From: Will Deacon <will@kernel.org>
To: sumit.garg@kernel.org
Cc: brendan.jackman@linux.dev,
Vincent Donnefort <vdonnefort@google.com>,
catalin.marinas@arm.com, rppt@kernel.org,
akpm@linux-foundation.org, sudeep.holla@kernel.org,
jenswi@kernel.org, robh@kernel.org, mark.rutland@arm.com,
ardb@kernel.org, thierry.reding@kernel.org, david@kernel.org,
danielmentz@google.com, linux-arm-kernel@lists.infradead.org,
linux-mm@kvack.org, op-tee@lists.trustedfirmware.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/8] arm64: Unmap FF-A lent memory from direct map
Date: Tue, 29 Sep 2026 12:33:07 +0100 [thread overview]
Message-ID: <aruh86rd5FMv2i9G@willie-the-truck> (raw)
In-Reply-To: <are21BjeS1O3RYE3@sumit-xelite>
On Sat, Sep 26, 2026 at 05:43:08PM +0530, Sumit Garg wrote:
> Looks like you dropped me from your reply.
Huh, that's weird. If I hit reply-all ('g') in mutt, it moves the entire
CC list to To: and drops you. I suspect the same thing happened to Thierry
when he replied here:
https://lore.kernel.org/all/arJcN60nagFKXj2Q@orome/
I can't figure out why that's happening :/
I manually tried to fix the To: and Cc: lines in this message.
> On Tue, 22 Sep 2026 at 15:55:59 +0100, Will Deacon wrote:
> > I spoke to Brendan at LPC (?) last year but this doesn't really work
> > for arm64 because it relies on being able to unmap arbitrary parts of
> > the linear map, which isn't generally possible unless you force pte-level
> > mappings for everything, which is prohibitive for perf/power.
>
> As per the cover letter it's about allocating pages that are not present
> in the direct map. This essentially fits the protected DMABufs use-case
> where we don't want any kernel mapping to exist at any time. Bufers
> allocated from protected DMABufs are only meant to be accessed by the
> TEE implementation or HW accelerators like in the secure media pipeline.
That sounds like it should probably build on top of this series, then.
You could allocate the DMABufs from a CMA region that has no linear alias.
> > Vincent's series tackles that by using a pool so that only that part of
> > memory requires the pte-level mappings in the linear map. That's the
> > whole point of it, so I don't think it makes sense to drop it in favour
> > of Brendan's approach (which doesn't work).
> >
>
> For protected DMABufs, we even don't require any pte-level mappings in
> linear map. The whole idea of mapping and unmapping is just a bottleneck
> for performance sensitive secure media pipeline use-cases. That's why if
> we can support __GFP_UNMAPPED with the memory allocator on arm64 would
> be the best fit for this use-case.
The point is that you will require pte-level mappings for the linear map
if you want to unmap from it at runtime on arm64. If you don't, then you
can end up needing to split a block mapping (e.g. pmd-level) when you
decide to unmap only part of it and there isn't a safe way to do that on
arm64 without transiently unmapping the entire block, which can lead to
fatal translation faults during that window.
> Now the question is why arm64 can't support __GFP_UNMAPPED similar to
> how Brendan is doing it for x86?
Because arm64 != x86? Presumably x86 doesn't have the strict
break-before-make requirements we have on arm64.
Will
next prev parent reply other threads:[~2026-09-29 11:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 11:00 Vincent Donnefort
2026-09-21 11:00 ` [PATCH v2 1/8] memblock: Introduce MEMBLOCK_PTEMAP Vincent Donnefort
2026-09-21 11:00 ` [PATCH v2 2/8] arm64: Introduce can_set_direct_map_range() Vincent Donnefort
2026-09-21 11:00 ` [PATCH v2 3/8] arm64: Introduce __set_direct_map*() Vincent Donnefort
2026-09-21 11:00 ` [PATCH v2 4/8] arm64: Add support for MEMBLOCK_PTEMAP Vincent Donnefort
2026-09-21 11:00 ` [PATCH v2 5/8] firmware: arm_ffa: Introduce ffa-lend-pool Vincent Donnefort
2026-09-21 11:00 ` [PATCH v2 6/8] optee: Add support for arm,ffa-lend-pool Vincent Donnefort
2026-09-21 11:00 ` [PATCH v2 7/8] dt-bindings: reserved-memory: Add Arm FF-A lend pool Vincent Donnefort
2026-09-21 15:20 ` Rob Herring (Arm)
2026-09-21 11:00 ` [PATCH v2 8/8] dt-bindings: firmware: optee: Add memory-region property Vincent Donnefort
2026-09-22 5:57 ` [PATCH v2 0/8] arm64: Unmap FF-A lent memory from direct map Sumit Garg
2026-09-22 10:57 ` Thierry Reding
2026-09-22 14:55 ` Will Deacon
2026-09-26 12:13 ` Sumit Garg
2026-09-29 11:33 ` Will Deacon [this message]
2026-10-01 12:34 ` Sumit Garg
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=aruh86rd5FMv2i9G@willie-the-truck \
--to=will@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=brendan.jackman@linux.dev \
--cc=catalin.marinas@arm.com \
--cc=danielmentz@google.com \
--cc=david@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jenswi@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=robh@kernel.org \
--cc=rppt@kernel.org \
--cc=sudeep.holla@kernel.org \
--cc=sumit.garg@kernel.org \
--cc=thierry.reding@kernel.org \
--cc=vdonnefort@google.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
all inboxes | Powered by JetHome®