From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVgWZ-0002NP-Kd for qemu-devel@nongnu.org; Thu, 03 Apr 2014 08:13:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVgWS-0005kd-EU for qemu-devel@nongnu.org; Thu, 03 Apr 2014 08:13:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVgWS-0005kS-5B for qemu-devel@nongnu.org; Thu, 03 Apr 2014 08:13:32 -0400 Message-ID: <533D5065.9060308@redhat.com> Date: Thu, 03 Apr 2014 06:13:25 -0600 From: Eric Blake MIME-Version: 1.0 References: <533D23C0.8080408@huawei.com> In-Reply-To: <533D23C0.8080408@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RL4T8aIXvRSA9mWk22uCEt7Vu2ubJWPjb" Subject: Re: [Qemu-devel] Is it necessary to add a Monitor event of QEVENT_DEVICE_ADDED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xiexiangyou , qemu-devel@nongnu.org Cc: mst@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RL4T8aIXvRSA9mWk22uCEt7Vu2ubJWPjb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/03/2014 03:02 AM, xiexiangyou wrote: > Hi all, >=20 > 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 s= uch 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --RL4T8aIXvRSA9mWk22uCEt7Vu2ubJWPjb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTPVBlAAoJEKeha0olJ0NqGdsH/3Q2IISMzGqnjZBiJHfEX3Lg YO5M4XnDDQge09cGUJNKKMEPkEtuEYx8J4MKytIBMCohh4WTrKAbLC7+gIqGt2uD IX2PRdzab6UNF2hxfEbG12ocOESACFuw0Bib0mbkI7xTlbS+wvG9rBXz0hppyg5p +BHdIiQ91ryi2PgOYxGmgUTTA6UlxuiPtlwHWLE1W7jpf7rQIKBoBG+o16+tWIKJ GFF4INSUOsCodlxqZYsteVrbTBUjOltRapQaJXyBKoXeqyAqean34LlnL132LA5H BylFsUzZy3xUwExpeuu2TeuGi3gprYWIOwcJW2tw/aijmXfemSjjx24UcxFuZLM= =Dg/1 -----END PGP SIGNATURE----- --RL4T8aIXvRSA9mWk22uCEt7Vu2ubJWPjb--