aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/mmu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 86433513fb71..50fe8541ed39 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -3117,6 +3117,11 @@ static void audit_mappings_page(struct kvm_vcpu *vcpu, u64 page_pte,
3117 pfn_t pfn = gfn_to_pfn(vcpu->kvm, gfn); 3117 pfn_t pfn = gfn_to_pfn(vcpu->kvm, gfn);
3118 hpa_t hpa = (hpa_t)pfn << PAGE_SHIFT; 3118 hpa_t hpa = (hpa_t)pfn << PAGE_SHIFT;
3119 3119
3120 if (is_error_pfn(pfn)) {
3121 kvm_release_pfn_clean(pfn);
3122 continue;
3123 }
3124
3120 if (is_shadow_present_pte(ent) 3125 if (is_shadow_present_pte(ent)
3121 && (ent & PT64_BASE_ADDR_MASK) != hpa) 3126 && (ent & PT64_BASE_ADDR_MASK) != hpa)
3122 printk(KERN_ERR "xx audit error: (%s) levels %d" 3127 printk(KERN_ERR "xx audit error: (%s) levels %d"
@@ -3288,7 +3293,8 @@ static void kvm_mmu_audit(struct kvm_vcpu *vcpu, const char *msg)
3288 audit_msg = msg; 3293 audit_msg = msg;
3289 audit_rmap(vcpu); 3294 audit_rmap(vcpu);
3290 audit_write_protection(vcpu); 3295 audit_write_protection(vcpu);
3291 audit_mappings(vcpu); 3296 if (strcmp("pre pte write", audit_msg) != 0)
3297 audit_mappings(vcpu);
3292 audit_writable_sptes_have_rmaps(vcpu); 3298 audit_writable_sptes_have_rmaps(vcpu);
3293 dbg = olddbg; 3299 dbg = olddbg;
3294} 3300}