Lines Matching refs:kvm

31 #define audit_printk(kvm, fmt, args...)		\  argument
33 fmt, audit_point_name[kvm->arch.audit_point], ##args)
86 typedef void (*sp_handler) (struct kvm *kvm, struct kvm_mmu_page *sp);
88 static void walk_all_active_sps(struct kvm *kvm, sp_handler fn) in walk_all_active_sps() argument
92 list_for_each_entry(sp, &kvm->arch.active_mmu_pages, link) in walk_all_active_sps()
93 fn(kvm, sp); in walk_all_active_sps()
107 audit_printk(vcpu->kvm, "unsync sp: %p " in audit_mappings()
124 audit_printk(vcpu->kvm, "levels %d pfn %llx hpa %llx " in audit_mappings()
129 static void inspect_spte_has_rmap(struct kvm *kvm, u64 *sptep) in inspect_spte_has_rmap() argument
141 slots = kvm_memslots_for_spte_role(kvm, rev_sp->role); in inspect_spte_has_rmap()
146 audit_printk(kvm, "no memslot for gfn %llx\n", gfn); in inspect_spte_has_rmap()
147 audit_printk(kvm, "index %ld of sp (gfn=%llx)\n", in inspect_spte_has_rmap()
157 audit_printk(kvm, "no rmap for writable spte %llx\n", in inspect_spte_has_rmap()
166 inspect_spte_has_rmap(vcpu->kvm, sptep); in audit_sptes_have_rmaps()
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()
178 static void check_mappings_rmap(struct kvm *kvm, struct kvm_mmu_page *sp) in check_mappings_rmap() argument
189 inspect_spte_has_rmap(kvm, sp->spt + i); in check_mappings_rmap()
193 static void audit_write_protection(struct kvm *kvm, struct kvm_mmu_page *sp) in audit_write_protection() argument
204 slots = kvm_memslots_for_spte_role(kvm, sp->role); in audit_write_protection()
210 audit_printk(kvm, "shadow page has writable " in audit_write_protection()
215 static void audit_sp(struct kvm *kvm, struct kvm_mmu_page *sp) in audit_sp() argument
217 check_mappings_rmap(kvm, sp); in audit_sp()
218 audit_write_protection(kvm, sp); in audit_sp()
221 static void audit_all_active_sps(struct kvm *kvm) in audit_all_active_sps() argument
223 walk_all_active_sps(kvm, audit_sp); in audit_all_active_sps()
248 vcpu->kvm->arch.audit_point = point; in __kvm_mmu_audit()
249 audit_all_active_sps(vcpu->kvm); in __kvm_mmu_audit()