summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity2012-01-15 15:13:59 +0100
committerAvi Kivity2012-01-15 15:13:59 +0100
commit3fbffb628c001bd540dc9c1805bdf7aa8591da4d (patch)
treef761b3c9883d576b1a492ce8ce264733296160bc
parentarm: Add dummy support for co-processor 15's secure config register (diff)
downloadqemu-3fbffb628c001bd540dc9c1805bdf7aa8591da4d.tar.gz
qemu-3fbffb628c001bd540dc9c1805bdf7aa8591da4d.tar.xz
qemu-3fbffb628c001bd540dc9c1805bdf7aa8591da4d.zip
kvm: flush the dirty log when unregistering a slot
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 <avi@redhat.com>
-rw-r--r--kvm-all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 3174f42a37..2cc4562921 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);