From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUjFf-000267-No for qemu-devel@nongnu.org; Tue, 12 Jan 2010 11:05:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUjFa-0001xt-2S for qemu-devel@nongnu.org; Tue, 12 Jan 2010 11:05:50 -0500 Received: from [199.232.76.173] (port=32929 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUjFZ-0001xU-Oz for qemu-devel@nongnu.org; Tue, 12 Jan 2010 11:05:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:65181) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUjFZ-0008Ei-49 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 11:05:45 -0500 Date: Tue, 12 Jan 2010 21:34:34 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests Message-ID: <20100112160434.GC28039@amit-x200.redhat.com> References: <20100111083443.GA6061@amit-x200.redhat.com> <20100111104553.GA4746@shareable.org> <20100111110410.GA13658@amit-x200.redhat.com> <20100111233356.GB30714@shareable.org> <20100112071612.GB19438@amit-x200.redhat.com> <4B4C8EA4.9080106@codemonkey.ws> <20100112151315.GA28039@amit-x200.redhat.com> <4B4C996F.6030909@codemonkey.ws> <20100112154923.GB28039@amit-x200.redhat.com> <4B4C9B7D.8000604@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4C9B7D.8000604@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On (Tue) Jan 12 2010 [09:55:41], Anthony Liguori wrote: > On 01/12/2010 09:49 AM, Amit Shah wrote: >> On (Tue) Jan 12 2010 [09:46:55], Anthony Liguori wrote: >> >>> On 01/12/2010 09:13 AM, Amit Shah wrote: >>> >>>> On (Tue) Jan 12 2010 [09:00:52], Anthony Liguori wrote: >>>> >>>> >>>>> On 01/12/2010 01:16 AM, Amit Shah wrote: >>>>> >>>>> >>>>>> BTW I don't really want this too, I can get rid of it if everyone agrees >>>>>> we won't support clipboard writes> 4k over vnc or if there's a better >>>>>> idea. >>>>>> >>>>>> >>>>>> >>>>> Why bother trying to preserve message boundaries? I think that's the >>>>> fundamental question. >>>>> >>>>> >>>> For the vnc clipboard copy-paste case, I explained that in the couple of >>>> mails before in this thread. >>>> >>>> >>> It didn't make sense to me. I think the assumption has to be that the >>> client can send corrupt data and the host has to handle it. >>> >> You mean if the guest kernel sends the wrong flags? Or doesn't set the >> flags? Can you explain what scenario you're talking about? >> > > It's very likely that you'll have to implement some sort of protocol on > top of virtio-serial. It won't always just be simple strings. Yes, virtio-serial is just meant to be a transport agnostic of whatever data or protocols that ride over it. > If you have a simple datagram protocol, that contains two ints and a > string, it's going to have to be encoded like len>. You need to validate that len fits within the > boundaries and deal with len being less than the boundary. > > If you've got a command protocol where the you send the guest something > and then expect a response, you have to deal with the fact that the > guest may never respond. Having well defined message boundaries does > not help the general problem and it only helps in the most trivial cases. > > Basically, it boils down to a lot of complexity for something that isn't > going to be helpful in most circumstances. I don't know why you're saying virtio-serial-bus does (or needs to) do anything of this. Amit