x86/cpuid: detect null segment behaviour on Zen2 CPUs
authorJane Malalane <jane.malalane@citrix.com>
Wed, 8 Sep 2021 12:39:18 +0000 (14:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 8 Sep 2021 12:39:18 +0000 (14:39 +0200)
commit5074b0c1c048ce7af3f33ab0885c610b7b2fcea0
tree392b16aa70b82a4c3daef9ce603f49b86a15cc38
parent7429e08d9c1cabec3ce1c7c246fb711f6e225275
x86/cpuid: detect null segment behaviour on Zen2 CPUs

All Zen2 CPUs actually have this behaviour, but the CPUID bit couldn't
be introduced into Zen2 due to a lack of leaves. So, it was added in a
new leaf in Zen3. Nonetheless, hypervisors can synthesize the CPUID
bit in software.

So, Xen probes for NSCB (NullSelectorClearsBit) and
synthesizes the bit, if the behaviour is present.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jane Malalane <jane.malalane@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/amd.c
xen/arch/x86/cpu/cpu.h
xen/arch/x86/cpu/hygon.c
xen/include/asm-x86/cpufeature.h