KVM: MMU: fix opposite condition in mapping_level_dirty_bitmap
authorSteve <stefan.bosak@gmail.com>
Fri, 17 Jun 2011 02:25:39 +0000 (10:25 +0800)
committerAvi Kivity <avi@redhat.com>
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 <stefan.bosak@gmail.com>
Signed-off-by: Steve <stefan.bosak@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
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)