|
|
1b87cf |
From 29eb7b77805cf5fb756c964cdbe7fb7fb2c01f5f Mon Sep 17 00:00:00 2001
|
|
|
1b87cf |
Message-Id: <29eb7b77805cf5fb756c964cdbe7fb7fb2c01f5f@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
|
|
|
1b87cf |
index a07c00a0e9..35f41daef2 100644
|
|
|
edecca |
--- a/src/util/virhostcpu.c
|
|
|
edecca |
+++ b/src/util/virhostcpu.c
|
|
|
1b87cf |
@@ -1166,6 +1166,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 |
--
|
|
|
1b87cf |
2.34.1
|
|
|
edecca |
|