Lines Matching refs:ref
192 struct tlbe_ref *ref = &vcpu_e500->gtlb_priv[tlbsel][esel].ref; in inval_gtlbe_on_host() local
195 if (!(ref->flags & E500_TLB_VALID)) { in inval_gtlbe_on_host()
196 WARN(ref->flags & (E500_TLB_BITMAP | E500_TLB_TLB0), in inval_gtlbe_on_host()
197 "%s: flags %x\n", __func__, ref->flags); in inval_gtlbe_on_host()
201 if (tlbsel == 1 && ref->flags & E500_TLB_BITMAP) { in inval_gtlbe_on_host()
219 ref->flags &= ~(E500_TLB_BITMAP | E500_TLB_VALID); in inval_gtlbe_on_host()
223 if (tlbsel == 1 && ref->flags & E500_TLB_TLB0) { in inval_gtlbe_on_host()
229 ref->flags &= ~(E500_TLB_TLB0 | E500_TLB_VALID); in inval_gtlbe_on_host()
236 if (ref->flags & E500_TLB_VALID) in inval_gtlbe_on_host()
240 ref->flags = 0; in inval_gtlbe_on_host()
248 static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref, in kvmppc_e500_ref_setup() argument
252 ref->pfn = pfn; in kvmppc_e500_ref_setup()
253 ref->flags = E500_TLB_VALID; in kvmppc_e500_ref_setup()
256 ref->flags |= (gtlbe->mas2 & MAS2_ATTRIB_MASK) | wimg; in kvmppc_e500_ref_setup()
265 static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref) in kvmppc_e500_ref_release() argument
267 if (ref->flags & E500_TLB_VALID) { in kvmppc_e500_ref_release()
269 trace_kvm_booke206_ref_release(ref->pfn, ref->flags); in kvmppc_e500_ref_release()
270 ref->flags = 0; in kvmppc_e500_ref_release()
291 struct tlbe_ref *ref = in clear_tlb_privs() local
292 &vcpu_e500->gtlb_priv[tlbsel][i].ref; in clear_tlb_privs()
293 kvmppc_e500_ref_release(ref); in clear_tlb_privs()
310 int tsize, struct tlbe_ref *ref, u64 gvaddr, in kvmppc_e500_setup_stlbe() argument
313 kvm_pfn_t pfn = ref->pfn; in kvmppc_e500_setup_stlbe()
316 BUG_ON(!(ref->flags & E500_TLB_VALID)); in kvmppc_e500_setup_stlbe()
320 stlbe->mas2 = (gvaddr & MAS2_EPN) | (ref->flags & E500_TLB_MAS2_ATTR); in kvmppc_e500_setup_stlbe()
328 struct tlbe_ref *ref) in kvmppc_e500_shadow_map() argument
496 kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg); in kvmppc_e500_shadow_map()
499 ref, gvaddr, stlbe); in kvmppc_e500_shadow_map()
518 struct tlbe_ref *ref; in kvmppc_e500_tlb0_map() local
524 ref = &vcpu_e500->gtlb_priv[0][esel].ref; in kvmppc_e500_tlb0_map()
528 gtlbe, 0, stlbe, ref); in kvmppc_e500_tlb0_map()
538 struct tlbe_ref *ref, in kvmppc_e500_tlb1_map_tlb1() argument
551 vcpu_e500->gtlb_priv[1][esel].ref.flags |= E500_TLB_BITMAP; in kvmppc_e500_tlb1_map_tlb1()
554 WARN_ON(!(ref->flags & E500_TLB_VALID)); in kvmppc_e500_tlb1_map_tlb1()
566 struct tlbe_ref *ref = &vcpu_e500->gtlb_priv[1][esel].ref; in kvmppc_e500_tlb1_map() local
571 ref); in kvmppc_e500_tlb1_map()
577 vcpu_e500->gtlb_priv[1][esel].ref.flags |= E500_TLB_TLB0; in kvmppc_e500_tlb1_map()
583 sesel = kvmppc_e500_tlb1_map_tlb1(vcpu_e500, ref, esel); in kvmppc_e500_tlb1_map()
605 if (!(priv->ref.flags & E500_TLB_VALID)) { in kvmppc_mmu_map()
609 &priv->ref, eaddr, &stlbe); in kvmppc_mmu_map()