Commit ac3cd34e authored by Hollis Blanchard's avatar Hollis Blanchard Committed by Avi Kivity

KVM: ppc: add lwzx/stwz emulation

Somehow these load/store instructions got missed before, but weren't used by
the guest so didn't break anything.
Signed-off-by: default avatarHollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: default avatarChristian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent ce263d70
...@@ -246,6 +246,11 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) ...@@ -246,6 +246,11 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
case 31: case 31:
switch (get_xop(inst)) { switch (get_xop(inst)) {
case 23: /* lwzx */
rt = get_rt(inst);
emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1);
break;
case 83: /* mfmsr */ case 83: /* mfmsr */
rt = get_rt(inst); rt = get_rt(inst);
vcpu->arch.gpr[rt] = vcpu->arch.msr; vcpu->arch.gpr[rt] = vcpu->arch.msr;
...@@ -267,6 +272,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) ...@@ -267,6 +272,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]); kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]);
break; break;
case 151: /* stwx */
rs = get_rs(inst);
emulated = kvmppc_handle_store(run, vcpu,
vcpu->arch.gpr[rs],
4, 1);
break;
case 163: /* wrteei */ case 163: /* wrteei */
vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE) vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE)
| (inst & MSR_EE); | (inst & MSR_EE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment