All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: George Dunlap <george.dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Jan Beulich <jbeulich@suse.com>,
	xenbugs <xen@bugs.xenproject.org>
Subject: Re: xl pci-detach vs xm pci-detach in Xen 4.3 (one works, the other does not)
Date: Mon, 10 Jun 2013 16:24:56 -0400	[thread overview]
Message-ID: <20130610202456.GA17822@phenom.dumpdata.com> (raw)
In-Reply-To: <51B5D46B.4010200@eu.citrix.com>

On Mon, Jun 10, 2013 at 02:28:11PM +0100, George Dunlap wrote:
> On 10/06/13 14:20, Konrad Rzeszutek Wilk wrote:
> >On Mon, Jun 10, 2013 at 12:12:47PM +0100, George Dunlap wrote:
> >>create ^
> >>title it xl pci-detach failure
> >>thanks
> >>
> >>On Fri, Jun 7, 2013 at 4:45 PM, Konrad Rzeszutek Wilk
> >><konrad.wilk@oracle.com> wrote:
> >>>any thoughts? I don't know if this is a regression or not, but the
> >>>libxl errors are pointing me to the recent XSA issue - which I thought
> >>>was fixed?
> >>I think the recent issue was with xend not working.  Did we fix send
> >>and break xl?
> >Could be. It might also be that that 'xl' never did it the same way
> >as 'xend' (meaning this might be a XenBus teardown change).
> >
> >Note also that this is PV guests - and I think most of the testing
> >had been with the HVM guests with PCI passthrough. So it might be a
> >seperate issue altogether. Or that nobody tried doing PCI plug/unplug
> >in the past :-(
> 
> I certainly did before my February FOSDEM talk that included driver domains.
> 
> >
> >>In any case, this is a pretty important feature; I think we need to
> >>sort it out before release, so I'm giving it a bug id to track.
> >>
> >>Is "pci permissive" set in the global xl.conf file?
> >No. Let me of course try that.
> 
> That really should have to do with getting it working in the first
> place, not detaching it; but still...
> 
> >>Have you tried this with say, a stock Debian Wheezy kernel?
> >No. A v3.10-rc4 with Xen 4.3 latest.
> >
> >Is Debian Wheezy a 2.6.32 kernel?
> 
> No, 3.2.

I figured it out. It is the XenBus states.


The 'xm' for pci-detach would do:
 4(Connected)->7(Reconfiguring)-> 8(Reconfigured)-> 4(Connected)->5(Closing).

While 'xl' does:
 4(Connected)->7(Reconfiguring)-> 8(Reconfigured)-> 4(Connected)

That means the xen-pcifront never gets told that the connection is going to
be removed and can do its cleanup.

Without the cleanup it fails at the 3->4(Connected) change state:

[  151.403112] pcifront pci-0: publishing successful!
[  151.404313] pcifront pci-0: backend new state: 2 (old state:3)!
[  151.406160] pcifront pci-0: backend new state: 3 (old state:3)!
[  151.407287] pcifront pci-0: backend new state: 4 (old state:3)!
[  151.407463] pcifront pci-0: PCI frontend already installed!
===> [  151.407474] pcifront pci-0: 17 Error setting up PCI Frontend <=====
[  151.407680] pcifront pci-0: failed to write error node for device/pci/0 (17 Error setting up PCI Frontend) ret: -13
[  151.410502] pcifront pci-0: backend new state: 5 (old state:5)!
[  151.410509] pcifront pci-0: backend going away!

B/c the 'PCI frontend already installed' check has been hit (new in 3.7)
and would never progress further (see git commit
3d925320e9e2de162bd138bf97816bda8c3f71be - xen/pcifront: Use Xen-SWIOTLB when initting if required.)


This looks like an OK protocol change so I am inclined to say the Xen pcifront
needs a bit more checking. Sending patches for that shortly.

  parent reply	other threads:[~2013-06-10 20:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 15:45 xl pci-detach vs xm pci-detach in Xen 4.3 (one works, the other does not) Konrad Rzeszutek Wilk
2013-06-10 11:12 ` George Dunlap
2013-06-10 11:15   ` Processed: " xen
2013-06-10 13:20   ` Konrad Rzeszutek Wilk
2013-06-10 13:28     ` George Dunlap
2013-06-10 13:30       ` Processed: " xen
2013-06-10 20:24       ` Konrad Rzeszutek Wilk [this message]
2013-06-10 20:30         ` xen
     [not found]           ` <20131104202224.GA18449@phenom.dumpdata.com>
2013-11-04 20:30             ` Processed: " xen
2013-11-04 20:39               ` Wei Liu
2013-11-04 20:45                 ` Processed: " xen
2013-06-10 21:06         ` Konrad Rzeszutek Wilk
2013-06-10 21:06           ` (unknown), Konrad Rzeszutek Wilk
2013-06-10 21:06           ` [PATCH] xen/pci: Deal with toolstack missing an 'XenbusStateClosing' Konrad Rzeszutek Wilk
2013-06-11  7:29             ` Jan Beulich
2013-06-11  7:29             ` [Xen-devel] " Jan Beulich
2013-06-11  9:00               ` George Dunlap
2013-06-11  9:00               ` [Xen-devel] " George Dunlap
2013-06-11 13:03                 ` konrad wilk
2013-06-11 13:03                 ` konrad wilk
2013-06-11 15:36             ` George Dunlap
2013-06-11 15:36               ` George Dunlap
2013-06-11 16:08               ` konrad wilk
2013-06-11 16:17                 ` George Dunlap
2013-06-11 16:17                   ` George Dunlap
2013-06-11 16:24                   ` konrad wilk
2013-06-12 13:45                   ` Konrad Rzeszutek Wilk
2013-06-12 13:47                     ` George Dunlap
2013-06-12 13:47                       ` George Dunlap
2013-06-12 14:27                       ` Konrad Rzeszutek Wilk
2013-06-12 17:28                     ` Bjorn Helgaas
2013-06-14 16:28                       ` Konrad Rzeszutek Wilk
2013-11-04 20:43                       ` Konrad Rzeszutek Wilk
2013-11-04 20:56                         ` Ben Guthro
     [not found]                           ` <20131104205917.GA18696@phenom.dumpdata.com>
2013-11-04 21:15                             ` Processed: " xen
2013-06-10 13:30     ` Processed: Re: xl pci-detach vs xm pci-detach in Xen 4.3 (one works, the other does not) xen

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=20130610202456.GA17822@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xen@bugs.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.