> From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > Sent: Monday, November 4, 2024 9:20 PM > > @@ -3404,8 +3404,18 @@ static void iommu_remove_dev_pasid(struct > device *dev, ioasid_t pasid, > struct iommu_domain *domain) > { > const struct iommu_ops *ops = dev_iommu_ops(dev); > + struct iommu_domain *blocked_domain = ops->blocked_domain; > + int ret = 1; > + > + if (blocked_domain && blocked_domain->ops->set_dev_pasid) { > + ret = blocked_domain->ops->set_dev_pasid(blocked_domain, > + dev, pasid, domain); > + } else if (ops->remove_dev_pasid) { > + ops->remove_dev_pasid(dev, pasid, domain); > + ret = 0; > + } > given ops->remove_dev_pasid is already checked at attach time here could just call it w/o further check. Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>