summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/e500_emulate.c
diff options
context:
space:
mode:
authorBharat Bhushan <bharat.bhushan@freescale.com>2013-04-08 00:32:16 (GMT)
committerAndy Fleming <afleming@freescale.com>2013-04-17 21:26:59 (GMT)
commitfcb86a8331691faae5200d522a22dab122897da3 (patch)
treefde3022964ccedf0b52111091b041061ccc7639d /arch/powerpc/kvm/e500_emulate.c
parent42258f1d3d183edaa8cbb3101808d6305393f50b (diff)
downloadlinux-fsl-qoriq-fcb86a8331691faae5200d522a22dab122897da3.tar.xz
KVM: PPC: exit to user space on "ehpriv" instruction
"ehpriv" instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with "run->debug" have relevant information. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Diffstat (limited to 'arch/powerpc/kvm/e500_emulate.c')
-rw-r--r--arch/powerpc/kvm/e500_emulate.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c
index b80d4cd..26687c3 100644
--- a/arch/powerpc/kvm/e500_emulate.c
+++ b/arch/powerpc/kvm/e500_emulate.c
@@ -27,6 +27,7 @@
#define XOP_TLBRE 946
#define XOP_TLBWE 978
#define XOP_TLBILX 18
+#define XOP_EHPRIV 270
#ifdef CONFIG_KVM_E500MC
static int dbell2prio(ulong param)
@@ -139,6 +140,15 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
emulated = EMULATE_FAIL;
break;
+ case XOP_EHPRIV:
+ run->exit_reason = KVM_EXIT_DEBUG;
+ run->debug.arch.address = vcpu->arch.pc;
+ run->debug.arch.status = 0;
+ kvmppc_account_exit(vcpu, DEBUG_EXITS);
+ emulated = EMULATE_EXIT_USER;
+ *advance = 0;
+ break;
+
default:
emulated = EMULATE_FAIL;
}