From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69B67C4743C for ; Mon, 14 Jun 2021 14:11:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C0746128C for ; Mon, 14 Jun 2021 14:11:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234491AbhFNON7 (ORCPT ); Mon, 14 Jun 2021 10:13:59 -0400 Received: from foss.arm.com ([217.140.110.172]:37150 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234035AbhFNON4 (ORCPT ); Mon, 14 Jun 2021 10:13:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0969C1FB; Mon, 14 Jun 2021 07:11:53 -0700 (PDT) Received: from [10.57.9.136] (unknown [10.57.9.136]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7F9373F70D; Mon, 14 Jun 2021 07:11:51 -0700 (PDT) Subject: Re: [PATCH v12 3/5] iommu/vt-d: Add support for IOMMU default DMA mode build options To: John Garry , Lu Baolu , joro@8bytes.org, will@kernel.org, dwmw2@infradead.org Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linuxarm@huawei.com, thunder.leizhen@huawei.com, chenxiang66@hisilicon.com References: <1623414043-40745-1-git-send-email-john.garry@huawei.com> <1623414043-40745-4-git-send-email-john.garry@huawei.com> <4f2cec34-bad9-e1bf-85c1-04d1a0c1aecf@linux.intel.com> <6055cd0d-a1d3-a73a-6831-3837021f3c9c@huawei.com> From: Robin Murphy Message-ID: <0a04f964-80f4-7b2a-9740-eae4596e4e09@arm.com> Date: Mon, 14 Jun 2021 15:11:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <6055cd0d-a1d3-a73a-6831-3837021f3c9c@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-14 08:53, John Garry wrote: > On 12/06/2021 03:22, Lu Baolu wrote: >> On 2021/6/11 20:20, John Garry wrote: >>> @@ -453,8 +452,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_info("Disable batched IOTLB flush\n"); >>> -            intel_iommu_strict = 1; >>> +            iommu_set_dma_strict(true); >> >> I would like to deprecate this command line and ask users to use >> iommu.strict instead. > > ok, but then I should probably make the AMD driver also officially > support this. Oops, I should have documented that "iommu.strict" already applies to x86 as well. The interaction with the driver-specific parameters is a bit weird and unintuitive, but it was done knowingly. Let me quickly spin a kernel-parameters.txt fix for that... Cheers, Robin. >> >> --- a/drivers/iommu/intel/iommu.c >> +++ b/drivers/iommu/intel/iommu.c >> @@ -436,7 +436,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_info("Disable batched IOTLB flush\n"); >> +                       pr_warn("intel_iommu=strict deprecated; use >> iommu.strict instead\n"); >>                          intel_iommu_strict = 1; >> >> Also update Documentation/admin-guide/kernel-parameters.txt accordingly. > > Thanks, > John From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DB57C2B9F4 for ; Mon, 14 Jun 2021 14:11:57 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39CD76128C for ; Mon, 14 Jun 2021 14:11:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39CD76128C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0505C600C9; Mon, 14 Jun 2021 14:11:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GW5c1feXIrY3; Mon, 14 Jun 2021 14:11:56 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id CB478600B5; Mon, 14 Jun 2021 14:11:55 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9301DC000E; Mon, 14 Jun 2021 14:11:55 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 985BBC000B for ; Mon, 14 Jun 2021 14:11:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 788DD600C9 for ; Mon, 14 Jun 2021 14:11:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KzPfDPe4Obrt for ; Mon, 14 Jun 2021 14:11:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp3.osuosl.org (Postfix) with ESMTP id C07DC600B5 for ; Mon, 14 Jun 2021 14:11:53 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0969C1FB; Mon, 14 Jun 2021 07:11:53 -0700 (PDT) Received: from [10.57.9.136] (unknown [10.57.9.136]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7F9373F70D; Mon, 14 Jun 2021 07:11:51 -0700 (PDT) Subject: Re: [PATCH v12 3/5] iommu/vt-d: Add support for IOMMU default DMA mode build options To: John Garry , Lu Baolu , joro@8bytes.org, will@kernel.org, dwmw2@infradead.org References: <1623414043-40745-1-git-send-email-john.garry@huawei.com> <1623414043-40745-4-git-send-email-john.garry@huawei.com> <4f2cec34-bad9-e1bf-85c1-04d1a0c1aecf@linux.intel.com> <6055cd0d-a1d3-a73a-6831-3837021f3c9c@huawei.com> From: Robin Murphy Message-ID: <0a04f964-80f4-7b2a-9740-eae4596e4e09@arm.com> Date: Mon, 14 Jun 2021 15:11:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <6055cd0d-a1d3-a73a-6831-3837021f3c9c@huawei.com> Content-Language: en-GB Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" T24gMjAyMS0wNi0xNCAwODo1MywgSm9obiBHYXJyeSB3cm90ZToKPiBPbiAxMi8wNi8yMDIxIDAz OjIyLCBMdSBCYW9sdSB3cm90ZToKPj4gT24gMjAyMS82LzExIDIwOjIwLCBKb2huIEdhcnJ5IHdy b3RlOgo+Pj4gQEAgLTQ1Myw4ICs0NTIsNyBAQCBzdGF0aWMgaW50IF9faW5pdCBpbnRlbF9pb21t dV9zZXR1cChjaGFyICpzdHIpCj4+PiDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBwcl93YXJu KCJpbnRlbF9pb21tdT1mb3JjZWRhYyBkZXByZWNhdGVkOyB1c2UgCj4+PiBpb21tdS5mb3JjZWRh YyBpbnN0ZWFkXG4iKTsKPj4+IMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIGlvbW11X2RtYV9m b3JjZWRhYyA9IHRydWU7Cj4+PiDCoMKgwqDCoMKgwqDCoMKgwqAgfSBlbHNlIGlmICghc3RybmNt cChzdHIsICJzdHJpY3QiLCA2KSkgewo+Pj4gLcKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgcHJfaW5m byg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