mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
i386: Expose module level in CPUID[0x1F]
Linux kernel (from v6.4, with commit edc0a2b595765 ("x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms") is able to handle platforms with Module level enumerated via CPUID.1F. Expose the module level in CPUID[0x1F] if the machine has more than 1 modules. 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-15-zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
3568adc995
commit
5304873acd
4 changed files with 12 additions and 3 deletions
|
@ -71,6 +71,7 @@ enum CPUTopoLevel {
|
|||
CPU_TOPO_LEVEL_INVALID,
|
||||
CPU_TOPO_LEVEL_SMT,
|
||||
CPU_TOPO_LEVEL_CORE,
|
||||
CPU_TOPO_LEVEL_MODULE,
|
||||
CPU_TOPO_LEVEL_DIE,
|
||||
CPU_TOPO_LEVEL_PACKAGE,
|
||||
CPU_TOPO_LEVEL_MAX,
|
||||
|
@ -198,11 +199,12 @@ static inline apic_id_t x86_apicid_from_cpu_idx(X86CPUTopoInfo *topo_info,
|
|||
}
|
||||
|
||||
/*
|
||||
* Check whether there's extended topology level (die)?
|
||||
* Check whether there's extended topology level (module or die)?
|
||||
*/
|
||||
static inline bool x86_has_extended_topo(unsigned long *topo_bitmap)
|
||||
{
|
||||
return test_bit(CPU_TOPO_LEVEL_DIE, topo_bitmap);
|
||||
return test_bit(CPU_TOPO_LEVEL_MODULE, topo_bitmap) ||
|
||||
test_bit(CPU_TOPO_LEVEL_DIE, topo_bitmap);
|
||||
}
|
||||
|
||||
#endif /* HW_I386_TOPOLOGY_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue