26 #define OP_19_XOP_RFI 50
27 #define OP_19_XOP_RFCI 51
29 #define OP_31_XOP_MFMSR 83
30 #define OP_31_XOP_WRTEE 131
31 #define OP_31_XOP_MTMSR 146
32 #define OP_31_XOP_WRTEEI 163
34 static void kvmppc_emul_rfi(
struct kvm_vcpu *vcpu)
36 vcpu->
arch.pc = vcpu->
arch.shared->srr0;
40 static void kvmppc_emul_rfci(
struct kvm_vcpu *vcpu)
47 unsigned int inst,
int *advance)
50 int rs = get_rs(inst);
51 int rt = get_rt(inst);
53 switch (get_op(inst)) {
55 switch (get_xop(inst)) {
57 kvmppc_emul_rfi(vcpu);
63 kvmppc_emul_rfci(vcpu);
75 switch (get_xop(inst)) {
78 kvmppc_set_gpr(vcpu, rt, vcpu->
arch.shared->msr);
89 | (kvmppc_get_gpr(vcpu, rs) &
MSR_EE);
124 vcpu->
arch.shared->dar = spr_val;
127 vcpu->
arch.shared->esr = spr_val;
130 vcpu->
arch.csrr0 = spr_val;
133 vcpu->
arch.csrr1 = spr_val;
136 vcpu->
arch.dbcr0 = spr_val;
139 vcpu->
arch.dbcr1 = spr_val;
142 vcpu->
arch.dbsr &= ~spr_val;
152 vcpu->
arch.decar = spr_val;
160 vcpu->
arch.shared->sprg4 = spr_val;
163 vcpu->
arch.shared->sprg5 = spr_val;
166 vcpu->
arch.shared->sprg6 = spr_val;
169 vcpu->
arch.shared->sprg7 = spr_val;
173 vcpu->
arch.ivpr = spr_val;
174 #ifdef CONFIG_KVM_BOOKE_HV
175 mtspr(SPRN_GIVPR, spr_val);
186 #ifdef CONFIG_KVM_BOOKE_HV
187 mtspr(SPRN_GIVOR2, spr_val);
207 #ifdef CONFIG_KVM_BOOKE_HV
208 mtspr(SPRN_GIVOR8, spr_val);
246 *spr_val = vcpu->
arch.ivpr;
249 *spr_val = vcpu->
arch.shared->dar;
252 *spr_val = vcpu->
arch.shared->esr;
255 *spr_val = vcpu->
arch.csrr0;
258 *spr_val = vcpu->
arch.csrr1;
261 *spr_val = vcpu->
arch.dbcr0;
264 *spr_val = vcpu->
arch.dbcr1;
267 *spr_val = vcpu->
arch.dbsr;
270 *spr_val = vcpu->
arch.tsr;
273 *spr_val = vcpu->
arch.tcr;