All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, tim@xen.org,
	stefano.stabellini@citrix.com
Subject: Re: [PATCH 4/4] xen/arm: Add some useful debug in coprocessor trapping
Date: Fri, 02 May 2014 13:58:09 +0100	[thread overview]
Message-ID: <53639661.2080201@linaro.org> (raw)
In-Reply-To: <1399029121.32736.45.camel@kazak.uk.xensource.com>

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 <julien.grall@linaro.org>
>> ---
>>  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

      reply	other threads:[~2014-05-02 12:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24 22:45 [PATCH 0/4] xen/arm32: Follow-up XSA-93 Julien Grall
2014-04-24 22:45 ` [PATCH 1/4] xen/arm: Add missing newline after commit 60f7376 Julien Grall
2014-05-02 12:58   ` Ian Campbell
2014-05-02 12:59     ` Julien Grall
2014-04-24 22:45 ` [PATCH 2/4] xen/arm: Implement a dummy Performance Monitor for ARM32 Julien Grall
2014-05-02 11:01   ` Ian Campbell
2014-05-02 12:41     ` Julien Grall
2014-06-13 12:02       ` Ian Campbell
2014-04-24 22:45 ` [PATCH 3/4] xen/arm: Implement a dummy debug monitor " Julien Grall
2014-05-02 11:09   ` Ian Campbell
2014-05-02 12:53     ` Julien Grall
2014-05-02 13:14       ` Ian Campbell
2014-05-02 13:29         ` Julien Grall
2014-06-13 12:02           ` Ian Campbell
2014-06-14 17:16             ` Julien Grall
2014-05-02 13:26       ` Ian Campbell
2014-05-02 13:39         ` Julien Grall
2014-05-02 14:18           ` Ian Campbell
2014-05-02 14:22             ` Julien Grall
2014-05-02 15:17               ` Ian Campbell
2014-04-24 22:45 ` [PATCH 4/4] xen/arm: Add some useful debug in coprocessor trapping Julien Grall
2014-05-02 11:12   ` Ian Campbell
2014-05-02 12:58     ` Julien Grall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53639661.2080201@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.