[PATCH RFC v7 6/7] iommu/arm-smmu-v3: Group aliasing devices into the same IOMMU group
Nicolin Chen
nicolinc at nvidia.com
Mon Nov 2 10:31:26 PST 2026
On Fri, Oct 30, 2026 at 08:09:38PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan at nxp.com>
>
> Devices sharing a SID must share a single IOMMU domain because the STE
> can only point to one CD table at a time. With the domain-owned CD table,
> non-PASID devices in that domain share that table directly.
>
> Detect SID aliasing at group-assignment time by looking up the RB tree
> for existing owners. Since probe_device() inserts the master before
> device_group() is called, skip the device's own stream and look for a
> different, already-probed master that shares the same SID.
>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>
With a nit,
> if (dev_is_pci(dev))
> - group = pci_device_group(dev);
> - else
> - group = generic_device_group(dev);
> + return pci_device_group(dev);
>
> - return group;
> + return generic_device_group(dev);
This change seems unnecessary.
Nicolin
More information about the linux-arm-kernel
mailing list