]> git.baikalelectronics.ru Git - kernel.git/commit
x86/tboot: Don't disable swiotlb when iommu is forced on
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 25 Nov 2020 01:41:24 +0000 (09:41 +0800)
committerWill Deacon <will@kernel.org>
Wed, 25 Nov 2020 12:07:32 +0000 (12:07 +0000)
commit1761ba1f813c13e23a809b15c1e016d80ba01f96
treec65b2fb1027a09586745f80df210cb8e2c72fc96
parent4f02a10a2a5d21c2780262091b113d05e0662379
x86/tboot: Don't disable swiotlb when iommu is forced on

After commit 3a81c0d1ac0b0 ("iommu/vt-d: Allow 32bit devices to uses DMA
domain"), swiotlb could also be used for direct memory access if IOMMU
is enabled but a device is configured to pass through the DMA translation.
Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work
if "iommu=pt" kernel parameter is used.

Fixes: 3a81c0d1ac0b ("iommu/vt-d: Allow 32bit devices to uses DMA domain")
Reported-and-tested-by: Adrian Huang <ahuang12@lenovo.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20201125014124.4070776-1-baolu.lu@linux.intel.com
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210237
Signed-off-by: Will Deacon <will@kernel.org>
arch/x86/kernel/tboot.c