Lines Matching refs:arch

73 	if (vcpu->arch.papr_enabled && (level > PRIV_SUPER))  in spr_allowed()
86 memcpy(&vcpu->arch.gpr_tm[0], &vcpu->arch.regs.gpr[0], in kvmppc_copyto_vcpu_tm()
87 sizeof(vcpu->arch.gpr_tm)); in kvmppc_copyto_vcpu_tm()
88 memcpy(&vcpu->arch.fp_tm, &vcpu->arch.fp, in kvmppc_copyto_vcpu_tm()
90 memcpy(&vcpu->arch.vr_tm, &vcpu->arch.vr, in kvmppc_copyto_vcpu_tm()
92 vcpu->arch.ppr_tm = vcpu->arch.ppr; in kvmppc_copyto_vcpu_tm()
93 vcpu->arch.dscr_tm = vcpu->arch.dscr; in kvmppc_copyto_vcpu_tm()
94 vcpu->arch.amr_tm = vcpu->arch.amr; in kvmppc_copyto_vcpu_tm()
95 vcpu->arch.ctr_tm = vcpu->arch.regs.ctr; in kvmppc_copyto_vcpu_tm()
96 vcpu->arch.tar_tm = vcpu->arch.tar; in kvmppc_copyto_vcpu_tm()
97 vcpu->arch.lr_tm = vcpu->arch.regs.link; in kvmppc_copyto_vcpu_tm()
98 vcpu->arch.cr_tm = vcpu->arch.regs.ccr; in kvmppc_copyto_vcpu_tm()
99 vcpu->arch.xer_tm = vcpu->arch.regs.xer; in kvmppc_copyto_vcpu_tm()
100 vcpu->arch.vrsave_tm = vcpu->arch.vrsave; in kvmppc_copyto_vcpu_tm()
105 memcpy(&vcpu->arch.regs.gpr[0], &vcpu->arch.gpr_tm[0], in kvmppc_copyfrom_vcpu_tm()
106 sizeof(vcpu->arch.regs.gpr)); in kvmppc_copyfrom_vcpu_tm()
107 memcpy(&vcpu->arch.fp, &vcpu->arch.fp_tm, in kvmppc_copyfrom_vcpu_tm()
109 memcpy(&vcpu->arch.vr, &vcpu->arch.vr_tm, in kvmppc_copyfrom_vcpu_tm()
111 vcpu->arch.ppr = vcpu->arch.ppr_tm; in kvmppc_copyfrom_vcpu_tm()
112 vcpu->arch.dscr = vcpu->arch.dscr_tm; in kvmppc_copyfrom_vcpu_tm()
113 vcpu->arch.amr = vcpu->arch.amr_tm; in kvmppc_copyfrom_vcpu_tm()
114 vcpu->arch.regs.ctr = vcpu->arch.ctr_tm; in kvmppc_copyfrom_vcpu_tm()
115 vcpu->arch.tar = vcpu->arch.tar_tm; in kvmppc_copyfrom_vcpu_tm()
116 vcpu->arch.regs.link = vcpu->arch.lr_tm; in kvmppc_copyfrom_vcpu_tm()
117 vcpu->arch.regs.ccr = vcpu->arch.cr_tm; in kvmppc_copyfrom_vcpu_tm()
118 vcpu->arch.regs.xer = vcpu->arch.xer_tm; in kvmppc_copyfrom_vcpu_tm()
119 vcpu->arch.vrsave = vcpu->arch.vrsave_tm; in kvmppc_copyfrom_vcpu_tm()
129 vcpu->arch.regs.ccr = (vcpu->arch.regs.ccr & ~(CR0_MASK << CR0_SHIFT)) | in kvmppc_emulate_treclaim()
151 vcpu->arch.texasr = texasr; in kvmppc_emulate_treclaim()
152 vcpu->arch.tfiar = kvmppc_get_pc(vcpu); in kvmppc_emulate_treclaim()
154 mtspr(SPRN_TFIAR, vcpu->arch.tfiar); in kvmppc_emulate_treclaim()
164 if (vcpu->arch.shadow_fscr & FSCR_TAR) in kvmppc_emulate_treclaim()
165 mtspr(SPRN_TAR, vcpu->arch.tar); in kvmppc_emulate_treclaim()
208 vcpu->arch.regs.ccr = (vcpu->arch.regs.ccr & ~(CR0_MASK << CR0_SHIFT)) | in kvmppc_emulate_tabort()
212 vcpu->arch.texasr = mfspr(SPRN_TEXASR); in kvmppc_emulate_tabort()
219 vcpu->arch.texasr &= ~(TEXASR_PR | TEXASR_HV); in kvmppc_emulate_tabort()
221 vcpu->arch.texasr |= TEXASR_PR; in kvmppc_emulate_tabort()
224 vcpu->arch.texasr |= TEXASR_HV; in kvmppc_emulate_tabort()
226 vcpu->arch.tfiar = kvmppc_get_pc(vcpu); in kvmppc_emulate_tabort()
317 if (vcpu->arch.mmu.mfsrin) { in kvmppc_core_emulate_op_pr()
319 sr = vcpu->arch.mmu.mfsrin(vcpu, srnum); in kvmppc_core_emulate_op_pr()
329 if (vcpu->arch.mmu.mfsrin) { in kvmppc_core_emulate_op_pr()
331 sr = vcpu->arch.mmu.mfsrin(vcpu, srnum); in kvmppc_core_emulate_op_pr()
337 vcpu->arch.mmu.mtsrin(vcpu, in kvmppc_core_emulate_op_pr()
342 vcpu->arch.mmu.mtsrin(vcpu, in kvmppc_core_emulate_op_pr()
351 vcpu->arch.mmu.tlbie(vcpu, addr, large); in kvmppc_core_emulate_op_pr()
362 !vcpu->arch.papr_enabled) { in kvmppc_core_emulate_op_pr()
377 vcpu->arch.hcall_needed = 1; in kvmppc_core_emulate_op_pr()
385 if (!vcpu->arch.mmu.slbmte) in kvmppc_core_emulate_op_pr()
388 vcpu->arch.mmu.slbmte(vcpu, in kvmppc_core_emulate_op_pr()
393 if (!vcpu->arch.mmu.slbie) in kvmppc_core_emulate_op_pr()
396 vcpu->arch.mmu.slbie(vcpu, in kvmppc_core_emulate_op_pr()
400 if (!vcpu->arch.mmu.slbia) in kvmppc_core_emulate_op_pr()
403 vcpu->arch.mmu.slbia(vcpu); in kvmppc_core_emulate_op_pr()
406 if (!(inst & 1) || !vcpu->arch.mmu.slbfee) { in kvmppc_core_emulate_op_pr()
413 if (!vcpu->arch.mmu.slbfee(vcpu, b, &t)) in kvmppc_core_emulate_op_pr()
417 cr |= (vcpu->arch.regs.xer & 0x80000000) >> in kvmppc_core_emulate_op_pr()
423 if (!vcpu->arch.mmu.slbmfee) { in kvmppc_core_emulate_op_pr()
429 t = vcpu->arch.mmu.slbmfee(vcpu, rb_val); in kvmppc_core_emulate_op_pr()
434 if (!vcpu->arch.mmu.slbmfev) { in kvmppc_core_emulate_op_pr()
440 t = vcpu->arch.mmu.slbmfev(vcpu, rb_val); in kvmppc_core_emulate_op_pr()
468 vcpu->arch.fault_dar = vaddr; in kvmppc_core_emulate_op_pr()
477 vcpu->arch.fault_dsisr = dsisr; in kvmppc_core_emulate_op_pr()
499 vcpu->arch.regs.ccr = (CR0_TBEGIN_FAILURE | in kvmppc_core_emulate_op_pr()
500 (vcpu->arch.regs.ccr & ~(CR0_MASK << CR0_SHIFT))); in kvmppc_core_emulate_op_pr()
502 vcpu->arch.texasr = (TEXASR_FS | TEXASR_EXACT | in kvmppc_core_emulate_op_pr()
507 vcpu->arch.texasr |= TEXASR_ROT; in kvmppc_core_emulate_op_pr()
510 vcpu->arch.texasr |= TEXASR_HV; in kvmppc_core_emulate_op_pr()
512 vcpu->arch.tfhar = kvmppc_get_pc(vcpu) + 4; in kvmppc_core_emulate_op_pr()
513 vcpu->arch.tfiar = kvmppc_get_pc(vcpu); in kvmppc_core_emulate_op_pr()
723 switch (vcpu->arch.pvr) { in kvmppc_core_emulate_mtspr_pr()
733 if (vcpu->arch.hflags & BOOK3S_HFLAG_NATIVE_PS) { in kvmppc_core_emulate_mtspr_pr()
736 vcpu->arch.hflags |= BOOK3S_HFLAG_PAIRED_SINGLE; in kvmppc_core_emulate_mtspr_pr()
739 vcpu->arch.hflags &= ~BOOK3S_HFLAG_PAIRED_SINGLE; in kvmppc_core_emulate_mtspr_pr()
751 if (vcpu->arch.mmu.is_dcbz32(vcpu) && in kvmppc_core_emulate_mtspr_pr()
753 vcpu->arch.hflags |= BOOK3S_HFLAG_DCBZ32; in kvmppc_core_emulate_mtspr_pr()
770 vcpu->arch.bescr = spr_val; in kvmppc_core_emulate_mtspr_pr()
773 vcpu->arch.ebbhr = spr_val; in kvmppc_core_emulate_mtspr_pr()
776 vcpu->arch.ebbrr = spr_val; in kvmppc_core_emulate_mtspr_pr()
922 *spr_val = vcpu->arch.purr; in kvmppc_core_emulate_mfspr_pr()
928 *spr_val = vcpu->arch.spurr; in kvmppc_core_emulate_mfspr_pr()
934 *spr_val = vcpu->arch.ic; in kvmppc_core_emulate_mfspr_pr()
948 *spr_val = vcpu->arch.fscr; in kvmppc_core_emulate_mfspr_pr()
951 *spr_val = vcpu->arch.bescr; in kvmppc_core_emulate_mfspr_pr()
954 *spr_val = vcpu->arch.ebbhr; in kvmppc_core_emulate_mfspr_pr()
957 *spr_val = vcpu->arch.ebbrr; in kvmppc_core_emulate_mfspr_pr()
1045 return vcpu->arch.fault_dar; in kvmppc_alignment_dar()