[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190814133841.7095-10-joro@8bytes.org>
Date: Wed, 14 Aug 2019 15:38:40 +0200
From: Joerg Roedel <joro@...tes.org>
To: Joerg Roedel <joro@...tes.org>
Cc: corbet@....net, tony.luck@...el.com, fenghua.yu@...el.com,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
x86@...nel.org, linux-doc@...r.kernel.org,
linux-ia64@...r.kernel.org, iommu@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, Thomas.Lendacky@....com,
Suravee.Suthikulpanit@....com, Joerg Roedel <jroedel@...e.de>
Subject: [PATCH 09/10] iommu: Disable passthrough mode when SME is active
From: Joerg Roedel <jroedel@...e.de>
Using Passthrough mode when SME is active causes certain
devices to use the SWIOTLB bounce buffer. The bounce buffer
code has an upper limit of 256kb for the size of DMA
allocations, which is too small for certain devices and
causes them to fail.
With this patch we enable IOMMU by default when SME is
active in the system, making the default configuration work
for more systems than it does now.
Users that don't want IOMMUs to be enabled still can disable
them with kernel parameters.
Signed-off-by: Joerg Roedel <jroedel@...e.de>
---
drivers/iommu/iommu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 96cc7cc8ab21..4bc9025a9975 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -119,6 +119,11 @@ static int __init iommu_subsys_init(void)
iommu_set_default_passthrough();
else
iommu_set_default_translated();
+
+ if (iommu_default_passthrough() && sme_active()) {
+ pr_info("SME detected - Disabling default IOMMU Passthrough\n");
+ iommu_set_default_translated();
+ }
}
pr_info("Default domain type: %s %s\n",
--
2.17.1
Powered by blists - more mailing lists