Skip to content

x86/cpu: RDPID+MSR_TSC_AUX fix and a cleanup

Sean Christopherson lkml stable 1 version Applied

Status from this message: The following commit has been merged into the x86/urgent branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supportedarch/x86/kernel/cpu/common.c+1 -10 replies
2/2x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappersarch/x86/include/asm/msr.h arch/x86/kernel/cpu/common.c+1 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] x86/cpu: RDPID+MSR_TSC_AUX fix and a cleanup

Fix a bug where MSR_TSC_AUX is left uninitialized in the theoretically possible scenario where RDPID is supported by RDTSCP is not. AFAIK, no such CPUs exits, but both Intel and AMD architecturally allow RDPID and MSR_TSC_AUX to exist without RDTSCP.

Found by inspection when cleaning up a similar mess in KVM. Confirmed the bug and verified the fix by running the problematic CPU model under KVM (once KVM's even bigger trainwreck was fixed).

Sean Christopherson (2):
x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappers

 arch/x86/include/asm/msr.h   | 4 ----
 arch/x86/kernel/cpu/common.c | 4 ++--
 2 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
2.31.1.527.g47e6f16901-goog