From 73389ba0d6eabc68d6c6ac57a8ed55d7d0f855d9 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 21 Jan 2014 10:46:52 +0100 Subject: [PATCH 163/212] use recommended max vcpu count RH-Author: Andrew Jones Message-id: <1390301212-15344-1-git-send-email-drjones@redhat.com> Patchwork-id: 56862 O-Subject: [RHEL7.0 qemu-kvm PATCH v6] use recommended max vcpu count Bugzilla: 998708 RH-Acked-by: Paolo Bonzini RH-Acked-by: Laszlo Ersek RH-Acked-by: Marcelo Tosatti RHEL-only Bugzilla: 998708 Brew: 6905708 The recommended vcpu max limit (KVM_CAP_NR_VCPUS) should be used instead of the actual max vcpu limit (KVM_CAP_MAX_VCPUS) to give an error. This matches the limit tested by QE on RHEL6: 160. Signed-off-by: Andrew Jones --- kvm-all.c | 3 +++ 1 file changed, 3 insertions(+) Signed-off-by: Miroslav Rezanina --- kvm-all.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 1402f4f..8f9bcb8 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1444,6 +1444,9 @@ int kvm_init(MachineClass *mc) soft_vcpus_limit = kvm_recommended_vcpus(s); hard_vcpus_limit = kvm_max_vcpus(s); + /* RHEL doesn't support nr_vcpus > soft_vcpus_limit */ + hard_vcpus_limit = soft_vcpus_limit; + while (nc->name) { if (nc->num > soft_vcpus_limit) { fprintf(stderr, -- 1.7.1