All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Privoznik <mprivozn@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Cc: libvir-list@redhat.com
Subject: Re: [Qemu-devel] [libvirt] qapi DEVICE_DELETED event issued *before* instance_finalize?!
Date: Fri, 2 Sep 2016 06:31:33 +0200	[thread overview]
Message-ID: <5abeb25c-a8a9-9144-cb6f-724647c5f35a@redhat.com> (raw)
In-Reply-To: <20160901171148.697e696b@t450s.home>

On 02.09.2016 01:11, Alex Williamson wrote:
> Hey,
> 

> 
> It appears that DEVICE_DELETED only means the VM is done with the
> device but libvirt is interpreting it as QEMU is done with the device.
> Which is correct?  Do we need a new event or do we need to fix the
> ordering of this event?  An ordering fix would be more compatible with
> existing libvirt.  Thanks,

What an interesting race. I think the even should be sent only after
both guest and qemu are done with the device. Having two events looks
like too much granularity to me. I mean, even if libvirt learns that
guest has detached device, it still can't do anything until qemu clears
its internal state.

On the other hand, it is clearly documented that the DEVICE_DELETED
event is sent as soon as guest acknowledges completion of device
removal. So libvirt's buggy if we'd follow documentation strictly. But
then again, I don't see much information value in "guest has detached
device but qemu hasn't yet" event. Libvirt would ignore such event.

Michal

  reply	other threads:[~2016-09-02  4:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 23:11 [Qemu-devel] qapi DEVICE_DELETED event issued *before* instance_finalize?! Alex Williamson
2016-09-02  4:31 ` Michal Privoznik [this message]
2016-09-05  9:23   ` [Qemu-devel] [libvirt] " Markus Armbruster
2016-09-05  9:36     ` Paolo Bonzini
2016-09-06  1:05       ` Laine Stump
2016-09-06  2:18       ` Alex Williamson
2016-09-06 14:02         ` Laine Stump
2016-09-06 14:26           ` Paolo Bonzini
2016-09-06 14:25         ` 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=5abeb25c-a8a9-9144-cb6f-724647c5f35a@redhat.com \
    --to=mprivozn@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=libvir-list@redhat.com \
    --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 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.