[PATCH 15/33] KVM: PPC: Add stw instruction emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds full emulation support for the stw instruction.

Signed-off-by: Alexander Graf <agraf@xxxxxxx>
---
 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 0a5355d..6658dea 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -397,6 +397,11 @@ int kvmppc_emulate_any_instruction(struct kvm_vcpu *vcpu)
 		value = kvmppc_get_gpr(vcpu, get_rs(inst));
 		emulated = kvmppc_emulate_store(vcpu, addr, value, 8);
 		break;
+	case OP_STW:
+		addr = get_addr(vcpu, (s16)get_d(inst), get_ra(inst));
+		value = kvmppc_get_gpr(vcpu, get_rs(inst));
+		emulated = kvmppc_emulate_store(vcpu, addr, value, 4);
+		break;
 	default:
 		emulated = EMULATE_FAIL;
 		break;
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux