i386/cpu: Introduce bitmap to cache available CPU topology levels
authorZhao Liu <zhao1.liu@intel.com>
Wed, 24 Apr 2024 15:49:17 +0000 (23:49 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 May 2024 17:43:29 +0000 (19:43 +0200)
commit6ddeb0ec8c29d51be49d5336c6d6508972b6d49c
treeffd35da99e2abaedfb8dd57c52e9653416006b31
parent2613747a794c4de8cd04e4a24001765220e91f1b
i386/cpu: Introduce bitmap to cache available CPU topology levels

Currently, QEMU checks the specify number of topology domains to detect
if there's extended topology levels (e.g., checking nr_dies).

With this bitmap, the extended CPU topology (the levels other than SMT,
core and package) could be easier to detect without touching the
topology details.

This is also in preparation for the follow-up to decouple CPUID[0x1F]
subleaf with specific topology level.

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>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-ID: <20240424154929.1487382-10-zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/x86-common.c
include/hw/i386/topology.h
target/i386/cpu.c
target/i386/cpu.h
target/i386/kvm/kvm.c