[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] arm: alloc_heap_pages allocates already allocated page



Hi,

On 07/02/17 15:59, Vijay Kilari wrote:
> On Tue, Feb 7, 2017 at 6:57 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
>>
>>
>> On 07/02/2017 13:25, Vijay Kilari wrote:
>>>
>>> On Tue, Feb 7, 2017 at 6:30 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
>>>>
>>>>
>>>> One more thing, if Xen 4.7 was able to go up to booting Dom0 without any
>>>> patches on a NUMA board. I would recommend to try to bisect and see if
>>>> you
>>>> can find an offending commit.
>>>
>>>
>>>   Yes, with plain 4.7 panic is not seen
>>
>>
>> Can you please bisect Xen? It could save us a bit of time to understand
>> what's going on.
> 
> ubuntu@ubuntu:~/xen_upstream_new/xen$ git bisect bad
> 493f535a06b5b4041c0745e954780dd5d6f80581 is the first bad commit
> commit 493f535a06b5b4041c0745e954780dd5d6f80581
> Author: Julien Grall <julien.grall@xxxxxxx>
> Date:   Thu Sep 15 12:28:36 2016 +0100
> 
>     xen/arm: p2m: Re-implement p2m_insert_mapping using p2m_set_entry
> 
>     The function p2m_insert_mapping can be re-implemented using the generic
>     function p2m_set_entry.
> 
>     Note that the mapping is not reverted anymore if Xen fails to insert a
>     mapping. This was added to ensure the MMIO are not kept half-mapped
>     in case of failure and to follow the x86 counterpart. This was removed
>     on the x86 part by commit c3c756bd "x86/p2m: use large pages for MMIO
>     mappings" and I think we should let the caller taking care of it.
> 
>     Finally drop the operation INSERT in apply_* as nobody is using it
>     anymore. Note that the functions could have been dropped in one go at the
>     end, however I find easier to drop the operations one by one avoiding a
>     big deletion in the patch that convert the last operation.
> 
>     Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
>     Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>     Tested-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
> 

I think I have managed to reproduce the crash at boot time though the stack
trace is different (see below). This sounds like to me a memory corruption,
I will dig down and see what I can find.

