From: Jan Beulich Date: Thu, 12 Jul 2018 08:46:58 +0000 (+0200) Subject: x86/shim: fully ignore "nosmp" and "maxcpus=" X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3622 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=736eb39d1f2d0b042bc770149c33929aab8b5b71;p=xen.git x86/shim: fully ignore "nosmp" and "maxcpus=" 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 --- 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;