]> xenbits.xensource.com Git - xen.git/commit
x86/Intel: unlock CPUID earlier for the BSP
authorJan Beulich <jbeulich@suse.com>
Tue, 18 Jun 2024 13:12:44 +0000 (15:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 18 Jun 2024 13:12:44 +0000 (15:12 +0200)
commitfa4d026737a47cd1d66ffb797a29150b4453aa9f
tree63f121c1a21d412f8208d8f75ddd280016fc8c8d
parent77b1ed1d02d082c457924a695e8dde7076285271
x86/Intel: unlock CPUID earlier for the BSP

Intel CPUs have a MSR bit to limit CPUID enumeration to leaf two. If
this bit is set by the BIOS then CPUID evaluation does not work when
data from any leaf greater than two is needed; early_cpu_init() in
particular wants to collect leaf 7 data.

Cure this by unlocking CPUID right before evaluating anything which
depends on the maximum CPUID leaf being greater than two.

Inspired by (and description cloned from) Linux commit 0c2f6d04619e
("x86/topology/intel: Unlock CPUID before evaluating anything").

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/cpu/cpu.h
xen/arch/x86/cpu/intel.c