[PATCHv3 0/2] x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default

From: Kirill A. Shutemov
Date: Mon Jan 13 2025 - 08:16:19 EST


From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxx>

Make memremap(MEMREMAP_WB) produce encrypted/private mapping by default
unless MEMREMAP_DEC is specified.

It fixes crash on kexec in TDX guests if CONFIG_EISA is enabled.

v3:
- Update commit message;
- Add Cc: stable;
v2:
- Fix sparse warning;

Kirill A. Shutemov (2):
memremap: Pass down MEMREMAP_* flags to arch_memremap_wb()
x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default

arch/arm/include/asm/io.h | 2 +-
arch/arm/mm/ioremap.c | 2 +-
arch/arm/mm/nommu.c | 2 +-
arch/riscv/include/asm/io.h | 2 +-
arch/x86/include/asm/io.h | 3 +++
arch/x86/mm/ioremap.c | 8 ++++++++
kernel/iomem.c | 5 +++--
7 files changed, 18 insertions(+), 6 deletions(-)

--
2.45.2