From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjY4X-00034q-SA for qemu-devel@nongnu.org; Wed, 20 Jul 2011 10:48:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjY4W-0006P6-1p for qemu-devel@nongnu.org; Wed, 20 Jul 2011 10:48:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjY4V-0006Oq-Ji for qemu-devel@nongnu.org; Wed, 20 Jul 2011 10:48:23 -0400 Message-ID: <4E26EAB3.7010708@redhat.com> Date: Wed, 20 Jul 2011 17:48:19 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1310901265-32051-1-git-send-email-avi@redhat.com> <1310901265-32051-24-git-send-email-avi@redhat.com> <4E26E0AF.9040503@siemens.com> <4E26E8CF.2080205@redhat.com> <4E26EA0F.40302@siemens.com> In-Reply-To: <4E26EA0F.40302@siemens.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" On 07/20/2011 05:45 PM, Jan Kiszka wrote: > On 2011-07-20 16:40, Avi Kivity wrote: > > On 07/20/2011 05:05 PM, Jan Kiszka wrote: > >> On 2011-07-17 13:13, Avi Kivity wrote: > >>> Convert all vga memory to the memory API. Note we need to fall back to > >>> get_system_memory(), since the various buses don't pass the vga window > >>> as a memory region. > >>> > >> > >>> > >>> if (limit> 0) { > >>> - /* Thinking about changing bank base? First, drop the dirty bitmap information > >>> - * on the current location, otherwise we lose this pointer forever */ > >>> - if (s->vga.lfb_vram_mapped) { > >>> - target_phys_addr_t base_addr = isa_mem_base + 0xa0000 + bank_index * 0x8000; > >>> - cpu_physical_sync_dirty_bitmap(base_addr, base_addr + 0x8000); > >>> - } > >> > >> Why is it safe to drop this? > >> > > > > The memory API will sync the dirty bitmap once it becomes invisible. > > OK, maybe add a short note to the commit log in the next release? > Sure. > > > > (that's the whole point - it can be made invisible by something outside > > the cirrus card's knowledge). > > > > Note - with kvm, there is still a race between syncing the bitmap and > > removing the region. However that is a bug in the kvm API; it is not > > possible to work around it in qemu. > > > > Dirty log off, reconfigure, dirty log on? What happens if there's a write after the first comma (assuming "reconfigure" == "remove slot")? Granted, the guest shouldn't be doing that. Hmm, I guess you could just mark the entire range dirty after removing it. -- error compiling committee.c: too many arguments to function