summaryrefslogtreecommitdiff
path: root/virt/kvm
diff options
context:
space:
mode:
authorIzik Eidus <ieidus@redhat.com>2009-06-10 19:23:24 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-02 16:49:34 -0700
commitaf300d11ea285f31cf4fec08204c108552912b2a (patch)
tree64f2297a7e4f613a971c634e3af850edfb8ea7ba /virt/kvm
parent6aa8dd31fc0032e226b8a9cbe17f4e4a12fec9b9 (diff)
KVM: Fix dirty bit tracking for slots with large pages
commit e244584fe3a5c20deddeca246548ac86dbc6e1d1 upstream. When slot is already allocated and being asked to be tracked we need to break the large pages. This code flush the mmu when someone ask a slot to start dirty bit tracking. Signed-off-by: Izik Eidus <ieidus@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 9eaba7572650..148982913805 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1030,6 +1030,8 @@ int __kvm_set_memory_region(struct kvm *kvm,
if (!new.dirty_bitmap)
goto out_free;
memset(new.dirty_bitmap, 0, dirty_bytes);
+ if (old.npages)
+ kvm_arch_flush_shadow(kvm);
}
#endif /* not defined CONFIG_S390 */