mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
mm/memremap.c: map FS_DAX device memory as decrypted
commit867400af90
upstream. 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/20221102160728.3184016-1-pankaj.gupta@amd.com Fixes:b7b3c01b19
("mm/memremap_pages: support multiple ranges per invocation") Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
03f9582a6a
commit
0b692d41ee
1 changed files with 1 additions and 0 deletions
|
@ -348,6 +348,7 @@ void *memremap_pages(struct dev_pagemap *pgmap, int nid)
|
|||
WARN(1, "File system DAX not supported\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
params.pgprot = pgprot_decrypted(params.pgprot);
|
||||
break;
|
||||
case MEMORY_DEVICE_GENERIC:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue