|
|
4a2fec |
From 92fef14623387db071a79f64fa7996ce8ea9040e Mon Sep 17 00:00:00 2001
|
|
|
4a2fec |
From: David Hildenbrand <david@redhat.com>
|
|
|
4a2fec |
Date: Tue, 9 Jan 2018 10:32:53 +0100
|
|
|
4a2fec |
Subject: [PATCH 03/12] redhat: remove manual max_cpus limitations for ppc
|
|
|
4a2fec |
|
|
|
4a2fec |
RH-Author: David Hildenbrand <david@redhat.com>
|
|
|
4a2fec |
Message-id: <20180109103253.24517-3-david@redhat.com>
|
|
|
4a2fec |
Patchwork-id: 78532
|
|
|
4a2fec |
O-Subject: [RHEL-7.5 qemu-kvm-ma PATCH v2 2/2] redhat: remove manual max_cpus limitations for ppc
|
|
|
4a2fec |
Bugzilla: 1527449
|
|
|
4a2fec |
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
Upstream-status: n/a
|
|
|
4a2fec |
|
|
|
4a2fec |
We now globally limit the number of VCPUs, depending on release type
|
|
|
4a2fec |
(RHEL vs. RHV). Especially, there is no way one can specify more than
|
|
|
4a2fec |
max_cpus VCPUs for a VM.
|
|
|
4a2fec |
|
|
|
4a2fec |
This allows us the restore the ppc max_cpus limitation to the upstream
|
|
|
4a2fec |
default and minimize the ppc hack in kvm-all.c.
|
|
|
4a2fec |
|
|
|
4a2fec |
Signed-off-by: David Hildenbrand <david@redhat.com>
|
|
|
4a2fec |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
4a2fec |
---
|
|
|
4a2fec |
accel/kvm/kvm-all.c | 10 ----------
|
|
|
4a2fec |
hw/ppc/spapr.c | 3 +--
|
|
|
4a2fec |
2 files changed, 1 insertion(+), 12 deletions(-)
|
|
|
4a2fec |
|
|
|
4a2fec |
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
|
|
4a2fec |
index 94c4968..158fe66 100644
|
|
|
4a2fec |
--- a/accel/kvm/kvm-all.c
|
|
|
4a2fec |
+++ b/accel/kvm/kvm-all.c
|
|
|
4a2fec |
@@ -1629,21 +1629,11 @@ static int kvm_init(MachineState *ms)
|
|
|
4a2fec |
|
|
|
4a2fec |
#ifdef HOST_PPC64
|
|
|
4a2fec |
/*
|
|
|
4a2fec |
- * RHEL hack:
|
|
|
4a2fec |
- *
|
|
|
4a2fec |
* On POWER, the kernel advertises a soft limit based on the
|
|
|
4a2fec |
* number of CPU threads on the host. We want to allow exceeding
|
|
|
4a2fec |
* this for testing purposes, so we don't want to set hard limit
|
|
|
4a2fec |
* to soft limit as on x86.
|
|
|
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 384
|
|
|
4a2fec |
*/
|
|
|
4a2fec |
- hard_vcpus_limit = 384;
|
|
|
4a2fec |
- if (soft_vcpus_limit > hard_vcpus_limit) {
|
|
|
4a2fec |
- soft_vcpus_limit = hard_vcpus_limit;
|
|
|
4a2fec |
- }
|
|
|
4a2fec |
#else
|
|
|
4a2fec |
/* RHEL doesn't support nr_vcpus > soft_vcpus_limit */
|
|
|
4a2fec |
hard_vcpus_limit = soft_vcpus_limit;
|
|
|
4a2fec |
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
|
|
4a2fec |
index d320b6c..d7fac62 100644
|
|
|
4a2fec |
--- a/hw/ppc/spapr.c
|
|
|
4a2fec |
+++ b/hw/ppc/spapr.c
|
|
|
4a2fec |
@@ -3586,8 +3586,7 @@ 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 |
- /* RHEL: set to max # of supported vcpus */
|
|
|
4a2fec |
- mc->max_cpus = 384;
|
|
|
4a2fec |
+ mc->max_cpus = 1024;
|
|
|
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 |
|