]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: Don't call process_shm_chosen() during ACPI boot
authorMichal Orzel <michal.orzel@amd.com>
Wed, 2 Apr 2025 08:42:32 +0000 (10:42 +0200)
committerMichal Orzel <michal.orzel@amd.com>
Thu, 3 Apr 2025 07:52:54 +0000 (09:52 +0200)
Static shared memory requires device-tree boot. At the moment, booting
with ACPI enabled and CONFIG_STATIC_SHM=y results in a data abort when
dereferencing node in process_shm() because dt_host is always NULL.

Fixes: 09c0a8976acf ("xen/arm: enable statically shared memory on Dom0")
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/arch/arm/domain_build.c

index 2b5b4331834f19545a28fa1650102862e0fb236b..85f423214a44cb8c4cf6a9b90115698711df7b9c 100644 (file)
@@ -2325,9 +2325,12 @@ int __init construct_hwdom(struct kernel_info *kinfo)
     else
         allocate_memory(d, kinfo);
 
-    rc = process_shm_chosen(d, kinfo);
-    if ( rc < 0 )
-        return rc;
+    if ( acpi_disabled )
+    {
+        rc = process_shm_chosen(d, kinfo);
+        if ( rc < 0 )
+            return rc;
+    }
 
     /* Map extra GIC MMIO, irqs and other hw stuffs to dom0. */
     rc = gic_map_hwdom_extra_mappings(d);