summaryrefslogtreecommitdiff
path: root/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-09-12 01:06:10 +0000
committerCoprDistGit <infra@openeuler.org>2023-09-12 01:06:10 +0000
commitd6d9b3795aceb43d6aa1fcab85193e88049ce309 (patch)
tree6fc7120d35bbdccab9830f6b46100bbed6501bf6 /libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
parent0081bffd55f7e9dc8df063521321178b95758d24 (diff)
automatic import of libvirtopeneuler22.03_LTS
Diffstat (limited to 'libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch')
-rw-r--r--libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch b/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
new file mode 100644
index 0000000..1ebd478
--- /dev/null
+++ b/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
@@ -0,0 +1,46 @@
+From 2b24836d30d5d576a641f2372877acf68a25ff3b Mon Sep 17 00:00:00 2001
+Message-Id: <2b24836d30d5d576a641f2372877acf68a25ff3b@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 5dd2baf2df..6811c498f9 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.33.1
+