Re: [RFC PATCH v3 3/5] dma-mapping: Decrypt memory on remap

Aneesh Kumar K.V
2026-04-14T13:13:58Z

Jason Gunthorpe <jgg@ziepe.ca> writes:

> On Tue, Apr 14, 2026 at 03:01:15PM +0530, Aneesh Kumar K.V wrote:
>> Mostafa Saleh <smostafa@google.com> writes:
>>
>> > In case memory needs to be remapped on systems with
>> > force_dma_unencrypted(), where this memory is not allocated
>> > from a restricted-dma pool, this was currently ignored, while only
>> > setting the decrypted pgprot in the remapped alias.
>> >
>> > The memory still needs to be decrypted in that case.
>> >
>>
>> For ARM CCA, we cannot mark a vmap address as decrypted.
>
> Why not? pgprot_decrypted is passed to vmap, why can't it work?
>

I might have confused you in my previous reply. What I meant is that, if
we do not have a linear map, we currently cannot change the page
attributes. We are avoiding that by requesting a non-HighMem address.
What I am suggesting here is that we should document this, or perhaps
handle it as a separate patch as done in [1] by explicitly stating the
challenges

[1] https://lore.kernel.org/all/20260102155037.2551524-1-aneesh.kumar@kernel.org

> Jason