mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/2] x86/retpoline: Clear RETPOLINE_AMD if LFENCE is not serializing
@ 2018-01-09 22:37 Tom Lendacky
  2018-01-09 22:37 ` [PATCH v1 1/2] x86/retpoline: Add a function to clear the RETPOLINE_AMD feature Tom Lendacky
  2018-01-09 22:37 ` [PATCH v1 2/2] x86/cpu/AMD: Clear RETPOLINE_AMD if LFENCE is not serializing Tom Lendacky
  0 siblings, 2 replies; 9+ messages in thread
From: Tom Lendacky @ 2018-01-09 22:37 UTC (permalink / raw)
  To: x86, linux-kernel
  Cc: Rik van Riel, Andi Kleen, Peter Zijlstra, Linus Torvalds,
	Jiri Kosina, Dan Williams, Dave Hansen, Borislav Petkov,
	Andy Lutomirski, Kees Cook, Thomas Gleixner, Tim Chen,
	Greg Kroah-Hartman, David Woodhouse, Paul Turner

The RETPOLINE_AMD feature is set by default for AMD hardware.  This
feature expects LFENCE to be serializing in order to perform the proper
speculation control.  If LFENCE cannot be determined to be serializing
(for example, when running under a hypervisor that does not allow writing
to the MSR that makes LFENCE serializing) the feature needs to be
disabled.  The kernel will then fall back to using the generic retpoline
support.

The following patches are included in this series:
- Add a function to clear the RETPOLINE_AMD feature and update the
  variable used for sysfs output.
- If LFENCE can not be determined to be serializing call the new
  function to clear the RETPOLINE_AMD feature.

This patch series is based on tip:x86/pti.

---

Tom Lendacky (2):
      x86/retpoline: Add a function to clear the RETPOLINE_AMD feature
      x86/cpu/AMD: Clear RETPOLINE_AMD if LFENCE is not serializing


 arch/x86/include/asm/nospec-branch.h |    1 +
 arch/x86/kernel/cpu/amd.c            |    4 ++++
 arch/x86/kernel/cpu/bugs.c           |   10 ++++++++++
 3 files changed, 15 insertions(+)

-- 
Tom Lendacky

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

end of thread, other threads:[~2018-01-10  0:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09 22:37 [PATCH v1 0/2] x86/retpoline: Clear RETPOLINE_AMD if LFENCE is not serializing Tom Lendacky
2018-01-09 22:37 ` [PATCH v1 1/2] x86/retpoline: Add a function to clear the RETPOLINE_AMD feature Tom Lendacky
2018-01-09 22:46   ` Thomas Gleixner
2018-01-09 23:01     ` Tom Lendacky
2018-01-09 23:09       ` Thomas Gleixner
2018-01-09 23:38         ` Tom Lendacky
2018-01-09 23:43           ` Thomas Gleixner
2018-01-10  0:22             ` Tom Lendacky
2018-01-09 22:37 ` [PATCH v1 2/2] x86/cpu/AMD: Clear RETPOLINE_AMD if LFENCE is not serializing Tom Lendacky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®