aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu_audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/mmu_audit.c')
-rw-r--r--arch/x86/kvm/mmu_audit.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c
index 66219afcc91e..4aee32c3cf92 100644
--- a/arch/x86/kvm/mmu_audit.c
+++ b/arch/x86/kvm/mmu_audit.c
@@ -164,6 +164,14 @@ static void audit_sptes_have_rmaps(struct kvm_vcpu *vcpu, u64 *sptep, int level)
164 inspect_spte_has_rmap(vcpu->kvm, sptep); 164 inspect_spte_has_rmap(vcpu->kvm, sptep);
165} 165}
166 166
167static void audit_spte_after_sync(struct kvm_vcpu *vcpu, u64 *sptep, int level)
168{
169 struct kvm_mmu_page *sp = page_header(__pa(sptep));
170
171 if (audit_point == AUDIT_POST_SYNC && sp->unsync)
172 audit_printk("meet unsync sp(%p) after sync root.\n", sp);
173}
174
167static void check_mappings_rmap(struct kvm *kvm, struct kvm_mmu_page *sp) 175static void check_mappings_rmap(struct kvm *kvm, struct kvm_mmu_page *sp)
168{ 176{
169 int i; 177 int i;
@@ -179,7 +187,7 @@ static void check_mappings_rmap(struct kvm *kvm, struct kvm_mmu_page *sp)
179 } 187 }
180} 188}
181 189
182void audit_write_protection(struct kvm *kvm, struct kvm_mmu_page *sp) 190static void audit_write_protection(struct kvm *kvm, struct kvm_mmu_page *sp)
183{ 191{
184 struct kvm_memory_slot *slot; 192 struct kvm_memory_slot *slot;
185 unsigned long *rmapp; 193 unsigned long *rmapp;
@@ -215,6 +223,7 @@ static void audit_spte(struct kvm_vcpu *vcpu, u64 *sptep, int level)
215{ 223{
216 audit_sptes_have_rmaps(vcpu, sptep, level); 224 audit_sptes_have_rmaps(vcpu, sptep, level);
217 audit_mappings(vcpu, sptep, level); 225 audit_mappings(vcpu, sptep, level);
226 audit_spte_after_sync(vcpu, sptep, level);
218} 227}
219 228
220static void audit_vcpu_spte(struct kvm_vcpu *vcpu) 229static void audit_vcpu_spte(struct kvm_vcpu *vcpu)