Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1529565pxj; Fri, 18 Jun 2021 09:04:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynpM4nbWu+0PRbZx9EetjgL62baMeA9M6mx36RF1hkUZMQK/Jx5ckP43gJjqLo0HYsTAaz X-Received: by 2002:a17:906:acf:: with SMTP id z15mr12006824ejf.140.1624032254166; Fri, 18 Jun 2021 09:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624032254; cv=none; d=google.com; s=arc-20160816; b=KwhTlw6gKOUZMJ8myd1qY9Bz3IrfvaJPqUWFJN+dM3dCHPuAFch+zuoszeKKj3Qtkf +YrVah7P2ToGQadYcVJ7Y3AxLIizKNJ1IUFQhyfh/4SYO0n2FdgX3+uC3sJzsjeTYRwY Os+WLlpRUXNtSZOCrq431//9JXPuZc7k9BlvHzOB6wKHFwWSxF/qjJpuDPA1+oaMRJ3M 77w0iwg+lX0wWt6f95/6ogoPldov5ttZYCM+AXgB76yqn7RKO4jQHx1GUHB+WTkcbb4r vTShTkwxRDYu5mnJzBmwcYxhZVceVpZar1IY6coWQNN6+oOzEfL1T1d4FPMJy56Lhjc8 pObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=CR5KMzvOYa29purSHlsvmCyKXyY4oQsh7L+jHwpohx4=; b=HbnQebFWzdacrI4MK6LAYlo9X4i8Xrd3Szw9nmffo8JYvotLVyAMvW3qKDd/c1QvY/ nrevMg+5W1UZdJKHyfU8xmbqXJvmGQtCZiy3uJ6Z8T8TEu6I0ISEg2a4iRJq+oJn8WA5 STMxjH9cK0OQQBRO0t0xkUZN7b0JdqvdXUhcc31dIwZVFj5xMWvyBJAxSM8DHp2cPqs3 1gzaODFlV05hFeoya9FzbXYRDbGiGkbDDk9FGetnrMIyAhKUd3G/ptvW/olZX8E6T6MI 6ShtCzvB8mFvSjkr7EoHQLfiNKHKtgtfCAK8GYdu+D1ABSRlsD7TCPOagFBld7dSia6+ YGbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f4si9333028edr.98.2021.06.18.09.03.41; Fri, 18 Jun 2021 09:04:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234083AbhFRLlJ (ORCPT + 99 others); Fri, 18 Jun 2021 07:41:09 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3270 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231128AbhFRLlG (ORCPT ); Fri, 18 Jun 2021 07:41:06 -0400 Received: from fraeml713-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G5xb63XTRz6G7Tw; Fri, 18 Jun 2021 19:31:46 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml713-chm.china.huawei.com (10.206.15.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 18 Jun 2021 13:38:54 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 18 Jun 2021 12:38:51 +0100 From: John Garry To: , , , , , CC: , , , , , , John Garry Subject: [PATCH v14 0/6] iommu: Enhance IOMMU default DMA mode build options Date: Fri, 18 Jun 2021 19:34:12 +0800 Message-ID: <1624016058-189713-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a reboot of Zhen Lei's series from a couple of years ago, which never made it across the line. I still think that it has some value, so taking up the mantle. Motivation: Allow lazy mode be default mode for DMA domains for all ARCHs, and not only those who hardcode it (to be lazy). For ARM64, currently we must use a kernel command line parameter to use lazy mode, which is less than ideal. I have now included the print for strict/lazy mode, which I originally sent in: https://lore.kernel.org/linux-iommu/72eb3de9-1d1c-ae46-c5a9-95f26525d435@huawei.com/ There was some concern there about drivers and their custom prints conflicting with the print in that patch, but I think that it should be ok. Based on next-20210611 + "iommu: Update "iommu.strict" documentation" Differences to v13: - Improve strict mode deprecation messages and cut out some kernel-parameters.txt legacy description - Add tag in 1/6 - use pr_info_once() for vt-d message about VM and caching Differences to v12: - Add Robin's RB tags (thanks!) - Add a patch to mark x86 strict cmdline params as deprecated - Improve wording in Kconfig change and tweak iommu_dma_strict declaration Differences to v11: - Rebase to next-20210610 - Drop strict mode globals in Intel and AMD drivers - Include patch to print strict vs lazy mode - Include patch to remove argument from iommu_set_dma_strict() John Garry (3): iommu: Deprecate Intel and AMD cmdline methods to enable strict mode iommu: Print strict or lazy mode at init time iommu: Remove mode argument from iommu_set_dma_strict() Zhen Lei (3): iommu: Enhance IOMMU default DMA mode build options iommu/vt-d: Add support for IOMMU default DMA mode build options iommu/amd: Add support for IOMMU default DMA mode build options .../admin-guide/kernel-parameters.txt | 12 ++---- drivers/iommu/Kconfig | 41 +++++++++++++++++++ drivers/iommu/amd/amd_iommu_types.h | 6 --- drivers/iommu/amd/init.c | 7 ++-- drivers/iommu/amd/iommu.c | 6 --- drivers/iommu/intel/iommu.c | 16 ++++---- drivers/iommu/iommu.c | 12 ++++-- include/linux/iommu.h | 2 +- 8 files changed, 65 insertions(+), 37 deletions(-) -- 2.26.2