From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [Linux-fbdev-devel] [PATCH] Add VirtIO Frame Buffer Support Date: Tue, 3 Nov 2009 00:24:15 +0100 Message-ID: <5B01907D-86BE-4693-81BA-23CB81B8B047@suse.de> References: <1257199759-2941-1-git-send-email-agraf@suse.de> <20091102223249.GC22301@localhost> Mime-Version: 1.0 (Apple Message framework v1076) Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed"; delsp="yes" To: Ondrej Zajicek Cc: linux-fbdev-devel@lists.sourceforge.net, qemu-devel , Anthony Liguori , kvm list On 02.11.2009, at 23:42, Alexander Graf wrote: > > Am 02.11.2009 um 23:32 schrieb Ondrej Zajicek > : > >> On Mon, Nov 02, 2009 at 11:09:19PM +0100, Alexander Graf wrote: >>> When we want to create a full VirtIO based machine, we're still >>> missing >>> graphics output. Fortunately, Linux provides us with most of the >>> frameworks >>> to render text and everything, we only need to implement a >>> transport. >>> >>> So this is a frame buffer backend written for VirtIO. Using this >>> and my >>> patch to qemu, you can use paravirtualized graphics. >> >> Just a note: it might be useful to allow paravirtualized graphics to >> handle text mode. In that case, it can be done in fbdev layer using >> tileblit operations. > > Is there any real driver implementing this already? I'd prefer to copy > from working code instead of writing my own :-). > > Also, we still need to keep the local frame buffer copy in sync so we > can mmap and read from it, right? So it's not really worth it > probably... But then again we could just try to be closer to a real graphics card. What if we'd set up a memory region on the host that is basically our graphics frame buffer? For S390 we could just append the graphics memory to the guest's memory. We could use that as backing buffer in the qemu graphics frontend and as frame buffer in the Linux fbdev layer, similar to what real graphics cards set up. Then we could send all those fancy commands that we have already over to the host, that renders them and thanks to the mapping have a consistent frame buffer we can mmap. It'd even simplify the deferred IO stuff, making it basically a notify that something changed, but the changes already being written to the frame buffer. On sync we'd just have to make sure the virtio buffer was processed completely. That would get rid of all sys_* calls, a lot of copying and the duplicate frame buffer we have right now. Wow. Alex From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N56G9-0003Fv-9Z for qemu-devel@nongnu.org; Mon, 02 Nov 2009 18:24:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N56G4-0003Do-Ff for qemu-devel@nongnu.org; Mon, 02 Nov 2009 18:24:24 -0500 Received: from [199.232.76.173] (port=35207 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N56G3-0003Dj-QE for qemu-devel@nongnu.org; Mon, 02 Nov 2009 18:24:19 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33118 helo=mx2.suse.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N56G3-0002KD-9w for qemu-devel@nongnu.org; Mon, 02 Nov 2009 18:24:19 -0500 Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Alexander Graf In-Reply-To: Date: Tue, 3 Nov 2009 00:24:15 +0100 Content-Transfer-Encoding: 7bit Message-Id: <5B01907D-86BE-4693-81BA-23CB81B8B047@suse.de> References: <1257199759-2941-1-git-send-email-agraf@suse.de> <20091102223249.GC22301@localhost> Subject: [Qemu-devel] Re: [Linux-fbdev-devel] [PATCH] Add VirtIO Frame Buffer Support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ondrej Zajicek Cc: linux-fbdev-devel@lists.sourceforge.net, qemu-devel , kvm list On 02.11.2009, at 23:42, Alexander Graf wrote: > > Am 02.11.2009 um 23:32 schrieb Ondrej Zajicek > : > >> On Mon, Nov 02, 2009 at 11:09:19PM +0100, Alexander Graf wrote: >>> When we want to create a full VirtIO based machine, we're still >>> missing >>> graphics output. Fortunately, Linux provides us with most of the >>> frameworks >>> to render text and everything, we only need to implement a >>> transport. >>> >>> So this is a frame buffer backend written for VirtIO. Using this >>> and my >>> patch to qemu, you can use paravirtualized graphics. >> >> Just a note: it might be useful to allow paravirtualized graphics to >> handle text mode. In that case, it can be done in fbdev layer using >> tileblit operations. > > Is there any real driver implementing this already? I'd prefer to copy > from working code instead of writing my own :-). > > Also, we still need to keep the local frame buffer copy in sync so we > can mmap and read from it, right? So it's not really worth it > probably... But then again we could just try to be closer to a real graphics card. What if we'd set up a memory region on the host that is basically our graphics frame buffer? For S390 we could just append the graphics memory to the guest's memory. We could use that as backing buffer in the qemu graphics frontend and as frame buffer in the Linux fbdev layer, similar to what real graphics cards set up. Then we could send all those fancy commands that we have already over to the host, that renders them and thanks to the mapping have a consistent frame buffer we can mmap. It'd even simplify the deferred IO stuff, making it basically a notify that something changed, but the changes already being written to the frame buffer. On sync we'd just have to make sure the virtio buffer was processed completely. That would get rid of all sys_* calls, a lot of copying and the duplicate frame buffer we have right now. Wow. Alex