[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82e00ce5-df71-5b71-cf5d-3de86aa0a1e8@amd.com>
Date: Tue, 20 Aug 2019 21:18:03 +0000
From: "Lendacky, Thomas" <Thomas.Lendacky@....com>
To: Joerg Roedel <joro@...tes.org>
CC: "corbet@....net" <corbet@....net>,
"tony.luck@...el.com" <tony.luck@...el.com>,
"fenghua.yu@...el.com" <fenghua.yu@...el.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Suthikulpanit, Suravee" <Suravee.Suthikulpanit@....com>,
Joerg Roedel <jroedel@...e.de>
Subject: Re: [PATCH 10/11] iommu: Disable passthrough mode when SME is active
On 8/19/19 8:22 AM, Joerg Roedel wrote:
> 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>
Reviewed-by: Tom Lendacky <thomas.lendacky@....com>
Tested-by: Tom Lendacky <thomas.lendacky@....com>
> ---
> drivers/iommu/iommu.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 01759d4ac70b..ec18c9630e93 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(false);
> else
> iommu_set_default_translated(false);
> +
> + if (iommu_default_passthrough() && sme_active()) {
> + pr_info("SME detected - Disabling default IOMMU Passthrough\n");
> + iommu_set_default_translated(false);
> + }
> }
>
> pr_info("Default domain type: %s %s\n",
>
Powered by blists - more mailing lists