]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/core: Make CPU topology enumeration arch-agnostic
authorZhao Liu <zhao1.liu@intel.com>
Fri, 1 Nov 2024 08:33:24 +0000 (16:33 +0800)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 5 Nov 2024 23:32:25 +0000 (23:32 +0000)
commite823ebe77d8f38b181a3c277d5dd9399748bf566
tree8e6942357c6c37da32aa28b182600779dd81f5d0
parent34230ce5a97b898a53032b958841e74fde0bdac1
hw/core: Make CPU topology enumeration arch-agnostic

Cache topology needs to be defined based on CPU topology levels. Thus,
define CPU topology enumeration in qapi/machine.json to make it generic
for all architectures.

To match the general topology naming style, rename CPU_TOPO_LEVEL_* to
CPU_TOPOLOGY_LEVEL_*, and rename SMT and package levels to thread and
socket.

Also, enumerate additional topology levels for non-i386 arches, and add
a CPU_TOPOLOGY_LEVEL_DEFAULT to help future smp-cache object to work
with compatibility requirement of arch-specific cache topology models.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241101083331.340178-3-zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/i386/x86-common.c
include/hw/i386/topology.h
qapi/machine-common.json
target/i386/cpu.c
target/i386/cpu.h