Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp358479pxj; Wed, 16 Jun 2021 04:12:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy9lbGEv2RK23wBPJoc72zFfLRXJcE/SwNenJq7+NPOoSaZt9Ci0yaVGJEhCneRNRrXVUp X-Received: by 2002:a17:906:4e93:: with SMTP id v19mr4715710eju.335.1623841929664; Wed, 16 Jun 2021 04:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623841929; cv=none; d=google.com; s=arc-20160816; b=lEJlqHmtRr5tqbdhtfivtfF/jqQb+fZy+gN7vM3Q1RUSGF3ztRbYuyf9KsZRKQbU/T IKTO7kVi9uKbdbeVMuhHUWnHiCw2jQrkDfUA/moIQMZ4bSCTpclbBCa7g5142IrXEfIQ CQP4eK2H3kUr2MrA3pfBGIDiHH/YBbOao0e4Z5wJiioIoQ8erL9WZkMhxp3iSlJWPTqO OEgiu/LBf8jkTRNCgiBvi8KbG19HfiWbo83XZPhcxhyVlkQL86cS7Sn8VloDi7wSZVbc iZrUl5jNMyaODCgP+PtSGo0Wk4zrSGVUsCpAM8EMaaOhlpnXPbaCD7siPffPqjstmADO 6hjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=u5sH/G1BdwYOLK0bFneh9YC/Hxxbsdd5KbM3dg/LVnY=; b=JM28IKbGBGZqy8jk2OYlg+fv/4wNUyY01mSj+7huepXZNmxThdxz93c7d37sb9WtrN 4kQhvxpn8VD8/veGArFptjVqcpHB7iTmveFjdl1Gij0w5fpjBciVZOPKrjrF3iyP1v26 SSdfdlAoefcYml6j0JM+4vbte0Pf5UCuyLhyN1xYKgUsgktulZowXy6pKSeauWIGmXLP K/Z3Grp+kqsIH4KXiA2exQM2UZID/z/xnWxOD4aVVrO9LYfxh62RJ+XcvKB04/ANwoMD SR0rIBN010fvx0kb3dwH0Cb5kQIyx01v/ngRe+Fz0WjC9ZEIG873ORsmAoMJP1cdiity kATQ== 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 w5si1688198edd.540.2021.06.16.04.11.47; Wed, 16 Jun 2021 04:12:09 -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 S232207AbhFPLKz (ORCPT + 99 others); Wed, 16 Jun 2021 07:10:55 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3244 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231256AbhFPLKu (ORCPT ); Wed, 16 Jun 2021 07:10:50 -0400 Received: from fraeml743-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G4htF2Kgpz6JBBm; Wed, 16 Jun 2021 18:55:33 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml743-chm.china.huawei.com (10.206.15.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 13:08:40 +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; Wed, 16 Jun 2021 12:08:37 +0100 From: John Garry To: , , , , , CC: , , , , , , John Garry Subject: [PATCH v13 1/6] iommu: Deprecate Intel and AMD cmdline methods to enable strict mode Date: Wed, 16 Jun 2021 19:03:52 +0800 Message-ID: <1623841437-211832-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623841437-211832-1-git-send-email-john.garry@huawei.com> References: <1623841437-211832-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 Now that the x86 drivers support iommu.strict, deprecate the custom methods. Signed-off-by: John Garry --- Documentation/admin-guide/kernel-parameters.txt | 5 +++-- drivers/iommu/amd/init.c | 4 +++- drivers/iommu/intel/iommu.c | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 30e9dd52464e..fcbb36d6eea7 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -290,7 +290,8 @@ amd_iommu= [HW,X86-64] Pass parameters to the AMD IOMMU driver in the system. Possible values are: - fullflush - enable flushing of IO/TLB entries when + fullflush [Deprecated, use iommu.strict instead] + - enable flushing of IO/TLB entries when they are unmapped. Otherwise they are flushed before they will be reused, which is a lot of faster @@ -1947,7 +1948,7 @@ bypassed by not enabling DMAR with this option. In this case, gfx device will use physical address for DMA. - strict [Default Off] + strict [Default Off] [Deprecated, use iommu.strict instead] With this option on every unmap_single operation will result in a hardware IOTLB flush operation as opposed to batching them for performance. diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 46280e6e1535..9f3096d650aa 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -3098,8 +3098,10 @@ static int __init parse_amd_iommu_intr(char *str) static int __init parse_amd_iommu_options(char *str) { for (; *str; ++str) { - if (strncmp(str, "fullflush", 9) == 0) + if (strncmp(str, "fullflush", 9) == 0) { + pr_warn("amd_iommu=fullflush deprecated; use iommu.strict instead\n"); amd_iommu_unmap_flush = true; + } if (strncmp(str, "force_enable", 12) == 0) amd_iommu_force_enable = true; if (strncmp(str, "off", 3) == 0) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index bd93c7ec879e..821d8227a4e6 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -454,6 +454,7 @@ static int __init intel_iommu_setup(char *str) pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac instead\n"); iommu_dma_forcedac = true; } else if (!strncmp(str, "strict", 6)) { + pr_warn("intel_iommu=strict deprecated; use iommu.strict instead\n"); pr_info("Disable batched IOTLB flush\n"); intel_iommu_strict = 1; } else if (!strncmp(str, "sp_off", 6)) { -- 2.26.2