Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1396589pxj; Fri, 18 Jun 2021 06:18:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPw/Pe+MssyR46r1JKBsXCxi5zQP2E4uKjievJlTO7z9r+spvhfJWsWEtiGZlMLySeTlJx X-Received: by 2002:a05:6402:34cc:: with SMTP id w12mr4767846edc.195.1624022279874; Fri, 18 Jun 2021 06:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624022279; cv=none; d=google.com; s=arc-20160816; b=rYcV1SyLev/Kt852QnaVEQoWP69l7f7JoknPuhAGvHJUidOxCH1D3RR/EwIuQJ4EoU Ejcb3CqIKoCojiD/rq0VT67Cy1yLgMajyo0EMFFSFgr4vo8kZyzzmHj03K4c1wl0IF6m SeZox4KyOuZDHVXOVrZso5/2cFW6FdkldXxH/vAAgx56nss5aVe6LyXkx9ERUF8AnFM0 mKcRCGJoywwxQW9LPaLXXPoLLjY57fTzt2NQ3mhVVDDVjo6WKl9Wgsi+CWLMOQfCW8f2 UlfCUcnh+HOb/x/1f4M1uOHU8ETuwSmNeFVSrfbk30MR7jZqzevjLoHuu3ds+7aQdF6B dA/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:cc:ironport-sdr:ironport-sdr; bh=AsJdsiVBpaNMwQOGSKAYklqIdc2IE3DdsMYFQnkH/Lg=; b=CKAHY1emJux5MErVn15xdOO+BE3LkTpxr0/IDWNjDfjDxkRzRc0yK62od/wBbf1sWF fN0Id3TDTzpMj9+fMw6PS4NFEdzwvAMC+08EXTjNQKaDAWtpS7sGnOP3ptoYH/1SCKj9 IB5Re6e31O6omSuUz7DP7+MG43IJbFy1QSA8/kHBmyqEmu96zFwId17uIHhfgBp6L2zP caJmV5CFDPwCvcEFbd2xXDXNQDHrZlco7KNli427odjYGXCVxhX6HVsNXEFf6vqf2JoE t/FmKPgk5kE+TMBFO2++5LR+SjLp8eOTV1j6lK0VVluiEHRB+Fc1rqN3VovWu9iXAn2t IEqg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si2558781ejl.394.2021.06.18.06.17.36; Fri, 18 Jun 2021 06:17:59 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232466AbhFRNMv (ORCPT + 99 others); Fri, 18 Jun 2021 09:12:51 -0400 Received: from mga04.intel.com ([192.55.52.120]:64373 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232238AbhFRNMu (ORCPT ); Fri, 18 Jun 2021 09:12:50 -0400 IronPort-SDR: T2w412mmboZhkx4k+r06c/DMBFp3p8ITDo8jqMYjXLgJnlodtt7QjHxgjOTlQA/ltld0F3E8Us btkH2j9Wyc4A== X-IronPort-AV: E=McAfee;i="6200,9189,10018"; a="204721394" X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="204721394" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 06:10:41 -0700 IronPort-SDR: ndZdFsDW8Q3BKEovwvKaFojvoM9Lgdt1pUsbdH7Je72Npur3QRwE+sGTVj3Ui9CsuA7D0y+wic hZY4iAqUlEBQ== X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="485683801" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.212.157]) ([10.254.212.157]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 06:10:38 -0700 Cc: baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linuxarm@huawei.com, thunder.leizhen@huawei.com, chenxiang66@hisilicon.com, linux-doc@vger.kernel.org Subject: Re: [PATCH v14 2/6] iommu: Print strict or lazy mode at init time To: John Garry , joro@8bytes.org, will@kernel.org, dwmw2@infradead.org, robin.murphy@arm.com, corbet@lwn.net References: <1624016058-189713-1-git-send-email-john.garry@huawei.com> <1624016058-189713-3-git-send-email-john.garry@huawei.com> From: Lu Baolu Message-ID: <502b7d81-7c6e-affd-0e06-4f0caf7e9fb9@linux.intel.com> Date: Fri, 18 Jun 2021 21:10:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1624016058-189713-3-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/18 19:34, John Garry wrote: > As well as the default domain type, it's useful to know whether strict > or lazy for DMA domains, so add this info in a separate print. > > The (stict/lazy) mode may be also set via iommu.strict earlyparm, but > this will be processed prior to iommu_subsys_init(), so that print will be > accurate for drivers which don't set the mode via custom means. > > For the drivers which set the mode via custom means - AMD and Intel drivers > - they maintain prints to inform a change in policy or that custom cmdline > methods to change policy are deprecated. > > Signed-off-by: John Garry > Reviewed-by: Robin Murphy > --- > drivers/iommu/iommu.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > index 5419c4b9f27a..cf58949cc2f3 100644 > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -138,6 +138,11 @@ static int __init iommu_subsys_init(void) > (iommu_cmd_line & IOMMU_CMD_LINE_DMA_API) ? > "(set via kernel command line)" : ""); > > + pr_info("DMA domain TLB invalidation policy: %s mode %s\n", > + iommu_dma_strict ? "strict" : "lazy", > + (iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ? > + "(set via kernel command line)" : ""); > + > return 0; > } > subsys_initcall(iommu_subsys_init); > Reviewed-by: Lu Baolu Best regards, baolu