mirror of https://github.com/xemu-project/xemu.git
hw/i386/pc: Support smp.modules for x86 PC machine
As module-level topology support is added to X86CPU, now we can enable the support for the modules parameter on PC machines. With this support, we can define a 5-level x86 CPU topology with "-smp": -smp cpus=*,maxcpus=*,sockets=*,dies=*,modules=*,cores=*,threads=*. So, add the 5-level topology example in description of "-smp". Additionally, add the missed drawers and books options in previous example. Tested-by: Yongwei Ma <yongwei.ma@intel.com> Co-developed-by: Zhuocheng Ding <zhuocheng.ding@intel.com> Signed-off-by: Zhuocheng Ding <zhuocheng.ding@intel.com> Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Reviewed-by: Babu Moger <babu.moger@amd.com> Message-ID: <20240424154929.1487382-19-zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
321d2599eb
commit
6807487474
|
@ -1843,6 +1843,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
|
|||
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
|
||||
mc->nvdimm_supported = true;
|
||||
mc->smp_props.dies_supported = true;
|
||||
mc->smp_props.modules_supported = true;
|
||||
mc->default_ram_id = "pc.ram";
|
||||
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_AUTO;
|
||||
|
||||
|
|
|
@ -281,7 +281,8 @@ ERST
|
|||
|
||||
DEF("smp", HAS_ARG, QEMU_OPTION_smp,
|
||||
"-smp [[cpus=]n][,maxcpus=maxcpus][,drawers=drawers][,books=books][,sockets=sockets]\n"
|
||||
" [,dies=dies][,clusters=clusters][,cores=cores][,threads=threads]\n"
|
||||
" [,dies=dies][,clusters=clusters][,modules=modules][,cores=cores]\n"
|
||||
" [,threads=threads]\n"
|
||||
" set the number of initial CPUs to 'n' [default=1]\n"
|
||||
" maxcpus= maximum number of total CPUs, including\n"
|
||||
" offline CPUs for hotplug, etc\n"
|
||||
|
@ -290,7 +291,8 @@ DEF("smp", HAS_ARG, QEMU_OPTION_smp,
|
|||
" sockets= number of sockets in one book\n"
|
||||
" dies= number of dies in one socket\n"
|
||||
" clusters= number of clusters in one die\n"
|
||||
" cores= number of cores in one cluster\n"
|
||||
" modules= number of modules in one cluster\n"
|
||||
" cores= number of cores in one module\n"
|
||||
" threads= number of threads in one core\n"
|
||||
"Note: Different machines may have different subsets of the CPU topology\n"
|
||||
" parameters supported, so the actual meaning of the supported parameters\n"
|
||||
|
@ -306,7 +308,7 @@ DEF("smp", HAS_ARG, QEMU_OPTION_smp,
|
|||
" must be set as 1 in the purpose of correct parsing.\n",
|
||||
QEMU_ARCH_ALL)
|
||||
SRST
|
||||
``-smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,clusters=clusters][,cores=cores][,threads=threads]``
|
||||
``-smp [[cpus=]n][,maxcpus=maxcpus][,drawers=drawers][,books=books][,sockets=sockets][,dies=dies][,clusters=clusters][,modules=modules][,cores=cores][,threads=threads]``
|
||||
Simulate a SMP system with '\ ``n``\ ' CPUs initially present on
|
||||
the machine type board. On boards supporting CPU hotplug, the optional
|
||||
'\ ``maxcpus``\ ' parameter can be set to enable further CPUs to be
|
||||
|
@ -345,14 +347,14 @@ SRST
|
|||
-smp 8,sockets=2,cores=2,threads=2,maxcpus=8
|
||||
|
||||
The following sub-option defines a CPU topology hierarchy (2 sockets
|
||||
totally on the machine, 2 dies per socket, 2 cores per die, 2 threads
|
||||
per core) for PC machines which support sockets/dies/cores/threads.
|
||||
Some members of the option can be omitted but their values will be
|
||||
automatically computed:
|
||||
totally on the machine, 2 dies per socket, 2 modules per die, 2 cores per
|
||||
module, 2 threads per core) for PC machines which support sockets/dies
|
||||
/modules/cores/threads. Some members of the option can be omitted but
|
||||
their values will be automatically computed:
|
||||
|
||||
::
|
||||
|
||||
-smp 16,sockets=2,dies=2,cores=2,threads=2,maxcpus=16
|
||||
-smp 32,sockets=2,dies=2,modules=2,cores=2,threads=2,maxcpus=32
|
||||
|
||||
The following sub-option defines a CPU topology hierarchy (2 sockets
|
||||
totally on the machine, 2 clusters per socket, 2 cores per cluster,
|
||||
|
|
Loading…
Reference in New Issue