xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Discussion of Xenheap problems on AArch64
@ 2021-04-21  6:28 Henry Wang
  2021-04-21  9:03 ` Julien Grall
  0 siblings, 1 reply; 15+ messages in thread
From: Henry Wang @ 2021-04-21  6:28 UTC (permalink / raw)
  To: julien, sstabellini, xen-devel; +Cc: Wei Chen, Penny Zheng, Bertrand Marquis

Hi,

We are trying to implement the static memory allocation on AArch64. Part of
this feature is the reserved heap memory allocation, where a specific range of
memory is reserved only for heap. In the development process, we found a
pitfall in current AArch64 setup_xenheap_mappings() function.

According to a previous discussion in community
https://lore.kernel.org/xen-devel/20190216134456.10681-1-peng.fan@nxp.com/,
on AArch64, bootmem is initialized after setup_xenheap_mappings(),
setup_xenheap_mappings() may try to allocate memory before memory has been
handed over to the boot allocator. If the reserved heap memory allocation is
introduced, either of below 2 cases will trigger a crash:

1. If the reserved heap memory is at the end of the memory block list and the
gap between reserved and unreserved memory is bigger than 512GB, when we setup
mappings from the beginning of the memory block list, we will get OOM caused
by lack of pages in boot allocator. This is because the memory that is reserved
for heap has not been mapped and added to the boot allocator.

2. If we add the memory that is reserved for heap to boot allocator first, and
then setup mappings for banks in the memory block list, we may get a page which
has not been setup mapping, causing a data abort.

Also, according to Julien's reply in previous mailing list discussion, we are
meant to support up to 5TB of RAM (see
https://lists.xenproject.org/archives/html/xen-devel/2018-12/msg00881.html).
Therefore, we think that maybe it is the time to re-visit this problem and try
to find a proper way to address it. Any comments?

Kind regards,

Henry


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-05-18 14:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).