qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: xiexiangyou <xiexiangyou@huawei.com>, qemu-devel@nongnu.org
Cc: mst@redhat.com
Subject: Re: [Qemu-devel] Is it necessary to add a Monitor event of QEVENT_DEVICE_ADDED
Date: Thu, 03 Apr 2014 06:13:25 -0600	[thread overview]
Message-ID: <533D5065.9060308@redhat.com> (raw)
In-Reply-To: <533D23C0.8080408@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

On 04/03/2014 03:02 AM, xiexiangyou wrote:
> Hi all,
> 
>    As we know, when hot-add a device, we don't know whether the device is present in VM from outside(like libvirt).
> However, unplugging device, when complete remove the device, Qemu will generate a Monitor event,QEVENT_DEVICE_DELETED.
> Libvirt can receive the event and do something.
>    So is it necessary to add a Monitor event of completing add device such as QEVENT_DEVICE_ADDED.

DEVICE_DELETED is important because the operation is still underway even
after the initial monitor command returns control to libvirt, because
there is guest interaction involved.  But for hotplug, the monitor
command doesn't return until the action is complete, and no guest
interaction is required to know that the action was completed; so I
don't see the use case for an event.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      parent reply	other threads:[~2014-04-03 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03  9:02 [Qemu-devel] Is it necessary to add a Monitor event of QEVENT_DEVICE_ADDED xiexiangyou
2014-04-03 11:18 ` Michael S. Tsirkin
2014-04-03 12:13 ` Eric Blake [this message]

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=533D5065.9060308@redhat.com \
    --to=eblake@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiexiangyou@huawei.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 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).