[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu l
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu limit |
Date: |
Fri, 23 Aug 2013 11:39:51 +0200 |
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.8.3.1
- Re: [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device(), (continued)
- [Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 2/9] target-i386: remove tabs from target-i386/cpu.h, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 5/9] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 3/9] kvm: migrate vPMU state, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 6/9] kvm: Simplify kvm_handle_io, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 4/9] kvm: add KVM_IRQFD_FLAG_RESAMPLE support, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu limit,
Paolo Bonzini <=
- [Qemu-devel] [PULL 8/9] kvm: i386: fix LAPIC TSC deadline timer save/restore, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device(), Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 5/9] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 2/9] target-i386: remove tabs from target-i386/cpu.h, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 6/9] kvm: Simplify kvm_handle_io, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 3/9] kvm: migrate vPMU state, Paolo Bonzini, 2013/08/23
- [Qemu-devel] [PULL 4/9] kvm: add KVM_IRQFD_FLAG_RESAMPLE support, Paolo Bonzini, 2013/08/23