KVM: MMU: Flush tlbs after clearing write permission when accessing dirty log
authorAvi Kivity <avi@qumranet.com>
Thu, 6 Aug 2009 17:39:47 +0000 (14:39 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:17:06 +0000 (20:17 -0700)
(cherry picked from commit 171d595d3b3254b9a952af8d1f6965d2e85dcbaa)

Otherwise, the cpu may allow writes to the tracked pages, and we lose
some display bits or fail to migrate correctly.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/mmu.c

index 32aa0b814842df0649f9d397b2eb0d8f2705e641..4c944941b0aa50eb1e6651fb366f7d64e13a4435 100644 (file)
@@ -2069,6 +2069,7 @@ void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot)
                        if (pt[i] & PT_WRITABLE_MASK)
                                pt[i] &= ~PT_WRITABLE_MASK;
        }
+       kvm_flush_remote_tlbs(kvm);
        spin_unlock(&kvm->mmu_lock);
 }