qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Is it necessary to add a Monitor event of QEVENT_DEVICE_ADDED
@ 2014-04-03  9:02 xiexiangyou
  2014-04-03 11:18 ` Michael S. Tsirkin
  2014-04-03 12:13 ` Eric Blake
  0 siblings, 2 replies; 3+ messages in thread
From: xiexiangyou @ 2014-04-03  9:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: mst

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.

Regards,
-xie

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Is it necessary to add a Monitor event of QEVENT_DEVICE_ADDED
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2014-04-03 11:18 UTC (permalink / raw)
  To: xiexiangyou; +Cc: qemu-devel

On Thu, Apr 03, 2014 at 05:02:56PM +0800, 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.
> 
> Regards,
> -xie

I don't know.
We have QEVENT_DEVICE_DELETED so libvirt doesn't do things like reuse
the slot.  But what would be the point of QEVENT_DEVICE_ADDED?

-- 
MST

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Is it necessary to add a Monitor event of QEVENT_DEVICE_ADDED
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2014-04-03 12:13 UTC (permalink / raw)
  To: xiexiangyou, qemu-devel; +Cc: mst

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-03 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).