Description
In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Flush dev-IOTLB only when PCIe device is accessible in scalable mode Commit 4fc82cd907ac ("iommu/vt-d: Don't issue ATS Invalidation request when device is disconnected") relies on pci_dev_is_disconnected() to skip ATS invalidation for safely-removed devices, but it does not cover link-down caused by faults, which can still hard-lock the system. For example, if a VM fails to connect to the PCIe device, "virsh destroy" is executed to release resources and isolate the fault, but a hard-lockup occurs while releasing the group fd. Call Trace: qi_submit_sync qi_flush_dev_iotlb intel_pasid_tear_down_entry device_block_translation blocking_domain_attach_dev __iommu_attach_device __iommu_device_set_domain __iommu_group_set_domain_internal iommu_detach_group vfio_iommu_type1_detach_group vfio_group_detach_container vfio_group_fops_release __fput Although pci_device_is_present() is slower than pci_dev_is_disconnected(), it still takes only ~70 µs on a ConnectX-5 (8 GT/s, x2) and becomes even faster as PCIe speed and width increase. Besides, devtlb_invalidation_with_pasid() is called only in the paths below, which are far less frequent than memory map/unmap. 1. mm-struct release 2. {attach,release}_dev 3. set/remove PASID 4. dirty-tracking setup The gain in system stability far outweighs the negligible cost of using pci_device_is_present() instead of pci_dev_is_disconnected() to decide when to skip ATS invalidation, especially under GDR high-load conditions.
Product status
f873b85ec762c5a6abe94a7ddb31df5d3ba07d85 (git) before 581ce094d9eafb78ec4f9de77bd24b780c151236
d70f1c85113cd8c2aa8373f491ca5d1b22ec0554 (git) before e2c78c69f8faf2885ea4ceee08c71ac738f401a0
34a7b30f56d30114bf4d436e4dc793afe326fbcf (git) before ead67d0378e90f419e385a43af29435242d80c12
2b74b2a92e524d7c8dec8e02e95ecf18b667c062 (git) before 01aed2f1d7cb8fdf4c60c5bb4727608cb82b401d
4fc82cd907ac075648789cc3a00877778aa1838b (git) before 9813306610d0d718c863aaa70928bf57d7570ec0
4fc82cd907ac075648789cc3a00877778aa1838b (git) before 9deaacc8dcaddb6ddc5b52e1e63b457450ec0f94
4fc82cd907ac075648789cc3a00877778aa1838b (git) before 0da6697e577023d8867c7beb2d16a22510e4eea9
4fc82cd907ac075648789cc3a00877778aa1838b (git) before 10e60d87813989e20eac1f3eda30b3bae461e7f9
c04f2780919f20e2cc4846764221f5e802555868 (git)
025bc6b41e020aeb1e71f84ae3ffce945026de05 (git)
6.9
Any version before 6.9
5.10.252 (semver)
5.15.202 (semver)
6.1.165 (semver)
6.6.128 (semver)
6.12.75 (semver)
6.18.16 (semver)
6.19.6 (semver)
7.0 (original_commit_for_fix)
References
git.kernel.org/...c/581ce094d9eafb78ec4f9de77bd24b780c151236
git.kernel.org/...c/e2c78c69f8faf2885ea4ceee08c71ac738f401a0
git.kernel.org/...c/ead67d0378e90f419e385a43af29435242d80c12
git.kernel.org/...c/01aed2f1d7cb8fdf4c60c5bb4727608cb82b401d
git.kernel.org/...c/9813306610d0d718c863aaa70928bf57d7570ec0
git.kernel.org/...c/9deaacc8dcaddb6ddc5b52e1e63b457450ec0f94
git.kernel.org/...c/0da6697e577023d8867c7beb2d16a22510e4eea9
git.kernel.org/...c/10e60d87813989e20eac1f3eda30b3bae461e7f9