All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Andre Przywara <andre.przywara@arm.com>, xen-devel@lists.xen.org
Cc: sstabellini@kernel.org
Subject: Re: [PATCH 14/27] xen/arm: traps: Improve logging for data/prefetch abort fault
Date: Wed, 23 Aug 2017 20:18:34 +0100	[thread overview]
Message-ID: <671bdf92-54f7-dbb8-def5-e462599b7eb0@arm.com> (raw)
In-Reply-To: <e46fd0f8-78fa-34f0-2091-2d7822405918@arm.com>



On 08/22/2017 06:20 PM, Andre Przywara wrote:
> Hi,

Hi Andre,


> On 14/08/17 15:24, Julien Grall wrote:
>> Walk the hypervisor page table for data/prefetch abort fault to help
>> diagnostics error in the page tables.
>>
>> Signed-off-by: Julien Grall <julien.grall@arm.com>
>> ---
>>   xen/arch/arm/traps.c | 19 +++++++++++++++++++
>>   1 file changed, 19 insertions(+)
>>
>> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
>> index 819bdbc69e..dac4e54fa7 100644
>> --- a/xen/arch/arm/traps.c
>> +++ b/xen/arch/arm/traps.c
>> @@ -2967,7 +2967,26 @@ asmlinkage void do_trap_hyp_sync(struct cpu_user_regs *regs)
>>           do_trap_brk(regs, hsr);
>>           break;
>>   #endif
>> +    case HSR_EC_DATA_ABORT_CURR_EL:
>> +    case HSR_EC_INSTR_ABORT_CURR_EL:
>> +    {
>> +        bool is_data = (hsr.ec == HSR_EC_DATA_ABORT_CURR_EL);
>> +        const char *fault = (is_data) ? "Data Abort" : "Instruction Abort";
>> +
>> +        printk("%s Trap. Syndrome=%#x\n", fault, hsr.iss);
>> +        /*
>> +         * FAR may not be valid for a Synchronous External abort other
>> +         * than translation table walk.
>> +         */
>> +        if ( hsr.xabt.fsc != FSC_SEA || !hsr.xabt.fnv )
> 
> This is quite hard to read. Would the DeMorgan'ed version be better?
> 	   if ( hsr.xabt.fsc == FSC_SEA && hsr.xabt.fnv )
> 	       printk ....
>             else
> 	       dump_hyp_walk ...

Indeed it is better. I will use that.

Cheers,

> 
>> +            dump_hyp_walk(get_hfar(is_data));
>> +        else
>> +            printk("Invalid FAR, don't walk the hypervisor tables\n");
> 
> Nit: "not walking" sounds less ambiguous.
> 
>> +        do_unexpected_trap(fault, regs);
>>   
>> +        break;
>> +    }
>>       default:
>>           printk("Hypervisor Trap. HSR=0x%x EC=0x%x IL=%x Syndrome=0x%"PRIx32"\n",
>>                  hsr.bits, hsr.ec, hsr.len, hsr.iss);
> 
> Ignoring the nits above:

I will fix both and keep the reviewed-by if you don't mind.

> Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-08-23 19:18 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 14:23 [PATCH 00/27] xen/arm: Memory subsystem clean-up Julien Grall
2017-08-14 14:23 ` [PATCH 01/27] xen/x86: numa: Don't check alloc_boot_pages return Julien Grall
2017-08-22 11:22   ` Andre Przywara
2017-08-14 14:23 ` [PATCH 02/27] xen/x86: srat: " Julien Grall
2017-08-22 11:23   ` Andre Przywara
2017-08-14 14:23 ` [PATCH 03/27] xen/x86: mm: " Julien Grall
2017-08-15 15:55   ` Jan Beulich
2017-08-22 11:28   ` Andre Przywara
2017-08-22 17:28     ` Julien Grall
2017-08-14 14:23 ` [PATCH 04/27] xen/mm: Move {G, M]FN <-> {G, M}ADDR helpers to common code Julien Grall
2017-08-22  8:23   ` Jan Beulich
2017-08-22 17:37     ` Julien Grall
2017-08-14 14:23 ` [PATCH 05/27] xen/mm: Use typesafe MFN for alloc_boot_pages return Julien Grall
2017-08-22  8:28   ` Jan Beulich
2017-08-14 14:23 ` [PATCH 06/27] xen/mm: Use __virt_to_mfn in map_domain_page instead of virt_to_mfn Julien Grall
2017-08-22  8:29   ` Jan Beulich
2017-08-14 14:23 ` [PATCH 07/27] xen/arm: mm: Redefine mfn_to_virt to use typesafe Julien Grall
2017-08-14 14:23 ` [PATCH 08/27] xen/arm: hsr_iabt: Document RES0 field Julien Grall
2017-08-22 14:21   ` Andre Przywara
2017-08-22 14:23     ` Julien Grall
2017-08-14 14:24 ` [PATCH 09/27] xen/arm: traps: Don't define FAR_EL2 for ARM32 Julien Grall
2017-08-22 14:12   ` Andre Przywara
2017-08-23 19:05     ` Julien Grall
2017-08-14 14:24 ` [PATCH 10/27] xen/arm: arm32: Don't define FAR_EL1 Julien Grall
2017-08-22 14:37   ` Andre Przywara
2017-08-23 19:06     ` Julien Grall
2017-08-14 14:24 ` [PATCH 11/27] xen/arm: Add FnV field in hsr_*abt Julien Grall
2017-08-22 16:07   ` Andre Przywara
2017-08-23 19:17     ` Julien Grall
2017-08-14 14:24 ` [PATCH 12/27] xen/arm: Introduce hsr_xabt to gather common bits between hsr_dabt and Julien Grall
2017-08-22 16:19   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 13/27] xen/arm: traps: Introduce a helper to read the hypersivor fault register Julien Grall
2017-08-22 17:19   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 14/27] xen/arm: traps: Improve logging for data/prefetch abort fault Julien Grall
2017-08-22 17:20   ` Andre Przywara
2017-08-23 19:18     ` Julien Grall [this message]
2017-08-14 14:24 ` [PATCH 15/27] xen/arm: Replace ioremap_attr(PAGE_HYPERVISOR_NOCACHE) call by ioremap_nocache Julien Grall
2017-08-22 17:20   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 16/27] xen/arm: page: Remove unused attributes DEV_NONSHARED and DEV_CACHED Julien Grall
2017-08-23 11:41   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 17/27] xen/arm: page: Use directly BUFFERABLE and drop DEV_WC Julien Grall
2017-08-22 17:21   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 18/27] xen/arm: page: Prefix memory types with MT_ Julien Grall
2017-08-23 11:41   ` Andre Przywara
2017-08-23 18:51     ` Julien Grall
2017-08-14 14:24 ` [PATCH 19/27] xen/arm: page: Clean-up the definition of MAIRVAL Julien Grall
2017-08-23 11:42   ` Andre Przywara
2017-08-23 18:53     ` Julien Grall
2017-08-14 14:24 ` [PATCH 20/27] xen/arm: page: Use ARMv8 naming to improve readability Julien Grall
2017-08-23 11:42   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 21/27] xen/arm: mm: Rename and clarify AP[1] in the stage-1 page table Julien Grall
2017-08-23 14:07   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 22/27] xen/arm: Switch to SYS_STATE_boot just after end_boot_allocator() Julien Grall
2017-08-22 17:21   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 23/27] xen/arm: mm: Rename 'ai' into 'flags' in create_xen_entries Julien Grall
2017-08-23 14:07   ` Andre Przywara
2017-08-14 14:24 ` [PATCH 24/27] xen/arm: page: Describe the layout of flags used to update page tables Julien Grall
2017-08-23 14:08   ` Andre Przywara
2017-08-23 14:31     ` Julien Grall
2017-08-14 14:24 ` [PATCH 25/27] xen/arm: mm: Embed permission in the flags Julien Grall
2017-08-23 14:08   ` Andre Przywara
2017-08-23 14:26     ` Julien Grall
2017-08-23 14:37       ` Andre Przywara
2017-08-23 19:03         ` Julien Grall
2017-08-14 14:24 ` [PATCH 26/27] xen/arm: mm: Handling permission flags when adding a new mapping Julien Grall
2017-08-23 14:09   ` Andre Przywara
2017-08-23 14:36     ` Julien Grall
2017-08-14 14:24 ` [PATCH 27/27] xen/arm: mm: Use memory flags for modify_xen_mappings rather than custom one Julien Grall
2017-08-23 14:10   ` Andre Przywara
2017-08-23 14:30     ` Julien Grall
2017-08-23 14:46 ` [PATCH 00/27] xen/arm: Memory subsystem clean-up Andre Przywara

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=671bdf92-54f7-dbb8-def5-e462599b7eb0@arm.com \
    --to=julien.grall@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.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.