From 736eb39d1f2d0b042bc770149c33929aab8b5b71 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 12 Jul 2018 10:46:58 +0200 Subject: [PATCH] x86/shim: fully ignore "nosmp" and "maxcpus=" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In the shim case, the number of CPUs should be solely controlled by the guest configuration file. Make sure the command line options are fully (and not just partially) ignored. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Reviewed-by: Roger Pau Monné Reviewed-by: Wei Liu --- docs/misc/xen-command-line.markdown | 6 ++++++ xen/arch/x86/setup.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 4f75f64a90..875c331d9a 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -1288,6 +1288,10 @@ free memory is getting low. Specifying `0` will disable this notification. ### maxcpus (x86) > `= ` +Specify the maximum number of CPUs that should be brought up. + +This option is ignored in **pv-shim** mode. + ### max\_cstate (x86) > `= ` @@ -1435,6 +1439,8 @@ seconds. Disable SMP support. No secondary processors will be booted. Defaults to booting secondary processors. +This option is ignored in **pv-shim** mode. + ### nr\_irqs (x86) > `= ` diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 419b46c033..8690535aa7 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1495,6 +1495,15 @@ void __init noreturn __start_xen(unsigned long mbi_p) if ( smp_found_config ) get_smp_config(); + /* + * In the shim case, the number of CPUs should be solely controlled by the + * guest configuration file. + */ + if ( pv_shim ) + { + opt_nosmp = false; + max_cpus = 0; + } if ( opt_nosmp ) { max_cpus = 0; -- 2.30.2