From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzQeK-0006my-12 for qemu-devel@nongnu.org; Tue, 24 Jun 2014 09:20:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzQeD-0007Us-T6 for qemu-devel@nongnu.org; Tue, 24 Jun 2014 09:20:35 -0400 Message-ID: <53A97B1C.6090600@suse.de> Date: Tue, 24 Jun 2014 15:20:28 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1403611807-7082-1-git-send-email-Bharat.Bhushan@freescale.com> <1403611807-7082-5-git-send-email-Bharat.Bhushan@freescale.com> <53A9776D.9070303@suse.de> <30a4ec74d0524959a58b642bc3ef9c0b@BLUPR03MB566.namprd03.prod.outlook.com> In-Reply-To: <30a4ec74d0524959a58b642bc3ef9c0b@BLUPR03MB566.namprd03.prod.outlook.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/5 v3][RESEND] ppc: Add software breakpoint support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Bharat.Bhushan@freescale.com" Cc: "maddy@linux.vnet.ibm.com" , "qemu-ppc@nongnu.org" , "qemu-devel@nongnu.org" On 24.06.14 15:11, Bharat.Bhushan@freescale.com wrote: > >> -----Original Message----- >> From: Alexander Graf [mailto:agraf@suse.de] >> Sent: Tuesday, June 24, 2014 6:35 PM >> To: Bhushan Bharat-R65777 >> Cc: qemu-ppc@nongnu.org; qemu-devel@nongnu.org; maddy@linux.vnet.ibm.com >> Subject: Re: [PATCH 4/5 v3][RESEND] ppc: Add software breakpoint support >> >> >> On 24.06.14 14:10, Bharat Bhushan wrote: >>> This patch allow insert/remove software breakpoint >>> >>> Signed-off-by: Bharat Bhushan >>> --- >>> target-ppc/kvm.c | 71 +++++++++++++++++++++++++++++++++++++++++++++--------- >> -- >>> 1 file changed, 57 insertions(+), 14 deletions(-) >>> >>> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index >>> 5238de7..8e2dbb3 100644 >>> --- a/target-ppc/kvm.c >>> +++ b/target-ppc/kvm.c >>> @@ -1317,6 +1317,53 @@ static int kvmppc_handle_dcr_write(CPUPPCState *env, >> uint32_t dcrn, uint32_t dat >>> return 0; >>> } >>> >>> +int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct >>> +kvm_sw_breakpoint *bp) { >>> + /* Mixed endian case is not handled */ >>> + uint32_t sc = debug_inst_opcode; >> What if debug_inst_opcode has never been set (thus is 0)? > Can "0" be a debug_inst_code ? > >> In that case we should fail the insert, no? > Yes, will checking for "0" is sufficient or we need a cap_ also ? "0" can be a valid debug_inst_code, but I don't think it's a very smart one. Either way works for me. Alex