KVM: MMU: fix opposite condition in mapping_level_dirty_bitmap
authorSteve <[email protected]>
Fri, 17 Jun 2011 02:25:39 +0000 (10:25 +0800)
committerAvi Kivity <[email protected]>
Sun, 19 Jun 2011 16:23:13 +0000 (19:23 +0300)
The condition is opposite, it always maps huge page for the dirty tracked page

Reported-by: Steve <[email protected]>
Signed-off-by: Steve <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
arch/x86/kvm/mmu.c

index bd14bb4c8594c4cb7b8375e6567e6a0aa56c61cc..aee38623b768edae62394fc09c64742f54b5b955 100644 (file)
@@ -565,7 +565,7 @@ gfn_to_memslot_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t gfn,
 
 static bool mapping_level_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t large_gfn)
 {
-       return gfn_to_memslot_dirty_bitmap(vcpu, large_gfn, true);
+       return !gfn_to_memslot_dirty_bitmap(vcpu, large_gfn, true);
 }
 
 static int mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn)