From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUI5L-0007iN-EG for qemu-devel@nongnu.org; Mon, 11 Jan 2010 06:05:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUI5G-0007fc-Dz for qemu-devel@nongnu.org; Mon, 11 Jan 2010 06:05:22 -0500 Received: from [199.232.76.173] (port=49286 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUI5G-0007fW-8V for qemu-devel@nongnu.org; Mon, 11 Jan 2010 06:05:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53071) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUI5F-0005M3-Kr for qemu-devel@nongnu.org; Mon, 11 Jan 2010 06:05:17 -0500 Date: Mon, 11 Jan 2010 16:34:10 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 5/8] virtio-serial-bus: Add support for buffering guest output, throttling guests Message-ID: <20100111110410.GA13658@amit-x200.redhat.com> References: <1262849506-27132-6-git-send-email-amit.shah@redhat.com> <20100108011231.GA5011@shareable.org> <20100108050351.GB8999@amit-x200.redhat.com> <20100108133503.GA19328@shareable.org> <20100111083443.GA6061@amit-x200.redhat.com> <20100111104553.GA4746@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100111104553.GA4746@shareable.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel@nongnu.org On (Mon) Jan 11 2010 [10:45:53], Jamie Lokier wrote: > Amit Shah wrote: > > On (Fri) Jan 08 2010 [13:35:03], Jamie Lokier wrote: > > > Since VNC is clearly designed to work over TCP, and is written by > > > people who know this, I'm wondering why you think it needs to be > > > different for virtio-serial. > > > > For vnc putting stuff from a guest clipboard into vnc client clipboard > > using the ServerCutText command, the entire buffer has to be provided > > after sending the command and the 'length' values. > > Are you talking about a VNC protocol command between qemu's VNC server > and the user's VNC client, or a private protocol between the guest and > qemu's VNC server? What happens is: 1. Guest puts something on its clipboard 2. An agent on the guest gets notified of new clipboard contents 3. This agent sends over the entire clipboard contents to qemu via virtio-serial 4. virtio-serial sends off this data to the virtio-serial-vnc code 5. ServerCutText message from the vnc backend is sent to the vnc client 6. vnc client's clipboard gets updated 7. You can see guest's clipboard contents in your client's clipboard. I'm talking about steps 3, 4, 5 here. > > In this case, if the data from guest arrives in multiple packets, we > > really don't want to call into the write function multiple times. A > > single clipboard entry has to be created in the client with the entire > > contents, so a single write operation has to be invoked. > > Same question again: *Why do you think the VNC server (in qemu) needs to > see the entire clipboard in a aingle write from the guest?* > > You have already told it the total length to expect. There is no > ambiguity about where it ends. Where does the total length come from? It has to come from the guest. Otherwise, the vnc code will not know if a byte stream contains two separate clipboard entries or just one huge clipboard entry. Earlier, I used to send the length of one write as issued by a guest to qemu. I just changed that to send a START and END flag so that I don't have to send the length. If this doesn't explain it, then I think we're not understanding each other here. Amit