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>
62 lines
1.9 KiB
Python
62 lines
1.9 KiB
Python
# -*- Mode: Python -*-
|
|
# vim: filetype=python
|
|
#
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
# See the COPYING file in the top-level directory.
|
|
|
|
##
|
|
# = Common machine types
|
|
##
|
|
|
|
##
|
|
# @S390CpuEntitlement:
|
|
#
|
|
# An enumeration of CPU entitlements that can be assumed by a virtual
|
|
# S390 CPU
|
|
#
|
|
# Since: 8.2
|
|
##
|
|
{ 'enum': 'S390CpuEntitlement',
|
|
'data': [ 'auto', 'low', 'medium', 'high' ] }
|
|
|
|
##
|
|
# @CpuTopologyLevel:
|
|
#
|
|
# An enumeration of CPU topology levels.
|
|
#
|
|
# @thread: thread level, which would also be called SMT level or
|
|
# logical processor level. The @threads option in
|
|
# SMPConfiguration is used to configure the topology of this
|
|
# level.
|
|
#
|
|
# @core: core level. The @cores option in SMPConfiguration is used
|
|
# to configure the topology of this level.
|
|
#
|
|
# @module: module level. The @modules option in SMPConfiguration is
|
|
# used to configure the topology of this level.
|
|
#
|
|
# @cluster: cluster level. The @clusters option in SMPConfiguration
|
|
# is used to configure the topology of this level.
|
|
#
|
|
# @die: die level. The @dies option in SMPConfiguration is used to
|
|
# configure the topology of this level.
|
|
#
|
|
# @socket: socket level, which would also be called package level.
|
|
# The @sockets option in SMPConfiguration is used to configure
|
|
# the topology of this level.
|
|
#
|
|
# @book: book level. The @books option in SMPConfiguration is used
|
|
# to configure the topology of this level.
|
|
#
|
|
# @drawer: drawer level. The @drawers option in SMPConfiguration is
|
|
# used to configure the topology of this level.
|
|
#
|
|
# @default: default level. Some architectures will have default
|
|
# topology settings (e.g., cache topology), and this special
|
|
# level means following the architecture-specific settings.
|
|
#
|
|
# Since: 9.2
|
|
##
|
|
{ 'enum': 'CpuTopologyLevel',
|
|
'data': [ 'thread', 'core', 'module', 'cluster', 'die',
|
|
'socket', 'book', 'drawer', 'default' ] }
|