aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Gross <[email protected]>2018-09-12 19:41:22 +0200
committerIngo Molnar <[email protected]>2018-09-12 21:15:02 +0200
commit999696752db1099aba595aac4f8d881f8c7cf4e6 (patch)
tree748a22c2c723e2a660ac2543d3fae56e634ef016
parent6a92b11169a65b3f8cc512c75a252cbd0d096ba0 (diff)
x86/xen: Disable CPU0 hotplug for Xen PV
Xen PV guests don't allow CPU0 hotplug, so disable it. Signed-off-by: Juergen Gross <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--arch/x86/kernel/topology.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 12cbe2b88c0f..738bf42b0218 100644
--- a/arch/x86/kernel/topology.c
+++ b/arch/x86/kernel/topology.c
@@ -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;
/*