From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpmpg-00005W-A8 for qemu-devel@nongnu.org; Tue, 24 Jan 2012 15:19:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rpmao-0000C2-LP for qemu-devel@nongnu.org; Tue, 24 Jan 2012 15:03:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpmao-0000BO-D1 for qemu-devel@nongnu.org; Tue, 24 Jan 2012 15:03:46 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0OK3i9r002783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 24 Jan 2012 15:03:44 -0500 Message-ID: <4F1F0E9F.8080302@redhat.com> Date: Tue, 24 Jan 2012 13:03:43 -0700 From: Eric Blake MIME-Version: 1.0 References: <20120124161628.4bf2592c@doriath.home> In-Reply-To: <20120124161628.4bf2592c@doriath.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD64CC4063C5D5E03695BF471" Subject: Re: [Qemu-devel] [PATCH] qmp: add BLOCK_MEDIUM_EJECT event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Kevin Wolf , qemu-devel , Markus Armbruster This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD64CC4063C5D5E03695BF471 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 01/24/2012 11:16 AM, Luiz Capitulino wrote: > Libvirt wants to be notified when the guest ejects a medium, so that > it can update its view of the guest. >=20 > This code has been originally written by Daniel Berrange. It adds > the event to IDE and SCSI emulation. >=20 > Please, note that this only covers guest initiated ejects, that's, > the QMP/HMP commands 'eject' and 'change' are not covered. >=20 > Signed-off-by: Luiz Capitulino Reviewed-by: Eric Blake > =20 > +BLOCK_MEDIUM_EJECT > +------------------ > + > +Emitted when the guest succeeds ejecting a medium. If the device has a= tray, s/succeeds ejecting/succeeds at ejecting/ Since libvirt is also tracking whether it makes 'eject' and 'change' monitor commands, and can also do a query when reconnecting to the monitor after a libvirtd restart to see if state changed in the meantime (when an event was lost), this should be sufficient for libvirt to have an accurate picture of the device state. I do have to wonder, however, if we also need an event for when the guest initiates a tray lock or tray unlock event, in order to track whether plain eject will work or whether a forced eject to override the tray lock would be required. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigD64CC4063C5D5E03695BF471 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.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPHw6fAAoJEKeha0olJ0Nqf/EH/iIjtfTlFdCCkE2TunLWUtb3 UDqfcOx3JzOV66c7Mf0oZt+4JTSieQknbCKbV9QlWYYfwjnpfkUKddXPQejIoC49 w8XaGmXReVSC0ifIT45gxte3QPq2DqxFczHXEA5HLfiCR9QJZ0fFEX+HN/py18j0 7M9DsXWxHICkdJs/oDh6rbuKzbgDz088mcyJeIjisr9N0NR4QvoVm6iMCotXvlTj nFyiHM5WOpGH9r7ZaGLWtSeOUh1sIq2nnZwf4XEtm2DnXi5dFus9rGToMRJpTSy1 sbe1Hp07Fp81jicYfgToDqf2MfKl586r8ek6n3IJRSmWjYj5fofhTjvRnray+nE= =TYTR -----END PGP SIGNATURE----- --------------enigD64CC4063C5D5E03695BF471--