diff options
author | Avi Kivity <avi@redhat.com> | 2009-06-10 05:56:54 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:32:50 -0400 |
commit | 439e218a6f4716da484314fc5a1f0a59b0212c01 (patch) | |
tree | b582edacc647f74f514417525f28e5f4c7f218f0 | |
parent | 7ffd92c53c5ebd0ad5a68ac3ca033c3a06374d19 (diff) |
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 <avi@redhat.com>
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 8ee67e3fb9d0..8f2cb29db2fe 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) | |||
242 | 242 | ||
243 | static int is_dirty_pte(unsigned long pte) | 243 | static int is_dirty_pte(unsigned long pte) |
244 | { | 244 | { |
245 | return pte & shadow_dirty_mask; | 245 | return pte & PT_DIRTY_MASK; |
246 | } | 246 | } |
247 | 247 | ||
248 | static int is_rmap_pte(u64 pte) | 248 | static int is_rmap_pte(u64 pte) |