Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GlPnD-0002IP-GJ for qemu-devel@nongnu.org; Sat, 18 Nov 2006 07:59:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GlPnB-0002DQ-8k for qemu-devel@nongnu.org; Sat, 18 Nov 2006 07:59:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlPnB-0002D6-3N for qemu-devel@nongnu.org; Sat, 18 Nov 2006 07:59:33 -0500 Received: from [212.247.154.108] (helo=swip.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GlPnB-0002Ru-3E for qemu-devel@nongnu.org; Sat, 18 Nov 2006 07:59:33 -0500 From: Even Rouault Subject: Re: [Qemu-devel] [PATCH] Experimental initial patch providing accelerated OpenGL for Linux i386 (2nd attempt to post) Date: Sat, 18 Nov 2006 13:59:24 +0100 References: <200611162134.48783.even.rouault@mines-paris.org> <455CE92F.2000100@bellard.org> In-Reply-To: <455CE92F.2000100@bellard.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200611181359.25068.even.rouault@mines-paris.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Le Jeudi 16 Novembre 2006 23:41, vous avez =E9crit=A0: > My main remark is that the host/guest communication system must be > changed and I can help you to implement it. I would prefer to use a PCI > device and to avoid any i386 dependent code. For the PCI device, using > the Bochs VGA adapter could be a possible idea. All the parameters and > data should be transmitted as if the PCI device was doing DMA. A single > I/O port could be used to start executing a list of OpenGL commands. Hi, I would indeed appreciate help, or at least some pointers to start in the=20 direction you propose, as I know hardly anything about hardware programming= ,=20 such as PCI, memory mapped region, DMA, etc... So my questions may sound ve= ry=20 naive. As you stated, the current solution is i386 dependent, but this dependancy = is=20 very thin, so I imagined that it should possible to find equivalent of the= =20 current int 0x99 trap for other architectures. Apart from portability to other architectures, what would be the other=20 advantages of a solution based on a PCI device ? Better security ? Better=20 performance when KQEMU is enabled ? I've looked at vga.c and I've the feeling that with=20 cpu_register_io_memory/cpu_register_physical_memory you can install callba= ck=20 functions that will intercept reads/writes to a range of the physical memor= y=20 of the target machine. Am I right ?=20 But I don't see how the replacement libGL can read/write physical memory fr= om=20 a userland process. I suppose it needs some special priviledges to use for= =20 example a ioctl, or maybe writing a kernel module. So it would become guest= =20 OS dependant. Furthermore, doesn't this solution imply more memcpy that may= =20 affect performance ? Currently, if a memory range of a guest process (let's= =20 say a texture) is by chance mapped contiguously into guest physical memory,= =20 we don't need to do any copy before passing it to the host libGL, though I'= ve=20 not benchmarked if it really improves performance. Regards, Even