]> xenbits.xensource.com Git - xen.git/commit
xen/arm: dom0less: cope with missing /gic phandle
authorStewart Hildebrand <stewart.hildebrand@amd.com>
Fri, 11 Oct 2024 21:19:56 +0000 (17:19 -0400)
committerJulien Grall <jgrall@amazon.com>
Thu, 17 Oct 2024 14:42:11 +0000 (15:42 +0100)
commit081683ea578da56dd20b9dc22a64d03c893b47ba
treee9046674a9ec21981e0f3389b23df3f77eccf7c1
parent1e81d2df4f48f37d2086bc75199c75ca93cace92
xen/arm: dom0less: cope with missing /gic phandle

If a partial DT has a /gic node, but no references to it, dtc may omit
the phandle property. With the phandle property missing,
fdt_get_phandle() returns 0, leading Xen to generate a malformed domU
dtb due to invalid interrupt-parent phandle references. 0 is an invalid
phandle value. Add a zero check, and fall back to GUEST_PHANDLE_GIC.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/dom0less-build.c