Blame SOURCES/0016-use-recommended-max-vcpu-count.patch

4a2fec
From a1f26d85171b4d554225150053700e93ba6eba10 Mon Sep 17 00:00:00 2001
4a2fec
From: Andrew Jones <drjones@redhat.com>
4a2fec
Date: Tue, 21 Jan 2014 10:46:52 +0100
4a2fec
Subject: use recommended max vcpu count
4a2fec
4a2fec
RH-Author: Andrew Jones <drjones@redhat.com>
4a2fec
Message-id: <1390301212-15344-1-git-send-email-drjones@redhat.com>
4a2fec
Patchwork-id: 56862
4a2fec
O-Subject: [RHEL7.0 qemu-kvm PATCH v6] use recommended max vcpu count
4a2fec
Bugzilla: 998708
4a2fec
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
4a2fec
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
4a2fec
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
4a2fec
4a2fec
The recommended vcpu max limit (KVM_CAP_NR_VCPUS) should be used instead
4a2fec
of the actual max vcpu limit (KVM_CAP_MAX_VCPUS) to give an error.
4a2fec
4a2fec
This matches the limit tested by QE on RHEL6: 160.
4a2fec
4a2fec
Signed-off-by: Andrew Jones <drjones@redhat.com>
4a2fec
(cherry picked from commit a4ceb63bdc5cbac19f5f633ec761b9de0dedb55e)
4a2fec
---
4a2fec
 accel/kvm/kvm-all.c | 3 +++
4a2fec
 1 file changed, 3 insertions(+)
4a2fec
4a2fec
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
4a2fec
index 46ce479..b42c56a 100644
4a2fec
--- a/accel/kvm/kvm-all.c
4a2fec
+++ b/accel/kvm/kvm-all.c
4a2fec
@@ -1627,6 +1627,9 @@ static int kvm_init(MachineState *ms)
4a2fec
     soft_vcpus_limit = kvm_recommended_vcpus(s);
4a2fec
     hard_vcpus_limit = kvm_max_vcpus(s);
4a2fec
 
4a2fec
+    /* RHEL doesn't support nr_vcpus > soft_vcpus_limit */
4a2fec
+    hard_vcpus_limit = soft_vcpus_limit;
4a2fec
+
4a2fec
     while (nc->name) {
4a2fec
         if (nc->num > soft_vcpus_limit) {
4a2fec
             fprintf(stderr,
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec