diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index be7694db285d49512ae649b77b79f797413bc380..e48b4d7a350e26e3adba13ed53d0d5047bb11f38 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -748,6 +748,8 @@ static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm, vcpu = vcpu_load_slot(kvm, i); if (!vcpu) continue; + if (new.flags & KVM_MEM_LOG_DIRTY_PAGES) + do_remove_write_access(vcpu, mem->slot); kvm_mmu_reset_context(vcpu); vcpu_put(vcpu); }