lkml.org 
[lkml]   [2018]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v1 0/2] x86/retpoline: Clear RETPOLINE_AMD if LFENCE is not serializing
Date
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

\
 
 \ /
  Last update: 2018-01-14 23:20    [W:0.051 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site