On 8/25/23 4:17 PM, Tian, Kevin wrote:
+static void assert_no_pending_iopf(struct device *dev, ioasid_t pasid)
+{
+ struct iommu_fault_param *iopf_param = dev->iommu-
fault_param;
+ struct iopf_fault *iopf;
+
+ if (!iopf_param)
+ return;
+
+ mutex_lock(&iopf_param->lock);
+ list_for_each_entry(iopf, &iopf_param->partial, list) {
+ if (WARN_ON(iopf->fault.prm.pasid == pasid))
+ break;
+ }
partial list is protected by dev_iommu lock.
Ah, do you mind elaborating a bit more? In my mind, partial list is
protected by dev_iommu->fault_param->lock.
Best regards,
baolu