libvirt/libvirt-Revert-RHEL-Fix-vir...

41 lines
1.4 KiB
Diff

From 8b90cda4a70e0cde0f386b41fddb59b6407a355b Mon Sep 17 00:00:00 2001
Message-Id: <8b90cda4a70e0cde0f386b41fddb59b6407a355b@dist-git>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Thu, 9 Jun 2022 13:11:02 +0200
Subject: [PATCH] Revert "RHEL: Fix virConnectGetMaxVcpus output"
This reverts commit fcec98bb80633bec6f4bc3de0ab75627c874d315.
Upstream KVM changed its soft limit for number of vCPUs to match the
number of physical CPUs on the host. This will make it into the kernel
in 9.1.0 and thus downstream qemu-kvm dropped their RHEL-only patch to
consider KVM soft limit as hard (otherwise no CPU overcommitment would
be possible). We need to do the same to avoid reporting wrong numbers.
https://bugzilla.redhat.com/show_bug.cgi?id=2095260
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/util/virhostcpu.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index d3f0fbb31c..e3f2d6d4b7 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -1172,11 +1172,6 @@ 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.35.1