File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -5311,6 +5311,8 @@ static int siov_find_pci_dvsec(struct pci_dev *pdev)
5311
5311
static bool
5312
5312
intel_iommu_dev_has_feat (struct device * dev , enum iommu_dev_features feat )
5313
5313
{
5314
+ struct device_domain_info * info = get_domain_info (dev );
5315
+
5314
5316
if (feat == IOMMU_DEV_FEAT_AUX ) {
5315
5317
int ret ;
5316
5318
@@ -5325,13 +5327,13 @@ intel_iommu_dev_has_feat(struct device *dev, enum iommu_dev_features feat)
5325
5327
return !!siov_find_pci_dvsec (to_pci_dev (dev ));
5326
5328
}
5327
5329
5328
- if (feat == IOMMU_DEV_FEAT_SVA ) {
5329
- struct device_domain_info * info = get_domain_info ( dev ) ;
5330
+ if (feat == IOMMU_DEV_FEAT_IOPF )
5331
+ return info && info -> pri_supported ;
5330
5332
5333
+ if (feat == IOMMU_DEV_FEAT_SVA )
5331
5334
return info && (info -> iommu -> flags & VTD_FLAG_SVM_CAPABLE ) &&
5332
5335
info -> pasid_supported && info -> pri_supported &&
5333
5336
info -> ats_supported ;
5334
- }
5335
5337
5336
5338
return false;
5337
5339
}
@@ -5342,6 +5344,9 @@ intel_iommu_dev_enable_feat(struct device *dev, enum iommu_dev_features feat)
5342
5344
if (feat == IOMMU_DEV_FEAT_AUX )
5343
5345
return intel_iommu_enable_auxd (dev );
5344
5346
5347
+ if (feat == IOMMU_DEV_FEAT_IOPF )
5348
+ return intel_iommu_dev_has_feat (dev , feat ) ? 0 : - ENODEV ;
5349
+
5345
5350
if (feat == IOMMU_DEV_FEAT_SVA ) {
5346
5351
struct device_domain_info * info = get_domain_info (dev );
5347
5352
You can’t perform that action at this time.
0 commit comments