diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 764554350ed86f41b26f45eb840ad02138a55081..013a5b3e9f75cd473832cb63d81723198e23063d 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1194,6 +1194,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 */