Lines Matching full:vcpu
70 static bool spr_allowed(struct kvm_vcpu *vcpu, enum priv_level level) in spr_allowed() argument
73 if (vcpu->arch.papr_enabled && (level > PRIV_SUPER)) in spr_allowed()
77 if ((kvmppc_get_msr(vcpu) & MSR_PR) && level > PRIV_PROBLEM) in spr_allowed()
84 static inline void kvmppc_copyto_vcpu_tm(struct kvm_vcpu *vcpu) in kvmppc_copyto_vcpu_tm() argument
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()
103 static inline void kvmppc_copyfrom_vcpu_tm(struct kvm_vcpu *vcpu) in kvmppc_copyfrom_vcpu_tm() argument
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()
122 static void kvmppc_emulate_treclaim(struct kvm_vcpu *vcpu, int ra_val) in kvmppc_emulate_treclaim() argument
124 unsigned long guest_msr = kvmppc_get_msr(vcpu); in kvmppc_emulate_treclaim()
129 vcpu->arch.regs.ccr = (vcpu->arch.regs.ccr & ~(CR0_MASK << CR0_SHIFT)) | in kvmppc_emulate_treclaim()
136 kvmppc_save_tm_pr(vcpu); in kvmppc_emulate_treclaim()
137 kvmppc_copyfrom_vcpu_tm(vcpu); in kvmppc_emulate_treclaim()
145 if (kvmppc_get_msr(vcpu) & MSR_PR) in kvmppc_emulate_treclaim()
148 if (kvmppc_get_msr(vcpu) & MSR_HV) 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()
161 kvmppc_set_msr(vcpu, guest_msr); 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()
168 static void kvmppc_emulate_trchkpt(struct kvm_vcpu *vcpu) in kvmppc_emulate_trchkpt() argument
170 unsigned long guest_msr = kvmppc_get_msr(vcpu); in kvmppc_emulate_trchkpt()
174 * need flush FP/VEC/VSX to vcpu save area before in kvmppc_emulate_trchkpt()
177 kvmppc_giveup_ext(vcpu, MSR_VSX); in kvmppc_emulate_trchkpt()
178 kvmppc_giveup_fac(vcpu, FSCR_TAR_LG); in kvmppc_emulate_trchkpt()
179 kvmppc_copyto_vcpu_tm(vcpu); in kvmppc_emulate_trchkpt()
180 kvmppc_save_tm_sprs(vcpu); in kvmppc_emulate_trchkpt()
187 kvmppc_set_msr(vcpu, guest_msr); in kvmppc_emulate_trchkpt()
188 kvmppc_restore_tm_pr(vcpu); in kvmppc_emulate_trchkpt()
193 void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val) in kvmppc_emulate_tabort() argument
199 unsigned long guest_msr = kvmppc_get_msr(vcpu); in kvmppc_emulate_tabort()
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()
234 int kvmppc_core_emulate_op_pr(struct kvm_vcpu *vcpu, in kvmppc_core_emulate_op_pr() argument
247 if ((kvmppc_get_msr(vcpu) & MSR_LE) && in kvmppc_core_emulate_op_pr()
256 kvmppc_set_gpr(vcpu, 3, EV_UNIMPLEMENTED); in kvmppc_core_emulate_op_pr()
257 kvmppc_set_pc(vcpu, kvmppc_get_pc(vcpu) + 4); in kvmppc_core_emulate_op_pr()
265 unsigned long srr1 = kvmppc_get_srr1(vcpu); in kvmppc_core_emulate_op_pr()
267 unsigned long cur_msr = kvmppc_get_msr(vcpu); in kvmppc_core_emulate_op_pr()
281 kvmppc_set_pc(vcpu, kvmppc_get_srr0(vcpu)); in kvmppc_core_emulate_op_pr()
282 kvmppc_set_msr(vcpu, srr1); in kvmppc_core_emulate_op_pr()
295 kvmppc_set_gpr(vcpu, rt, kvmppc_get_msr(vcpu)); in kvmppc_core_emulate_op_pr()
299 ulong rs_val = kvmppc_get_gpr(vcpu, rs); in kvmppc_core_emulate_op_pr()
301 ulong new_msr = kvmppc_get_msr(vcpu); in kvmppc_core_emulate_op_pr()
304 kvmppc_set_msr_fast(vcpu, new_msr); in kvmppc_core_emulate_op_pr()
306 kvmppc_set_msr(vcpu, rs_val); in kvmppc_core_emulate_op_pr()
310 kvmppc_set_msr(vcpu, kvmppc_get_gpr(vcpu, rs)); in kvmppc_core_emulate_op_pr()
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()
320 kvmppc_set_gpr(vcpu, rt, sr); in kvmppc_core_emulate_op_pr()
328 srnum = (kvmppc_get_gpr(vcpu, rb) >> 28) & 0xf; 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()
332 kvmppc_set_gpr(vcpu, rt, sr); in kvmppc_core_emulate_op_pr()
337 vcpu->arch.mmu.mtsrin(vcpu, in kvmppc_core_emulate_op_pr()
339 kvmppc_get_gpr(vcpu, rs)); in kvmppc_core_emulate_op_pr()
342 vcpu->arch.mmu.mtsrin(vcpu, in kvmppc_core_emulate_op_pr()
343 (kvmppc_get_gpr(vcpu, rb) >> 28) & 0xf, in kvmppc_core_emulate_op_pr()
344 kvmppc_get_gpr(vcpu, rs)); in kvmppc_core_emulate_op_pr()
350 ulong addr = kvmppc_get_gpr(vcpu, rb); in kvmppc_core_emulate_op_pr()
351 vcpu->arch.mmu.tlbie(vcpu, addr, large); in kvmppc_core_emulate_op_pr()
358 ulong cmd = kvmppc_get_gpr(vcpu, 3); in kvmppc_core_emulate_op_pr()
361 if ((kvmppc_get_msr(vcpu) & MSR_PR) || in kvmppc_core_emulate_op_pr()
362 !vcpu->arch.papr_enabled) { in kvmppc_core_emulate_op_pr()
367 if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) in kvmppc_core_emulate_op_pr()
370 vcpu->run->papr_hcall.nr = cmd; in kvmppc_core_emulate_op_pr()
372 ulong gpr = kvmppc_get_gpr(vcpu, 4 + i); in kvmppc_core_emulate_op_pr()
373 vcpu->run->papr_hcall.args[i] = gpr; in kvmppc_core_emulate_op_pr()
376 vcpu->run->exit_reason = KVM_EXIT_PAPR_HCALL; 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()
389 kvmppc_get_gpr(vcpu, rs), in kvmppc_core_emulate_op_pr()
390 kvmppc_get_gpr(vcpu, rb)); 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()
397 kvmppc_get_gpr(vcpu, rb)); 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()
410 ulong cr = kvmppc_get_cr(vcpu) & ~CR0_MASK; in kvmppc_core_emulate_op_pr()
412 b = kvmppc_get_gpr(vcpu, rb); in kvmppc_core_emulate_op_pr()
413 if (!vcpu->arch.mmu.slbfee(vcpu, b, &t)) in kvmppc_core_emulate_op_pr()
415 kvmppc_set_gpr(vcpu, rt, t); in kvmppc_core_emulate_op_pr()
417 cr |= (vcpu->arch.regs.xer & 0x80000000) >> in kvmppc_core_emulate_op_pr()
419 kvmppc_set_cr(vcpu, cr); in kvmppc_core_emulate_op_pr()
423 if (!vcpu->arch.mmu.slbmfee) { in kvmppc_core_emulate_op_pr()
428 rb_val = kvmppc_get_gpr(vcpu, rb); in kvmppc_core_emulate_op_pr()
429 t = vcpu->arch.mmu.slbmfee(vcpu, rb_val); in kvmppc_core_emulate_op_pr()
430 kvmppc_set_gpr(vcpu, rt, t); in kvmppc_core_emulate_op_pr()
434 if (!vcpu->arch.mmu.slbmfev) { in kvmppc_core_emulate_op_pr()
439 rb_val = kvmppc_get_gpr(vcpu, rb); in kvmppc_core_emulate_op_pr()
440 t = vcpu->arch.mmu.slbmfev(vcpu, rb_val); in kvmppc_core_emulate_op_pr()
441 kvmppc_set_gpr(vcpu, rt, t); in kvmppc_core_emulate_op_pr()
449 ulong rb_val = kvmppc_get_gpr(vcpu, rb); in kvmppc_core_emulate_op_pr()
457 ra_val = kvmppc_get_gpr(vcpu, ra); in kvmppc_core_emulate_op_pr()
460 if (!(kvmppc_get_msr(vcpu) & MSR_SF)) in kvmppc_core_emulate_op_pr()
464 r = kvmppc_st(vcpu, &addr, 32, zeros, true); in kvmppc_core_emulate_op_pr()
467 kvmppc_set_dar(vcpu, vaddr); in kvmppc_core_emulate_op_pr()
468 vcpu->arch.fault_dar = vaddr; in kvmppc_core_emulate_op_pr()
476 kvmppc_set_dsisr(vcpu, dsisr); in kvmppc_core_emulate_op_pr()
477 vcpu->arch.fault_dsisr = dsisr; in kvmppc_core_emulate_op_pr()
479 kvmppc_book3s_queue_irqprio(vcpu, in kvmppc_core_emulate_op_pr()
491 if (!(kvmppc_get_msr(vcpu) & MSR_TM)) { in kvmppc_core_emulate_op_pr()
492 kvmppc_trigger_fac_interrupt(vcpu, FSCR_TM_LG); in kvmppc_core_emulate_op_pr()
497 if (!(kvmppc_get_msr(vcpu) & MSR_PR)) { 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()
509 if (kvmppc_get_msr(vcpu) & MSR_HV) 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()
515 kvmppc_restore_tm_sprs(vcpu); in kvmppc_core_emulate_op_pr()
523 ulong guest_msr = kvmppc_get_msr(vcpu); in kvmppc_core_emulate_op_pr()
529 if (!(kvmppc_get_msr(vcpu) & MSR_TM)) { in kvmppc_core_emulate_op_pr()
530 kvmppc_trigger_fac_interrupt(vcpu, FSCR_TM_LG); in kvmppc_core_emulate_op_pr()
542 ra_val = kvmppc_get_gpr(vcpu, ra); in kvmppc_core_emulate_op_pr()
544 kvmppc_emulate_tabort(vcpu, ra_val); in kvmppc_core_emulate_op_pr()
549 ulong guest_msr = kvmppc_get_msr(vcpu); in kvmppc_core_emulate_op_pr()
555 if (!(kvmppc_get_msr(vcpu) & MSR_TM)) { in kvmppc_core_emulate_op_pr()
556 kvmppc_trigger_fac_interrupt(vcpu, FSCR_TM_LG); in kvmppc_core_emulate_op_pr()
564 kvmppc_core_queue_program(vcpu, SRR1_PROGPRIV); in kvmppc_core_emulate_op_pr()
571 kvmppc_core_queue_program(vcpu, SRR1_PROGTM); in kvmppc_core_emulate_op_pr()
577 ra_val = kvmppc_get_gpr(vcpu, ra); in kvmppc_core_emulate_op_pr()
578 kvmppc_emulate_treclaim(vcpu, ra_val); in kvmppc_core_emulate_op_pr()
583 ulong guest_msr = kvmppc_get_msr(vcpu); in kvmppc_core_emulate_op_pr()
589 if (!(kvmppc_get_msr(vcpu) & MSR_TM)) { in kvmppc_core_emulate_op_pr()
590 kvmppc_trigger_fac_interrupt(vcpu, FSCR_TM_LG); in kvmppc_core_emulate_op_pr()
598 kvmppc_core_queue_program(vcpu, SRR1_PROGPRIV); in kvmppc_core_emulate_op_pr()
610 kvmppc_core_queue_program(vcpu, SRR1_PROGTM); in kvmppc_core_emulate_op_pr()
615 kvmppc_emulate_trchkpt(vcpu); in kvmppc_core_emulate_op_pr()
628 emulated = kvmppc_emulate_paired_single(vcpu); in kvmppc_core_emulate_op_pr()
633 void kvmppc_set_bat(struct kvm_vcpu *vcpu, struct kvmppc_bat *bat, bool upper, in kvmppc_set_bat() argument
653 static struct kvmppc_bat *kvmppc_find_bat(struct kvm_vcpu *vcpu, int sprn) in kvmppc_find_bat() argument
655 struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu); in kvmppc_find_bat()
678 int kvmppc_core_emulate_mtspr_pr(struct kvm_vcpu *vcpu, int sprn, ulong spr_val) in kvmppc_core_emulate_mtspr_pr() argument
684 if (!spr_allowed(vcpu, PRIV_HYPER)) in kvmppc_core_emulate_mtspr_pr()
686 to_book3s(vcpu)->sdr1 = spr_val; in kvmppc_core_emulate_mtspr_pr()
689 kvmppc_set_dsisr(vcpu, spr_val); in kvmppc_core_emulate_mtspr_pr()
692 kvmppc_set_dar(vcpu, spr_val); in kvmppc_core_emulate_mtspr_pr()
695 to_book3s(vcpu)->hior = spr_val; in kvmppc_core_emulate_mtspr_pr()
702 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mtspr_pr()
704 kvmppc_set_bat(vcpu, bat, !(sprn % 2), (u32)spr_val); in kvmppc_core_emulate_mtspr_pr()
707 kvmppc_mmu_pte_flush(vcpu, 0, 0); in kvmppc_core_emulate_mtspr_pr()
708 kvmppc_mmu_flush_segments(vcpu); in kvmppc_core_emulate_mtspr_pr()
712 to_book3s(vcpu)->hid[0] = spr_val; in kvmppc_core_emulate_mtspr_pr()
715 to_book3s(vcpu)->hid[1] = spr_val; in kvmppc_core_emulate_mtspr_pr()
718 to_book3s(vcpu)->hid[2] = spr_val; in kvmppc_core_emulate_mtspr_pr()
721 to_book3s(vcpu)->hid[2] = spr_val; in kvmppc_core_emulate_mtspr_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()
737 kvmppc_giveup_ext(vcpu, MSR_FP); in kvmppc_core_emulate_mtspr_pr()
739 vcpu->arch.hflags &= ~BOOK3S_HFLAG_PAIRED_SINGLE; in kvmppc_core_emulate_mtspr_pr()
746 to_book3s(vcpu)->hid[4] = spr_val; in kvmppc_core_emulate_mtspr_pr()
749 to_book3s(vcpu)->hid[5] = spr_val; 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()
763 to_book3s(vcpu)->gqr[sprn - SPRN_GQR0] = spr_val; in kvmppc_core_emulate_mtspr_pr()
767 kvmppc_set_fscr(vcpu, spr_val); 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()
785 if (!(kvmppc_get_msr(vcpu) & MSR_TM)) { in kvmppc_core_emulate_mtspr_pr()
786 kvmppc_trigger_fac_interrupt(vcpu, FSCR_TM_LG); in kvmppc_core_emulate_mtspr_pr()
791 if (MSR_TM_ACTIVE(kvmppc_get_msr(vcpu)) && in kvmppc_core_emulate_mtspr_pr()
792 !((MSR_TM_SUSPENDED(kvmppc_get_msr(vcpu))) && in kvmppc_core_emulate_mtspr_pr()
798 kvmppc_core_queue_program(vcpu, SRR1_PROGTM); in kvmppc_core_emulate_mtspr_pr()
848 if (kvmppc_get_msr(vcpu) & MSR_PR) { in kvmppc_core_emulate_mtspr_pr()
849 kvmppc_core_queue_program(vcpu, SRR1_PROGPRIV); in kvmppc_core_emulate_mtspr_pr()
853 if ((kvmppc_get_msr(vcpu) & MSR_PR) || sprn == 0) { in kvmppc_core_emulate_mtspr_pr()
854 kvmppc_core_queue_program(vcpu, SRR1_PROGILL); in kvmppc_core_emulate_mtspr_pr()
864 int kvmppc_core_emulate_mfspr_pr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val) in kvmppc_core_emulate_mfspr_pr() argument
874 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mfspr_pr()
884 if (!spr_allowed(vcpu, PRIV_HYPER)) in kvmppc_core_emulate_mfspr_pr()
886 *spr_val = to_book3s(vcpu)->sdr1; in kvmppc_core_emulate_mfspr_pr()
889 *spr_val = kvmppc_get_dsisr(vcpu); in kvmppc_core_emulate_mfspr_pr()
892 *spr_val = kvmppc_get_dar(vcpu); in kvmppc_core_emulate_mfspr_pr()
895 *spr_val = to_book3s(vcpu)->hior; in kvmppc_core_emulate_mfspr_pr()
898 *spr_val = to_book3s(vcpu)->hid[0]; in kvmppc_core_emulate_mfspr_pr()
901 *spr_val = to_book3s(vcpu)->hid[1]; in kvmppc_core_emulate_mfspr_pr()
905 *spr_val = to_book3s(vcpu)->hid[2]; in kvmppc_core_emulate_mfspr_pr()
909 *spr_val = to_book3s(vcpu)->hid[4]; in kvmppc_core_emulate_mfspr_pr()
912 *spr_val = to_book3s(vcpu)->hid[5]; in kvmppc_core_emulate_mfspr_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()
931 *spr_val = to_book3s(vcpu)->vtb; in kvmppc_core_emulate_mfspr_pr()
934 *spr_val = vcpu->arch.ic; in kvmppc_core_emulate_mfspr_pr()
944 *spr_val = to_book3s(vcpu)->gqr[sprn - SPRN_GQR0]; 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()
966 if (!(kvmppc_get_msr(vcpu) & MSR_TM)) { in kvmppc_core_emulate_mfspr_pr()
967 kvmppc_trigger_fac_interrupt(vcpu, FSCR_TM_LG); in kvmppc_core_emulate_mfspr_pr()
1016 if (kvmppc_get_msr(vcpu) & MSR_PR) { in kvmppc_core_emulate_mfspr_pr()
1017 kvmppc_core_queue_program(vcpu, SRR1_PROGPRIV); in kvmppc_core_emulate_mfspr_pr()
1021 if ((kvmppc_get_msr(vcpu) & MSR_PR) || sprn == 0 || in kvmppc_core_emulate_mfspr_pr()
1023 kvmppc_core_queue_program(vcpu, SRR1_PROGILL); in kvmppc_core_emulate_mfspr_pr()
1034 u32 kvmppc_alignment_dsisr(struct kvm_vcpu *vcpu, unsigned int inst) in kvmppc_alignment_dsisr() argument
1039 ulong kvmppc_alignment_dar(struct kvm_vcpu *vcpu, unsigned int inst) in kvmppc_alignment_dar() argument
1045 return vcpu->arch.fault_dar; in kvmppc_alignment_dar()
1057 dar = kvmppc_get_gpr(vcpu, ra); in kvmppc_alignment_dar()
1062 dar = kvmppc_get_gpr(vcpu, ra); in kvmppc_alignment_dar()
1063 dar += kvmppc_get_gpr(vcpu, rb); in kvmppc_alignment_dar()