]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Decouple PASID & PRI enabling from SVA
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 26 Sep 2022 13:15:25 +0000 (21:15 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 26 Sep 2022 13:52:24 +0000 (15:52 +0200)
commit4328d146a12d756eacb669288fee67afae1f1b14
tree0833bb29a63a8f9e6a44f81d89837a2374704fbe
parent138b9ac81ba72baaad7935470bc6c8bfc6392d53
iommu/vt-d: Decouple PASID & PRI enabling from SVA

Previously the PCI PASID and PRI capabilities are enabled in the path of
iommu device probe only if INTEL_IOMMU_SVM is configured and the device
supports ATS. As we've already decoupled the I/O page fault handler from
SVA, we could also decouple PASID and PRI enabling from it to make room
for growth of new features like kernel DMA with PASID, SIOV and nested
translation.

At the same time, the iommu_enable_dev_iotlb() helper is also called in
iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_SVA) path. It's unnecessary
and duplicate. This cleanups this helper to make the code neat.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20220915085814.2261409-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/Kconfig
drivers/iommu/intel/iommu.c
drivers/iommu/intel/iommu.h