linux_dsm_epyc7002/arch/x86/kernel/cpu
David Woodhouse da28512156 x86/spectre: Add boot time option to select Spectre v2 mitigation
Add a spectre_v2= option to select the mitigation used for the indirect
branch speculation vulnerability.

Currently, the only option available is retpoline, in its various forms.
This will be expanded to cover the new IBRS/IBPB microcode features.

The RETPOLINE_AMD feature relies on a serializing LFENCE for speculation
control. For AMD hardware, only set RETPOLINE_AMD if LFENCE is a
serializing instruction, which is indicated by the LFENCE_RDTSC feature.

[ tglx: Folded back the LFENCE/AMD fixes and reworked it so IBRS
  	integration becomes simple ]

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: gnomes@lxorguk.ukuu.org.uk
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: thomas.lendacky@amd.com
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Kees Cook <keescook@google.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Link: https://lkml.kernel.org/r/1515707194-20531-5-git-send-email-dwmw@amazon.co.uk
2018-01-12 00:14:29 +01:00
..
mcheck Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-05 12:12:51 -08:00
microcode x86/microcode: Dont abuse the TLB-flush interface 2017-12-22 20:13:03 +01:00
mtrr License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore
amd.c x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC 2018-01-09 01:43:11 +01:00
aperfmperf.c Revert "x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo" 2017-11-10 11:19:11 -08:00
bugs.c x86/spectre: Add boot time option to select Spectre v2 mitigation 2018-01-12 00:14:29 +01:00
centaur.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
common.c x86/spectre: Add boot time option to select Spectre v2 mitigation 2018-01-12 00:14:29 +01:00
cpu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpuid-deps.c x86/cpuid: Replace set/clear_bit32() 2017-11-02 14:56:43 +01:00
cyrix.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hypervisor.c x86/virt: Add enum for hypervisors to replace x86_hyper 2017-11-10 10:03:12 +01:00
intel_cacheinfo.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel_rdt_ctrlmondata.c x86/intel_rdt/mbm: Add mbm counter initialization 2017-08-01 22:41:29 +02:00
intel_rdt_monitor.c x86/intel_rdt/cqm: Improve limbo list processing 2017-08-16 12:05:41 +02:00
intel_rdt_rdtgroup.c x86/intel_rdt: Remove redundant ternary operator on return 2017-08-16 16:20:55 +02:00
intel_rdt.c x86/intel_rdt: Turn off most RDT features on Skylake 2017-08-25 22:00:45 +02:00
intel_rdt.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile Merge commit 'upstream-x86-entry' into WIP.x86/mm 2017-12-17 12:58:53 +01:00
match.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mkcapflags.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mshyperv.c x86/virt: Add enum for hypervisors to replace x86_hyper 2017-11-10 10:03:12 +01:00
perfctr-watchdog.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
powerflags.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.c Revert "x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo" 2017-11-10 11:19:11 -08:00
rdrand.c x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h 2016-06-08 12:41:20 -07:00
scattered.c x86/cpu/AMD: Add the Secure Memory Encryption CPU feature 2017-07-18 11:37:59 +02:00
topology.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
transmeta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
umc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmware.c x86/virt: Add enum for hypervisors to replace x86_hyper 2017-11-10 10:03:12 +01:00