]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memremap.c: map FS_DAX device memory as decrypted
authorPankaj Gupta <pankaj.gupta@amd.com>
Wed, 2 Nov 2022 16:07:28 +0000 (11:07 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 8 Nov 2022 23:57:23 +0000 (15:57 -0800)
commitcebc37903ffde02e03c74d1a5d6ce20c55b8f5c5
tree8bb709bc2ea65c6ece6ff66115b6736735c02fac
parent7826c7327934241fcfacef8f7a7775391352f2da
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/20221102160728.3184016-1-pankaj.gupta@amd.com
Fixes: 992a0f9d01635 ("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>
mm/memremap.c