From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mhjpv-0006CV-0S for qemu-devel@nongnu.org; Sun, 30 Aug 2009 08:48:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mhjpp-0006Bl-Hd for qemu-devel@nongnu.org; Sun, 30 Aug 2009 08:48:45 -0400 Received: from [199.232.76.173] (port=51277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mhjpp-0006Ba-Bp for qemu-devel@nongnu.org; Sun, 30 Aug 2009 08:48:41 -0400 Received: from mail-yw0-f195.google.com ([209.85.211.195]:47234) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mhjpp-0001Yp-1U for qemu-devel@nongnu.org; Sun, 30 Aug 2009 08:48:41 -0400 Received: by ywh33 with SMTP id 33so4832616ywh.18 for ; Sun, 30 Aug 2009 05:48:39 -0700 (PDT) Message-ID: <4A9A7525.6010707@codemonkey.ws> Date: Sun, 30 Aug 2009 07:48:37 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1251181044-3696-1-git-send-email-amit.shah@redhat.com> <20090826112718.GA11117@amit-x200.redhat.com> <4A980D18.30106@codemonkey.ws> <20090830101057.GB32563@amit-x200.redhat.com> In-Reply-To: <20090830101057.GB32563@amit-x200.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: Extending virtio_console to support multiple ports List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Amit Shah wrote: > I did think about that as well, but there are problems: > > - vnc clients (at least tigervnc) wants to receive the entire clipboard > in a single flush command. So in the pre-allocated buffers scenario we > could run short of the available buffers in some cases. So there will > have to be a flag with each buffer that says 'there's more data > pending for this particular write' which will have to be passed on to > qemu and qemu will then flush it once it receives all the data > No flags, assume it's a streaming protocol and don't assume anything about message sizes. IOW, when you send clipboard data, send size and then the data. QEMU consumes bytes until it reaches size. > - A lock has to be introduced to fetch one unused buffer from the list > and pass it on to the host. And this lock has to be a spinlock, just > because writes can be called from irq context. > I don't see a problem here. Regards, Anthony Liguori > Amit >