From: "Gupta, Pankaj" <pankaj.gupta@amd.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
dan.j.williams@intel.com, thomas.lendacky@amd.com,
pankaj.gupta@amd.com
Subject: Re: [PATCH] mm/memremap.c: map FS_DAX device memory as decrypted
Date: Wed, 2 Nov 2022 20:03:59 +0100 [thread overview]
Message-ID: <257ed6bb-6625-e634-a4b0-4bcca751d7c8@amd.com> (raw)
In-Reply-To: <20221102160728.3184016-1-pankaj.gupta@amd.com>
+Cc Andrew [forgot to add earlier]
> 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.
>
> Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com>
> ---
> mm/memremap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/memremap.c b/mm/memremap.c
> index 421bec3a29ee..08cbf54fe037 100644
> --- a/mm/memremap.c
> +++ b/mm/memremap.c
> @@ -335,6 +335,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;
next prev parent reply other threads:[~2022-11-02 19:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 16:07 Pankaj Gupta
2022-11-02 19:03 ` Gupta, Pankaj [this message]
2022-11-02 20:05 ` Andrew Morton
2022-11-03 7:55 ` Gupta, Pankaj
2022-11-04 23:32 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=257ed6bb-6625-e634-a4b0-4bcca751d7c8@amd.com \
--to=pankaj.gupta@amd.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox