[PATCH v3 5/8] dma-mapping: Introduce lendable-dma-pool

Sumit Garg sumit.garg at kernel.org
Fri Nov 27 04:14:23 PST 2026


> On arm64, when memory is lent to secure world (e.g. via Arm FF-A), fatal
> CPU speculative reads can still occur while it retains a cacheable
> direct mapping. Introduce the "lendable-dma-pool" reserved-memory CMA
> driver with dma_zap_direct_map() and dma_restore_direct_map() to unmap
> pages before lending and restore them upon reclaim. Devices use the pool
> via "memory-region" or "linux,cma-default":
> 
>   reserved-memory {
>       #address-cells = <0x2>;
>       #size-cells = <0x2>;
>       ranges;
> 
>       linux,cma {
>           compatible = "lendable-dma-pool";
>           reusable;
>           linux,cma-default;
>           size = <0x0 0x4000000>;
>       };
>   };
> 
> If no lendable-dma-pool node is provided, the API falls back to
> can_set_direct_map().
> 
> Signed-off-by: Vincent Donnefort <vdonnefort at google.com>

Acked-by: Sumit Garg <sumit.garg at oss.qualcomm.com>

-Sumit

-- 
Sumit Garg <sumit.garg at kernel.org>



More information about the linux-arm-kernel mailing list