From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvtzY-0007Xj-19 for qemu-devel@nongnu.org; Sun, 28 Mar 2010 11:01:32 -0400 Received: from [140.186.70.92] (port=49643 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvtzW-0007X8-84 for qemu-devel@nongnu.org; Sun, 28 Mar 2010 11:01:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvtzU-0004Te-KD for qemu-devel@nongnu.org; Sun, 28 Mar 2010 11:01:29 -0400 Received: from mail2.shareable.org ([80.68.89.115]:35865) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvtzU-0004TY-G6 for qemu-devel@nongnu.org; Sun, 28 Mar 2010 11:01:28 -0400 Date: Sun, 28 Mar 2010 16:01:26 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH 10/15] virtio-serial: Add QMP events for failed port/device add Message-ID: <20100328150126.GG3417@shareable.org> References: <20100325034717.GA23562@amit-x200.redhat.com> <20100325153406.69fbc717@redhat.com> <20100326011749.GE19308@shareable.org> <20100326020752.GH8111@amit-x200.redhat.com> <20100326040754.GU19308@shareable.org> <20100326045607.GJ8111@amit-x200.redhat.com> <20100326052325.GZ19308@shareable.org> <20100326134936.GF7039@amit-x200.redhat.com> <20100326144423.GA11626@shareable.org> <20100326145728.GH7039@amit-x200.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100326145728.GH7039@amit-x200.redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Luiz Capitulino , "Michael S. Tsirkin" , Gerd Hoffmann , qemu list , Juan Quintela Amit Shah wrote: > > Without this specific thing, which is an indicator that guest has lost > > state outside its control, the guest<->host communication is > > unreliable (even for things like "cut and paste"), so every app that > > cares has to implement a packet framing protocol with no binary data > > (to reserve an escaping byte), or with CRCs like > > PPP-over-virtio-serial, which is complicated and silly imho. If it > > were a real serial port, not emulated, that's the sort of thing apps > > would actually do (or use timeouts, which are more dubious in > > emulator-land). But I hope we're not that sadistic :-) > > I agree. So: ports have in-qemu users, they get guest_open / > guest_close callbacks and get data which they can pass on to external > apps. Looks like we're fine there? Provided the guest_open / guest_close callbacks are synchronous with the data - so that data sent/received following guest_open exactly matches what the guest sends/receives from its beginning, that internal interface looks fine to me. We can tidy up the chardev later as needed :-) -- Jamie > > *Inband* open/close indication aren't 100% guarantees of reliability, > > but I think they raise it to the point where an app can usefully count > > on it.