qemu-kvm/0031-ppc-Set-correct-max_cpus-value-on-spapr-rhel-machine.patch
Danilo C. L. de Paula 2b808133e8 Rebase to qemu-5.1.0
2020-08-12 11:53:34 -04:00

50 lines
1.7 KiB
Diff

From 12841675e2a81f3b98cb9741b54c3041cebf9e87 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Wed, 12 Aug 2020 10:58:04 +0200
Subject: ppc: Set correct max_cpus value on spapr-rhel* machine types
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
Message-id: <20200729180236.627559-2-ehabkost@redhat.com>
Patchwork-id: 98073
O-Subject: [RHEL-AV-8.3.0 qemu-kvm PATCH v2 1/4] ppc: Set correct max_cpus value on spapr-rhel* machine types
Bugzilla: 1819292
RH-Acked-by: Andrew Jones <drjones@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: David Gibson <dgibson@redhat.com>
Currently vl.c forces MachineClass::max_cpus to be
<= RHEL_MAX_CPUS (384) on all machine types.
Instead of relying on that global limit, set max_cpus=384
explicitly at spapr_machine_rhel820_class_options(), which will
affect all pseriesl-rhel* machine types.
This will keep exactly the same behavior as before, but will
allow us to remove the downstream-only RHEL_MAX_CPUS code at vl.c
later.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/ppc/spapr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ccceb6d39f..1c367a2367 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -5003,6 +5003,9 @@ DEFINE_SPAPR_MACHINE(2_1, "2.1", false);
static void spapr_machine_rhel830_class_options(MachineClass *mc)
{
/* Defaults for the latest behaviour inherited from the base class */
+
+ /* Maximum supported VCPU count for all pseries-rhel* machines */
+ mc->max_cpus = 384;
}
DEFINE_SPAPR_MACHINE(rhel830, "rhel8.3.0", true);
--
2.27.0