Skip to content

FROMLIST: media: iris: Enable Secure PAS support with IOMMU managed b…#653

Merged
dikshita-agarwal merged 1 commit intoqualcomm-linux:tech/mm/videofrom
dikshita-agarwal:video-KVM
Feb 13, 2026
Merged

FROMLIST: media: iris: Enable Secure PAS support with IOMMU managed b…#653
dikshita-agarwal merged 1 commit intoqualcomm-linux:tech/mm/videofrom
dikshita-agarwal:video-KVM

Conversation

@dikshita-agarwal
Copy link

@dikshita-agarwal dikshita-agarwal commented Feb 11, 2026

Most Qualcomm platforms feature a inhouse hypervisor (such as Gunyah or QHEE), which typically handles IOMMU configuration. This includes mapping memory regions and device memory resources for remote processors by intercepting qcom_scm_pas_auth_and_reset() calls. These mappings are later removed during teardown. Additionally, SHM bridge setup is required to enable memory protection for both remoteproc metadata and its memory regions.

When the hypervisor is absent, the operating system must perform these configurations instead.

Support for handling IOMMU and SHM setup in the absence of a hypervisor is now in place. Extend the Iris driver to enable this functionality on platforms where IOMMU is managed by Linux (i.e., non-Gunyah, non-QHEE).

Additionally, the Iris driver must map the firmware and its required resources to the firmware SID, which is now specified via the device tree.

Link: https://lore.kernel.org/lkml/20250819165447.4149674-12-mukesh.ojha@oss.qualcomm.com/

Exception JIRA: https://jira-dc.qualcomm.com/jira/browse/QLIJIRA-109
CRs-Fixed: 4345867

return 0;

err_iommu_free:
iommu_domain_free(iommu_dom);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this

res_size = resource_size(&res);

if (core->has_iommu)
dev = core->fw.dev;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there is a need for has_iommu ?

dev = core->fw.dev ? : core->dev;

if (ret)
goto err_mem_unmap;

if (core->has_iommu) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (core->fw.iommu_domain) ?


ctx = core->fw.ctx;
ret = qcom_scm_pas_shutdown(ctx->pas_id);
if (core->has_iommu) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

if (!np)
return 0;

core->has_iommu = true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this additional


void iris_fw_deinit(struct iris_core *core)
{
if (!core->has_iommu)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..something like if (!fw dev) return 0;

Copy link

@vgarodia vgarodia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments

…y Linux

Most Qualcomm platforms feature a inhouse hypervisor (such as Gunyah
or QHEE), which typically handles IOMMU configuration. This includes
mapping memory regions and device memory resources for remote processors
by intercepting qcom_scm_pas_auth_and_reset() calls. These mappings are
later removed during teardown. Additionally, SHM bridge setup is required
to enable memory protection for both remoteproc metadata and its memory
regions.

When the hypervisor is absent, the operating system must perform these
configurations instead.

Support for handling IOMMU and SHM setup in the absence of a hypervisor
is now in place. Extend the Iris driver to enable this functionality on
platforms where IOMMU is managed by Linux (i.e., non-Gunyah, non-QHEE).

Additionally, the Iris driver must map the firmware and its required
resources to the firmware SID, which is now specified via the device tree.

Link: https://lore.kernel.org/lkml/20250819165447.4149674-12-mukesh.ojha@oss.qualcomm.com/

Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
@dikshita-agarwal dikshita-agarwal merged commit 31153be into qualcomm-linux:tech/mm/video Feb 13, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants