[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices



On Sat, Jan 23, 2016 at 05:12:04PM +0100, Tommi Airikka wrote:
> Xen developers,
> 
> After an upgrade of my Debian Jessie dom0 and domUs, my passthroughed
> NIC stopped working.
> This bug was probably introduced in Debian Jessie sometime
> between 2015-12-30 and 2016-01-08 as 2015-12-30 as 2015-12-30 was the
> last time I upgraded without any problems according to my dpkg.log.

This upgrade looks to only have upgraded the hypervisor?

As in I see:

domU "bug" "uname -a":
Linux bug 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02)
x86_64 GNU/Linux

domU "working" "uname -a":
Linux working 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2
(2016-01-02) x86_64 GNU/Linux

So same version? What was the earlier version of the hypervisor?

The Xen version you have says:
> (XEN) I/O virtualisation disabled

Which is not very healthy for PCI passthrough. Albeit you can do
it with PV without IOMMU. Did the previous version of Xen have the same
message?

Looking at the code (in Linux) I see:
 516         /* NB. We are happy to share unless we are probing. */
 517         bind_pirq.flags = info->u.pirq.flags & PIRQ_SHAREABLE ?
 518                                         BIND_PIRQ__WILL_SHARE : 0;
 519         rc = HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, &bind_pirq);
 520         if (rc != 0) {
 521                 pr_warn("Failed to obtain physical IRQ %d\n", irq);
 522                 return 0;
 523         }

It would be nice if I we had included the return code :-(

Anyhow for PV guests in the hypervisor there is a check:
 414     if ( !is_hvm_domain(d) && !pirq_access_permitted(d, pirq) )
 415         return -EPERM;
 416 

And I wonder if the XEN_DOMCTL_irq_permission aka, xc_domain_irq_permission
had been called. I remember that at some point we missed it for Xend..

Could you enable Xend debugging (if you are using that):

export XEND_DEBUG=1
/etc/init.d/xend start

And try starting the guest. Then grep in /var/log/xen/xend.log for
"pci: enabling irq "

You should see 18, 17 and 21.

Also if you do 'xl debug-keys i && xl dmesg'

You should see that the IRQ 17, 18, 21 are assigned to the domain.
?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.