linux/arch/x86/mm
Tom Lendacky 985e537a40 x86/ioremap: Map EFI runtime services data as encrypted for SEV
The dmidecode program fails to properly decode the SMBIOS data supplied
by OVMF/UEFI when running in an SEV guest. The SMBIOS area, under SEV, is
encrypted and resides in reserved memory that is marked as EFI runtime
services data.

As a result, when memremap() is attempted for the SMBIOS data, it
can't be mapped as regular RAM (through try_ram_remap()) and, since
the address isn't part of the iomem resources list, it isn't mapped
encrypted through the fallback ioremap().

Add a new __ioremap_check_other() to deal with memory types like
EFI_RUNTIME_SERVICES_DATA which are not covered by the resource ranges.

This allows any runtime services data which has been created encrypted,
to be mapped encrypted too.

 [ bp: Move functionality to a separate function. ]

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Joerg Roedel <jroedel@suse.de>
Cc: <stable@vger.kernel.org> # 5.3
Link: https://lkml.kernel.org/r/2d9e16eb5b53dc82665c95c6764b7407719df7a0.1582645327.git.thomas.lendacky@amd.com
2020-03-11 15:54:54 +01:00
..
pat ARM: Cleanups and corner case fixes 2020-01-31 09:30:41 -08:00
amdtopology.c
cpu_entry_area.c x86/doublefault/32: Move #DF stack and TSS to cpu_entry_area 2019-11-26 21:53:34 +01:00
debug_pagetables.c x86: mm: avoid allocating struct mm_struct on the stack 2020-02-04 03:05:25 +00:00
dump_pagetables.c x86/mm: Fix dump_pagetables with Xen PV 2020-02-29 12:43:10 +01:00
extable.c
fault.c Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 11:08:13 -08:00
highmem_32.c
hugetlbpage.c x86/mpx: remove MPX from arch/x86 2020-01-23 10:41:20 -08:00
ident_map.c
init_32.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 09:44:15 -08:00
init_64.c Linux 5.5-rc7 2020-01-20 08:43:44 +01:00
init.c
iomap_32.c x86/mm/pat: Rename <asm/pat.h> => <asm/memtype.h> 2019-12-10 10:12:55 +01:00
ioremap.c x86/ioremap: Map EFI runtime services data as encrypted for SEV 2020-03-11 15:54:54 +01:00
kasan_init_64.c x86/kasan: Print original address on #GP 2019-12-31 13:15:38 +01:00
kaslr.c
kmmio.c
maccess.c
Makefile x86: mm: convert dump_pagetables to use walk_page_range 2020-02-04 03:05:25 +00:00
mem_encrypt_boot.S
mem_encrypt_identity.c
mem_encrypt.c
mm_internal.h
mmap.c x86/mpx: remove MPX from arch/x86 2020-01-23 10:41:20 -08:00
mmio-mod.c
numa_32.c
numa_64.c
numa_emulation.c
numa_internal.h
numa.c
pf_in.c
pf_in.h
pgtable_32.c mm, x86/mm: Untangle address space layout definitions from basic pgtable type definitions 2019-12-10 10:12:55 +01:00
pgtable.c
physaddr.c mm, x86/mm: Untangle address space layout definitions from basic pgtable type definitions 2019-12-10 10:12:55 +01:00
physaddr.h
pkeys.c
pti.c
setup_nx.c
srat.c
testmmiotrace.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
tlb.c smp: Remove allocation mask from on_each_cpu_cond.*() 2020-01-24 20:40:09 +01:00