From: Avi Kivity Date: Wed, 10 Jun 2009 09:56:54 +0000 (+0300) Subject: KVM: MMU: Fix is_dirty_pte() X-Git-Tag: v2.6.32-rc1~693^2~160 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=439e218a6f4716da484314fc5a1f0a59b0212c01;p=~emulex%2Finfiniband.git KVM: MMU: Fix is_dirty_pte() is_dirty_pte() is used on guest ptes, not shadow ptes, so it needs to avoid shadow_dirty_mask and use PT_DIRTY_MASK instead. Misdetecting dirty pages could lead to unnecessarily setting the dirty bit under EPT. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 8ee67e3fb9d..8f2cb29db2f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -242,7 +242,7 @@ static int is_writeble_pte(unsigned long pte) static int is_dirty_pte(unsigned long pte) { - return pte & shadow_dirty_mask; + return pte & PT_DIRTY_MASK; } static int is_rmap_pte(u64 pte)