From: Marcelo Tosatti Date: Wed, 26 Feb 2014 02:22:07 +0000 (-0300) Subject: kvm-all: exit in case max vcpus exceeded X-Git-Tag: v2.0.0-rc0~20^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9ba3cf540fb902cbb40f0689868d51a2ac111852;p=users%2Fdwmw2%2Fqemu.git kvm-all: exit in case max vcpus exceeded 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 --- diff --git a/kvm-all.c b/kvm-all.c index fd8157ad5e..f299532e27 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++;