xen/arm: Check if the platform is not using ACPI before initializing Dom0less
authorJulien Grall <jgrall@amazon.com>
Sat, 26 Sep 2020 20:16:55 +0000 (21:16 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Mon, 13 Sep 2021 09:51:21 +0000 (11:51 +0200)
Dom0less requires a device-tree. However, since commit 6e3e77120378
"xen/arm: setup: Relocate the Device-Tree later on in the boot", the
device-tree will not get unflatten when using ACPI.

This will lead to a crash during boot.

Given the complexity to setup dom0less with ACPI (for instance how to
assign device?), we should skip any code related to Dom0less when using
ACPI.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Elliott Mitchell <ehem+xen@m5p.com>
(cherry picked from commit dac867bf9adc1562a4cf9db5f89726597af13ef8)

xen/arch/arm/setup.c

index 34b1c1a11ef6115da6781d11c772ff3576661af8..fb2f45e230fa144c43cd7aef90a5a143c435e3e2 100644 (file)
@@ -961,7 +961,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     if ( construct_dom0(dom0) != 0)
         panic("Could not set up DOM0 guest OS\n");
 
-    create_domUs();
+    if ( acpi_disabled )
+        create_domUs();
 
     /*
      * This needs to be called **before** heap_init_late() so modules