Lines Matching refs:arch
77 if (vcpu->arch.papr_enabled && (level > PRIV_SUPER)) in spr_allowed()
90 memcpy(&vcpu->arch.gpr_tm[0], &vcpu->arch.regs.gpr[0], in kvmppc_copyto_vcpu_tm()
91 sizeof(vcpu->arch.gpr_tm)); in kvmppc_copyto_vcpu_tm()
92 memcpy(&vcpu->arch.fp_tm, &vcpu->arch.fp, in kvmppc_copyto_vcpu_tm()
94 memcpy(&vcpu->arch.vr_tm, &vcpu->arch.vr, in kvmppc_copyto_vcpu_tm()
96 vcpu->arch.ppr_tm = vcpu->arch.ppr; in kvmppc_copyto_vcpu_tm()
97 vcpu->arch.dscr_tm = vcpu->arch.dscr; in kvmppc_copyto_vcpu_tm()
98 vcpu->arch.amr_tm = vcpu->arch.amr; in kvmppc_copyto_vcpu_tm()
99 vcpu->arch.ctr_tm = vcpu->arch.regs.ctr; in kvmppc_copyto_vcpu_tm()
100 vcpu->arch.tar_tm = vcpu->arch.tar; in kvmppc_copyto_vcpu_tm()
101 vcpu->arch.lr_tm = vcpu->arch.regs.link; in kvmppc_copyto_vcpu_tm()
102 vcpu->arch.cr_tm = vcpu->arch.regs.ccr; in kvmppc_copyto_vcpu_tm()
103 vcpu->arch.xer_tm = vcpu->arch.regs.xer; in kvmppc_copyto_vcpu_tm()
104 vcpu->arch.vrsave_tm = vcpu->arch.vrsave; in kvmppc_copyto_vcpu_tm()
109 memcpy(&vcpu->arch.regs.gpr[0], &vcpu->arch.gpr_tm[0], in kvmppc_copyfrom_vcpu_tm()
110 sizeof(vcpu->arch.regs.gpr)); in kvmppc_copyfrom_vcpu_tm()
111 memcpy(&vcpu->arch.fp, &vcpu->arch.fp_tm, in kvmppc_copyfrom_vcpu_tm()
113 memcpy(&vcpu->arch.vr, &vcpu->arch.vr_tm, in kvmppc_copyfrom_vcpu_tm()
115 vcpu->arch.ppr = vcpu->arch.ppr_tm; in kvmppc_copyfrom_vcpu_tm()
116 vcpu->arch.dscr = vcpu->arch.dscr_tm; in kvmppc_copyfrom_vcpu_tm()
117 vcpu->arch.amr = vcpu->arch.amr_tm; in kvmppc_copyfrom_vcpu_tm()
118 vcpu->arch.regs.ctr = vcpu->arch.ctr_tm; in kvmppc_copyfrom_vcpu_tm()
119 vcpu->arch.tar = vcpu->arch.tar_tm; in kvmppc_copyfrom_vcpu_tm()
120 vcpu->arch.regs.link = vcpu->arch.lr_tm; in kvmppc_copyfrom_vcpu_tm()
121 vcpu->arch.regs.ccr = vcpu->arch.cr_tm; in kvmppc_copyfrom_vcpu_tm()
122 vcpu->arch.regs.xer = vcpu->arch.xer_tm; in kvmppc_copyfrom_vcpu_tm()
123 vcpu->arch.vrsave = vcpu->arch.vrsave_tm; in kvmppc_copyfrom_vcpu_tm()
133 vcpu->arch.regs.ccr = (vcpu->arch.regs.ccr & ~(CR0_MASK << CR0_SHIFT)) | in kvmppc_emulate_treclaim()
155 vcpu->arch.texasr = texasr; in kvmppc_emulate_treclaim()
156 vcpu->arch.tfiar = kvmppc_get_pc(vcpu); in kvmppc_emulate_treclaim()
158 mtspr(SPRN_TFIAR, vcpu->arch.tfiar); in kvmppc_emulate_treclaim()
168 if (vcpu->arch.shadow_fscr & FSCR_TAR) in kvmppc_emulate_treclaim()
169 mtspr(SPRN_TAR, vcpu->arch.tar); in kvmppc_emulate_treclaim()
212 vcpu->arch.regs.ccr = (vcpu->arch.regs.ccr & ~(CR0_MASK << CR0_SHIFT)) | in kvmppc_emulate_tabort()
216 vcpu->arch.texasr = mfspr(SPRN_TEXASR); in kvmppc_emulate_tabort()
223 vcpu->arch.texasr &= ~(TEXASR_PR | TEXASR_HV); in kvmppc_emulate_tabort()
225 vcpu->arch.texasr |= TEXASR_PR; in kvmppc_emulate_tabort()
228 vcpu->arch.texasr |= TEXASR_HV; in kvmppc_emulate_tabort()
230 vcpu->arch.tfiar = kvmppc_get_pc(vcpu); in kvmppc_emulate_tabort()
321 if (vcpu->arch.mmu.mfsrin) { in kvmppc_core_emulate_op_pr()
323 sr = vcpu->arch.mmu.mfsrin(vcpu, srnum); in kvmppc_core_emulate_op_pr()
333 if (vcpu->arch.mmu.mfsrin) { in kvmppc_core_emulate_op_pr()
335 sr = vcpu->arch.mmu.mfsrin(vcpu, srnum); in kvmppc_core_emulate_op_pr()
341 vcpu->arch.mmu.mtsrin(vcpu, in kvmppc_core_emulate_op_pr()
346 vcpu->arch.mmu.mtsrin(vcpu, in kvmppc_core_emulate_op_pr()
355 vcpu->arch.mmu.tlbie(vcpu, addr, large); in kvmppc_core_emulate_op_pr()
366 !vcpu->arch.papr_enabled) { in kvmppc_core_emulate_op_pr()
381 vcpu->arch.hcall_needed = 1; in kvmppc_core_emulate_op_pr()
389 if (!vcpu->arch.mmu.slbmte) in kvmppc_core_emulate_op_pr()
392 vcpu->arch.mmu.slbmte(vcpu, in kvmppc_core_emulate_op_pr()
397 if (!vcpu->arch.mmu.slbie) in kvmppc_core_emulate_op_pr()
400 vcpu->arch.mmu.slbie(vcpu, in kvmppc_core_emulate_op_pr()
404 if (!vcpu->arch.mmu.slbia) in kvmppc_core_emulate_op_pr()
407 vcpu->arch.mmu.slbia(vcpu); in kvmppc_core_emulate_op_pr()
410 if (!(inst & 1) || !vcpu->arch.mmu.slbfee) { in kvmppc_core_emulate_op_pr()
417 if (!vcpu->arch.mmu.slbfee(vcpu, b, &t)) in kvmppc_core_emulate_op_pr()
421 cr |= (vcpu->arch.regs.xer & 0x80000000) >> in kvmppc_core_emulate_op_pr()
427 if (!vcpu->arch.mmu.slbmfee) { in kvmppc_core_emulate_op_pr()
433 t = vcpu->arch.mmu.slbmfee(vcpu, rb_val); in kvmppc_core_emulate_op_pr()
438 if (!vcpu->arch.mmu.slbmfev) { in kvmppc_core_emulate_op_pr()
444 t = vcpu->arch.mmu.slbmfev(vcpu, rb_val); in kvmppc_core_emulate_op_pr()
472 vcpu->arch.fault_dar = vaddr; in kvmppc_core_emulate_op_pr()
481 vcpu->arch.fault_dsisr = dsisr; in kvmppc_core_emulate_op_pr()
503 vcpu->arch.regs.ccr = (CR0_TBEGIN_FAILURE | in kvmppc_core_emulate_op_pr()
504 (vcpu->arch.regs.ccr & ~(CR0_MASK << CR0_SHIFT))); in kvmppc_core_emulate_op_pr()
506 vcpu->arch.texasr = (TEXASR_FS | TEXASR_EXACT | in kvmppc_core_emulate_op_pr()
511 vcpu->arch.texasr |= TEXASR_ROT; in kvmppc_core_emulate_op_pr()
514 vcpu->arch.texasr |= TEXASR_HV; in kvmppc_core_emulate_op_pr()
516 vcpu->arch.tfhar = kvmppc_get_pc(vcpu) + 4; in kvmppc_core_emulate_op_pr()
517 vcpu->arch.tfiar = kvmppc_get_pc(vcpu); in kvmppc_core_emulate_op_pr()
727 switch (vcpu->arch.pvr) { in kvmppc_core_emulate_mtspr_pr()
737 if (vcpu->arch.hflags & BOOK3S_HFLAG_NATIVE_PS) { in kvmppc_core_emulate_mtspr_pr()
740 vcpu->arch.hflags |= BOOK3S_HFLAG_PAIRED_SINGLE; in kvmppc_core_emulate_mtspr_pr()
743 vcpu->arch.hflags &= ~BOOK3S_HFLAG_PAIRED_SINGLE; in kvmppc_core_emulate_mtspr_pr()
755 if (vcpu->arch.mmu.is_dcbz32(vcpu) && in kvmppc_core_emulate_mtspr_pr()
757 vcpu->arch.hflags |= BOOK3S_HFLAG_DCBZ32; in kvmppc_core_emulate_mtspr_pr()
774 vcpu->arch.bescr = spr_val; in kvmppc_core_emulate_mtspr_pr()
777 vcpu->arch.ebbhr = spr_val; in kvmppc_core_emulate_mtspr_pr()
780 vcpu->arch.ebbrr = spr_val; in kvmppc_core_emulate_mtspr_pr()
923 *spr_val = vcpu->arch.purr; in kvmppc_core_emulate_mfspr_pr()
929 *spr_val = vcpu->arch.spurr; in kvmppc_core_emulate_mfspr_pr()
935 *spr_val = vcpu->arch.ic; in kvmppc_core_emulate_mfspr_pr()
949 *spr_val = vcpu->arch.fscr; in kvmppc_core_emulate_mfspr_pr()
952 *spr_val = vcpu->arch.bescr; in kvmppc_core_emulate_mfspr_pr()
955 *spr_val = vcpu->arch.ebbhr; in kvmppc_core_emulate_mfspr_pr()
958 *spr_val = vcpu->arch.ebbrr; in kvmppc_core_emulate_mfspr_pr()
1043 return vcpu->arch.fault_dar; in kvmppc_alignment_dar()