From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] x86/Dom0: Don't allow dom0_max_vcpus to be zero Date: Fri, 10 Apr 2015 10:47:18 -0400 Message-ID: <20150410144718.GD14574@l.oracle.com> References: <1428611923-1282-1-git-send-email-boris.ostrovsky@oracle.com> <5526E818.4040300@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5526E818.4040300@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Boris Ostrovsky , keir@xen.org, jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Apr 09, 2015 at 09:59:04PM +0100, Andrew Cooper wrote: > On 09/04/2015 21:38, Boris Ostrovsky wrote: > > In case dom0_max_vcpus is incorrectly specified on boot line make sure > > we will still boot. > > > > Signed-off-by: Boris Ostrovsky > > Good catch - lets not do that. > > Reviewed-by: Andrew Cooper Aye, Reviewed-by: Konrad Rzeszutek Wilk > > > --- > > 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 */ >