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