KVM: MMU: audit: fix vcpu's spte walking
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Mon, 27 Sep 2010 10:06:16 +0000 (18:06 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:53:12 +0000 (10:53 +0200)
After nested nested paging, it may using long mode to shadow 32/PAE paging
guest, so this patch fix it

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu_audit.c

index bd2b1be7066ea891b9826cd88a59b138036fec29..dcca3e7d7b4ef7074638241430ab61beea86b3c9 100644 (file)
@@ -51,7 +51,7 @@ static void mmu_spte_walk(struct kvm_vcpu *vcpu, inspect_spte_fn fn)
        if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
                return;
 
-       if (vcpu->arch.mmu.shadow_root_level == PT64_ROOT_LEVEL) {
+       if (vcpu->arch.mmu.root_level == PT64_ROOT_LEVEL) {
                hpa_t root = vcpu->arch.mmu.root_hpa;
 
                sp = page_header(root);