(XEN) Hypervisor Trap. HSR=0x96000007 EC=0x25 IL=1 Syndrome=0x7
(XEN) CPU0: Unexpected Trap: Hypervisor
(XEN) ----[ Xen-4.9-unstable  arm64  debug=y   Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     000000000022de88 _spin_lock+0x1c/0x88
(XEN) LR:     000000000022de84
(XEN) SP:     00000000002c7370
(XEN) CPSR:   600002c9 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)      X0: 00000000003d992a  X1: 0000000000000001  X2: 00000000003d9924
(XEN)      X3: 00000000002c746c  X4: 0000000000000001  X5: 0000000000000080
(XEN)      X6: 00000000806d7369  X7: 68726bff71646b6b  X8: 7f7f7f7f7f7f7f7f
(XEN)      X9: 0000000000000002 X10: 0101010101010101 X11: 0000000000000020
(XEN)     X12: 0000000000000018 X13: ff00000000000000 X14: 00000000002d1140
(XEN)     X15: 0000000000000000 X16: 0000000000000000 X17: 0000000000000000
(XEN)     X18: 0000000000000000 X19: 00000000003d9924 X20: 00000000003d9924
(XEN)     X21: 0000000000002010 X22: 0000000000000004 X23: 0000000000000004
(XEN)     X24: 0000000000000005 X25: 0000000000000000 X26: 0000000000000009
(XEN)     X27: 00000000002d0000 X28: 0000000000000002  FP: 00000000002c7370
(XEN) 
(XEN)   VTCR_EL2: 800d3590
(XEN)  VTTBR_EL2: 0000000000000000
(XEN) 
(XEN)  SCTLR_EL2: 30cd183d
(XEN)    HCR_EL2: 000000008038663f
(XEN)  TTBR0_EL2: 0000010fffcfe000
(XEN) 
(XEN)    ESR_EL2: 96000007
(XEN)  HPFAR_EL2: 0000000000000000
(XEN)    FAR_EL2: 00000000003d9924
(XEN)
(XEN) Xen stack trace from sp=00000000002c7370:
(XEN)    00000000002c7390 000000000022df48 0000000000000240 00000000002c76a8
(XEN)    00000000002c73b0 000000000024e3f4 00000000003d9900 0000000000000009
(XEN)    00000000002c73e0 000000000024e468 0000000000002010 0000801ffff8ff98
(XEN)    0000000000002010 00000000002c76a8 00000000002c7440 000000000024e5e8
(XEN)    0000000000002010 0000801ffff8ff98 0000000000000000 00000000002c76a8
(XEN)    0000801ff819d000 0000000000000005 0000000000000000 0000000000000009
(XEN)    00000000002d0000 00000000002c7518 00000000002c7470 00000000002481b4
(XEN)    0000801ffff90020 0000801ffff8ff98 00000002002c7470 0000000400002010
(XEN)    00000000002c7540 000000000024852c 0000801ffff8ff98 0000801ffff80000
(XEN)    0000000000000000 00000000002c76a8 0000801ff819d000 0000000000000005
(XEN)    000000000027aa98 0000801ffffae09c 000000000000001d 00000000002b08b0
(XEN)    000000000000001d 0000000000275aa8 000000000027af40 0000000000000001
(XEN)    0000801f00000010 0000801ffff80000 00000000002c7530 0000801ff819d000
(XEN)    0000000000000005 0000801ffff8f750 0000000100000003 0000000400002000
(XEN)    0b00000001000000 00000000080f0000 00000000002c7610 0000000000249274
(XEN)    0000801ff819d000 0000801ff8173000 0000801ff816feb0 000000000000b090
(XEN)    0000000000000000 000000000027c788 0000000020000000 0000000001000000
(XEN)    0000000011000000 00000000ff000000 000000000000c08f 0000000000275aa8
(XEN)    0000000000000000 0000000000275ac0 00000000002c7610 0000000000249240
(XEN)    00000000002c7600 0000801ff819d000 0000801f00000005 0000801ff8173000
(XEN)    0000801ff816feb0 0000000000249250 00000000002c7610 000000000024925c
(XEN)    00000000002c7e20 0000000000294918 0000801ff819d000 0000000000282c80
(XEN)    000000000030c448 0000000000000080 000000000027ec10 0000000000000060
(XEN)    00000000002b0178 0000000001400000 0000011000000000 0000000000000010
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000001
(XEN)    0000801ff8150000 0000000000000000 0000000000000001 0000000020000000
(XEN)    0000000020000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN) Xen call trace:
(XEN)    [<000000000022dea0>] _spin_lock+0x1c/0x88 (PC)
(XEN)    [<000000000022de9c>] _spin_lock+0x18/0x88 (LR)
(XEN)    [<000000000022df48>] _spin_lock_irqsave+0x18/0x28
(XEN)    [<000000000024e3f4>] irq_set_spi_type+0x34/0x78
(XEN)    [<000000000024e468>] irq_set_type+0x30/0x188
(XEN)    [<000000000024e5e8>] platform_get_irq+0x28/0x44
(XEN)    [<00000000002481b4>] domain_build.c#handle_node+0x564/0xecc
(XEN)    [<000000000024852c>] domain_build.c#handle_node+0x8dc/0xecc
(XEN)    [<0000000000249274>] construct_dom0+0x758/0x968
(XEN)    [<0000000000294918>] start_xen+0xbb4/0xcfc
(XEN)    [<0000000000200624>] arm64/head.o#paging+0x84/0xbc
(XEN) 
(XEN) 
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) CPU0: Unexpected Trap: Hypervisor
(XEN) 
(XEN) ****************************************

Cheers,

-- 
Julien Grall

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.