[RFC PATCH v4 15/28] Add support to access persistent memory in the clear

From: Tom Lendacky
Date: Thu Feb 16 2017 - 10:45:47 EST

Persistent memory is expected to persist across reboots. The encryption
key used by SME will change across reboots which will result in corrupted
persistent memory. Persistent memory is handed out by block devices
through memory remapping functions, so be sure not to map this memory as

Signed-off-by: Tom Lendacky <thomas.lendacky@xxxxxxx>
arch/x86/mm/ioremap.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index b0ff6bc..c6cb921 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -498,6 +498,8 @@ static bool memremap_should_map_encrypted(resource_size_t phys_addr,
case E820_TYPE_ACPI:
case E820_TYPE_NVS:
+ case E820_TYPE_PMEM:
+ case E820_TYPE_PRAM:
return false;