From: Julien Grall <julien@xen.org>
To: Henry Wang <Henry.Wang@arm.com>,
"sstabellini@kernel.org" <sstabellini@kernel.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Wei Chen <Wei.Chen@arm.com>, Penny Zheng <Penny.Zheng@arm.com>,
Bertrand Marquis <Bertrand.Marquis@arm.com>
Subject: Re: Discussion of Xenheap problems on AArch64
Date: Thu, 13 May 2021 19:18:12 +0100 [thread overview]
Message-ID: <ba1bc084-5a5b-1410-acba-33bfca7c4f6a@xen.org> (raw)
In-Reply-To: <PA4PR08MB6253F85E184CA51BDB99786992539@PA4PR08MB6253.eurprd08.prod.outlook.com>
On 11/05/2021 02:11, Henry Wang wrote:
> Hi Julien,
Hi Henry,
>
>> From: Julien Grall <julien@xen.org>
>> Hi Henry,
>>
>> On 07/05/2021 05:06, Henry Wang wrote:
>>>> From: Julien Grall <julien@xen.org>
>>>> 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)
>>> (XEN) VTCR_EL2: 80000000
>>> (XEN) VTTBR_EL2: 0000000000000000
>>> (XEN)
>>> (XEN) SCTLR_EL2: 30cd183d
>>> (XEN) HCR_EL2: 0000000000000038
>>> (XEN) TTBR0_EL2: 000000008413c000
>>> (XEN)
>>> (XEN) ESR_EL2: f2000001
>>> (XEN) HPFAR_EL2: 0000000000000000
>>> (XEN) FAR_EL2: 0000000000000000
>>> (XEN)
>>> (XEN) Xen call trace:
>>> (XEN) [<00000000002b5a5c>] alloc_boot_pages+0x94/0x98 (PC)
>>> (XEN) [<00000000002ca3bc>] setup_frametable_mappings+0xa4/0x108
>> (LR)
>>> (XEN) [<00000000002ca3bc>] setup_frametable_mappings+0xa4/0x108
>>> (XEN) [<00000000002cb988>] start_xen+0x344/0xbcc
>>> (XEN) [<00000000002001c0>]
>> arm64/head.o#primary_switched+0x10/0x30
>>> (XEN)
>>> (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 )
return;
+ 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);
+
BUG_ON(!nr_bootmem_regions);
while ( i-- )
Cheers,
--
Julien Grall
next prev parent reply other threads:[~2021-05-13 18:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 6:28 Discussion of Xenheap problems on AArch64 Henry Wang
2021-04-21 9:03 ` Julien Grall
2021-04-21 9:32 ` Henry Wang
2021-04-25 20:19 ` Julien Grall
2021-04-27 6:29 ` Henry Wang
2021-04-28 9:28 ` Henry Wang
2021-04-28 12:46 ` Julien Grall
2021-05-07 4:06 ` Henry Wang
2021-05-10 16:58 ` Julien Grall
2021-05-11 1:11 ` Henry Wang
2021-05-13 18:18 ` Julien Grall [this message]
2021-05-14 4:35 ` Henry Wang
2021-05-15 19:11 ` Julien Grall
2021-05-17 6:38 ` Henry Wang
2021-05-18 14:09 ` Julien Grall
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=ba1bc084-5a5b-1410-acba-33bfca7c4f6a@xen.org \
--to=julien@xen.org \
--cc=Bertrand.Marquis@arm.com \
--cc=Henry.Wang@arm.com \
--cc=Penny.Zheng@arm.com \
--cc=Wei.Chen@arm.com \
--cc=sstabellini@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).