From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Sent: Friday, August 25, 2023 10:30 AM
+ if (fault->prm.flags & IOMMU_FAULT_PAGE_REQUEST_PASID_VALID)
+ domain = iommu_get_domain_for_dev_pasid(dev, fault-
prm.pasid, 0);+ else
+ domain = iommu_get_domain_for_dev(dev);
+
+ if (!domain || !domain->iopf_handler) {
+ dev_warn_ratelimited(dev,
+ "iopf from pasid %d received without handler
installed\n",
"without domain attached or handler installed"
+int iommu_sva_handle_iopf(struct iopf_group *group)
+{
+ struct iommu_fault_param *fault_param = group->dev->iommu-
fault_param;+
+ INIT_WORK(&group->work, iopf_handler);
+ if (!queue_work(fault_param->queue->wq, &group->work))
+ return -EBUSY;
+
+ return 0;
+}
this function is generic so the name should not tie to 'sva'.