Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1365586pxj; Fri, 18 Jun 2021 05:44:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweItlPLzzU3TZsN+Z2Ua2ZL1Tw5WZk7WPUc12kIdlycJ301ZIDOPLm2BR3I7jjxrHjaWVG X-Received: by 2002:a17:906:2985:: with SMTP id x5mr8366605eje.438.1624020289560; Fri, 18 Jun 2021 05:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624020289; cv=none; d=google.com; s=arc-20160816; b=GeMEfm2OJD6pZYZm6Ni+T9/7/JSU/x8EQFwiLM2UjrPPQ3wxd6mhLVLpTduxmVNxEy +Q2fDpmqcFmN5uKkjgE0iYzj2BYaZMNHwU/km9yJw2yX5XGL3rf2b65WaK7Q7Sz0ualb MNUe2nRFfoh6w5rB9QfPKcqNHeYM4SupXQ7zsu7DST7aHDahyWMZ11hiWIkbcDevPv7q LRlepSGobg+FEtTy/K6hl8gQalZFU6H3rU9LZzlZfFdIOZwki/7naaxKrQ76tqilTJG1 tc0ylvR3Sarr6hg7xWpT41foe24+o0M5CtSbfhwwt8AhmVxGgsIq0QyYQxaZRbFUj5u6 qkJA== 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=iTqmKZC3tvhdS5TZkmVW7xt4P3o3rA/BXsN5f2tOS9Y=; b=ZqNBhgsZAvoXIm8s2mgXwiPlX6fZspRhNmcJJ6/dOwhrPH5YhZU2z+A/vZ5dc7lz70 +jzOxLYgevTHElNSZrrXIkMsEIfrcsuAj6WJ24jI8bpOdQ2sBkk+oEE4jizp+/G2kJiE d7B1y8TvT9g3metMupJDMsad9HREQGwLQYeUOHfHLJxnpd36cY4JePQHmi/BHlnaJFF+ IaHwpBYna8LHL/DxjbLiBVxS0j/UQFYIrUsOAa7xDAoiG5eBnCrLOMoRdB93ef9XUFXa Mw8YgkUQ06p3xGM/jC177ASl08cpkmCHrZamFmB2XH25kX1mwDfhbslqau/+mT/UZ07w JDxQ== 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 hg24si2482554ejc.43.2021.06.18.05.44.27; Fri, 18 Jun 2021 05:44:49 -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 S234097AbhFRLlM (ORCPT + 99 others); Fri, 18 Jun 2021 07:41:12 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3271 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234077AbhFRLlI (ORCPT ); Fri, 18 Jun 2021 07:41:08 -0400 Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G5xb94Hf5z6G7TP; Fri, 18 Jun 2021 19:31:49 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml715-chm.china.huawei.com (10.206.15.34) 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:57 +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:54 +0100 From: John Garry To: , , , , , CC: , , , , , , John Garry Subject: [PATCH v14 1/6] iommu: Deprecate Intel and AMD cmdline methods to enable strict mode Date: Fri, 18 Jun 2021 19:34:13 +0800 Message-ID: <1624016058-189713-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1624016058-189713-1-git-send-email-john.garry@huawei.com> References: <1624016058-189713-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: 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 Now that the x86 drivers support iommu.strict, deprecate the custom methods. Signed-off-by: John Garry Acked-by: Robin Murphy --- Documentation/admin-guide/kernel-parameters.txt | 9 ++------- drivers/iommu/amd/init.c | 4 +++- drivers/iommu/intel/iommu.c | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 30e9dd52464e..673952379900 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -290,10 +290,7 @@ 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 - they are unmapped. Otherwise they are - flushed before they will be reused, which - is a lot of faster + fullflush - Deprecated, equivalent to iommu.strict=1 off - do not initialize any AMD IOMMU found in the system force_isolation - Force device isolation for all @@ -1948,9 +1945,7 @@ this case, gfx device will use physical address for DMA. strict [Default Off] - With this option on every unmap_single operation will - result in a hardware IOTLB flush operation as opposed - to batching them for performance. + Deprecated, equivalent to iommu.strict=1. sp_off [Default Off] By default, super page will be supported if Intel IOMMU has the capability. With this option, super page will diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 46280e6e1535..3a2fb805f11e 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=1 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..29497113d748 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=1 instead\n"); pr_info("Disable batched IOTLB flush\n"); intel_iommu_strict = 1; } else if (!strncmp(str, "sp_off", 6)) { -- 2.26.2