|
|
c1c534 |
From e6b3f2c8091afc39840c44add90c0148db365811 Mon Sep 17 00:00:00 2001
|
|
|
c1c534 |
Message-Id: <e6b3f2c8091afc39840c44add90c0148db365811@dist-git>
|
|
|
6d3351 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
6d3351 |
Date: Wed, 17 Sep 2014 19:00:58 +0200
|
|
|
6d3351 |
Subject: [PATCH] RHEL: Fix maxvcpus output
|
|
|
6d3351 |
|
|
|
6d3351 |
https://bugzilla.redhat.com/show_bug.cgi?id=1092363
|
|
|
6d3351 |
|
|
|
6d3351 |
RHEL-only.
|
|
|
6d3351 |
|
|
|
6d3351 |
Ignore the maximum vcpu limit (KVM_CAP_MAX_VCPUS) on RHEL,
|
|
|
6d3351 |
since RHEL QEMU treats the recommended limit (KVM_CAP_NR_VCPUS)
|
|
|
6d3351 |
as the maximum, see:
|
|
|
6d3351 |
https://bugzilla.redhat.com/show_bug.cgi?id=998708
|
|
|
6d3351 |
|
|
|
6d3351 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
6d3351 |
---
|
|
|
6d3351 |
src/util/virhostcpu.c | 5 +++++
|
|
|
6d3351 |
1 file changed, 5 insertions(+)
|
|
|
6d3351 |
|
|
|
6d3351 |
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
|
|
|
c1c534 |
index c485a97211..bd58aa43df 100644
|
|
|
6d3351 |
--- a/src/util/virhostcpu.c
|
|
|
6d3351 |
+++ b/src/util/virhostcpu.c
|
|
|
c1c534 |
@@ -1178,6 +1178,11 @@ virHostCPUGetKVMMaxVCPUs(void)
|
|
|
6d3351 |
return -1;
|
|
|
6d3351 |
}
|
|
|
6d3351 |
|
|
|
6d3351 |
+/* Ignore KVM_CAP_MAX_VCPUS on RHEL - the recommended maximum
|
|
|
6d3351 |
+ * is treated as a hard limit.
|
|
|
6d3351 |
+ */
|
|
|
6d3351 |
+# undef KVM_CAP_MAX_VCPUS
|
|
|
6d3351 |
+
|
|
|
6d3351 |
# ifdef KVM_CAP_MAX_VCPUS
|
|
|
6d3351 |
/* at first try KVM_CAP_MAX_VCPUS to determine the maximum count */
|
|
|
6d3351 |
if ((ret = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_MAX_VCPUS)) > 0)
|
|
|
6d3351 |
--
|
|
|
c1c534 |
2.14.3
|
|
|
6d3351 |
|