From 12841675e2a81f3b98cb9741b54c3041cebf9e87 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost 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 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 RH-Acked-by: Thomas Huth RH-Acked-by: David Gibson 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 Signed-off-by: Miroslav Rezanina Signed-off-by: Danilo C. L. de Paula --- 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