From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzvSZ-0000kF-1S for qemu-devel@nongnu.org; Tue, 11 Nov 2008 10:47:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzvSX-0000jt-GB for qemu-devel@nongnu.org; Tue, 11 Nov 2008 10:47:18 -0500 Received: from [199.232.76.173] (port=48871 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzvSX-0000jq-Ak for qemu-devel@nongnu.org; Tue, 11 Nov 2008 10:47:17 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:30978 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzvSX-00042q-E9 for qemu-devel@nongnu.org; Tue, 11 Nov 2008 10:47:17 -0500 Message-ID: <4919A9D0.30600@eu.citrix.com> Date: Tue, 11 Nov 2008 15:50:40 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 5/5] vga optimization. References: <1226369769-5109-1-git-send-email-glommer@redhat.com> <1226369769-5109-2-git-send-email-glommer@redhat.com> <1226369769-5109-3-git-send-email-glommer@redhat.com> <1226369769-5109-4-git-send-email-glommer@redhat.com> <1226369769-5109-5-git-send-email-glommer@redhat.com> <1226369769-5109-6-git-send-email-glommer@redhat.com> <49199A50.40504@codemonkey.ws> <4919A5BA.40604@eu.citrix.com> <5d6222a80811110733p471c5603jb2e510aeadd3f587@mail.gmail.com> In-Reply-To: <5d6222a80811110733p471c5603jb2e510aeadd3f587@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Glauber Costa wrote: >> @@ -2102,6 +2122,11 @@ static void vga_map(PCIDevice *pci_dev, int region_num, >> } else { >> cpu_register_physical_memory(addr, s->vram_size, s->vram_offset); >> } >> + >> + s->map_addr = addr; >> + s->map_end = addr + VGA_RAM_SIZE; >> + >> + vga_dirty_log_start(s); >> } >> >> I think you should set lfb_addr and lfb_end here instead of map_addr and >> map_end. >> > It is possible for the lfb to be set, but not mapped. > So map_addr is what really indicates we're interested in tracking this region. > Or I am totally wrong? > Yes, you are right. However these changes are in vga_map that is the pci_register_io_region function, much like cirrus_pci_lfb_map for cirrus. They are supposed to set the lfb_addr before we remap it. Besides I just noticed that you should set lfb_addr only in case that region_num != PCI_ROM_SLOT.