Skip to contentSkip to conversation

iommu/vt-d: Remove incorrect PSI capability check

PATCH In review Lu Baolu 2 participants 2 messages Nov 20, 2019 – Dec 18, 2019 IOMMU

lore
Share & tools
lore

Lu Baolu

author
#0 lore raw

PATCH 1/1 iommu/vt-d: Remove incorrect PSI capability check

The PSI (Page Selective Invalidation) bit in the capability register is only valid for second-level translation. Intel IOMMU supporting scalable mode must support page/address selective IOTLB invalidation for first-level translation. Remove the PSI capability check in SVA cache invalidation code.

Fixes 8744daf4b0699 ("iommu/vt-d: Remove global page flush support")
Cc Jacob Pan <[email protected]>
---
 drivers/iommu/intel-svm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/iommu/intel-svm.c +1 -5
index 9b159132405d..dca88f9fdf29 100644
@@ -104,11 +104,7 @@ static void intel_flush_svm_range_dev (struct intel_svm *svm, struct intel_svm_d
 {
 	struct qi_desc desc;
 
-	/*
-	 * Do PASID granu IOTLB invalidation if page selective capability is
-	 * not available.
-	 */
-	if (pages == -1 || !cap_pgsel_inv(svm->iommu->cap)) {
+	if (pages == -1) {
 		desc.qw0 = QI_EIOTLB_PASID(svm->pasid) |
 			QI_EIOTLB_DID(sdev->did) |
 			QI_EIOTLB_GRAN(QI_GRAN_NONG_PASID) |
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 6 lines · Lu Baolu

The PSI (Page Selective Invalidation) bit in the capability register is only valid for second-level translation. Intel IOMMU supporting scalable mode must support page/address selective IOTLB invalidation for first-level translation. Remove the PSI capability check in SVA cache invalidation code.

Quoted 6 lines
Fixes 8744daf4b0699 ("iommu/vt-d: Remove global page flush support")
Cc Jacob Pan <[email protected]>
---
 drivers/iommu/intel-svm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Applied for v5.5, thanks.