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