From mboxrd@z Thu Jan 1 00:00:00 1970 From: Madhavan Srinivasan Subject: Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint Date: Mon, 11 Aug 2014 09:29:59 +0530 Message-ID: <53E83FBF.2040607@linux.vnet.ibm.com> References: <1406868643-26291-1-git-send-email-maddy@linux.vnet.ibm.com> <20140803155108.GA19710@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: agraf@suse.de, benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: Segher Boessenkool Return-path: In-Reply-To: <20140803155108.GA19710@gate.crashing.org> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Sunday 03 August 2014 09:21 PM, Segher Boessenkool wrote: >> +/* >> + * KVMPPC_INST_BOOK3S_DEBUG is debug Instruction for supporting Software Breakpoint. >> + * Based on PowerISA v2.07, Instruction with opcode 0s will be treated as illegal >> + * instruction. >> + */ > > "primary opcode 0" instead? > ok sure. >> +#define OP_ZERO 0x0 > > Using 0x0 where you mean 0, making a #define for 0 in the first place... > This all looks rather silly doesn't it. > I wanted to avoid zero mentioned in the case statement, but can add a comment explaining it. >> + case OP_ZERO: >> + if((inst & 0x00FFFF00) == KVMPPC_INST_BOOK3S_DEBUG) { > > You either shouldn't mask at all here, or the mask is wrong (the primary > op is the top six bits, not the top eight). > Yes. I guess I dont need to check here. Will resend the patch. Thanks for review Regards Maddy > > Segher >