From ee8e99d0a7821b26d0afe20c3a1f7517e4fa6772 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 12 Aug 2020 10:58:04 +0200 Subject: arm: Set correct max_cpus value on virt-rhel* machine types RH-Author: Eduardo Habkost Message-id: <20200729180236.627559-3-ehabkost@redhat.com> Patchwork-id: 98074 O-Subject: [RHEL-AV-8.3.0 qemu-kvm PATCH v2 2/4] arm: Set correct max_cpus value on virt-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 the virt-rhel-machine base class, which will affect all virt-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/arm/virt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 48b58be597..fb5a5a7013 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2736,11 +2736,8 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data) mc->family = "virt-rhel-Z"; mc->init = machvirt_init; - /* Start with max_cpus set to 512, which is the maximum supported by KVM. - * The value may be reduced later when we have more information about the - * configuration of the particular instance. - */ - mc->max_cpus = 512; + /* Maximum supported VCPU count for all virt-rhel* machines */ + mc->max_cpus = 384; mc->block_default_type = IF_VIRTIO; mc->no_cdrom = 1; mc->pci_allow_0_address = true; -- 2.27.0