Lines Matching refs:sp
37 static void __mmu_spte_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, in __mmu_spte_walk() argument
43 u64 *ent = sp->spt; in __mmu_spte_walk()
60 struct kvm_mmu_page *sp; in mmu_spte_walk() local
68 sp = page_header(root); in mmu_spte_walk()
69 __mmu_spte_walk(vcpu, sp, fn, PT64_ROOT_LEVEL); in mmu_spte_walk()
78 sp = page_header(root); in mmu_spte_walk()
79 __mmu_spte_walk(vcpu, sp, fn, 2); in mmu_spte_walk()
86 typedef void (*sp_handler) (struct kvm *kvm, struct kvm_mmu_page *sp);
90 struct kvm_mmu_page *sp; in walk_all_active_sps() local
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()
98 struct kvm_mmu_page *sp; in audit_mappings() local
103 sp = page_header(__pa(sptep)); in audit_mappings()
105 if (sp->unsync) { in audit_mappings()
108 "level = %d\n", sp, level); in audit_mappings()
116 gfn = kvm_mmu_page_get_gfn(sp, sptep - sp->spt); in audit_mappings()
171 struct kvm_mmu_page *sp = page_header(__pa(sptep)); in audit_spte_after_sync() local
173 if (vcpu->kvm->arch.audit_point == AUDIT_POST_SYNC && sp->unsync) in audit_spte_after_sync()
175 "root.\n", sp); in audit_spte_after_sync()
178 static void check_mappings_rmap(struct kvm *kvm, struct kvm_mmu_page *sp) in check_mappings_rmap() argument
182 if (sp->role.level != PT_PAGE_TABLE_LEVEL) in check_mappings_rmap()
186 if (!is_rmap_spte(sp->spt[i])) in check_mappings_rmap()
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
201 if (sp->role.direct || sp->unsync || sp->role.invalid) in audit_write_protection()
204 slots = kvm_memslots_for_spte_role(kvm, sp->role); in audit_write_protection()
205 slot = __gfn_to_memslot(slots, sp->gfn); in audit_write_protection()
206 rmapp = __gfn_to_rmap(sp->gfn, PT_PAGE_TABLE_LEVEL, slot); in audit_write_protection()
212 sp->gfn, sp->role.word); 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()