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

Re: [PATCH v4] xen/arm: Skip memory nodes if not enabled





On 06/11/2023 02:18, Leo Yan wrote:
Hi maintainers,

Hi Leo,

On Fri, Oct 13, 2023 at 08:04:42PM +0800, Leo Yan wrote:
Currently, Xen doesn't check the status property of memory/reserved
memory nodes, which may lead to the following issues:

- If a memory node has a status "disabled" it implies that it should
   not be used. Xen does not handle the status property for the memory
   node and ends up using it.

- If a reserved memory node has a status "disabled", it means that this
   region is no longer reserved and can be used, but the "disabled"
   status is not handled by Xen.

   Xen passes the intact device tree binding of the reserved memory nodes
   to Dom0 and creates a memory node to cover reserved regions. Disabled
   reserved memory nodes are ignored by the Dom0 Linux kernel, thus the
   Dom0 Linux kernel will continue to allocate pages from such a region.

   On the other hand, since the disabled status is not handled by Xen,
   the disabled reserved memory regions are excluded from the page
   management in Xen which results in Xen being unable to obtain the
   corresponding MFN, in the end, Xen reports error like:

   (XEN) arch/arm/p2m.c:2202: d0v0: Failing to acquire the MFN 0x1a02dc

This patch introduces a function device_tree_node_is_available(). If it
detects a memory node is not enabled, Xen will not add the memory region
into the memory lists. In the end, this avoids to generate the memory
node for the disabled memory regions sent to the kernel and the kernel
cannot use the disabled memory nodes any longer.

Since this patch adds checking device node's status in the
device_tree_get_meminfo() function, except it checks for memory nodes
and reserved memory nodes, it also supports status for static memory
and static heap.

Suggested-by: Michal Orzel <michal.orzel@xxxxxxx>
Signed-off-by: Leo Yan <leo.yan@xxxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

Gentle ping.

I don't see this patch is landed in Xen master or staging branch, should
anything I need to follow up?

The tree has been frozen for the past few weeks for any patches that are not meant for 4.18. We branched for 4.18 last week so staging is now in soft-reopening until 4.18 is released.

I am aware of few patches that are ready to be merged. But I haven't yet gone through all of them and merge to 4.19. It will probably be done once 4.18 is released.

Cheers,

--
Julien Grall



 


Rackspace

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