RE: [PATCH 1/1] iommu/vt-d: Only handle IOPF for SVA when PRI is supported

From: Tian, Kevin

Date: Sun Mar 15 2026 - 21:10:21 EST


> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Sent: Tuesday, March 10, 2026 3:55 PM
>
> In intel_svm_set_dev_pasid(), the driver unconditionally manages the IOPF
> handling during a domain transition. However, commit a86fb7717320
> ("iommu/vt-d: Allow SVA with device-specific IOPF") introduced support for
> SVA on devices that handle page faults internally without utilizing the
> PCI PRI. On such devices, the IOMMU-side IOPF infrastructure is not
> required. Calling iopf_for_domain_replace() on these devices is incorrect
> and can lead to unexpected failures during PASID attachment or unwinding.
>
> Add a check for info->pri_supported to ensure that the IOPF queue logic
> is only invoked for devices that actually rely on the IOMMU's PRI-based
> fault handling.
>
> Fixes: 17fce9d2336d ("iommu/vt-d: Put iopf enablement in domain attach
> path")
> Cc: stable@xxxxxxxxxxxxxxx
> Suggested-by: Kevin Tian <kevin.tian@xxxxxxxxx>
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>