From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuyzG-0007Wk-H1 for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:09:26 -0400 Received: from [140.186.70.92] (port=58597 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuyzE-0007Vj-B7 for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:09:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuyzC-0000f0-GQ for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:09:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27146) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuyzC-0000es-5J for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:09:22 -0400 Date: Fri, 26 Mar 2010 07:37:52 +0530 From: Amit Shah Subject: Re: [Qemu-devel] Re: [PATCH 10/15] virtio-serial: Add QMP events for failed port/device add Message-ID: <20100326020752.GH8111@amit-x200.redhat.com> References: <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> <20100324173415.63e31bd0@redhat.com> <20100325034717.GA23562@amit-x200.redhat.com> <20100325153406.69fbc717@redhat.com> <20100326011749.GE19308@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100326011749.GE19308@shareable.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu list , Juan Quintela , "Michael S. Tsirkin" , Gerd Hoffmann , Luiz Capitulino On (Fri) Mar 26 2010 [01:17:49], Jamie Lokier wrote: > Luiz Capitulino wrote: > > On Thu, 25 Mar 2010 09:17:17 +0530 > > Amit Shah wrote: > > > > > On (Wed) Mar 24 2010 [17:34:15], 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. > > > > > > > > I'm completely unfamiliar with virtio-serial, so let me ask: how are ports > > > > added? I'd expect the command performing this operation to fail in this case. > > > > > > If adding the port fails in qemu, then the command will fail. However if > > > adding the port in the guest fails, we raise this QMP event. Adding in > > > the guest could fail because of several reasons, like ENOMEM. In this > > > case, the mgmt might want to hot-unplug the port from qemu so that > > > resources are freed and also apps are notified of guest side not ready. > > > > Ok, what about a disconnect? Does virtio-serial have this kind of action? > > Disconnect would be valuable. E.g. if the guest app dies (but not the > guest kernel), it won't get a chance to send an "I'm going away" > message. That's something applications should be able to handle: If an app on the guest dies, the app on the host should be able to discover this. In any case, we have 'open' and 'close' notifications where we trigger callbacks for the applications if they're interested in such events. This only works for in-qemu apps, though, so I'm OK with adding a QMP event for this as well. > Machine reboot, PCI reset and so on, should probably trigger a All these messages belong to other subsystems, not virtio-serial. Eg, libvirt or other mgmt app should know that a reset event, when received, affects virtio ports as well. Similar for pci events. Amit