summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBharat Bhushan2014-07-14 11:15:35 +0200
committerAlexander Graf2014-09-08 12:50:49 +0200
commit3c902d4469304a9fd78cbef8a927d44b847cde3f (patch)
treee5c7d3e84318ed2c3325c3d2ce1c2c7f1ad8d6e4
parentspapr: Locate RTAS and device-tree based on real RMA (diff)
downloadqemu-3c902d4469304a9fd78cbef8a927d44b847cde3f.tar.gz
qemu-3c902d4469304a9fd78cbef8a927d44b847cde3f.tar.xz
qemu-3c902d4469304a9fd78cbef8a927d44b847cde3f.zip
ppc: debug stub: Get trap instruction opcode from KVM
Get trap instruction opcode from KVM and this opcode will be used for setting software breakpoint in following patch Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--target-ppc/kvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 8c9e79c3a9..126f7ee690 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -72,6 +72,8 @@ static int cap_papr;
static int cap_htab_fd;
static int cap_fixup_hcalls;
+static uint32_t debug_inst_opcode;
+
/* XXX We have a race condition where we actually have a level triggered
* interrupt, but the infrastructure can't expose that yet, so the guest
* takes but ignores it, goes to sleep and never gets notified that there's
@@ -436,6 +438,8 @@ int kvm_arch_init_vcpu(CPUState *cs)
break;
}
+ kvm_get_one_reg(cs, KVM_REG_PPC_DEBUG_INST, &debug_inst_opcode);
+
return ret;
}