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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

patchbot
commit 736eb39d1f2d0b042bc770149c33929aab8b5b71
Author:     Jan Beulich <[hidden email]>
AuthorDate: Thu Jul 12 10:46:58 2018 +0200
Commit:     Jan Beulich <[hidden email]>
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 <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
    Reviewed-by: Roger Pau Monné <[hidden email]>
    Reviewed-by: Wei Liu <[hidden email]>
---
 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
[hidden email]
https://lists.xenproject.org/xen-changelog