qemu/include
Zhao Liu dcba73b445 hw/core/machine: Introduce the module as a CPU topology level
In x86, module is the topology level above core, which contains a set
of cores that share certain resources (in current products, the resource
usually includes L2 cache, as well as module scoped features and MSRs).

Though smp.clusters could also share the L2 cache resource [1], there
are following reasons that drive us to introduce the new smp.modules:

  * As the CPU topology abstraction in device tree [2], cluster supports
    nesting (though currently QEMU hasn't support that). In contrast,
    (x86) module does not support nesting.

  * Due to nesting, there is great flexibility in sharing resources
    on cluster, rather than narrowing cluster down to sharing L2 (and
    L3 tags) as the lowest topology level that contains cores.

  * Flexible nesting of cluster allows it to correspond to any level
    between the x86 package and core.

  * In Linux kernel, x86's cluster only represents the L2 cache domain
    but QEMU's smp.clusters is the CPU topology level. Linux kernel will
    also expose module level topology information in sysfs for x86. To
    avoid cluster ambiguity and keep a consistent CPU topology naming
    style with the Linux kernel, we introduce module level for x86.

The module is, in existing hardware practice, the lowest layer that
contains the core, while the cluster is able to have a higher
topological scope than the module due to its nesting.

Therefore, place the module between the cluster and the core:

    drawer/book/socket/die/cluster/module/core/thread

With the above topological hierarchy order, introduce module level
support in MachineState and MachineClass.

[1]: https://lore.kernel.org/qemu-devel/c3d68005-54e0-b8fe-8dc1-5989fe3c7e69@huawei.com/
[2]: https://www.kernel.org/doc/Documentation/devicetree/bindings/cpu/cpu-topology.txt

Suggested-by: Xiaoyao Li <xiaoyao.li@intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Message-ID: <20240424154929.1487382-2-zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-04-25 12:48:12 +02:00
..
authz
block
chardev
crypto
disas target/nios2: Remove the deprecated Nios II target 2024-04-24 16:03:38 +02:00
exec Removal of deprecated code 2024-04-24 11:49:57 -07:00
fpu
gdbstub gdbstub: Save target's siginfo 2024-03-13 11:43:52 +00:00
hw hw/core/machine: Introduce the module as a CPU topology level 2024-04-25 12:48:12 +02:00
io io: Introduce qio_channel_file_new_dupfd 2024-03-12 15:22:23 -04:00
libdecnumber
migration migration: Add Error** argument to .load_setup() handler 2024-04-23 18:36:01 -04:00
monitor hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper 2024-04-24 16:03:38 +02:00
net Revert "tap: setting error appropriately when calling net_init_tap_one()" 2024-03-29 14:59:07 +08:00
qapi qapi: Inline and remove QERR_PROPERTY_VALUE_BAD definition 2024-04-24 09:50:58 +02:00
qemu util/qemu-config: Extract QMP commands to qemu-config-qmp.c 2024-04-18 11:17:27 +02:00
qom
scsi
semihosting
standard-headers Removal of deprecated code 2024-04-24 11:49:57 -07:00
sysemu Removal of deprecated code 2024-04-24 11:49:57 -07:00
tcg tcg: Add TCGContext.emit_before_op 2024-04-09 07:45:01 -10:00
ui ui/curses: Do not use console_select() 2024-03-20 10:27:58 +04:00
user
elf.h
glib-compat.h
qemu-io.h
qemu-main.h