qemu-kvm/0033-vl-Remove-downstream-only-MAX_RHEL_CPUS-code.patch
Danilo C. L. de Paula 2b808133e8 Rebase to qemu-5.1.0
2020-08-12 11:53:34 -04:00

84 lines
2.6 KiB
Diff

From f8a4123e211ed0685097f496c99e73913a6b34d0 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Wed, 12 Aug 2020 10:58:04 +0200
Subject: vl: Remove downstream-only MAX_RHEL_CPUS code
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
Message-id: <20200729180236.627559-4-ehabkost@redhat.com>
Patchwork-id: 98075
O-Subject: [RHEL-AV-8.3.0 qemu-kvm PATCH v2 3/4] vl: Remove downstream-only MAX_RHEL_CPUS code
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>
Now that all machine types have max_cpus set to the actual
supported number of VCPUs, the MAX_RHEL_CPUS code becomes
unnecessary and can be completely removed.
For reference these are the max_cpus values set by the RHEL
machine types:
- arm: virt-rhel*: max_cpus=384 (rhel_machine_class_init());
- ppc: spapr-rhel*: max_cpus=384
(spapr_machine_rhel820_class_options());
- s390: s390-ccw*: max_cpus=248 (ccw_machine_class_init());
- x86: q35: max_cpus=384 (pc_q35_machine_rhel_options());
- x86: q35-rhel7.3.0 and older: max_cpus=255
(pc_q35_machine_rhel730_options());
- x86: pc-i440fx*: max_cpus=240 (pc_machine_class_init()).
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>
---
softmmu/vl.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 62fc7c898f..3c383911cd 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -116,8 +116,6 @@
#define MAX_VIRTIO_CONSOLES 1
-#define RHEL_MAX_CPUS 384
-
static const char *data_dir[16];
static int data_dir_idx;
const char *bios_name = NULL;
@@ -1191,20 +1189,6 @@ static MachineClass *find_default_machine(GSList *machines)
return default_machineclass;
}
-/* Maximum number of CPUs limited for Red Hat Enterprise Linux */
-static void limit_max_cpus_in_machines(void)
-{
- GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);
-
- for (el = machines; el; el = el->next) {
- MachineClass *mc = el->data;
-
- if (mc->max_cpus > RHEL_MAX_CPUS) {
- mc->max_cpus = RHEL_MAX_CPUS;
- }
- }
-}
-
static int machine_help_func(QemuOpts *opts, MachineState *machine)
{
ObjectProperty *prop;
@@ -3861,8 +3845,6 @@ void qemu_init(int argc, char **argv, char **envp)
"mutually exclusive");
exit(EXIT_FAILURE);
}
- /* Maximum number of CPUs limited for Red Hat Enterprise Linux */
- limit_max_cpus_in_machines();
configure_rtc(qemu_find_opts_singleton("rtc"));
--
2.27.0