x86/xen: Disable CPU0 hotplug for Xen PV
authorJuergen Gross <jgross@suse.com>
Wed, 12 Sep 2018 17:41:22 +0000 (19:41 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 Sep 2018 19:15:02 +0000 (21:15 +0200)
Xen PV guests don't allow CPU0 hotplug, so disable it.

Signed-off-by: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: boris.ostrovsky@oracle.com
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/20180912174122.24282-1-jgross@suse.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/topology.c

index 12cbe2b..738bf42 100644 (file)
@@ -111,8 +111,10 @@ int arch_register_cpu(int num)
        /*
         * Currently CPU0 is only hotpluggable on Intel platforms. Other
         * vendors can add hotplug support later.
+        * Xen PV guests don't support CPU0 hotplug at all.
         */
-       if (c->x86_vendor != X86_VENDOR_INTEL)
+       if (c->x86_vendor != X86_VENDOR_INTEL ||
+           boot_cpu_has(X86_FEATURE_XENPV))
                cpu0_hotpluggable = 0;
 
        /*