[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] x86/shim: fully ignore "nosmp" and "maxcpus="



commit 736eb39d1f2d0b042bc770149c33929aab8b5b71
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jul 12 10:46:58 2018 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 12 10:46:58 2018 +0200

    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 <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 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)
 > `= <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>`
 
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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.