Skip to content
Commit 8f39d297 authored by Lu Baolu's avatar Lu Baolu Committed by Greg Kroah-Hartman
Browse files

iommu/vt-d: Add device_block_translation() helper



[ Upstream commit c7be17c2 ]

If domain attaching to device fails, the IOMMU driver should bring the
device to blocking DMA state. The upper layer is expected to recover it
by attaching a new domain. Use device_block_translation() in the error
path of dev_attach to make the behavior specific.

The difference between device_block_translation() and the previous
dmar_remove_one_dev_info() is that, in the scalable mode, it is the
RID2PASID entry instead of context entry being cleared. As a result,
enabling PCI capabilities is moved up.

Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20221118132451.114406-3-baolu.lu@linux.intel.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Stable-dep-of: da37dddc ("iommu/vt-d: Disable PCI ATS in legacy passthrough mode")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3787b316
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment