xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tommi Airikka <tommi@airikka.net>
Cc: 810379@bugs.debian.org, xen-devel@lists.xen.org
Subject: Re: [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
Date: Wed, 27 Jan 2016 13:30:05 -0500	[thread overview]
Message-ID: <20160127183005.GB3134@char.us.oracle.com> (raw)
In-Reply-To: <CANQMFx4YULqKctKZqeESesTQjLQun7rQ0ZjGzq96TXTtUw6VWA@mail.gmail.com>

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.
?

       reply	other threads:[~2016-01-27 18:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANQMFx4YULqKctKZqeESesTQjLQun7rQ0ZjGzq96TXTtUw6VWA@mail.gmail.com>
2016-01-27 18:30 ` Konrad Rzeszutek Wilk [this message]
2016-01-30  2:13   ` [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices Marek Marczykowski-Górecki
2016-01-30 13:18   ` Tommi Airikka
2016-02-01 10:43     ` Ian Campbell
2016-02-01 14:50       ` Konrad Rzeszutek Wilk
2016-02-03 14:22         ` Marek Marczykowski-Górecki
2016-02-03 15:26           ` Konrad Rzeszutek Wilk
2016-02-08 17:39             ` Marek Marczykowski-Górecki
2016-02-09  4:59               ` Konrad Rzeszutek Wilk
2016-02-03 20:28     ` Konrad Rzeszutek Wilk
2016-02-04  9:37       ` Ian Campbell
2016-02-04 23:35         ` Tommi Airikka
2016-02-12 21:36           ` Konrad Rzeszutek Wilk
2016-02-12 21:53             ` Tommi Airikka
2016-01-23 16:12 Tommi Airikka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160127183005.GB3134@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=810379@bugs.debian.org \
    --cc=tommi@airikka.net \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).