kernel-ark/arch/x86/mm
Tom Lendacky bba4ed011a x86/mm, kexec: Allow kexec to be used with SME
Provide support so that kexec can be used to boot a kernel when SME is
enabled.

Support is needed to allocate pages for kexec without encryption.  This
is needed in order to be able to reboot in the kernel in the same manner
as originally booted.

Additionally, when shutting down all of the CPUs we need to be sure to
flush the caches and then halt. This is needed when booting from a state
where SME was not active into a state where SME is active (or vice-versa).
Without these steps, it is possible for cache lines to exist for the same
physical location but tagged both with and without the encryption bit. This
can cause random memory corruption when caches are flushed depending on
which cacheline is written last.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: <kexec@lists.infradead.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Larry Woodman <lwoodman@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Toshimitsu Kani <toshi.kani@hpe.com>
Cc: kasan-dev@googlegroups.com
Cc: kvm@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-efi@vger.kernel.org
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/b95ff075db3e7cd545313f2fb609a49619a09625.1500319216.git.thomas.lendacky@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-07-18 11:38:04 +02:00
..
kmemcheck
amdtopology.c x86/boot/e820: Move asm/e820.h to asm/e820/api.h 2017-01-28 09:31:13 +01:00
debug_pagetables.c
dump_pagetables.c x86/boot/64: Rename init_level4_pgt and early_level4_pgt 2017-06-13 08:56:55 +02:00
extable.c x86/debug: Handle early WARN_ONs proper 2017-06-12 21:17:48 +02:00
fault.c x86/mm: Split read_cr3() into read_cr3_pa() and __read_cr3() 2017-06-13 08:48:09 +02:00
highmem_32.c
hugetlbpage.c mm/hugetlb: add size parameter to huge_pte_offset() 2017-07-06 16:24:34 -07:00
ident_map.c x86/mm, kexec: Allow kexec to be used with SME 2017-07-18 11:38:04 +02:00
init_32.c mm, memory_hotplug: replace for_device by want_memblock in arch_add_memory 2017-07-06 16:24:32 -07:00
init_64.c mm, memory_hotplug: replace for_device by want_memblock in arch_add_memory 2017-07-06 16:24:32 -07:00
init.c x86/mm: Rework lazy TLB mode and TLB freshness tracking 2017-07-05 10:52:57 +02:00
iomap_32.c
ioremap.c x86/mm: Add support to access persistent memory in the clear 2017-07-18 11:38:02 +02:00
kasan_init_64.c x86/mm: Insure that boot memory areas are mapped properly 2017-07-18 11:38:01 +02:00
kaslr.c x86/mm: Add support for 5-level paging for KASLR 2017-06-13 08:56:58 +02:00
kmmio.c
Makefile x86/mm: Add Secure Memory Encryption (SME) support 2017-07-18 11:37:59 +02:00
mem_encrypt.c x86, swiotlb: Add memory encryption support 2017-07-18 11:38:03 +02:00
mm_internal.h
mmap.c x86/mmap: properly account for stack randomization in mmap_base 2017-07-12 16:26:03 -07:00
mmio-mod.c x86/boot/e820: Move asm/e820.h to asm/e820/api.h 2017-01-28 09:31:13 +01:00
mpx.c x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space 2017-04-12 08:40:58 +02:00
numa_32.c x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init() 2017-05-09 08:12:27 +02:00
numa_64.c
numa_emulation.c
numa_internal.h
numa.c Merge branch 'x86/boot' into x86/mm, to avoid conflict 2017-04-11 08:56:05 +02:00
pageattr-test.c
pageattr.c x86, drm, fbdev: Do not specify encrypted memory for video mappings 2017-07-18 11:38:04 +02:00
pat_internal.h
pat_rbtree.c x86/mm/pat: Use rb_entry() 2017-02-04 17:18:00 +01:00
pat.c x86/mm/pat: Set write-protect cache mode for full PAT support 2017-07-18 11:37:58 +02:00
pf_in.c
pf_in.h
pgtable_32.c Merge branch 'x86/boot' into x86/mm, to avoid conflict 2017-04-11 08:56:05 +02:00
pgtable.c x86/mm: Add basic defines/helpers for CONFIG_X86_5LEVEL=y 2017-04-04 08:22:34 +02:00
physaddr.c
physaddr.h
pkeys.c x86/fpu: Finish excising 'eagerfpu' 2016-10-18 09:56:03 +02:00
setup_nx.c
srat.c x86/boot/e820: Move asm/e820.h to asm/e820/api.h 2017-01-28 09:31:13 +01:00
testmmiotrace.c Annotate hardware config module parameters in arch/x86/mm/ 2017-04-04 16:54:21 +01:00
tlb.c x86/mm: Provide general kernel support for memory encryption 2017-07-18 11:38:00 +02:00