x86/cpu, kvm: Add the Null Selector Clears Base feature
authorKim Phillips <kim.phillips@amd.com>
Tue, 24 Jan 2023 16:33:16 +0000 (10:33 -0600)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 25 Jan 2023 15:25:46 +0000 (16:25 +0100)
commit5b909d4ae59aedc711b7a432da021be0e82c95a0
tree6058d658298f09fd039686e827fe510010692021
parent84168ae786f8a15a7eb0f79d34f20b8d261ce2f5
x86/cpu, kvm: Add the Null Selector Clears Base feature

The Null Selector Clears Base feature was being open-coded for KVM.
Add it to its newly added native CPUID leaf 0x80000021 EAX proper.

Also drop the bit description comments now it's more self-describing.

  [ bp: Convert test in check_null_seg_clears_base() too. ]

Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20230124163319.2277355-6-kim.phillips@amd.com
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/common.c
arch/x86/kvm/cpuid.c