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

54 lines
1.9 KiB
Diff

From ee8e99d0a7821b26d0afe20c3a1f7517e4fa6772 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
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 <ehabkost@redhat.com>
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 <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 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 <ehabkost@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
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