[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/10] kvm-all.c: max_cpus should not exceed KVM vcp
From: |
Gleb Natapov |
Subject: |
[Qemu-devel] [PATCH 07/10] kvm-all.c: max_cpus should not exceed KVM vcpu limit |
Date: |
Wed, 28 Aug 2013 17:33:35 +0300 |
From: Marcelo Tosatti <address@hidden>
maxcpus, which specifies the maximum number of hotpluggable CPUs,
should not exceed KVM's vcpu limit.
Signed-off-by: Marcelo Tosatti <address@hidden>
[Reword message. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>
---
kvm-all.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kvm-all.c b/kvm-all.c
index ef52a0f..a2d4978 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1400,6 +1400,13 @@ int kvm_init(void)
goto err;
}
+ if (max_cpus > max_vcpus) {
+ ret = -EINVAL;
+ fprintf(stderr, "Number of hotpluggable cpus requested (%d) exceeds
max cpus "
+ "supported by KVM (%d)\n", max_cpus, max_vcpus);
+ goto err;
+ }
+
s->vmfd = kvm_ioctl(s, KVM_CREATE_VM, 0);
if (s->vmfd < 0) {
#ifdef TARGET_S390X
--
1.7.10.4
- [Qemu-devel] [PATCH v3 00/10] [PULL] qemu-kvm.git uq/master queue, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 05/10] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 06/10] kvm: Simplify kvm_handle_io, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 02/10] target-i386: remove tabs from target-i386/cpu.h, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 01/10] Initialize IA32_FEATURE_CONTROL MSR in reset and migration, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 08/10] kvm: i386: fix LAPIC TSC deadline timer save/restore, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 09/10] kvm: shorten the parameter list for get_real_device(), Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 03/10] kvm: migrate vPMU state, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 04/10] kvm: add KVM_IRQFD_FLAG_RESAMPLE support, Gleb Natapov, 2013/08/28
- [Qemu-devel] [PATCH 07/10] kvm-all.c: max_cpus should not exceed KVM vcpu limit,
Gleb Natapov <=
- [Qemu-devel] [PATCH 10/10] kvm-stub: fix compilation, Gleb Natapov, 2013/08/28