Received: from eggs.gnu.org ([2001:4830:134:3::10]:39724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPaiP-0004CQ-Df for qemu-devel@nongnu.org; Thu, 04 Sep 2014 13:21:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPaiD-0005kh-JZ for qemu-devel@nongnu.org; Thu, 04 Sep 2014 13:20:57 -0400 From: Alexander Graf Date: Thu, 4 Sep 2014 19:20:09 +0200 Message-Id: <1409851240-48126-22-git-send-email-agraf@suse.de> In-Reply-To: <1409851240-48126-1-git-send-email-agraf@suse.de> References: <1409851240-48126-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PULL 21/52] ppc: debug stub: Get trap instruction opcode from KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: Bharat Bhushan , peter.maydell@linaro.org, qemu-devel@nongnu.org From: Bharat Bhushan Get trap instruction opcode from KVM and this opcode will be used for setting software breakpoint in following patch Signed-off-by: Bharat Bhushan Signed-off-by: Alexander Graf --- target-ppc/kvm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 8c9e79c..126f7ee 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; } -- 1.8.1.4