v2 2026-11-06

arm64 解除 FF-A 借出内存直映射 · v2

arm64/FF-A 为借出内存引入 ll-map 与 CMA 池,按区域建立末级映射并在 lend/reclaim 时解映射/重映射,避免全局拆分直接映射。

原始补丁链接

子 Patch(8)

1/8
memblock: Introduce MEMBLOCK_PTEMAP
Keeping PTE-level mappings is interesting on some architectures as it allows mapping/unmapping pages from the kernel direct map without the risk of splitting blocks which, under the break-before-make
2/8
arm64: Introduce can_set_direct_map_range()
For systems where can_set_direct_map() is false, it is still possible that a subregion of the direct map can be modified if it is mapped at the last-level. Add an implementation for can_set_direct_map
3/8
arm64: Introduce __set_direct_map*()
Add implementation for the unsafe functions __set_direct_map*(). They do not verify for can_set_direct_map() and expect the caller to do so beforehand. Signed-off-by: Vincent Donnefort <vdonnefort@go
4/8
arm64: Add support for MEMBLOCK_PTEMAP
With the MEMBLOCK_PTEMAP flag, force a PTE-level mapping. Signed-off-by: Vincent Donnefort vdonnefort@google.com — arch/arm64/mm/mmu.c | 23 ++++++++++++++++——- 1 file changed , 16 insertion
5/8
firmware: arm_ffa: Introduce ffa-lend-pool
When memory is lent to the Secure world via FF-A, fatal CPU speculative reads from Non-Secure can still occur as long as it retains a cacheable mapping to that memory. Introduce the “arm,ffa-lend-pool
6/8
optee: Add support for arm,ffa-lend-pool
Hook OP-TEE dynamically allocated protected memory pools to the “arm,ffa-lend-pool” driver. While the SMC transport platform device resolves the pool through its DT “memory-region” property, the FF-A
7/8
dt-bindings: reserved-memory: Add Arm FF-A lend pool
Add bindings for the “arm,ffa-lend-pool” reserved-memory CMA pool. Signed-off-by: Vincent Donnefort vdonnefort@google.com — …/reserved-memory/arm,ffa-lend-pool.yaml | 55 +++++++++++++++++++
8/8
dt-bindings: firmware: optee: Add memory-region property
Allow reserved-memory via memory-region to support the arm,ffa-lend-pool. Signed-off-by: Vincent Donnefort vdonnefort@google.com — …/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml |