Lines Matching refs:arch

74 		esel += gtlb0_set_base(vcpu_e500, vcpu->arch.shared->mas2);  in get_tlb_esel()
137 tlbsel = (vcpu->arch.shared->mas4 >> 28) & 0x1; in kvmppc_e500_deliver_tlb_miss()
139 tsized = (vcpu->arch.shared->mas4 >> 7) & 0x1f; in kvmppc_e500_deliver_tlb_miss()
141 vcpu->arch.shared->mas0 = MAS0_TLBSEL(tlbsel) | MAS0_ESEL(victim) in kvmppc_e500_deliver_tlb_miss()
143 vcpu->arch.shared->mas1 = MAS1_VALID | (as ? MAS1_TS : 0) in kvmppc_e500_deliver_tlb_miss()
146 vcpu->arch.shared->mas2 = (eaddr & MAS2_EPN) in kvmppc_e500_deliver_tlb_miss()
147 | (vcpu->arch.shared->mas4 & MAS2_ATTRIB_MASK); in kvmppc_e500_deliver_tlb_miss()
148 vcpu->arch.shared->mas7_3 &= MAS3_U0 | MAS3_U1 | MAS3_U2 | MAS3_U3; in kvmppc_e500_deliver_tlb_miss()
149 vcpu->arch.shared->mas6 = (vcpu->arch.shared->mas6 & MAS6_SPID1) in kvmppc_e500_deliver_tlb_miss()
335 vcpu->arch.shared->mas0 &= ~MAS0_NV(~0); in kvmppc_e500_emul_tlbre()
336 vcpu->arch.shared->mas0 |= MAS0_NV(vcpu_e500->gtlb_nv[tlbsel]); in kvmppc_e500_emul_tlbre()
337 vcpu->arch.shared->mas1 = gtlbe->mas1; in kvmppc_e500_emul_tlbre()
338 vcpu->arch.shared->mas2 = gtlbe->mas2; in kvmppc_e500_emul_tlbre()
339 vcpu->arch.shared->mas7_3 = gtlbe->mas7_3; in kvmppc_e500_emul_tlbre()
363 vcpu->arch.shared->mas0 = MAS0_TLBSEL(tlbsel) | MAS0_ESEL(esel) in kvmppc_e500_emul_tlbsx()
365 vcpu->arch.shared->mas1 = gtlbe->mas1; in kvmppc_e500_emul_tlbsx()
366 vcpu->arch.shared->mas2 = gtlbe->mas2; in kvmppc_e500_emul_tlbsx()
367 vcpu->arch.shared->mas7_3 = gtlbe->mas7_3; in kvmppc_e500_emul_tlbsx()
372 tlbsel = vcpu->arch.shared->mas4 >> 28 & 0x1; in kvmppc_e500_emul_tlbsx()
375 vcpu->arch.shared->mas0 = MAS0_TLBSEL(tlbsel) in kvmppc_e500_emul_tlbsx()
378 vcpu->arch.shared->mas1 = in kvmppc_e500_emul_tlbsx()
379 (vcpu->arch.shared->mas6 & MAS6_SPID0) in kvmppc_e500_emul_tlbsx()
380 | ((vcpu->arch.shared->mas6 & MAS6_SAS) ? MAS1_TS : 0) in kvmppc_e500_emul_tlbsx()
381 | (vcpu->arch.shared->mas4 & MAS4_TSIZED(~0)); in kvmppc_e500_emul_tlbsx()
382 vcpu->arch.shared->mas2 &= MAS2_EPN; in kvmppc_e500_emul_tlbsx()
383 vcpu->arch.shared->mas2 |= vcpu->arch.shared->mas4 & in kvmppc_e500_emul_tlbsx()
385 vcpu->arch.shared->mas7_3 &= MAS3_U0 | MAS3_U1 | in kvmppc_e500_emul_tlbsx()
413 gtlbe->mas1 = vcpu->arch.shared->mas1; in kvmppc_e500_emul_tlbwe()
414 gtlbe->mas2 = vcpu->arch.shared->mas2; in kvmppc_e500_emul_tlbwe()
415 if (!(vcpu->arch.shared->msr & MSR_CM)) in kvmppc_e500_emul_tlbwe()
417 gtlbe->mas7_3 = vcpu->arch.shared->mas7_3; in kvmppc_e500_emul_tlbwe()
419 trace_kvm_booke206_gtlb_write(vcpu->arch.shared->mas0, gtlbe->mas1, in kvmppc_e500_emul_tlbwe()
500 unsigned int as = !!(vcpu->arch.shared->msr & MSR_IS); in kvmppc_mmu_itlb_index()
507 unsigned int as = !!(vcpu->arch.shared->msr & MSR_DS); in kvmppc_mmu_dtlb_index()
514 unsigned int as = !!(vcpu->arch.shared->msr & MSR_IS); in kvmppc_mmu_itlb_miss()
516 kvmppc_e500_deliver_tlb_miss(vcpu, vcpu->arch.regs.nip, as); in kvmppc_mmu_itlb_miss()
521 unsigned int as = !!(vcpu->arch.shared->msr & MSR_DS); in kvmppc_mmu_dtlb_miss()
523 kvmppc_e500_deliver_tlb_miss(vcpu, vcpu->arch.fault_dear, as); in kvmppc_mmu_dtlb_miss()
576 sregs->u.e.mas0 = vcpu->arch.shared->mas0; in kvmppc_get_sregs_e500_tlb()
577 sregs->u.e.mas1 = vcpu->arch.shared->mas1; in kvmppc_get_sregs_e500_tlb()
578 sregs->u.e.mas2 = vcpu->arch.shared->mas2; in kvmppc_get_sregs_e500_tlb()
579 sregs->u.e.mas7_3 = vcpu->arch.shared->mas7_3; in kvmppc_get_sregs_e500_tlb()
580 sregs->u.e.mas4 = vcpu->arch.shared->mas4; in kvmppc_get_sregs_e500_tlb()
581 sregs->u.e.mas6 = vcpu->arch.shared->mas6; in kvmppc_get_sregs_e500_tlb()
583 sregs->u.e.mmucfg = vcpu->arch.mmucfg; in kvmppc_get_sregs_e500_tlb()
584 sregs->u.e.tlbcfg[0] = vcpu->arch.tlbcfg[0]; in kvmppc_get_sregs_e500_tlb()
585 sregs->u.e.tlbcfg[1] = vcpu->arch.tlbcfg[1]; in kvmppc_get_sregs_e500_tlb()
593 vcpu->arch.shared->mas0 = sregs->u.e.mas0; in kvmppc_set_sregs_e500_tlb()
594 vcpu->arch.shared->mas1 = sregs->u.e.mas1; in kvmppc_set_sregs_e500_tlb()
595 vcpu->arch.shared->mas2 = sregs->u.e.mas2; in kvmppc_set_sregs_e500_tlb()
596 vcpu->arch.shared->mas7_3 = sregs->u.e.mas7_3; in kvmppc_set_sregs_e500_tlb()
597 vcpu->arch.shared->mas4 = sregs->u.e.mas4; in kvmppc_set_sregs_e500_tlb()
598 vcpu->arch.shared->mas6 = sregs->u.e.mas6; in kvmppc_set_sregs_e500_tlb()
612 *val = get_reg_val(id, vcpu->arch.shared->mas0); in kvmppc_get_one_reg_e500_tlb()
615 *val = get_reg_val(id, vcpu->arch.shared->mas1); in kvmppc_get_one_reg_e500_tlb()
618 *val = get_reg_val(id, vcpu->arch.shared->mas2); in kvmppc_get_one_reg_e500_tlb()
621 *val = get_reg_val(id, vcpu->arch.shared->mas7_3); in kvmppc_get_one_reg_e500_tlb()
624 *val = get_reg_val(id, vcpu->arch.shared->mas4); in kvmppc_get_one_reg_e500_tlb()
627 *val = get_reg_val(id, vcpu->arch.shared->mas6); in kvmppc_get_one_reg_e500_tlb()
630 *val = get_reg_val(id, vcpu->arch.mmucfg); in kvmppc_get_one_reg_e500_tlb()
633 *val = get_reg_val(id, vcpu->arch.eptcfg); in kvmppc_get_one_reg_e500_tlb()
640 *val = get_reg_val(id, vcpu->arch.tlbcfg[i]); in kvmppc_get_one_reg_e500_tlb()
647 *val = get_reg_val(id, vcpu->arch.tlbps[i]); in kvmppc_get_one_reg_e500_tlb()
665 vcpu->arch.shared->mas0 = set_reg_val(id, *val); in kvmppc_set_one_reg_e500_tlb()
668 vcpu->arch.shared->mas1 = set_reg_val(id, *val); in kvmppc_set_one_reg_e500_tlb()
671 vcpu->arch.shared->mas2 = set_reg_val(id, *val); in kvmppc_set_one_reg_e500_tlb()
674 vcpu->arch.shared->mas7_3 = set_reg_val(id, *val); in kvmppc_set_one_reg_e500_tlb()
677 vcpu->arch.shared->mas4 = set_reg_val(id, *val); in kvmppc_set_one_reg_e500_tlb()
680 vcpu->arch.shared->mas6 = set_reg_val(id, *val); in kvmppc_set_one_reg_e500_tlb()
685 if (reg != vcpu->arch.mmucfg) in kvmppc_set_one_reg_e500_tlb()
691 if (reg != vcpu->arch.eptcfg) in kvmppc_set_one_reg_e500_tlb()
702 if (reg != vcpu->arch.tlbcfg[i]) in kvmppc_set_one_reg_e500_tlb()
712 if (reg != vcpu->arch.tlbps[i]) in kvmppc_set_one_reg_e500_tlb()
727 vcpu->arch.tlbcfg[0] &= ~(TLBnCFG_N_ENTRY | TLBnCFG_ASSOC); in vcpu_mmu_geometry_update()
729 vcpu->arch.tlbcfg[0] |= params->tlb_sizes[0]; in vcpu_mmu_geometry_update()
730 vcpu->arch.tlbcfg[0] |= params->tlb_ways[0] << TLBnCFG_ASSOC_SHIFT; in vcpu_mmu_geometry_update()
732 vcpu->arch.tlbcfg[1] &= ~(TLBnCFG_N_ENTRY | TLBnCFG_ASSOC); in vcpu_mmu_geometry_update()
733 vcpu->arch.tlbcfg[1] |= params->tlb_sizes[1]; in vcpu_mmu_geometry_update()
734 vcpu->arch.tlbcfg[1] |= params->tlb_ways[1] << TLBnCFG_ASSOC_SHIFT; in vcpu_mmu_geometry_update()
877 vcpu->arch.mmucfg = mfspr(SPRN_MMUCFG) & ~MMUCFG_LPIDSIZE; in vcpu_mmu_init()
880 vcpu->arch.tlbcfg[0] = mfspr(SPRN_TLB0CFG) & in vcpu_mmu_init()
882 vcpu->arch.tlbcfg[0] |= params[0].entries; in vcpu_mmu_init()
883 vcpu->arch.tlbcfg[0] |= params[0].ways << TLBnCFG_ASSOC_SHIFT; in vcpu_mmu_init()
885 vcpu->arch.tlbcfg[1] = mfspr(SPRN_TLB1CFG) & in vcpu_mmu_init()
887 vcpu->arch.tlbcfg[1] |= params[1].entries; in vcpu_mmu_init()
888 vcpu->arch.tlbcfg[1] |= params[1].ways << TLBnCFG_ASSOC_SHIFT; in vcpu_mmu_init()
891 vcpu->arch.tlbps[0] = mfspr(SPRN_TLB0PS); in vcpu_mmu_init()
892 vcpu->arch.tlbps[1] = mfspr(SPRN_TLB1PS); in vcpu_mmu_init()
894 vcpu->arch.mmucfg &= ~MMUCFG_LRAT; in vcpu_mmu_init()
897 vcpu->arch.eptcfg = 0; in vcpu_mmu_init()
898 vcpu->arch.tlbcfg[0] &= ~TLBnCFG_PT; in vcpu_mmu_init()
899 vcpu->arch.tlbcfg[1] &= ~TLBnCFG_IND; in vcpu_mmu_init()