From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpNYf-0007Jd-6g for qemu-devel@nongnu.org; Fri, 05 Aug 2011 12:47:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpNYd-0000x2-Jk for qemu-devel@nongnu.org; Fri, 05 Aug 2011 12:47:36 -0400 Received: from mail-gw0-f46.google.com ([74.125.83.46]:50488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpNYd-0000wt-FW for qemu-devel@nongnu.org; Fri, 05 Aug 2011 12:47:35 -0400 Received: by gwaa12 with SMTP id a12so2398440gwa.33 for ; Fri, 05 Aug 2011 09:47:34 -0700 (PDT) Message-ID: <4E3C1EA2.5000709@codemonkey.ws> Date: Fri, 05 Aug 2011 11:47:30 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1312141678-5141-1-git-send-email-avi@redhat.com> In-Reply-To: <1312141678-5141-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory: synchronize dirty bitmap before unmapping a range List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Jan Kiszka , qemu-devel@nongnu.org, kvm@vger.kernel.org On 07/31/2011 02:47 PM, Avi Kivity wrote: > When a range is being unmapped, ask accelerators (e.g. kvm) to synchronize the > dirty bitmap to avoid losing information forever. > > Fixes grub2 screen update. > > Signed-off-by: Avi Kivity Applied. Thanks. Regards, Anthony Liguori > --- > > Please apply before the PCI batch to avoid bisectability issues (and don't > pull, since that removes ordering). > > memory.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/memory.c b/memory.c > index 5c6e63d..5f20320 100644 > --- a/memory.c > +++ b/memory.c > @@ -245,6 +245,10 @@ static void as_memory_range_add(AddressSpace *as, FlatRange *fr) > > static void as_memory_range_del(AddressSpace *as, FlatRange *fr) > { > + if (fr->dirty_log_mask) { > + cpu_physical_sync_dirty_bitmap(fr->addr.start, > + fr->addr.start + fr->addr.size); > + } > cpu_register_physical_memory(fr->addr.start, fr->addr.size, > IO_MEM_UNASSIGNED); > }