From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNKGu-0002rn-V6 for qemu-devel@nongnu.org; Tue, 11 Mar 2014 06:51:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNKGl-0003pV-Ra for qemu-devel@nongnu.org; Tue, 11 Mar 2014 06:50:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNKGl-0003pQ-KI for qemu-devel@nongnu.org; Tue, 11 Mar 2014 06:50:47 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2BAokki012198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Mar 2014 06:50:46 -0400 From: Paolo Bonzini Date: Tue, 11 Mar 2014 11:50:36 +0100 Message-Id: <1394535038-32454-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1394535038-32454-1-git-send-email-pbonzini@redhat.com> References: <1394535038-32454-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 1/3] kvm-all: exit in case max vcpus exceeded List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcelo Tosatti From: Marcelo Tosatti 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 Signed-off-by: Paolo Bonzini --- kvm-all.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index fd8157a..f299532 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1420,11 +1420,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++; -- 1.8.3.1