@@ -626,21 +626,6 @@ static void idxd_disable_system_pasid(struct idxd_device *idxd)
626
626
idxd -> pasid = IOMMU_PASID_INVALID ;
627
627
}
628
628
629
- static int idxd_enable_sva (struct pci_dev * pdev )
630
- {
631
- int ret ;
632
-
633
- ret = iommu_dev_enable_feature (& pdev -> dev , IOMMU_DEV_FEAT_IOPF );
634
- if (ret )
635
- return ret ;
636
- return 0 ;
637
- }
638
-
639
- static void idxd_disable_sva (struct pci_dev * pdev )
640
- {
641
- iommu_dev_disable_feature (& pdev -> dev , IOMMU_DEV_FEAT_IOPF );
642
- }
643
-
644
629
static int idxd_probe (struct idxd_device * idxd )
645
630
{
646
631
struct pci_dev * pdev = idxd -> pdev ;
@@ -655,17 +640,13 @@ static int idxd_probe(struct idxd_device *idxd)
655
640
dev_dbg (dev , "IDXD reset complete\n" );
656
641
657
642
if (IS_ENABLED (CONFIG_INTEL_IDXD_SVM ) && sva ) {
658
- if (idxd_enable_sva (pdev )) {
659
- dev_warn (dev , "Unable to turn on user SVA feature.\n" );
660
- } else {
661
- set_bit (IDXD_FLAG_USER_PASID_ENABLED , & idxd -> flags );
643
+ set_bit (IDXD_FLAG_USER_PASID_ENABLED , & idxd -> flags );
662
644
663
- rc = idxd_enable_system_pasid (idxd );
664
- if (rc )
665
- dev_warn (dev , "No in-kernel DMA with PASID. %d\n" , rc );
666
- else
667
- set_bit (IDXD_FLAG_PASID_ENABLED , & idxd -> flags );
668
- }
645
+ rc = idxd_enable_system_pasid (idxd );
646
+ if (rc )
647
+ dev_warn (dev , "No in-kernel DMA with PASID. %d\n" , rc );
648
+ else
649
+ set_bit (IDXD_FLAG_PASID_ENABLED , & idxd -> flags );
669
650
} else if (!sva ) {
670
651
dev_warn (dev , "User forced SVA off via module param.\n" );
671
652
}
@@ -703,8 +684,6 @@ static int idxd_probe(struct idxd_device *idxd)
703
684
err :
704
685
if (device_pasid_enabled (idxd ))
705
686
idxd_disable_system_pasid (idxd );
706
- if (device_user_pasid_enabled (idxd ))
707
- idxd_disable_sva (pdev );
708
687
return rc ;
709
688
}
710
689
@@ -715,8 +694,6 @@ static void idxd_cleanup(struct idxd_device *idxd)
715
694
idxd_cleanup_internals (idxd );
716
695
if (device_pasid_enabled (idxd ))
717
696
idxd_disable_system_pasid (idxd );
718
- if (device_user_pasid_enabled (idxd ))
719
- idxd_disable_sva (idxd -> pdev );
720
697
}
721
698
722
699
/*
@@ -1247,8 +1224,6 @@ static void idxd_remove(struct pci_dev *pdev)
1247
1224
free_irq (irq_entry -> vector , irq_entry );
1248
1225
pci_free_irq_vectors (pdev );
1249
1226
pci_iounmap (pdev , idxd -> reg_base );
1250
- if (device_user_pasid_enabled (idxd ))
1251
- idxd_disable_sva (pdev );
1252
1227
pci_disable_device (pdev );
1253
1228
destroy_workqueue (idxd -> wq );
1254
1229
perfmon_pmu_remove (idxd );
0 commit comments