summary refs log tree commit diff stats
path: root/hw/char/omap_uart.c
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2024-04-24 23:49:28 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2024-05-22 19:56:27 +0200
commitf602eb925ac5d51d09de6c4b32ba8a5142055492 (patch)
treedf78330e7c9e73693112a7b3eb5860bd24e2fd47 /hw/char/omap_uart.c
parent9fcba76ab9c264d06394696c304f2462d9296918 (diff)
downloadfocaccia-qemu-f602eb925ac5d51d09de6c4b32ba8a5142055492.tar.gz
focaccia-qemu-f602eb925ac5d51d09de6c4b32ba8a5142055492.zip
i386/cpu: Use CPUCacheInfo.share_level to encode CPUID[4]
CPUID[4].EAX[bits 25:14] is used to represent the cache topology for
Intel CPUs.

After cache models have topology information, we can use
CPUCacheInfo.share_level to decide which topology level to be encoded
into CPUID[4].EAX[bits 25:14].

And since with the helper max_processor_ids_for_cache(), the filed
CPUID[4].EAX[bits 25:14] (original virable "num_apic_ids") is parsed
based on cpu topology levels, which are verified when parsing -smp, it's
no need to check this value by "assert(num_apic_ids > 0)" again, so
remove this assert().

Additionally, wrap the encoding of CPUID[4].EAX[bits 31:26] into a
helper to make the code cleaner.

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-21-zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/char/omap_uart.c')
0 files changed, 0 insertions, 0 deletions