|
|
aa5bf2 |
From 540233361294459596ec2e4ccef089662945ac5c Mon Sep 17 00:00:00 2001
|
|
|
aa5bf2 |
Message-Id: <540233361294459596ec2e4ccef089662945ac5c@dist-git>
|
|
|
d76c62 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
d76c62 |
Date: Mon, 27 Aug 2018 13:09:38 +0200
|
|
|
d76c62 |
Subject: [PATCH] RHEL: Fix virConnectGetMaxVcpus output
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1092363
|
|
|
d76c62 |
|
|
|
d76c62 |
RHEL-only.
|
|
|
d76c62 |
|
|
|
d76c62 |
Ignore the maximum vcpu limit (KVM_CAP_MAX_VCPUS) on RHEL,
|
|
|
d76c62 |
since RHEL QEMU treats the recommended limit (KVM_CAP_NR_VCPUS)
|
|
|
d76c62 |
as the maximum, see:
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=998708
|
|
|
d76c62 |
|
|
|
d76c62 |
(cherry picked from commit 7dff909fa34bdd93ad200dbffe70c0c1ee931925)
|
|
|
d76c62 |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
|
|
|
d76c62 |
https: //bugzilla.redhat.com/show_bug.cgi?id=1582222
|
|
|
d76c62 |
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/util/virhostcpu.c | 5 +++++
|
|
|
d76c62 |
1 file changed, 5 insertions(+)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
|
|
|
aa5bf2 |
index 5dd2baf2df..6811c498f9 100644
|
|
|
d76c62 |
--- a/src/util/virhostcpu.c
|
|
|
d76c62 |
+++ b/src/util/virhostcpu.c
|
|
|
9de337 |
@@ -1192,6 +1192,11 @@ virHostCPUGetKVMMaxVCPUs(void)
|
|
|
d76c62 |
return -1;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
+/* Ignore KVM_CAP_MAX_VCPUS on RHEL - the recommended maximum
|
|
|
d76c62 |
+ * is treated as a hard limit.
|
|
|
d76c62 |
+ */
|
|
|
d76c62 |
+# undef KVM_CAP_MAX_VCPUS
|
|
|
d76c62 |
+
|
|
|
d76c62 |
# ifdef KVM_CAP_MAX_VCPUS
|
|
|
d76c62 |
/* at first try KVM_CAP_MAX_VCPUS to determine the maximum count */
|
|
|
d76c62 |
if ((ret = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_MAX_VCPUS)) > 0)
|
|
|
d76c62 |
--
|
|
|
aa5bf2 |
2.33.0
|
|
|
d76c62 |
|