diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2024-04-24 23:49:28 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-22 19:56:27 +0200 |
commit | f602eb925ac5d51d09de6c4b32ba8a5142055492 (patch) | |
tree | df78330e7c9e73693112a7b3eb5860bd24e2fd47 /event-loop-base.c | |
parent | 9fcba76ab9c264d06394696c304f2462d9296918 (diff) | |
download | qemu-f602eb925ac5d51d09de6c4b32ba8a5142055492.zip qemu-f602eb925ac5d51d09de6c4b32ba8a5142055492.tar.gz qemu-f602eb925ac5d51d09de6c4b32ba8a5142055492.tar.bz2 |
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 'event-loop-base.c')
0 files changed, 0 insertions, 0 deletions