From: David Gibson <david@gibson.dropbear.id.au>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Markus Armbruster <armbru@redhat.com>, Greg Kurz <groug@kaod.org>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.10 0/3] qdev/vfio: defer DEVICE_DEL to avoid races with libvirt
Date: Fri, 28 Jul 2017 13:14:43 +1000 [thread overview]
Message-ID: <20170728031443.GB3098@umbus.fritz.box> (raw)
In-Reply-To: <20170727084733.43038922@w520.home>
[-- Attachment #1: Type: text/plain, Size: 2106 bytes --]
On Thu, Jul 27, 2017 at 08:47:33AM -0600, Alex Williamson wrote:
> On Thu, 27 Jul 2017 20:53:48 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > On Thu, Jul 27, 2017 at 10:11:48AM +0100, Peter Maydell wrote:
> > > On 27 July 2017 at 02:30, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> > > > In particular, Mellanox CX4 adapters on PowerNV hosts might not be fully
> > > > quiesced by vfio-pci's finalize() routine until up to 6s after the
> > > > DEVICE_DELETED was emitted, leading to detach-device on the libvirt side pretty
> > > > much always crashing the host.
> > >
> > > My initial naive thought is that if the host kernel can crash then
> > > this is a host kernel bug... shouldn't the host kernel refuse
> > > the subsequent libvirt rebind if it would cause a crash ?
> >
> > I think so too, but I haven't been able to convince Alex. Nor
> > find time to fix it in the kernel myself.
>
> It's not me you need to convince, it's GregKH[1]. That interpretation
> is that the user bind request is a mandate and we'll fall over
> ourselves to try to do as they ask. I think the best I might be able
> to do is to kill the QEMU process to avoid compromising the kernel
> rather than killing the kernel after the isolation compromise has
> occurred. Messing with driver binding is a privileged operation, and
> the kernel believes you get to keep all the pieces when it fails.
> Sorry. Thanks,
Ah, my mistake. Well, I guess I'll whinge at GregKH at some point.
Anyway, the basic point remains - I still think we should address this
in the kernel, but that's not going to happen soon. So we're left
with addressing it in qemu and/or libvirt. And as others have pointed
out, there are reasons to do that even if the kernel does get changed
to protect itself better here.
>
> Alex
>
> [1] https://lkml.org/lkml/2017/7/10/728
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-07-28 3:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 1:30 [Qemu-devel] [PATCH for-2.10 0/3] qdev/vfio: defer DEVICE_DEL to avoid races with libvirt Michael Roth
2017-07-27 1:30 ` [Qemu-devel] [PATCH for-2.10 1/3] qdev: store DeviceState's canonical path to use when unparenting Michael Roth
2017-07-27 1:30 ` [Qemu-devel] [PATCH for-2.10 2/3] Revert "qdev: Free QemuOpts when the QOM path goes away" Michael Roth
2017-07-31 15:51 ` Greg Kurz
2017-07-31 16:39 ` Michael Roth
2017-07-31 17:10 ` Greg Kurz
2017-07-27 1:30 ` [Qemu-devel] [PATCH for-2.10 3/3] qdev: defer DEVICE_DEL event until instance_finalize() Michael Roth
2017-07-31 17:11 ` Greg Kurz
2017-08-09 14:04 ` Auger Eric
2017-10-07 0:03 ` Michael Roth
2017-07-27 9:11 ` [Qemu-devel] [PATCH for-2.10 0/3] qdev/vfio: defer DEVICE_DEL to avoid races with libvirt Peter Maydell
2017-07-27 10:53 ` David Gibson
2017-07-27 11:50 ` Daniel P. Berrange
2017-08-08 19:40 ` Alex Williamson
2017-08-09 5:08 ` David Gibson
2017-09-05 19:35 ` Greg Kurz
2017-07-27 11:54 ` Michael Roth
2017-07-27 14:47 ` Alex Williamson
2017-07-28 3:14 ` David Gibson [this message]
2017-08-09 14:53 ` Auger Eric
2017-10-03 22:21 ` Michael Roth
2017-10-04 6:01 ` David Gibson
2017-10-06 10:23 ` David Gibson
2017-10-06 12:31 ` Paolo Bonzini
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=20170728031443.GB3098@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=groug@kaod.org \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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).