This patch adds emulation support for the oris instruction.
Signed-off-by: Alexander Graf <[email protected]>
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/kvm/emulate.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h
b/arch/powerpc/include/asm/ppc-opcode.h
index f2da847..42aba82 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -120,6 +120,7 @@
#define OP_ADDIS 15
#define OP_BC 16
#define OP_ORI 24
+#define OP_ORIS 25
#define OP_ANDI 28
#define OP_LWZ 32
#define OP_LD 58
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index 8c2db76..fe0eb6e 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -595,6 +595,11 @@ int kvmppc_emulate_any_instruction(struct kvm_vcpu *vcpu)
value |= get_d(inst);
kvmppc_set_gpr(vcpu, get_ra(inst), value);
break;
+ case OP_ORIS:
+ value = kvmppc_get_gpr(vcpu, get_rs(inst));
+ value |= get_d(inst) << 16;
+ kvmppc_set_gpr(vcpu, get_ra(inst), value);
+ break;
case OP_ANDI:
value = kvmppc_get_gpr(vcpu, get_rs(inst));
value &= get_d(inst);
--
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