From: Hollis Blanchard Date: Wed, 21 May 2008 23:22:52 +0000 (-0500) Subject: KVM: ppc: add lwzx/stwz emulation X-Git-Tag: v2.6.26-rc6~11^2~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ac3cd34e4eb9e3dccaec8e586c073ba2660b322f;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity --- diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index a03fe0c8069..00009746128 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) case 31: switch (get_xop(inst)) { + case 23: /* lwzx */ + rt = get_rt(inst); + emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1); + break; + case 83: /* mfmsr */ rt = get_rt(inst); vcpu->arch.gpr[rt] = vcpu->arch.msr; @@ -267,6 +272,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]); break; + case 151: /* stwx */ + rs = get_rs(inst); + emulated = kvmppc_handle_store(run, vcpu, + vcpu->arch.gpr[rs], + 4, 1); + break; + case 163: /* wrteei */ vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE) | (inst & MSR_EE);