aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2025-01-10 22:51:11 +0800
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-02-16 14:25:07 +0100
commit0d2d00e57a55d3d8205923e60c2553d83d288ebb (patch)
treef46fd2cd031f3439dbff11275e0dd3bd7f2e3000
parent1e71a9b1147145c9904b2ce5350c5591d5badb23 (diff)
downloadqemu-0d2d00e57a55d3d8205923e60c2553d83d288ebb.zip
qemu-0d2d00e57a55d3d8205923e60c2553d83d288ebb.tar.gz
qemu-0d2d00e57a55d3d8205923e60c2553d83d288ebb.tar.bz2
hw/core/machine: Reject thread level cache
Currently, neither i386 nor ARM have real hardware support for per- thread cache, and there is no clear demand for this specific cache topology. Additionally, since ARM even can't support this special cache topology in device tree, it is unnecessary to support it at this moment, even though per-thread cache might have potential scheduling benefits for VMs without CPU affinity. Therefore, disable thread-level cache topology in the general machine part. At present, i386 has not enabled SMP cache, so disabling the thread parameter does not pose compatibility issues. In the future, if there is a clear demand for this feature, the correct approach would be to add a new control field in MachineClass.smp_props and enable it only for the machines that require it. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250110145115.1574345-2-zhao1.liu@intel.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--hw/core/machine-smp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/core/machine-smp.c b/hw/core/machine-smp.c
index b954eb8..4e020c3 100644
--- a/hw/core/machine-smp.c
+++ b/hw/core/machine-smp.c
@@ -321,6 +321,13 @@ bool machine_parse_smp_cache(MachineState *ms,
return false;
}
+ if (props->topology == CPU_TOPOLOGY_LEVEL_THREAD) {
+ error_setg(errp,
+ "%s level cache not supported by this machine",
+ CpuTopologyLevel_str(props->topology));
+ return false;
+ }
+
if (!machine_check_topo_support(ms, props->topology, errp)) {
return false;
}