From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>,
xen-devel@lists.xensource.com,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
"Wei Liu (Intern)" <wei.liu2@citrix.com>
Subject: Re: [PATCH for-4.5] reset PCI devices on force removal even when QEMU returns error
Date: Wed, 17 Dec 2014 16:07:39 -0500 [thread overview]
Message-ID: <20141217210739.GC1829@laptop.dumpdata.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1412151108370.30971@kaball.uk.xensource.com>
On Mon, Dec 15, 2014 at 11:13:06AM +0000, Stefano Stabellini wrote:
> On Fri, 12 Dec 2014, Konrad Rzeszutek Wilk wrote:
> > On Fri, Dec 12, 2014 at 04:13:52PM +0100, Sander Eikelenboom wrote:
> > > Hi Konrad,
> > >
> > > This doesn't seem to be applied yet, nor does it seem to have a release-(N)ACK
> > > from you ?
> >
> > Hm, Stefano:
> >
> > - Is this a regression?
>
> I don't think so. Probably a regression compared to the xend toolstack
> though.
OK, so that is Xen 4.4 -> Xen 4.5 regression then.
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thanks.
>
>
> > - What are the risks of this not going in? I presume that it just means
> > we haven't reset it in sysfs. But the xc_deassign_device operation
> > if not done will not affect the hypervisor - which will move the
> > device to dom0 upon guest teardown.
>
> The device becomes unusable until somebody manually resets it.
>
>
> > >
> > > --
> > > Sander
> > >
> > >
> > >
> > > Friday, November 28, 2014, 5:53:09 PM, you wrote:
> > >
> > > > On do_pci_remove when QEMU returns error, we just bail out early without
> > > > resetting the device. On domain shutdown we are racing with QEMU exiting
> > > > and most often QEMU closes the QMP connection before executing the
> > > > requested command.
> > >
> > > > In these cases if force=1, it makes sense to go ahead with rest of the
> > > > PCI device removal, that includes resetting the device and calling
> > > > xc_deassign_device. Otherwise we risk not resetting the device properly
> > > > on domain shutdown.
> > >
> > > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > >
> > > > diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
> > > > index 316643c..0ac0b93 100644
> > > > --- a/tools/libxl/libxl_pci.c
> > > > +++ b/tools/libxl/libxl_pci.c
> > > > @@ -1243,7 +1245,7 @@ static int do_pci_remove(libxl__gc *gc, uint32_t domid,
> > > > rc = ERROR_INVAL;
> > > > goto out_fail;
> > > > }
> > > > - if (rc) {
> > > > + if (rc && !force) {
> > > > rc = ERROR_FAIL;
> > > > goto out_fail;
> > > > }
> > >
> > >
> >
next prev parent reply other threads:[~2014-12-17 21:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 16:53 [PATCH for-4.5] reset PCI devices on force removal even when QEMU returns error Stefano Stabellini
2014-12-02 13:43 ` Ian Campbell
2014-12-02 15:09 ` Boris Ostrovsky
2014-12-12 15:13 ` Sander Eikelenboom
2014-12-12 16:50 ` Konrad Rzeszutek Wilk
2014-12-15 11:13 ` Stefano Stabellini
2014-12-17 21:07 ` Konrad Rzeszutek Wilk [this message]
2015-01-06 11:45 ` Ian Campbell
2015-01-06 14:02 ` Sander Eikelenboom
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=20141217210739.GC1829@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=linux@eikelenboom.it \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.