From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 4/4] xen/arm: Add some useful debug in coprocessor trapping Date: Fri, 02 May 2014 13:58:09 +0100 Message-ID: <53639661.2080201@linaro.org> References: <1398379556-1132-1-git-send-email-julien.grall@linaro.org> <1398379556-1132-5-git-send-email-julien.grall@linaro.org> <1399029121.32736.45.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WgD2b-0003Jj-0q for xen-devel@lists.xenproject.org; Fri, 02 May 2014 12:58:13 +0000 Received: by mail-ee0-f51.google.com with SMTP id c13so3141670eek.38 for ; Fri, 02 May 2014 05:58:11 -0700 (PDT) In-Reply-To: <1399029121.32736.45.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 05/02/2014 12:12 PM, Ian Campbell wrote: > On Thu, 2014-04-24 at 23:45 +0100, Julien Grall wrote: >> XSA-93 adds a couple of new functions to trap coprocessor registers. They >> unconditonally inject an undefined instruction to guest. > > "unconditionally" > >> When debugging an OS at early stage, it may be hard to know why the guest >> received an UNDEFINED. Add some debug message to help the developper when Xen > > "developer" I will fix both typo on the next version. >> is built in debug mode. >> >> Signed-off-by: Julien Grall >> --- >> xen/arch/arm/traps.c | 18 ++++++++++++++++++ >> xen/include/asm-arm/processor.h | 15 +++++++++++++-- >> 2 files changed, 31 insertions(+), 2 deletions(-) >> >> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c >> index 1f61e6e..c04f53f 100644 >> --- a/xen/arch/arm/traps.c >> +++ b/xen/arch/arm/traps.c >> @@ -1539,23 +1539,41 @@ bad_cp: >> >> static void do_cp14_dbg(struct cpu_user_regs *regs, union hsr hsr) >> { >> + struct hsr_cp64 cp64 = hsr.cp64; > > Won't this be unused in debug=n builds and therefore not build? Right. I will add #ifndef NDEBUG >> diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h >> index 9267c1b..bc29de1 100644 >> --- a/xen/include/asm-arm/processor.h >> +++ b/xen/include/asm-arm/processor.h >> @@ -289,12 +289,23 @@ union hsr { >> unsigned long reg2:5; /* Rt2 */ >> unsigned long sbzp2:1; >> unsigned long op1:4; /* Op1 */ >> - unsigned long cc:4; /* Condition Code */ >> - unsigned long ccvalid:1;/* CC Valid */ >> + unsigned long cc:4; /* condition code */ >> + unsigned long ccvalid:1;/* cc valid */ > > This seems a bit gratuitous, especially given it appears 3 times and you > only change one. I'd prefer if you just made the new version match the > existing ones than change everything. This change has been added by mistake. I will remove it in next version. Regards, -- Julien Grall