mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
To: Anandu Krishnan E <anandu.e@oss.qualcomm.com>,
	Srinivas Kandagatla <srini@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, quic_bkumar@quicinc.com,
	quic_chennak@quicinc.com, amahesh@qti.qualcomm.com,
	Tyler Baker <tyler.baker@oss.qualcomm.com>
Subject: Re: [PATCH v4] misc: fastrpc: map ADSP remote heap into remoteproc IOMMU domain
Date: Thu, 3 Dec 2026 07:37:37 +0530	[thread overview]
Message-ID: <01fb2c07-331b-4124-a600-530d942a535b@oss.qualcomm.com> (raw)
In-Reply-To: <20261201-fastrpc-kvm-iommu-v4-b4-v4-1-b83c79d2c541@oss.qualcomm.com>

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@oss.qualcomm.com> # Eliza EVK, EL2
> Signed-off-by: Anandu Krishnan E <anandu.e@oss.qualcomm.com>

Reviewed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>



      reply	other threads:[~2026-12-03  2:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 14:10 Anandu Krishnan E
2026-12-03  2:07 ` Ekansh Gupta [this message]

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=01fb2c07-331b-4124-a600-530d942a535b@oss.qualcomm.com \
    --to=ekansh.gupta@oss.qualcomm.com \
    --cc=amahesh@qti.qualcomm.com \
    --cc=anandu.e@oss.qualcomm.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_bkumar@quicinc.com \
    --cc=quic_chennak@quicinc.com \
    --cc=srini@kernel.org \
    --cc=tyler.baker@oss.qualcomm.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®