[PATCH v1 3/3] iommu/arm-smmu-v3-iommufd: Require exactly one Stream ID for a vDEVICE
Nicolin Chen
nicolinc at nvidia.com
Fri Jul 3 00:08:59 PDT 2026
On Fri, Jul 03, 2026 at 06:40:22AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc at nvidia.com>
> > Sent: Tuesday, June 30, 2026 5:16 AM
> > }
> >
> > +static int arm_vsmmu_vdevice_init(struct iommufd_vdevice *vdev)
> > +{
> > + struct device *dev = iommufd_vdevice_to_device(vdev);
> > + struct arm_smmu_master *master = dev_iommu_priv_get(dev);
> > +
> > + /*
> > + * arm_vsmmu_vsid_to_sid() maps a vSID to master->streams[0]
> > alone, so
> > + * more streams would leave the rest stale and none reads out of
> > bounds.
> > + */
> > + if (master->num_streams != 1)
> > + return -EINVAL;
> > + return 0;
> > +}
>
> - EOPNOTSUPP, given the comment seems to indicate it as a current
> limitation hence may be removed in future? otherwise with -EINVAL
> this may be documented somewhere to get attention from userspace.
OK. I will change it and other places too.
Thanks
Nicolin
More information about the linux-arm-kernel
mailing list