]> Git Repo - linux.git/commit
x86/cpu, kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf
authorKim Phillips <[email protected]>
Tue, 24 Jan 2023 16:33:15 +0000 (10:33 -0600)
committerBorislav Petkov (AMD) <[email protected]>
Wed, 25 Jan 2023 12:06:13 +0000 (13:06 +0100)
commit84168ae786f8a15a7eb0f79d34f20b8d261ce2f5
treec1df51afc3793a3f9ee00bfefe4444a3c47ddc8b
parenta9dc9ec5a1fafc3d2fe7a7b594eefaeaccf89a6b
x86/cpu, kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf

The LFENCE always serializing feature bit was defined as scattered
LFENCE_RDTSC and its native leaf bit position open-coded for KVM.  Add
it to its newly added CPUID leaf 0x80000021 EAX proper.  With
LFENCE_RDTSC in its proper place, the kernel's set_cpu_cap() will
effectively synthesize the feature for KVM going forward.

Also, DE_CFG[1] doesn't need to be set on such CPUs anymore.

  [ bp: Massage and merge diff from Sean. ]

Signed-off-by: Kim Phillips <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Acked-by: Sean Christopherson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/amd.c
arch/x86/kvm/cpuid.c
This page took 0.080898 seconds and 4 git commands to generate.