From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDban-0004iA-Et for qemu-devel@nongnu.org; Fri, 30 Mar 2012 09:10:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDbai-00059C-Kq for qemu-devel@nongnu.org; Fri, 30 Mar 2012 09:10:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDbai-00058O-Cm for qemu-devel@nongnu.org; Fri, 30 Mar 2012 09:10:08 -0400 Date: Fri, 30 Mar 2012 10:10:11 -0300 From: Luiz Capitulino Message-ID: <20120330101011.60f02f8a@doriath.home> In-Reply-To: <4F74A213.6030908@redhat.com> References: <1333040202-11225-1-git-send-email-lcapitulino@redhat.com> <1333040202-11225-3-git-send-email-lcapitulino@redhat.com> <4F74A213.6030908@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] qapi: convert device_del List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: armbru@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com On Thu, 29 Mar 2012 11:55:31 -0600 Eric Blake wrote: > On 03/29/2012 10:56 AM, Luiz Capitulino wrote: > > Signed-off-by: Anthony Liguori > > Signed-off-by: Luiz Capitulino > > --- > > hmp-commands.hx | 3 +-- > > hmp.c | 9 +++++++++ > > hmp.h | 1 + > > hw/qdev-monitor.c | 18 +++++------------- > > qapi-schema.json | 20 ++++++++++++++++++++ > > qmp-commands.hx | 5 +---- > > 6 files changed, 37 insertions(+), 19 deletions(-) > > > +# @device_del: > > +# > > +# Remove a device from a guest > > +# > > +# @id: the name of the device > > +# > > +# Returns: Nothing on success > > +# If @id is not a valid device, DeviceNotFound > > +# If the device does not support unplug, BusNoHotplug > > +# > > +# Notes: When this command completes, the device may not be removed from the > > +# guest. Hot removal is an operation that requires guest cooperation. > > +# This command merely requests that the guest begin the hot removal > > +# process. > > Nothing against your patch itself, but is there any way we could enhance > things in future patches to actually notify the management app when the > guest has cooperated and the devices is actually removed? A new event > would be helpful, as well as a way to detect whether the new event > exists and should be waited for. To allow to query for the existence of the event, we need to add the 'event' type to the qapi and allow clients to query our schema. Maybe we could try it for 1.2. The 'device removed' event could be added now, but I think it's better to wait for the QOM refactoring because there might be better ways to do it.