From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq2mG-0003le-I3 for qemu-devel@nongnu.org; Wed, 25 Jan 2012 08:20:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq2mA-0005sI-HE for qemu-devel@nongnu.org; Wed, 25 Jan 2012 08:20:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq2mA-0005rw-A4 for qemu-devel@nongnu.org; Wed, 25 Jan 2012 08:20:34 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0PDKWij012367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Jan 2012 08:20:32 -0500 Message-ID: <4F20026B.4020801@redhat.com> Date: Wed, 25 Jan 2012 14:23:55 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <20120124161628.4bf2592c@doriath.home> <4F1F0E9F.8080302@redhat.com> <4F1FC030.2030705@redhat.com> <20120125104204.55eec0a1@doriath.home> In-Reply-To: <20120125104204.55eec0a1@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Eric Blake , qemu-devel , Markus Armbruster Am 25.01.2012 13:42, schrieb Luiz Capitulino: > On Wed, 25 Jan 2012 09:41:20 +0100 > Kevin Wolf wrote: > >> Am 24.01.2012 21:03, schrieb Eric Blake: >>> 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. >>>> >>>> This code has been originally written by Daniel Berrange. It adds >>>> the event to IDE and SCSI emulation. >>>> >>>> Please, note that this only covers guest initiated ejects, that's, >>>> the QMP/HMP commands 'eject' and 'change' are not covered. >> >> What's the reason for this behaviour? It feels inconsistent. > > I don't think it's inconsistent because we're limiting it to guest initiated > actions. Also, the mngt app knows when it sends a 'eject' or 'change' command. Yes, management shouldn't need an event in order to see what it just did itself. I haven't really looked at the code yet, but what I want to avoid is that we have to pass a flag all the way through qemu just so we don't send an event in the end. This might not be the case today, but after some more cleanup of the code it might just turn out like this. > The exception is if it allows HMP to run in parallel with QMP, but I don't think > this is recommended (at least not for commands that change any VM state). Or QMP passthrough. It would be very nice to support these scenarios one day. Probably not top priority, but we don't need to actively prevent such events from being generated. > That said, I'm not necessarily against covering all cases. It just doesn't > seem necessary to me. > >> Also, I seem to remember that once we had discussed some kind of a "tray >> status (open/closed) changed" event, which would be more generic. > > Yes, but my old series got complex and way beyond the original event. If we > decide to cover all eject scenarios, I'd like to do it w/o adding new commands. I don't really remember. Were it problems with the design of a tray status event or were you sidetracked by other problems? Kevin