APPLIED[G]: [PATCH][SRU][F/aws, G/aws] UBUNTU: SAUCE: [aws] iommu: set the default iommu-dma mode as non-strict
Ian May
ian.may at canonical.com
Thu Nov 5 23:49:45 UTC 2020
Applied to G/aws/master
Thanks,
Ian
On 2020-10-30 18:33:40 , Andrea Righi wrote:
> BugLink: https://bugs.launchpad.net/bugs/1902281
>
> Relax the synchronous IOMMU TLB invalidation constraint by default to
> get a significant performance improvement on some AWS arm64 instance
> types.
>
> This is a performance vs security tradeoff and it is not suitable for
> the generic kernel. In the particular AWS environment it is reasonable
> to relax the constraint without realisticly introducing security flaws.
>
> Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 4 ++--
> drivers/iommu/iommu.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index fb3eade0b7c5..a27706cde3c7 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -1835,13 +1835,13 @@
>
> iommu.strict= [ARM64] Configure TLB invalidation behaviour
> Format: { "0" | "1" }
> - 0 - Lazy mode.
> + 0 - Lazy mode (default).
> Request that DMA unmap operations use deferred
> invalidation of hardware TLBs, for increased
> throughput at the cost of reduced device isolation.
> Will fall back to strict mode if not supported by
> the relevant IOMMU driver.
> - 1 - Strict mode (default).
> + 1 - Strict mode.
> DMA unmap operations invalidate IOMMU hardware TLBs
> synchronously.
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 9d7232e26ecf..50851f4e90d2 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -28,7 +28,7 @@ static struct kset *iommu_group_kset;
> static DEFINE_IDA(iommu_group_ida);
>
> static unsigned int iommu_def_domain_type __read_mostly;
> -static bool iommu_dma_strict __read_mostly = true;
> +static bool iommu_dma_strict __read_mostly;
> static u32 iommu_cmd_line __read_mostly;
>
> struct iommu_group {
> --
> 2.27.0
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list