Re: [PATCH 05/40] dma-contiguous: add dma_get_numa_cma_area() accessor
From: Graf (AWS), Alexander
Date: Mon Nov 16 2026 - 09:25:39 EST
On 16.11.26 13:48, Marek Szyprowski wrote:
> On 11.11.2026 23:41, Alexander Graf wrote:
>> With Nitro Sandboxes, we want to allocate per-NUMA memory from the DMA
>> contiguous allocator, but have no per-NUMA struct device to pass in.
>> dma_alloc_contiguous() takes the node from dev_to_node(dev), and the
>> per-node areas sit in dma_contiguous_numa_area[], which is static.
>>
>> So instead, introduce dma_get_numa_cma_area(), which returns the generic
>> per-NUMA DMA CMA area that cma_alloc() would use. This way, the
>> nitro_enclaves driver can build its own generic CMA pool per-node
>> allocation logic on top of those pools.
>>
>> Signed-off-by: Alexander Graf <graf@xxxxxxxxxx>
> Take a look at the following patch and the patchset it belongs to:
>
> https://lore.kernel.org/all/20261106184433.761422-5-kuba@xxxxxxxxxx/
Nice! That looks very much like what I need. Thanks a lot, let me try
and see if I can base on top of it instead.
Alex