FROMGIT: iommu: fix amd_iommu=force_isolation
The parameter is still there but it's ignored. We need to check its
value before deciding to go into passthrough mode for AMD IOMMU v2
capable device.
We occasionally use this parameter to force v2 capable device into
translation mode to debug memory corruption that we suspect is
caused by DMA writes.
To address the following comment from Joerg Roedel on the first
version, v2 capability of device is completely ignored.
> This breaks the iommu_v2 use-case, as it needs a direct mapping for the
> devices that support it.
And from Documentation/admin-guide/kernel-parameters.txt:
This option does not override iommu=pt
Fixes: aafd8ba0ca74 ("iommu/amd: Implement add_device and remove_device")
Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
(cherry picked from commit c12b08ebbe16f0d3a96a116d86709b04c1ee8e74
git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next)
BUG=b:74746196,b:112880090,b:117648023,b:117655204,b:117682788,b:117872985,b:118762519,b:119068670
TEST=suspend_stress_test
Change-Id: I5fb80bba327b20d969f6ad3d60b3cfeb68ae2e09
Reviewed-on: https://chromium-review.googlesource.com/1360376
Commit-Ready: Yu Zhao <yuzhao@chromium.org>
Tested-by: Yu Zhao <yuzhao@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1415192
Reviewed-by: Yu Zhao <yuzhao@chromium.org>
Commit-Queue: Yu Zhao <yuzhao@chromium.org>
Trybot-Ready: Yu Zhao <yuzhao@chromium.org>
1 file changed