]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/vt-d: Move scalable mode ATS enablement to probe path
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 10 Mar 2025 02:47:47 +0000 (10:47 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 10 Mar 2025 08:31:04 +0000 (09:31 +0100)
commit5518f239aff1baf772c5748da3add7243c5fb5df
tree373ffee853ece238a97338e0137429c93fb4cda5
parent607ba1bb096110751f6aa4b46666e0ba024ab3c2
iommu/vt-d: Move scalable mode ATS enablement to probe path

Device ATS is currently enabled when a domain is attached to the device
and disabled when the domain is detached. This creates a limitation:
when the IOMMU is operating in scalable mode and IOPF is enabled, the
device's domain cannot be changed.

The previous code enables ATS when a domain is set to a device's RID and
disables it during RID domain switch. So, if a PASID is set with a
domain requiring PRI, ATS should remain enabled until the domain is
removed. During the PASID domain's lifecycle, if the RID's domain
changes, PRI will be disrupted because it depends on ATS, which is
disabled when the blocking domain is set for the device's RID.

Remove this limitation by moving ATS enablement to the device probe path.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Link: https://lore.kernel.org/r/20250228092631.3425464-5-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c