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

Re: Discussion of Xenheap problems on AArch64

On 11/05/2021 02:11, Henry Wang wrote:
Hi Julien,

Hi Henry,

From: Julien Grall <julien@xxxxxxx>
Hi Henry,

On 07/05/2021 05:06, Henry Wang wrote:
From: Julien Grall <julien@xxxxxxx>
On 28/04/2021 10:28, Henry Wang wrote:

when I continue booting Xen, I got following error log:

(XEN) CPU:    0
(XEN) PC:     00000000002b5a5c alloc_boot_pages+0x94/0x98
(XEN) LR:     00000000002ca3bc
(XEN) SP:     00000000002ffde0
(XEN) CPSR:   600003c9 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)   VTCR_EL2: 80000000
(XEN)  VTTBR_EL2: 0000000000000000
(XEN)  SCTLR_EL2: 30cd183d
(XEN)    HCR_EL2: 0000000000000038
(XEN)  TTBR0_EL2: 000000008413c000
(XEN)    ESR_EL2: f2000001
(XEN)  HPFAR_EL2: 0000000000000000
(XEN)    FAR_EL2: 0000000000000000
(XEN) Xen call trace:
(XEN)    [<00000000002b5a5c>] alloc_boot_pages+0x94/0x98 (PC)
(XEN)    [<00000000002ca3bc>] setup_frametable_mappings+0xa4/0x108
(XEN)    [<00000000002ca3bc>] setup_frametable_mappings+0xa4/0x108
(XEN)    [<00000000002cb988>] start_xen+0x344/0xbcc
(XEN)    [<00000000002001c0>]
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Xen BUG at page_alloc.c:432
(XEN) ****************************************

This is happening without my patch series applied, right? If so, what
happen if you apply it?

No, I am afraid this is with your patch series applied, and that is why I
am a little bit confused about the error log...

You are hitting the BUG() at the end of alloc_boot_pages(). This is hit because the boot allocator couldn't allocate memory for your request.

Would you be able to apply the following diff and paste the output here?

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index ace6333c18ea..dbb736fdb275 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -329,6 +329,8 @@ void __init init_boot_pages(paddr_t ps, paddr_t pe)
     if ( pe <= ps )

+    printk("%s: ps %"PRI_paddr" pe %"PRI_paddr"\n", __func__, ps, pe);
     first_valid_mfn = mfn_min(maddr_to_mfn(ps), first_valid_mfn);

     bootmem_region_add(ps >> PAGE_SHIFT, pe >> PAGE_SHIFT);
@@ -395,6 +397,8 @@ mfn_t __init alloc_boot_pages(unsigned long nr_pfns, unsigned long pfn_align)
     unsigned long pg, _e;
     unsigned int i = nr_bootmem_regions;

+ printk("%s: nr_pfns %lu pfn_align %lu\n", __func__, nr_pfns, pfn_align);

     while ( i-- )


Julien Grall



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