Re: [PATCH] vmgenid: Remap memory as decrypted

From: Vitaly Kuznetsov

Date: Mon Dec 22 2025 - 10:18:26 EST


"Jason A. Donenfeld" <Jason@xxxxxxxxx> writes:

> Hi Vitaly,
>
> On Mon, Dec 22, 2025 at 3:46 PM Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> wrote:
>> - virt_addr = devm_memremap(&device->dev, phys_addr, VMGENID_SIZE, MEMREMAP_WB);
>> + virt_addr = devm_memremap(&device->dev, phys_addr, VMGENID_SIZE,
>> + MEMREMAP_WB | MEMREMAP_DEC);
>
> Thanks for this patch. I still need to do a bit of my own testing with
> it, but I've preliminarily applied it to the random.git tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git/commit/?id=9476583268980ce64ed75f124768fe3bff6fff4c
>
> Should this patch CC stable@, by the way?
>

I'm not sure how common the configuration (SEV-SNP/(TDX?) + vmgenid) is
but I guess AWS SEV-SNP config is significant enough to justify stable@
as all kernels 6.15+ don't boot there at all.

--
Vitaly