From 7e144af26a2f0f8b5b972d60c32e55824bcc60b4 Mon Sep 17 00:00:00 2001 From: Marcelo Tosatti Date: Thu, 6 Mar 2014 02:29:12 +0100 Subject: [PATCH 03/16] kvm-all: exit in case max vcpus exceeded RH-Author: Marcelo Tosatti Message-id: <20140306022912.GC4955@amt.cnet> Patchwork-id: 58024 O-Subject: [RHEL7.0 qemu-kvm PATCH] kvm-all: exit in case max vcpus exceeded Bugzilla: 993429 RH-Acked-by: Amos Kong RH-Acked-by: Andrew Jones RH-Acked-by: Paolo Bonzini Rather than fall back to TCG (so the user has to discover whats happening, in case of no access to qemu stdout/stderr). (cherry-picked from 9ba3cf540fb9 from uq/master) Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini BZ: 993429 Signed-off-by: Miroslav Rezanina --- kvm-all.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 16e4f65..adc0a8e 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1382,11 +1382,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.7.1