On Fri, Jul 03, 2026 at 06:40:22AM +0000, Tian, Kevin wrote:
quoted
From: Nicolin Chen <redacted>
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