On 2023/12/28 14:17, Tian, Kevin wrote:
From: Liu, Yi L yi.l.liu@intel.com Sent: Thursday, December 28, 2023 12:14 AM
@@ -1376,6 +1383,8 @@ int qi_submit_sync(struct intel_iommu *iommu, struct qi_desc *desc,
restart: rc = 0;
- if (fault)
*fault = 0;
move it to right before the loop of qi_check_fault()
ok.
raw_spin_lock_irqsave(&qi->q_lock, flags); /* @@ -1430,7 +1439,7 @@ int qi_submit_sync(struct intel_iommu *iommu, struct qi_desc *desc, * a deadlock where the interrupt context can wait indefinitely * for free slots in the queue. */
rc = qi_check_fault(iommu, index, wait_index);
if (rc) break;rc = qi_check_fault(iommu, index, wait_index, fault);
and as replied in another thread let's change qi_check_fault to return -ETIMEDOUT to break the restart loop when fault pointer is valid.
sure.