Lines Matching refs:vcpu
35 typedef void (*inspect_spte_fn) (struct kvm_vcpu *vcpu, u64 *sptep, int level);
37 static void __mmu_spte_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, in __mmu_spte_walk() argument
45 fn(vcpu, ent + i, level); in __mmu_spte_walk()
52 __mmu_spte_walk(vcpu, child, fn, level - 1); in __mmu_spte_walk()
57 static void mmu_spte_walk(struct kvm_vcpu *vcpu, inspect_spte_fn fn) in mmu_spte_walk() argument
62 if (!VALID_PAGE(vcpu->arch.mmu.root_hpa)) in mmu_spte_walk()
65 if (vcpu->arch.mmu.root_level == PT64_ROOT_LEVEL) { in mmu_spte_walk()
66 hpa_t root = vcpu->arch.mmu.root_hpa; in mmu_spte_walk()
69 __mmu_spte_walk(vcpu, sp, fn, PT64_ROOT_LEVEL); in mmu_spte_walk()
74 hpa_t root = vcpu->arch.mmu.pae_root[i]; in mmu_spte_walk()
79 __mmu_spte_walk(vcpu, sp, fn, 2); in mmu_spte_walk()
96 static void audit_mappings(struct kvm_vcpu *vcpu, u64 *sptep, int level) in audit_mappings() argument
107 audit_printk(vcpu->kvm, "unsync sp: %p " in audit_mappings()
117 pfn = gfn_to_pfn_atomic(vcpu->kvm, gfn); in audit_mappings()
124 audit_printk(vcpu->kvm, "levels %d pfn %llx hpa %llx " in audit_mappings()
125 "ent %llxn", vcpu->arch.mmu.root_level, pfn, in audit_mappings()
159 static void audit_sptes_have_rmaps(struct kvm_vcpu *vcpu, u64 *sptep, int level) in audit_sptes_have_rmaps() argument
162 inspect_spte_has_rmap(vcpu->kvm, sptep); in audit_sptes_have_rmaps()
165 static void audit_spte_after_sync(struct kvm_vcpu *vcpu, u64 *sptep, int level) in audit_spte_after_sync() argument
169 if (vcpu->kvm->arch.audit_point == AUDIT_POST_SYNC && sp->unsync) in audit_spte_after_sync()
170 audit_printk(vcpu->kvm, "meet unsync sp(%p) after sync " in audit_spte_after_sync()
220 static void audit_spte(struct kvm_vcpu *vcpu, u64 *sptep, int level) in audit_spte() argument
222 audit_sptes_have_rmaps(vcpu, sptep, level); in audit_spte()
223 audit_mappings(vcpu, sptep, level); in audit_spte()
224 audit_spte_after_sync(vcpu, sptep, level); in audit_spte()
227 static void audit_vcpu_spte(struct kvm_vcpu *vcpu) in audit_vcpu_spte() argument
229 mmu_spte_walk(vcpu, audit_spte); in audit_vcpu_spte()
235 static void __kvm_mmu_audit(struct kvm_vcpu *vcpu, int point) in __kvm_mmu_audit() argument
242 vcpu->kvm->arch.audit_point = point; in __kvm_mmu_audit()
243 audit_all_active_sps(vcpu->kvm); in __kvm_mmu_audit()
244 audit_vcpu_spte(vcpu); in __kvm_mmu_audit()
247 static inline void kvm_mmu_audit(struct kvm_vcpu *vcpu, int point) in kvm_mmu_audit() argument
250 __kvm_mmu_audit(vcpu, point); in kvm_mmu_audit()