Skip to content

Commit 867400a

Browse files
paguptaakpm00
authored andcommitted
mm/memremap.c: map FS_DAX device memory as decrypted
virtio_pmem use devm_memremap_pages() to map the device memory. By default this memory is mapped as encrypted with SEV. Guest reboot changes the current encryption key and guest no longer properly decrypts the FSDAX device meta data. Mark the corresponding device memory region for FSDAX devices (mapped with memremap_pages) as decrypted to retain the persistent memory property. Link: https://lkml.kernel.org/r/[email protected] Fixes: b7b3c01 ("mm/memremap_pages: support multiple ranges per invocation") Signed-off-by: Pankaj Gupta <[email protected]> Cc: Dan Williams <[email protected]> Cc: Tom Lendacky <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 624a2c9 commit 867400a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mm/memremap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ void *memremap_pages(struct dev_pagemap *pgmap, int nid)
335335
WARN(1, "File system DAX not supported\n");
336336
return ERR_PTR(-EINVAL);
337337
}
338+
params.pgprot = pgprot_decrypted(params.pgprot);
338339
break;
339340
case MEMORY_DEVICE_GENERIC:
340341
break;

0 commit comments

Comments
 (0)