73 lines
2.9 KiB
Diff
73 lines
2.9 KiB
Diff
|
From b270420c34cd990b1bcbe506c3fb0ef6f76d21a8 Mon Sep 17 00:00:00 2001
|
||
|
From: Ani Sinha <anisinha@redhat.com>
|
||
|
Date: Wed, 8 Jan 2025 15:10:22 +0530
|
||
|
Subject: [PATCH 5/7] pc: q35: Bump max_cpus to 4096 vcpus
|
||
|
|
||
|
RH-Author: Ani Sinha <anisinha@redhat.com>
|
||
|
RH-MergeRequest: 317: pc: q35: Bump max_cpus to 4096 vcpus
|
||
|
RH-Jira: RHEL-57668
|
||
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||
|
RH-Commit: [1/1] 35242a1fa8fc21f7d73422d23074cd8da5f74781 (anisinha/centos-qemu-kvm)
|
||
|
|
||
|
This is the downstream change equivalent of the upstream QEMU commit
|
||
|
e4e98c7e ("pc: q35: Bump max_cpus to 4096 vcpus")
|
||
|
|
||
|
Since upstream Linux kernel commit
|
||
|
f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow up to 4096 vCPUs")
|
||
|
Linux kernel can support upto a maximum number of 4096 vcpus when MAXSMP is
|
||
|
enabled in the kernel. This upstream change has been backported to c9s kernel
|
||
|
already. Please see JIRA https://issues.redhat.com/browse/RHEL-11579 and the
|
||
|
following commit authored by Vitaly Kuznetsov:
|
||
|
a85f846be686b0a ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow up to 4096 vCPUs")
|
||
|
|
||
|
At present, QEMU has been tested to correctly boot a linux guest with 4096
|
||
|
vcpus using edk2 that has the fixes corresponding to the following two upstream
|
||
|
edk2 PRs:
|
||
|
|
||
|
https://github.com/tianocore/edk2/pull/5410
|
||
|
https://github.com/tianocore/edk2/pull/5418
|
||
|
|
||
|
The changes corresponding to the above two upstream edk2 PRs has been included
|
||
|
in the downstream c9s edk2 with the following MR:
|
||
|
https://gitlab.com/redhat/centos-stream/src/edk2/-/merge_requests/59
|
||
|
|
||
|
So bump up the value max_cpus to 4096 for RHEL q35 machines versions 9.6 and
|
||
|
newer. Q35 RHEL machines versions 9.4 and older continue to support 710 maximum
|
||
|
vcpus as before for compatibility reasons.
|
||
|
|
||
|
See also
|
||
|
https://gitlab.com/redhat/centos-stream/src/qemu-kvm/-/merge_requests/236
|
||
|
https://gitlab.com/redhat/centos-stream/src/qemu-kvm/-/merge_requests/273
|
||
|
|
||
|
Signed-off-by: Ani Sinha <anisinha@redhat.com>
|
||
|
---
|
||
|
hw/i386/pc_q35.c | 5 ++++-
|
||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
|
||
|
index 37f54062c8..506f9dc0c0 100644
|
||
|
--- a/hw/i386/pc_q35.c
|
||
|
+++ b/hw/i386/pc_q35.c
|
||
|
@@ -344,7 +344,7 @@ static void pc_q35_machine_options(MachineClass *m)
|
||
|
m->default_display = "std";
|
||
|
m->default_nic = "e1000e";
|
||
|
m->no_floppy = 1;
|
||
|
- m->max_cpus = 710;
|
||
|
+ m->max_cpus = 4096;
|
||
|
m->no_parallel = 1;
|
||
|
machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE);
|
||
|
machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
|
||
|
@@ -698,6 +698,9 @@ static void pc_q35_rhel_machine_9_4_0_options(MachineClass *m)
|
||
|
{
|
||
|
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||
|
pc_q35_rhel_machine_9_6_0_options(m);
|
||
|
+
|
||
|
+ /* older RHEL machines continue to support 710 vcpus */
|
||
|
+ m->max_cpus = 710;
|
||
|
m->desc = "RHEL-9.4.0 PC (Q35 + ICH9, 2009)";
|
||
|
pcmc->smbios_stream_product = "RHEL";
|
||
|
pcmc->smbios_stream_version = "9.4.0";
|
||
|
--
|
||
|
2.39.3
|
||
|
|