From: Avi Kivity Date: Wed, 27 Aug 2008 13:40:51 +0000 (+0300) Subject: KVM: MMU: Flush tlbs after clearing write permission when accessing dirty log X-Git-Tag: v2.6.28-rc1~269^2~60 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=171d595d3b3254b9a952af8d1f6965d2e85dcbaa;p=linux-2.6-omap-h63xx.git KVM: MMU: Flush tlbs after clearing write permission when accessing dirty log 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 --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 5052acdc0a7..853a2889b20 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2111,6 +2111,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); }