aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorIzik Eidus <ieidus@redhat.com>2009-08-06 14:40:05 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-08 20:17:27 -0700
commitf599c5cbcaa13a93215d2f260815d29f265a4457 (patch)
tree0d9a6252aaab6f98ff83ddec78328633519d1802 /virt
parentd2127c8300fb1ec54af56faee17170e7a525326d (diff)
KVM: Fix dirty bit tracking for slots with large pages
(cherry picked from commit e244584fe3a5c20deddeca246548ac86dbc6e1d1) 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')
-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 53ab86d4669..db062b538b6 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -550,6 +550,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 */