cryptospore / rpms / qemu-kvm

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