From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmQu0-0002iP-DR for qemu-devel@nongnu.org; Sun, 15 Jan 2012 09:17:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmQtz-0003ai-Bt for qemu-devel@nongnu.org; Sun, 15 Jan 2012 09:17:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmQtz-0003ac-3y for qemu-devel@nongnu.org; Sun, 15 Jan 2012 09:17:43 -0500 From: Avi Kivity Date: Sun, 15 Jan 2012 16:17:31 +0200 Message-Id: <1326637051-23920-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH] kvm: flush the dirty log when unregistering a slot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org Otherwise, the dirty log information is lost in the kernel forever. Fixes opensuse-12.1 boot screen, which changes the vga windows rapidly. Signed-off-by: Avi Kivity --- This patch gives me a deja vu - I'm sure I've fixed exactly the same issue before. Please test. kvm-all.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 3174f42..2cc4562 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -566,6 +566,10 @@ static void kvm_set_phys_mem(MemoryRegionSection *section, bool add) old = *mem; + if (mem->flags & KVM_MEM_LOG_DIRTY_PAGES) { + kvm_physical_sync_dirty_bitmap(section); + } + /* unregister the overlapping slot */ mem->memory_size = 0; err = kvm_set_user_memory_region(s, mem); -- 1.7.7.1