diff options
-rw-r--r-- | arch/x86/kvm/mmu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index b39ec626040..3592aea59ef 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -3029,11 +3029,13 @@ static void audit_mappings_page(struct kvm_vcpu *vcpu, u64 page_pte, | |||
3029 | " in nonleaf level: levels %d gva %lx" | 3029 | " in nonleaf level: levels %d gva %lx" |
3030 | " level %d pte %llx\n", audit_msg, | 3030 | " level %d pte %llx\n", audit_msg, |
3031 | vcpu->arch.mmu.root_level, va, level, ent); | 3031 | vcpu->arch.mmu.root_level, va, level, ent); |
3032 | 3032 | else | |
3033 | audit_mappings_page(vcpu, ent, va, level - 1); | 3033 | audit_mappings_page(vcpu, ent, va, level - 1); |
3034 | } else { | 3034 | } else { |
3035 | gpa_t gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, va); | 3035 | gpa_t gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, va); |
3036 | hpa_t hpa = (hpa_t)gpa_to_pfn(vcpu, gpa) << PAGE_SHIFT; | 3036 | gfn_t gfn = gpa >> PAGE_SHIFT; |
3037 | pfn_t pfn = gfn_to_pfn(vcpu->kvm, gfn); | ||
3038 | hpa_t hpa = (hpa_t)pfn << PAGE_SHIFT; | ||
3037 | 3039 | ||
3038 | if (is_shadow_present_pte(ent) | 3040 | if (is_shadow_present_pte(ent) |
3039 | && (ent & PT64_BASE_ADDR_MASK) != hpa) | 3041 | && (ent & PT64_BASE_ADDR_MASK) != hpa) |