xen/arm: don't assign domU static-mem to dom0 as reserved-memory
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Wed, 10 Nov 2021 20:18:12 +0000 (12:18 -0800)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Thu, 11 Nov 2021 18:34:18 +0000 (10:34 -0800)
commit9aaf437cd3612fea26d5a645da83b8f21cf34a79
tree32f8419394f79d0cbbee0cd2596da5bccd5e8ab6
parent9d9cd0c6f5b16652f61e7f21233ec8dfd6cf7df2
xen/arm: don't assign domU static-mem to dom0 as reserved-memory

DomUs static-mem ranges are added to the reserved_mem array for
accounting, but they shouldn't be assigned to dom0 as the other regular
reserved-memory ranges in device tree.

In make_memory_nodes, fix the error by skipping banks with xen_domain
set to true in the reserved-memory array. Also make sure to use the
first valid (!xen_domain) start address for the memory node name.

Fixes: 41c031ff437b ("xen/arm: introduce domain on Static Allocation")
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Penny Zheng <penny.zheng@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
xen/arch/arm/domain_build.c