mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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 <mtosatti@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9fbee91a13
commit
9ba3cf540f
1 changed files with 1 additions and 2 deletions
|
@ -1420,11 +1420,10 @@ int kvm_init(void)
|
||||||
nc->name, nc->num, soft_vcpus_limit);
|
nc->name, nc->num, soft_vcpus_limit);
|
||||||
|
|
||||||
if (nc->num > hard_vcpus_limit) {
|
if (nc->num > hard_vcpus_limit) {
|
||||||
ret = -EINVAL;
|
|
||||||
fprintf(stderr, "Number of %s cpus requested (%d) exceeds "
|
fprintf(stderr, "Number of %s cpus requested (%d) exceeds "
|
||||||
"the maximum cpus supported by KVM (%d)\n",
|
"the maximum cpus supported by KVM (%d)\n",
|
||||||
nc->name, nc->num, hard_vcpus_limit);
|
nc->name, nc->num, hard_vcpus_limit);
|
||||||
goto err;
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nc++;
|
nc++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue