This patch adds full emulation support for the lwz instruction.
Signed-off-by: Alexander Graf <[email protected]>
---
arch/powerpc/kvm/emulate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index 9f89a41..e688d85 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -468,6 +468,11 @@ int kvmppc_emulate_any_instruction(struct kvm_vcpu *vcpu)
if (emulated == EMULATE_DONE)
kvmppc_set_gpr(vcpu, get_rt(inst), value);
break;
+ case OP_LWZ:
+ addr = get_addr(vcpu, (s16)get_d(inst), get_ra(inst));
+ emulated = kvmppc_emulate_load(vcpu, addr, &value, 4);
+ kvmppc_set_gpr(vcpu, get_rt(inst), value);
+ break;
default:
emulated = EMULATE_FAIL;
break;
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html