All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/Dom0: Don't allow dom0_max_vcpus to be zero
@ 2015-04-09 20:38 Boris Ostrovsky
  2015-04-09 20:59 ` Andrew Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Boris Ostrovsky @ 2015-04-09 20:38 UTC (permalink / raw)
  To: jbeulich, andrew.cooper3, keir; +Cc: boris.ostrovsky, xen-devel

In case dom0_max_vcpus is incorrectly specified on boot line make sure
we will still boot.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 xen/arch/x86/domain_build.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index e5c845c..378e650 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -92,6 +92,8 @@ static void __init parse_dom0_max_vcpus(const char *s)
     else                               /* N, N-, or N-M */
     {
         opt_dom0_max_vcpus_min = simple_strtoul(s, &s, 0);
+        if ( opt_dom0_max_vcpus_min == 0 )
+            opt_dom0_max_vcpus_min = 1;
         if ( !*s )                    /* N */
             opt_dom0_max_vcpus_max = opt_dom0_max_vcpus_min;
         else if ( *s++ == '-' && *s ) /* N-M */
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-14 13:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09 20:38 [PATCH] x86/Dom0: Don't allow dom0_max_vcpus to be zero Boris Ostrovsky
2015-04-09 20:59 ` Andrew Cooper
2015-04-10 14:47   ` Konrad Rzeszutek Wilk
2015-04-14  7:21   ` Jan Beulich
2015-04-14 13:52     ` Boris Ostrovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.