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 = kvm_vcpu_gfn_to_pfn_atomic(vcpu, 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()
163 static void audit_sptes_have_rmaps(struct kvm_vcpu *vcpu, u64 *sptep, int level) in audit_sptes_have_rmaps() argument
166 inspect_spte_has_rmap(vcpu->kvm, sptep); in audit_sptes_have_rmaps()
169 static void audit_spte_after_sync(struct kvm_vcpu *vcpu, u64 *sptep, int level) in audit_spte_after_sync() argument
173 if (vcpu->kvm->arch.audit_point == AUDIT_POST_SYNC && sp->unsync) in audit_spte_after_sync()
174 audit_printk(vcpu->kvm, "meet unsync sp(%p) after sync " in audit_spte_after_sync()
226 static void audit_spte(struct kvm_vcpu *vcpu, u64 *sptep, int level) in audit_spte() argument
228 audit_sptes_have_rmaps(vcpu, sptep, level); in audit_spte()
229 audit_mappings(vcpu, sptep, level); in audit_spte()
230 audit_spte_after_sync(vcpu, sptep, level); in audit_spte()
233 static void audit_vcpu_spte(struct kvm_vcpu *vcpu) in audit_vcpu_spte() argument
235 mmu_spte_walk(vcpu, audit_spte); in audit_vcpu_spte()
241 static void __kvm_mmu_audit(struct kvm_vcpu *vcpu, int point) in __kvm_mmu_audit() argument
248 vcpu->kvm->arch.audit_point = point; in __kvm_mmu_audit()
249 audit_all_active_sps(vcpu->kvm); in __kvm_mmu_audit()
250 audit_vcpu_spte(vcpu); in __kvm_mmu_audit()
253 static inline void kvm_mmu_audit(struct kvm_vcpu *vcpu, int point) in kvm_mmu_audit() argument
256 __kvm_mmu_audit(vcpu, point); in kvm_mmu_audit()