From: Izik Eidus <[email protected]> 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. Cc: [email protected] Signed-off-by: Izik Eidus <[email protected]> Signed-off-by: Avi Kivity <[email protected]> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index d604812..8939ffa 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1190,6 +1190,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 */ -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
