android_kernel_oneplus_msm8998/arch/x86
Tom Lendacky 642ce1bb5e x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC
commit 9c6a73c75864ad9fa49e5fa6513e4c4071c0e29f upstream.

With LFENCE now a serializing instruction, use LFENCE_RDTSC in preference
to MFENCE_RDTSC.  However, since the kernel could be running under a
hypervisor that does not support writing that MSR, read the MSR back and
verify that the bit has been set successfully.  If the MSR can be read
and the bit is set, then set the LFENCE_RDTSC feature, otherwise set the
MFENCE_RDTSC feature.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Paul Turner <pjt@google.com>
Link: https://lkml.kernel.org/r/20180108220932.12580.52458.stgit@tlendack-t1.amdoffice.net
Signed-off-by: Razvan Ghitulete <rga@amazon.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 19:50:11 +01:00
..
boot KPTI: Rename to PAGE_TABLE_ISOLATION 2018-01-05 15:44:26 +01:00
configs kconfig: tinyconfig: provide whole choice blocks to avoid warnings 2016-09-24 10:07:42 +02:00
crypto crypto: salsa20 - fix blkcipher_walk API usage 2017-12-20 10:04:51 +01:00
entry Fix build error in vma.c 2018-01-10 09:27:15 +01:00
ia32 Merge branch 'x86-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 21:05:40 -08:00
include x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC 2018-01-23 19:50:11 +01:00
kernel x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC 2018-01-23 19:50:11 +01:00
kvm KVM: x86: Add memory barrier on vmcs field lookup 2018-01-17 09:35:30 +01:00
lguest x86/paravirt: Prevent rtc_cmos platform device init on PV guests 2015-12-19 21:35:13 +01:00
lib x86/boot: Add early cmdline parsing for options with arguments 2018-01-05 15:44:23 +01:00
math-emu Merge branch 'x86-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 21:05:40 -08:00
mm kaiser: Set _PAGE_NX only if supported 2018-01-17 09:35:30 +01:00
net ebpf: migrate bpf_prog's flags to bitfield 2015-10-03 05:02:39 -07:00
oprofile x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context 2017-11-15 17:13:14 +01:00
pci x86/PCI: Make broadcom_postcore_init() check acpi_disabled 2017-12-16 10:33:48 +01:00
platform Revert "x86/mm/pat: Ensure cpa->pfn only contains page frame numbers" 2017-12-16 10:33:57 +01:00
power x86/ldt: Make modify_ldt synchronous 2015-07-31 10:23:23 +02:00
purgatory x86/kexec: add -fno-PIE 2016-11-26 09:54:52 +01:00
ras x86/ras/mce_amd_inj: Inject bank 4 errors on the NBC 2015-10-12 16:15:48 +02:00
realmode x86/pti/efi: broken conversion from efi to kernel page table 2018-01-17 09:35:29 +01:00
tools x86/tools: Fix gcc-7 warning in relocs.c 2017-07-15 11:57:47 +02:00
um x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt() 2017-12-09 18:42:40 +01:00
video
xen x86/mm: Enable CR4.PCIDE on supported systems 2018-01-02 20:33:24 +01:00
.gitignore
Kbuild
Kconfig x86/cpu: Implement CPU vulnerabilites sysfs functions 2018-01-17 09:35:33 +01:00
Kconfig.cpu x86/Kconfig/cpus: Fix/complete CPU type help texts 2015-10-21 11:12:56 +02:00
Kconfig.debug x86: don't make DEBUG_WX default to 'y' even with DEBUG_RODATA 2015-11-06 09:12:41 -08:00
Makefile Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-11-04 09:11:12 -08:00
Makefile.um
Makefile_32.cpu