From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUj5x-0001Gv-3v for qemu-devel@nongnu.org; Tue, 12 Jan 2010 10:55:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUj5t-0001Fl-1l for qemu-devel@nongnu.org; Tue, 12 Jan 2010 10:55:48 -0500 Received: from [199.232.76.173] (port=56284 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUj5s-0001Fg-MK for qemu-devel@nongnu.org; Tue, 12 Jan 2010 10:55:44 -0500 Received: from mail-qy0-f189.google.com ([209.85.221.189]:55149) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUj5s-0004h1-8B for qemu-devel@nongnu.org; Tue, 12 Jan 2010 10:55:44 -0500 Received: by qyk27 with SMTP id 27so10072510qyk.20 for ; Tue, 12 Jan 2010 07:55:43 -0800 (PST) Message-ID: <4B4C9B7D.8000604@codemonkey.ws> Date: Tue, 12 Jan 2010 09:55:41 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests References: <20100108050351.GB8999@amit-x200.redhat.com> <20100108133503.GA19328@shareable.org> <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> In-Reply-To: <20100112154923.GB28039@amit-x200.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org 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. If you have a simple datagram protocol, that contains two ints and a string, it's going to have to be encoded like . 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. Regards, Anthony Liguori > Amit >