From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [uq/master PATCH] kvm-all: exit in case max vcpus exceeded Date: Wed, 26 Feb 2014 11:27:44 +0100 Message-ID: <530DC1A0.80703@redhat.com> References: <20140226022207.GA2787@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit To: Marcelo Tosatti , kvm-devel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58677 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbaBZK1q (ORCPT ); Wed, 26 Feb 2014 05:27:46 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1QARkPc019359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 26 Feb 2014 05:27:46 -0500 In-Reply-To: <20140226022207.GA2787@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Il 26/02/2014 03:22, Marcelo Tosatti ha scritto: > > Rather than fall back to TCG (so the user has to discover > whats happening, in case of no access to qemu stdout/stderr). > > Signed-off-by: Marcelo Tosatti > > diff --git a/kvm-all.c b/kvm-all.c > index 3937754..3f6841d 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -1432,11 +1432,10 @@ int kvm_init(void) > nc->name, nc->num, soft_vcpus_limit); > > if (nc->num > hard_vcpus_limit) { > - ret = -EINVAL; > fprintf(stderr, "Number of %s cpus requested (%d) exceeds " > "the maximum cpus supported by KVM (%d)\n", > nc->name, nc->num, hard_vcpus_limit); > - goto err; > + exit(1); > } > } > nc++; > Thanks, I applied this locally. I'll push to uq/master once the pending pull request is processed. Paolo