]> xenbits.xensource.com Git - xen.git/commit
xen/arm: fix duplicate /reserved-memory node in Dom0
authorPenny Zheng <Penny.Zheng@arm.com>
Thu, 18 Apr 2024 07:36:51 +0000 (08:36 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 24 Apr 2024 18:13:35 +0000 (19:13 +0100)
commit51a2b3f109189ec2f3ea9a14921e6976e6098577
treefbf0bc304a7f9bbac69a78098cbca59082ec4d15
parenta0fee882c1404500470fe4e0ade1495dea6c1f04
xen/arm: fix duplicate /reserved-memory node in Dom0

In case there is a /reserved-memory node already present in the host
dtb, current Xen codes would create yet another /reserved-memory node
when the static shared memory feature is enabled and static shared
memory regions are present.
This would result in an incorrect device tree generation and hwdom
would not be able to detect the static shared memory region.

Avoid this issue by checking the presence of the /reserved-memory
node and appending the nodes instead of generating a duplicate
/reserved-memory.

Make make_shm_memory_node externally visible and rename it to
make_shm_resv_memory_node to make clear it produces childs for
/reserved-memory.

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
xen/arch/arm/domain_build.c
xen/arch/arm/include/asm/static-shmem.h
xen/arch/arm/static-shmem.c