|
|
4a2fec |
From 0584216921b243fac91395aa8975dbc34997381a Mon Sep 17 00:00:00 2001
|
|
|
4a2fec |
From: David Gibson <dgibson@redhat.com>
|
|
|
4a2fec |
Date: Mon, 4 Dec 2017 06:30:08 +0100
|
|
|
4a2fec |
Subject: [PATCH 28/36] Match POWER max cpus to x86
|
|
|
4a2fec |
|
|
|
4a2fec |
RH-Author: David Gibson <dgibson@redhat.com>
|
|
|
4a2fec |
Message-id: <20171204063008.31826-1-dgibson@redhat.com>
|
|
|
4a2fec |
Patchwork-id: 78091
|
|
|
4a2fec |
O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH] [RHEL only] Match POWER max cpus to x86
|
|
|
4a2fec |
Bugzilla: 1495456
|
|
|
4a2fec |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
On at least some x86 configurations we now support 384 guest vcpus.
|
|
|
4a2fec |
POWER supports more than that in theory, but set the cap to 384 as a
|
|
|
4a2fec |
supported maximum for feature parity. This includes updating the
|
|
|
4a2fec |
downstream lie about what KVM supports (in fact it supports 2048 vcpus
|
|
|
4a2fec |
as of right now).
|
|
|
4a2fec |
|
|
|
4a2fec |
As of the current kernel, even with this patch 384 vcpus can only be
|
|
|
4a2fec |
created with threads=2 or greater (in the guest), otherwise the
|
|
|
4a2fec |
spacing of guest vcpu numbers causes us to exhaust the 2048 vcpu ids
|
|
|
4a2fec |
in KVM. There are a few ways we could address that, which we'll track
|
|
|
4a2fec |
as a different bug.
|
|
|
4a2fec |
|
|
|
4a2fec |
Testing: Started guest with -smp 384,threads=2 using new qemu
|
|
|
4a2fec |
|
|
|
4a2fec |
Signed-off-by: David Gibson <dgibson@redhat.com>
|
|
|
4a2fec |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
4a2fec |
---
|
|
|
4a2fec |
accel/kvm/kvm-all.c | 4 ++--
|
|
|
4a2fec |
hw/ppc/spapr.c | 3 ++-
|
|
|
4a2fec |
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
4a2fec |
|
|
|
4a2fec |
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
|
|
4a2fec |
index 80ab1c7..94c4968 100644
|
|
|
4a2fec |
--- a/accel/kvm/kvm-all.c
|
|
|
4a2fec |
+++ b/accel/kvm/kvm-all.c
|
|
|
4a2fec |
@@ -1638,9 +1638,9 @@ static int kvm_init(MachineState *ms)
|
|
|
4a2fec |
*
|
|
|
4a2fec |
* However the POWER hard limit advertised by the kernel is 2048
|
|
|
4a2fec |
* (== NR_CPUS) but we only want to allow up to the number of
|
|
|
4a2fec |
- * vCPUs we actually test, so we force the hard limit to 240
|
|
|
4a2fec |
+ * vCPUs we actually test, so we force the hard limit to 384
|
|
|
4a2fec |
*/
|
|
|
4a2fec |
- hard_vcpus_limit = 240;
|
|
|
4a2fec |
+ hard_vcpus_limit = 384;
|
|
|
4a2fec |
if (soft_vcpus_limit > hard_vcpus_limit) {
|
|
|
4a2fec |
soft_vcpus_limit = hard_vcpus_limit;
|
|
|
4a2fec |
}
|
|
|
4a2fec |
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
|
|
4a2fec |
index 6c64c55..8623996 100644
|
|
|
4a2fec |
--- a/hw/ppc/spapr.c
|
|
|
4a2fec |
+++ b/hw/ppc/spapr.c
|
|
|
4a2fec |
@@ -3580,7 +3580,8 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
|
|
|
4a2fec |
mc->init = ppc_spapr_init;
|
|
|
4a2fec |
mc->reset = ppc_spapr_reset;
|
|
|
4a2fec |
mc->block_default_type = IF_SCSI;
|
|
|
4a2fec |
- mc->max_cpus = 1024;
|
|
|
4a2fec |
+ /* RHEL: set to max # of supported vcpus */
|
|
|
4a2fec |
+ mc->max_cpus = 384;
|
|
|
4a2fec |
mc->no_parallel = 1;
|
|
|
4a2fec |
mc->default_boot_order = "";
|
|
|
4a2fec |
mc->default_ram_size = 512 * M_BYTE;
|
|
|
4a2fec |
--
|
|
|
4a2fec |
1.8.3.1
|
|
|
4a2fec |
|