From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4grt-0002ZT-Bq for qemu-devel@nongnu.org; Wed, 21 Apr 2010 16:49:57 -0400 Received: from [140.186.70.92] (port=42169 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4grq-0002VB-F9 for qemu-devel@nongnu.org; Wed, 21 Apr 2010 16:49:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4grn-0004Ns-To for qemu-devel@nongnu.org; Wed, 21 Apr 2010 16:49:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58448) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4grn-0004Ni-MX for qemu-devel@nongnu.org; Wed, 21 Apr 2010 16:49:51 -0400 Message-ID: <4BCF64E9.4090909@redhat.com> Date: Wed, 21 Apr 2010 23:49:45 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: QEMU-KVM and video performance References: <4BCEBE5C.4020404@redhat.com> <20100421100840.GF13114@shareable.org> <4BCED82C.9020702@redhat.com> In-Reply-To: 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: Gerhard Wiesinger Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 04/21/2010 09:14 PM, Gerhard Wiesinger wrote: > > Can you explain which code files/functions of KVM is involved in > handling VGA memory window and page switching through the port write > to the VGA window register (or is that part handled through QEMU), so > a little bit architecture explaination would be nice? qemu hw/vga.c and hw/cirrus_vga.c. Boring functions like vbe_ioport_write_data() and vga_ioport_write(). > > BTW: In which KVM code parts is decided where "direct code" or an > "emulated device code" is used? > Same place. Look for calls to cpu_register_physical_memory(). If the last argument was obtained by a call to cpu_register_io_memory(), then all writes trap. Otherwise, it was obtained by qemu_ram_alloc() and writes will not trap (except the first write to a page in a 30ms window, used to note that the page is dirty and needs redrawing). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.