linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/cpu: RDPID+MSR_TSC_AUX fix and a cleanup
@ 2021-05-04 22:56 Sean Christopherson
  2021-05-04 22:56 ` [PATCH 1/2] x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported Sean Christopherson
  2021-05-04 22:56 ` [PATCH 2/2] x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappers Sean Christopherson
  0 siblings, 2 replies; 5+ messages in thread
From: Sean Christopherson @ 2021-05-04 22:56 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86
  Cc: H. Peter Anvin, linux-kernel, Reiji Watanabe, Jim Mattson,
	Andy Lutomirski, Sean Christopherson

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(-)

-- 
2.31.1.527.g47e6f16901-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-06 12:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 22:56 [PATCH 0/2] x86/cpu: RDPID+MSR_TSC_AUX fix and a cleanup Sean Christopherson
2021-05-04 22:56 ` [PATCH 1/2] x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported Sean Christopherson
2021-05-06 12:14   ` [tip: x86/urgent] " tip-bot2 for Sean Christopherson
2021-05-04 22:56 ` [PATCH 2/2] x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappers Sean Christopherson
2021-05-06 12:14   ` [tip: x86/urgent] " tip-bot2 for Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).