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