libvirt/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
Jiri Denemark f99fdbd1ec libvirt-7.3.0-1.el9
- Rebased to libvirt-7.3.0 (rhbz#1950948)
- The rebase also fixes the following bugs:
    rhbz#1898526, rhbz#1910617, rhbz#1910618, rhbz#1943392, rhbz#1946918
    rhbz#1947718, rhbz#1947720, rhbz#1947824, rhbz#1949342, rhbz#1950228
    rhbz#1950301, rhbz#1950601, rhbz#1950948, rhbz#1953939, rhbz#1958302
    rhbz#1962053
- RHEL: Enable usage of x-blockdev-reopen (rhbz#1953939)
- RHEL: Add gating.yaml for RHEL9 (rhbz#1950601)
Resolves: rhbz#1898526, rhbz#1910617, rhbz#1910618, rhbz#1943392, rhbz#1946918
Resolves: rhbz#1947718, rhbz#1947720, rhbz#1947824, rhbz#1949342, rhbz#1950228
Resolves: rhbz#1950301, rhbz#1950601, rhbz#1950948, rhbz#1953939, rhbz#1958302
Resolves: rhbz#1962053
2021-05-24 18:44:48 +02:00

47 lines
1.4 KiB
Diff

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