mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
2613747a79
commit
6ddeb0ec8c
5 changed files with 48 additions and 5 deletions
|
@ -271,7 +271,10 @@ void x86_cpu_pre_plug(HotplugHandler *hotplug_dev,
|
|||
|
||||
init_topo_info(&topo_info, x86ms);
|
||||
|
||||
env->nr_dies = ms->smp.dies;
|
||||
if (ms->smp.dies > 1) {
|
||||
env->nr_dies = ms->smp.dies;
|
||||
set_bit(CPU_TOPO_LEVEL_DIE, env->avail_cpu_topo);
|
||||
}
|
||||
|
||||
/*
|
||||
* If APIC ID is not set,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue