Hi Oleksandr,

One more comment :).

On 8/2/19 5:39 PM, Oleksandr Tyshchenko wrote:
+int iommu_fwspec_init(struct device *dev, struct device *iommu_dev)
+{
+    struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
+
+    if ( fwspec )

I would actually check the iommu_dev passed in parameter is the same as stored. We expect all device to be protected by only one IOMMU. So better to be safe than allow overriding ;).

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to