Skip to content

Commit 5ef7e24

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: PRS isn't usable if PDS isn't supported
The specification, Section 7.10, "Software Steps to Drain Page Requests & Responses," requires software to submit an Invalidation Wait Descriptor (inv_wait_dsc) with the Page-request Drain (PD=1) flag set, along with the Invalidation Wait Completion Status Write flag (SW=1). It then waits for the Invalidation Wait Descriptor's completion. However, the PD field in the Invalidation Wait Descriptor is optional, as stated in Section 6.5.2.9, "Invalidation Wait Descriptor": "Page-request Drain (PD): Remapping hardware implementations reporting Page-request draining as not supported (PDS = 0 in ECAP_REG) treat this field as reserved." This implies that if the IOMMU doesn't support the PDS capability, software can't drain page requests and group responses as expected. Do not enable PCI/PRI if the IOMMU doesn't support PDS. Reported-by: Joel Granados <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Fixes: 66ac4db ("iommu/vt-d: Add page request draining support") Cc: [email protected] Signed-off-by: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 4402e8f commit 5ef7e24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3812,7 +3812,7 @@ static struct iommu_device *intel_iommu_probe_device(struct device *dev)
38123812
}
38133813

38143814
if (info->ats_supported && ecap_prs(iommu->ecap) &&
3815-
pci_pri_supported(pdev))
3815+
ecap_pds(iommu->ecap) && pci_pri_supported(pdev))
38163816
info->pri_supported = 1;
38173817
}
38183818
}

0 commit comments

Comments
 (0)