]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen/acpi: Disable ACPI memory hotplug when running under Xen.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 5 Jul 2016 16:54:55 +0000 (12:54 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 8 Jul 2016 05:48:32 +0000 (22:48 -0700)
This came about as we back-ported f5775e0b6116b7e2425ccf535243b21768566d87
"x86/xen: discard RAM regions above the maximum reservation".

where on certain very specific Intel platforms (which can do memory
hotplug) we would crash during bootup.

The reason for the failure is that we use the baremetal mechanism
to do memory hotplug - which is not appropiate. We should use
the xen-acpi-memory.c one, but ..

config XEN_ACPI_HOTPLUG_MEMORY

    tristate "Xen ACPI memory hotplug"

    depends on XEN_DOM0 && XEN_STUB && ACPI
and
config XEN_STUB

    bool "Xen stub drivers"

    depends on XEN && X86_64 && BROKEN

See the 'BROKEN'? That came about
76fc253723add627cf28c09c79fb67e71f9e4782
"xen/acpi-stub: Disable it b/c the acpi_processor_add is no longer called.":

    With the Xen ACPI stub code (CONFIG_XEN_STUB=y) enabled, the power
    C and P states are no longer uploaded to the hypervisor.

   ..
Fixing 76fc253723add627cf28c09c79fb67e71f9e4782 would be nice, but
that is some upstream work to get done and we don't have the time.

In the meantime we can:
 1) Revert f5775e0b6116b7e2425ccf535243b21768566d87
    I would prefer not as we would diverge from upstream when it comes
    to backporting features.
 2) Simulate acpi_no_memhotplug being passed on the Linux command line.
    That is much easier, and we can carry this patch until upstream
    gets a proper fix.

The patch "solves" the regression be implementing 2).

Reported-and-Tested-by: Deepak Patel <deepak.patel@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
OraBug:23735125

arch/x86/xen/setup.c
drivers/acpi/acpi_memhotplug.c

index d1fac0e53d570b2e4162a396b80acc305da87ef9..cbd4a9111bcb94a5d7c2a6fc2495e72b2880eaab 100644 (file)
@@ -1050,6 +1050,9 @@ void __init xen_pvmmu_arch_setup(void)
        xen_enable_syscall();
 }
 
+#ifdef CONFIG_ACPI_HOTPLUG_MEMORY
+extern bool acpi_no_memhotplug;
+#endif
 /* This function is not called for HVM domains */
 void __init xen_arch_setup(void)
 {
@@ -1076,4 +1079,7 @@ void __init xen_arch_setup(void)
 #ifdef CONFIG_NUMA
        numa_off = 1;
 #endif
+#ifdef CONFIG_ACPI_HOTPLUG_MEMORY
+        acpi_no_memhotplug = true;
+#endif
 }
index ee28f4d15625f433a68f0bcfa3dfc6ff521dd388..2cd89f41c17c3f5e3f6356a443a3a745b01617ff 100644 (file)
@@ -362,7 +362,7 @@ static void acpi_memory_device_remove(struct acpi_device *device)
        acpi_memory_device_free(mem_device);
 }
 
-static bool __initdata acpi_no_memhotplug;
+bool __initdata acpi_no_memhotplug;
 
 void __init acpi_memory_hotplug_init(void)
 {