Re: [PATCH v1 1/2] iommu: export iommu_get_dma_domain()

From: Jianfeng Liu

Date: Mon Sep 28 2026 - 23:37:36 EST


Hi Robin,

On Mon, Sep 28, 2026 at 12:26 PM Robin Murphy wrote:
> NAK. Read the comment - this is an internal helper for iommu-dma
> (currently the only IOMMU_DOMAIN_DMA implementation) and is definitely
> not for random drivers to abuse. In fact it should really move to
> iommu-priv.h now that we have that.
>
> If you want to do sketchy things with your device's DMA domain then use
> the public iommu_get_domain_for_dev() interface like everyone else.

Fair enough - I'll drop the export.

For the record, if the msm side of the series goes anywhere, the plan
is to capture iommu_get_domain_for_dev(drm->dev) before msm takes the
device over with iommu_attach_device() - at that point the device's
current domain is still the DMA domain, so no new export is needed.
(Christian is pushing back on the msm patch itself, so that may end up
moot either way.)

Thanks for the pointer,
Jianfeng