Lines Matching refs:pte
56 void kvmppc_mmu_hpte_cache_map(struct kvm_vcpu *vcpu, struct hpte_cache *pte) in kvmppc_mmu_hpte_cache_map() argument
61 trace_kvm_book3s_mmu_map(pte); in kvmppc_mmu_hpte_cache_map()
66 index = kvmppc_mmu_hash_pte(pte->pte.eaddr); in kvmppc_mmu_hpte_cache_map()
67 hlist_add_head_rcu(&pte->list_pte, &vcpu3s->hpte_hash_pte[index]); in kvmppc_mmu_hpte_cache_map()
70 index = kvmppc_mmu_hash_pte_long(pte->pte.eaddr); in kvmppc_mmu_hpte_cache_map()
71 hlist_add_head_rcu(&pte->list_pte_long, in kvmppc_mmu_hpte_cache_map()
75 index = kvmppc_mmu_hash_vpte(pte->pte.vpage); in kvmppc_mmu_hpte_cache_map()
76 hlist_add_head_rcu(&pte->list_vpte, &vcpu3s->hpte_hash_vpte[index]); in kvmppc_mmu_hpte_cache_map()
79 index = kvmppc_mmu_hash_vpte_long(pte->pte.vpage); in kvmppc_mmu_hpte_cache_map()
80 hlist_add_head_rcu(&pte->list_vpte_long, in kvmppc_mmu_hpte_cache_map()
85 index = kvmppc_mmu_hash_vpte_64k(pte->pte.vpage); in kvmppc_mmu_hpte_cache_map()
86 hlist_add_head_rcu(&pte->list_vpte_64k, in kvmppc_mmu_hpte_cache_map()
97 struct hpte_cache *pte = container_of(head, struct hpte_cache, rcu_head); in free_pte_rcu() local
98 kmem_cache_free(hpte_cache, pte); in free_pte_rcu()
101 static void invalidate_pte(struct kvm_vcpu *vcpu, struct hpte_cache *pte) in invalidate_pte() argument
105 trace_kvm_book3s_mmu_invalidate(pte); in invalidate_pte()
108 kvmppc_mmu_invalidate_pte(vcpu, pte); in invalidate_pte()
113 if (hlist_unhashed(&pte->list_pte)) { in invalidate_pte()
118 hlist_del_init_rcu(&pte->list_pte); in invalidate_pte()
119 hlist_del_init_rcu(&pte->list_pte_long); in invalidate_pte()
120 hlist_del_init_rcu(&pte->list_vpte); in invalidate_pte()
121 hlist_del_init_rcu(&pte->list_vpte_long); in invalidate_pte()
123 hlist_del_init_rcu(&pte->list_vpte_64k); in invalidate_pte()
129 call_rcu(&pte->rcu_head, free_pte_rcu); in invalidate_pte()
135 struct hpte_cache *pte; in kvmppc_mmu_pte_flush_all() local
143 hlist_for_each_entry_rcu(pte, list, list_vpte_long) in kvmppc_mmu_pte_flush_all()
144 invalidate_pte(vcpu, pte); in kvmppc_mmu_pte_flush_all()
154 struct hpte_cache *pte; in kvmppc_mmu_pte_flush_page() local
162 hlist_for_each_entry_rcu(pte, list, list_pte) in kvmppc_mmu_pte_flush_page()
163 if ((pte->pte.eaddr & ~0xfffUL) == guest_ea) in kvmppc_mmu_pte_flush_page()
164 invalidate_pte(vcpu, pte); in kvmppc_mmu_pte_flush_page()
173 struct hpte_cache *pte; in kvmppc_mmu_pte_flush_long() local
182 hlist_for_each_entry_rcu(pte, list, list_pte_long) in kvmppc_mmu_pte_flush_long()
183 if ((pte->pte.eaddr & 0x0ffff000UL) == guest_ea) in kvmppc_mmu_pte_flush_long()
184 invalidate_pte(vcpu, pte); in kvmppc_mmu_pte_flush_long()
216 struct hpte_cache *pte; in kvmppc_mmu_pte_vflush_short() local
224 hlist_for_each_entry_rcu(pte, list, list_vpte) in kvmppc_mmu_pte_vflush_short()
225 if ((pte->pte.vpage & vp_mask) == guest_vp) in kvmppc_mmu_pte_vflush_short()
226 invalidate_pte(vcpu, pte); in kvmppc_mmu_pte_vflush_short()
237 struct hpte_cache *pte; in kvmppc_mmu_pte_vflush_64k() local
246 hlist_for_each_entry_rcu(pte, list, list_vpte_64k) in kvmppc_mmu_pte_vflush_64k()
247 if ((pte->pte.vpage & vp_mask) == guest_vp) in kvmppc_mmu_pte_vflush_64k()
248 invalidate_pte(vcpu, pte); in kvmppc_mmu_pte_vflush_64k()
259 struct hpte_cache *pte; in kvmppc_mmu_pte_vflush_long() local
268 hlist_for_each_entry_rcu(pte, list, list_vpte_long) in kvmppc_mmu_pte_vflush_long()
269 if ((pte->pte.vpage & vp_mask) == guest_vp) in kvmppc_mmu_pte_vflush_long()
270 invalidate_pte(vcpu, pte); in kvmppc_mmu_pte_vflush_long()
301 struct hpte_cache *pte; in kvmppc_mmu_pte_pflush() local
311 hlist_for_each_entry_rcu(pte, list, list_vpte_long) in kvmppc_mmu_pte_pflush()
312 if ((pte->pte.raddr >= pa_start) && in kvmppc_mmu_pte_pflush()
313 (pte->pte.raddr < pa_end)) in kvmppc_mmu_pte_pflush()
314 invalidate_pte(vcpu, pte); in kvmppc_mmu_pte_pflush()
323 struct hpte_cache *pte; in kvmppc_mmu_hpte_cache_next() local
328 pte = kmem_cache_zalloc(hpte_cache, GFP_KERNEL); in kvmppc_mmu_hpte_cache_next()
330 return pte; in kvmppc_mmu_hpte_cache_next()
333 void kvmppc_mmu_hpte_cache_free(struct hpte_cache *pte) in kvmppc_mmu_hpte_cache_free() argument
335 kmem_cache_free(hpte_cache, pte); in kvmppc_mmu_hpte_cache_free()