dmaengine: idxd: Add enable/disable device IOPF feature
authorLu Baolu <baolu.lu@linux.intel.com>
Thu, 13 Apr 2023 04:06:29 +0000 (12:06 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 13 Apr 2023 10:05:46 +0000 (12:05 +0200)
commit84c9ef72b64d9bd0d8a219a75019ec4c2da77a08
tree692f3f591bf9888992973d1891607c508f5749b0
parente8d018dd0257f744ca50a729e3d042cf2ec9da65
dmaengine: idxd: Add enable/disable device IOPF feature

The iommu subsystem requires IOMMU_DEV_FEAT_IOPF must be enabled before
and disabled after IOMMU_DEV_FEAT_SVA, if device's I/O page faults rely
on the IOMMU. Add explicit IOMMU_DEV_FEAT_IOPF enabling/disabling in this
driver.

At present, missing IOPF enabling/disabling doesn't cause any real issue,
because the IOMMU driver places the IOPF enabling/disabling in the path
of SVA feature handling. But this may change.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230324120234.313643-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/dma/idxd/init.c