Re: [PATCH v4] misc: fastrpc: map ADSP remote heap into remoteproc IOMMU domain
From: Ekansh Gupta
Date: Wed Dec 02 2026 - 21:08:01 EST
On 01-12-2026 19:40, Anandu Krishnan E wrote:
> On Qualcomm platforms without Gunyah/QHEE, the kernel runs at EL2
> without a separate hypervisor to manage inter-VM memory access
> control. In this configuration the remoteproc is assigned its own
> IOMMU domain, and any memory carveout the DSP must access requires
> an explicit mapping into that domain before the DSP can reach it.
>
> The existing code calls qcom_scm_assign_mem() to transfer ownership
> of the ADSP remote heap carveout from HLOS to the DSP VM. This SCM
> call is only meaningful when a separate hypervisor (e.g. Gunyah) is
> present to enforce inter-VM memory access control. On platforms
> without such a hypervisor, the carveout must instead be mapped into
> the remoteproc's IOMMU domain via an identity mapping (IOVA == PA)
> using iommu_map(). Without this mapping the DSP triggers an SMMU
> translation fault when accessing the remote heap during audio PD
> static process creation.
>
> Detect whether the remoteproc has an IOMMU by checking for the
> "iommus" property on the remoteproc DT node and store the result in
> a new use_iommu_map flag in fastrpc_channel_ctx. When the flag is
> set, map the carveout into the remoteproc's IOMMU domain instead of
> calling qcom_scm_assign_mem(). Introduce fastrpc_remote_heap_map()
> and fastrpc_remote_heap_unmap() helpers to encapsulate the IOMMU
> domain lookup and map/unmap operations, and a shared
> fastrpc_remote_heap_release() helper that tears the mapping (or SCM
> assignment) back down, used both from fastrpc_rpmsg_remove() and
> from fastrpc_rpmsg_probe()'s error path.
>
> Tested-by: Tyler Baker <tyler.baker@xxxxxxxxxxxxxxxx> # Eliza EVK, EL2
> Signed-off-by: Anandu Krishnan E <anandu.e@xxxxxxxxxxxxxxxx>
Reviewed-by: Ekansh Gupta <ekansh.gupta@xxxxxxxxxxxxxxxx>