Re: [PATCH 3/7] of/iommu: add multi-map support
From: Vijayanand Jitta
Date: Mon Feb 02 2026 - 05:57:02 EST
On 1/27/2026 7:50 PM, Robin Murphy wrote:
> On 2026-01-27 11:45 am, Dmitry Baryshkov wrote:
>> On Mon, Jan 26, 2026 at 05:55:46PM +0530, Vikash Garodia wrote:
>>> From: Charan Teja Kalla <charan.kalla@xxxxxxxxxxxxxxxx>
>>>
>>> When multiple mappings are present for an input id, linux matches just
>>> the first one. There is a usecase[1] where all the mappings are to be
>>> maintained in parallel for an iommu-map entry of a same input id.
>>
>> This contradicts the IOMMU idealogy (at least as far as I understood it
>> fom the maintainers): the device (driver) doesn't control which IOMMUs
>> are getting used. Instead _all_ defined entries should get used. For
>> iommu-map it means that if the map defines several entries for a single
>> function, then all entries should always get mapped.
>
> Indeed there is no concept of "multi-map" - if a single input ID represents more than one thing then that notion of "input ID" is fundamentally wrong. A single *device* may have multiple IDs, as in the case of PCI bridge aliasing, but in that case there are multiple things to map.
>
vpu hardware do have video decode and encode usecases that would generate multiple Stream ID's.
So, all these Stream ID's would need to be represented using single input id as mentioned
in dt binding.
Referring patch [1/7] in this series
iommu-map = <0x100 &apps_smmu 0x1940 0x0 0x1>,
<0x100 &apps_smmu 0x1a20 0x0 0x1>,
<0x100 &apps_smmu 0x1944 0x0 0x1>;
Here, IRIS_CB_NON_SECURE_NON_PIXEL [1] is the input id.
enum iris_iommu_map_function_id {
IRIS_CB_NON_SECURE_NON_PIXEL = 0x100,
[1] https://lore.kernel.org/all/20260126-kaanapali-iris-v1-5-e2646246bfc1@xxxxxxxxxxxxxxxx/
Thanks,
Vijay
> Thanks,
> Robin.