From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nv9Mg-0006AK-Gu for qemu-devel@nongnu.org; Fri, 26 Mar 2010 09:14:18 -0400 Received: from [140.186.70.92] (port=55278 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nv9Mf-00066d-32 for qemu-devel@nongnu.org; Fri, 26 Mar 2010 09:14:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nv9Md-0000TX-6X for qemu-devel@nongnu.org; Fri, 26 Mar 2010 09:14:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11786) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nv9Ma-0000T0-KQ for qemu-devel@nongnu.org; Fri, 26 Mar 2010 09:14:15 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2QDEAOk009921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 26 Mar 2010 09:14:10 -0400 Date: Fri, 26 Mar 2010 10:14:02 -0300 From: Luiz Capitulino Message-ID: <20100326101402.02e3fffb@redhat.com> In-Reply-To: <20100326021628.GI8111@amit-x200.redhat.com> References: <1269442173-18421-3-git-send-email-amit.shah@redhat.com> <1269442173-18421-4-git-send-email-amit.shah@redhat.com> <1269442173-18421-5-git-send-email-amit.shah@redhat.com> <1269442173-18421-6-git-send-email-amit.shah@redhat.com> <1269442173-18421-7-git-send-email-amit.shah@redhat.com> <1269442173-18421-8-git-send-email-amit.shah@redhat.com> <1269442173-18421-9-git-send-email-amit.shah@redhat.com> <1269442173-18421-10-git-send-email-amit.shah@redhat.com> <1269442173-18421-11-git-send-email-amit.shah@redhat.com> <20100325155541.570f817d@redhat.com> <20100326021628.GI8111@amit-x200.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 10/15] virtio-serial: Add QMP events for failed port/device add List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Juan Quintela , Gerd Hoffmann , qemu list , "Michael S. Tsirkin" On Fri, 26 Mar 2010 07:46:28 +0530 Amit Shah wrote: > On (Thu) Mar 25 2010 [15:55:41], Luiz Capitulino wrote: > > On Wed, 24 Mar 2010 20:19:28 +0530 > > Amit Shah wrote: > > > > > When adding a port or a device to the guest fails, management software > > > might be interested in knowing and then cleaning up the host-side of the > > > port. Introduce QMP events to signal such errors. > > > > > > Signed-off-by: Amit Shah > > > CC: Luiz Capitulino > > > --- > > > QMP/qmp-events.txt | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ > > > hw/virtio-serial-bus.c | 15 +++++++++++++++ > > > monitor.c | 3 +++ > > > monitor.h | 1 + > > > 4 files changed, 67 insertions(+), 0 deletions(-) > > > > > > diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt > > > index a94e9b4..f13cf45 100644 > > > --- a/QMP/qmp-events.txt > > > +++ b/QMP/qmp-events.txt > > > @@ -188,3 +188,51 @@ Example: > > > > > > Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is > > > followed respectively by the RESET, SHUTDOWN, or STOP events. > > > + > > > +VIRTIO_SERIAL > > > +------------- > > > > It should be VIRTIO_SERIAL_ADD. > > What about other events that VIRTIO_SERIAL generates? We don't address this problem currently, maybe an integration with qdev will do, but I have to think more about it. > Should they have a different event by themselves? With the current code, yes. But would be good to avoid it until we have a proper solution. > Or should they ride on top of VIRTIO_SERIAL and mention different > 'operations' that caused the event? I'd prefer having a different name if it's a different event, at least this is how we've done it so far. > > > + > > > +- "result": The result of the operation {json-string} > > > + This is one of the following: > > > + "pass", "fail" > > > > "result" could be a boolean "success". > > OK; success/fail? Also, by boolean, do you mean the data type? How is > that represented? In JSON it's true/false. In our parser you can use '%i' with integers, undocumented, yes, sorry for that.