Lines Matching refs:ref
189 struct tlbe_ref *ref = &vcpu_e500->gtlb_priv[tlbsel][esel].ref; in inval_gtlbe_on_host() local
192 if (!(ref->flags & E500_TLB_VALID)) { in inval_gtlbe_on_host()
193 WARN(ref->flags & (E500_TLB_BITMAP | E500_TLB_TLB0), in inval_gtlbe_on_host()
194 "%s: flags %x\n", __func__, ref->flags); in inval_gtlbe_on_host()
198 if (tlbsel == 1 && ref->flags & E500_TLB_BITMAP) { in inval_gtlbe_on_host()
216 ref->flags &= ~(E500_TLB_BITMAP | E500_TLB_VALID); in inval_gtlbe_on_host()
220 if (tlbsel == 1 && ref->flags & E500_TLB_TLB0) { in inval_gtlbe_on_host()
226 ref->flags &= ~(E500_TLB_TLB0 | E500_TLB_VALID); in inval_gtlbe_on_host()
233 if (ref->flags & E500_TLB_VALID) in inval_gtlbe_on_host()
237 ref->flags = 0; in inval_gtlbe_on_host()
245 static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref, in kvmppc_e500_ref_setup() argument
249 ref->pfn = pfn; in kvmppc_e500_ref_setup()
250 ref->flags = E500_TLB_VALID; in kvmppc_e500_ref_setup()
253 ref->flags |= (gtlbe->mas2 & MAS2_ATTRIB_MASK) | wimg; in kvmppc_e500_ref_setup()
262 static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref) in kvmppc_e500_ref_release() argument
264 if (ref->flags & E500_TLB_VALID) { in kvmppc_e500_ref_release()
266 trace_kvm_booke206_ref_release(ref->pfn, ref->flags); in kvmppc_e500_ref_release()
267 ref->flags = 0; in kvmppc_e500_ref_release()
288 struct tlbe_ref *ref = in clear_tlb_privs() local
289 &vcpu_e500->gtlb_priv[tlbsel][i].ref; in clear_tlb_privs()
290 kvmppc_e500_ref_release(ref); in clear_tlb_privs()
307 int tsize, struct tlbe_ref *ref, u64 gvaddr, in kvmppc_e500_setup_stlbe() argument
310 kvm_pfn_t pfn = ref->pfn; in kvmppc_e500_setup_stlbe()
313 BUG_ON(!(ref->flags & E500_TLB_VALID)); in kvmppc_e500_setup_stlbe()
317 stlbe->mas2 = (gvaddr & MAS2_EPN) | (ref->flags & E500_TLB_MAS2_ATTR); in kvmppc_e500_setup_stlbe()
325 struct tlbe_ref *ref) in kvmppc_e500_shadow_map() argument
493 kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg); in kvmppc_e500_shadow_map()
496 ref, gvaddr, stlbe); in kvmppc_e500_shadow_map()
515 struct tlbe_ref *ref; in kvmppc_e500_tlb0_map() local
521 ref = &vcpu_e500->gtlb_priv[0][esel].ref; in kvmppc_e500_tlb0_map()
525 gtlbe, 0, stlbe, ref); in kvmppc_e500_tlb0_map()
535 struct tlbe_ref *ref, in kvmppc_e500_tlb1_map_tlb1() argument
548 vcpu_e500->gtlb_priv[1][esel].ref.flags |= E500_TLB_BITMAP; in kvmppc_e500_tlb1_map_tlb1()
551 WARN_ON(!(ref->flags & E500_TLB_VALID)); in kvmppc_e500_tlb1_map_tlb1()
563 struct tlbe_ref *ref = &vcpu_e500->gtlb_priv[1][esel].ref; in kvmppc_e500_tlb1_map() local
568 ref); in kvmppc_e500_tlb1_map()
574 vcpu_e500->gtlb_priv[1][esel].ref.flags |= E500_TLB_TLB0; in kvmppc_e500_tlb1_map()
580 sesel = kvmppc_e500_tlb1_map_tlb1(vcpu_e500, ref, esel); in kvmppc_e500_tlb1_map()
602 if (!(priv->ref.flags & E500_TLB_VALID)) { in kvmppc_mmu_map()
606 &priv->ref, eaddr, &stlbe); in kvmppc_mmu_map()