Thread (8 messages) 8 messages, 2 authors, 20d ago

Re: [PATCH v1 3/3] iommu/arm-smmu-v3-iommufd: Require exactly one Stream ID for a vDEVICE

From: Nicolin Chen <hidden>
Date: 2026-07-03 07:09:27
Also in: linux-iommu, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help