diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2008-05-21 19:22:52 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-06-06 14:22:17 -0400 |
commit | ac3cd34e4eb9e3dccaec8e586c073ba2660b322f (patch) | |
tree | e719c2f756e5032236dbba101456e9e282bb6319 /arch | |
parent | ce263d70e509287ee761f9bba519342f57b121ca (diff) |
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: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kvm/emulate.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index a03fe0c80698..000097461283 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -246,6 +246,11 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
246 | case 31: | 246 | case 31: |
247 | switch (get_xop(inst)) { | 247 | switch (get_xop(inst)) { |
248 | 248 | ||
249 | case 23: /* lwzx */ | ||
250 | rt = get_rt(inst); | ||
251 | emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1); | ||
252 | break; | ||
253 | |||
249 | case 83: /* mfmsr */ | 254 | case 83: /* mfmsr */ |
250 | rt = get_rt(inst); | 255 | rt = get_rt(inst); |
251 | vcpu->arch.gpr[rt] = vcpu->arch.msr; | 256 | vcpu->arch.gpr[rt] = vcpu->arch.msr; |
@@ -267,6 +272,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
267 | kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]); | 272 | kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]); |
268 | break; | 273 | break; |
269 | 274 | ||
275 | case 151: /* stwx */ | ||
276 | rs = get_rs(inst); | ||
277 | emulated = kvmppc_handle_store(run, vcpu, | ||
278 | vcpu->arch.gpr[rs], | ||
279 | 4, 1); | ||
280 | break; | ||
281 | |||
270 | case 163: /* wrteei */ | 282 | case 163: /* wrteei */ |
271 | vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE) | 283 | vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE) |
272 | | (inst & MSR_EE); | 284 | | (inst & MSR_EE); |