x86/shim: fully ignore "nosmp" and "maxcpus="
authorJan Beulich <jbeulich@suse.com>
Thu, 12 Jul 2018 08:46:58 +0000 (10:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Jul 2018 08:46:58 +0000 (10:46 +0200)
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 <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
docs/misc/xen-command-line.markdown
xen/arch/x86/setup.c

index 4f75f64a90763cf739473a3b01d61e13f6927622..875c331d9a9582109c0a737ceb8cf95e2f554dd2 100644 (file)
@@ -1288,6 +1288,10 @@ free memory is getting low.  Specifying `0` will disable this notification.
 ### maxcpus (x86)
 > `= <integer>`
 
+Specify the maximum number of CPUs that should be brought up.
+
+This option is ignored in **pv-shim** mode.
+
 ### max\_cstate (x86)
 > `= <integer>`
 
@@ -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)
 > `= <integer>`
 
index 419b46c03344d5b938ae98f372dff6f4878506a1..8690535aa71c8eeb0aa463b232131df37c9e6940 100644 (file)
@@ -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;