linux/arch/x86/mm
Josh Poimboeuf ac8b525418 x86/speculation: Support 'mitigations=' cmdline option
commit d68be4c4d3 upstream.

Configure x86 runtime CPU speculation bug mitigations in accordance with
the 'mitigations=' cmdline option.  This affects Meltdown, Spectre v2,
Speculative Store Bypass, and L1TF.

The default behavior is unchanged.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Jiri Kosina <jkosina@suse.cz> (on x86)
Reviewed-by: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Jon Masters <jcm@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arch@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Steven Price <steven.price@arm.com>
Cc: Phil Auld <pauld@redhat.com>
Link: https://lkml.kernel.org/r/6616d0ae169308516cfdf5216bedd169f8a8291b.1555085500.git.jpoimboe@redhat.com
[bwh: Backported to 3.16:
 - Drop the auto,nosmt option and the l1tf mitigation selection, which we can't
   support
 - Adjust filenames, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-05-22 23:15:26 +01:00
..
kmemcheck x86/process: Don't mix user/kernel regs in 64bit __show_regs() 2018-12-16 22:09:11 +00:00
amdtopology.c x86/mm/numa: Simplify some bit mangling 2013-04-10 19:06:26 +02:00
dump_pagetables.c x86/mm: Prevent kernel Oops in PTDUMP code with HIGHPTE=y 2018-10-21 08:45:29 +01:00
extable.c x86, extable: Switch to relative exception table entries 2012-04-20 17:22:34 -07:00
fault.c x86: mm: move mmap_sem unlock from mm_fault_error() to caller 2015-02-16 09:45:27 +00:00
gup.c mm/hugetlb: pmd_huge() returns true for non-present hugepage 2015-03-02 13:17:14 +00:00
highmem_32.c mm: accurately calculate zone->managed_pages for highmem zones 2013-07-03 16:07:33 -07:00
hugetlbpage.c mm: larger stack guard gap, between vmas 2017-07-02 17:13:02 +01:00
init.c x86/speculation/l1tf: Fix off-by-one error when warning that system has too much RAM 2018-10-03 04:10:04 +01:00
init_32.c x86/mm: Initialize pmd_idx in page_table_range_init_count() 2015-09-30 13:20:36 +01:00
init_64.c kaiser: add "nokaiser" boot option, using ALTERNATIVE 2018-01-09 00:35:15 +00:00
iomap_32.c mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
ioremap.c Merge branch 'x86/vdso' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-05 08:05:29 -07:00
kaiser.c x86/speculation: Support 'mitigations=' cmdline option 2019-05-22 23:15:26 +01:00
kmmio.c x86/mm/kmmio: Make the tracer robust against L1TF 2018-10-03 04:10:06 +01:00
Makefile KPTI: Rename to PAGE_TABLE_ISOLATION 2018-01-09 00:35:20 +00:00
memtest.c x86/mm: memblock: switch to use NUMA_NO_NODE 2014-01-21 16:19:47 -08:00
mm_internal.h x86, mm: Move after_bootmem to mm_internel.h 2012-11-17 11:59:45 -08:00
mmap.c x86/speculation/l1tf: Fix off-by-one error when warning that system has too much RAM 2018-10-03 04:10:04 +01:00
mmio-mod.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
numa.c arch/x86/mm/numa.c: use for_each_memblock() 2014-06-04 16:54:05 -07:00
numa_32.c x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init() 2017-08-26 02:14:47 +01:00
numa_64.c x86, mm: kill numa_free_all_bootmem() 2012-11-17 11:59:47 -08:00
numa_emulation.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
numa_internal.h x86-32, mm: Rip out x86_32 NUMA remapping code 2013-01-31 14:12:30 -08:00
pageattr-test.c x86: define _PAGE_NUMA by reusing software bits on the PMD and PTE levels 2014-06-04 16:53:55 -07:00
pageattr.c x86/mm/pat: Make set_memory_np() L1TF safe 2018-10-03 04:10:06 +01:00
pat.c x86/io: add interface to reserve io memtype for a resource range. (v1.1) 2018-10-03 04:10:01 +01:00
pat_internal.h x86, pat: Fix memory leak in free_memtype 2010-05-26 11:26:04 -07:00
pat_rbtree.c rbtree: move augmented rbtree functionality to rbtree_augmented.h 2012-10-09 16:22:40 +09:00
pf_in.c x86: Eliminate various 'set but not used' warnings 2011-05-21 19:10:33 +02:00
pf_in.h x86 mmiotrace: move files into arch/x86/mm/. 2008-05-24 11:25:37 +02:00
pgtable.c x86/mm: Use WRITE_ONCE() when setting PTEs 2018-12-16 22:09:14 +00:00
pgtable_32.c x86: use generic early_ioremap 2014-04-07 16:36:15 -07:00
physaddr.c x86, mm: Make DEBUG_VIRTUAL work earlier in boot 2013-01-25 16:33:22 -08:00
physaddr.h x86: split __phys_addr out into separate file 2009-09-10 11:48:55 -07:00
setup_nx.c x86/cpufeature: Carve out X86_FEATURE_* 2019-05-22 23:15:08 +01:00
srat.c x86/mm: Avoid duplicated pxm_to_node() calls 2014-02-09 15:32:31 +01:00
testmmiotrace.c x86, kmmio/mmiotrace: Fix double free of kmmio_fault_pages 2010-06-18 11:30:09 +02:00
tlb.c x86/speculation: Prepare for conditional IBPB in switch_mm() 2019-05-22 23:15:17 +01:00