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