Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp358633pxj; Wed, 16 Jun 2021 04:12:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKP96uznhVEDPHJdaRvZFsIu8N0S+2VszmbzxMADwAEvRi3iDOYoqbaRNMS29dq17evGvP X-Received: by 2002:aa7:c64e:: with SMTP id z14mr3398518edr.119.1623841941437; Wed, 16 Jun 2021 04:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623841941; cv=none; d=google.com; s=arc-20160816; b=uW9o8iiv5KfbgzlCACuapRaxhlQyKN5BzyCtMbJf5oQIkLSotuwaOpYXIpKfqx9Nxk sCz7IduORTPvqZ0uAlMb07VT1tWVWRgm/1rTrI/Ih/WVNEzU8lfiATfy3/SOSIJQ3FlV Ayoa0rpUSoGmaEvAC5VZfwkjaWeNvdN1kOaQ8ZND7Lw4wQ7ZPQnNasKLlvXmBRJmJbYG IayQsBkwuVnZFtAvCyEQ6UqI4ggfFC1VpBoNeDuq2GVgfBG+vTMf5UiShSEWOp69mrt8 VuGCRGD5n+3wFC/YG7y1ME8Txnufc8BYfpUHw4mOBY5EWgoI4suBgauT3RnWUGB+2IIC /FFA== 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=b0ogG0nc+WEEmVjug9Pd4MkFAvY9BVeJfW6JUNFtvEo=; b=THej4/Q1Ya53e/q1NdnN7S2aEDt9Mh4eNCbCRAXA+NRg4SmqV2itDCMiVCCjV0C7yE hLmDhPe9IV02jOU7ZQWE29XWNRZ/Cu5GlNrqDCWx8t5QEdJCOrXeU9dPjJrKK9DbYvSE qXxTSvyGq33P3ytjvTg3wc+GjSkukxyufpqRyLtxUActmBcGFy4KgqF4JLftXGdXWJEB xkU7x6LaAxCaVfZSanQjcRhieqxocinDjJjIeMKXdYPreBWcItNp7GljHeH0nSxuE7l1 75/zxmtILFrvptnrcSBpd2OQkpBN1C4mMoS96584OvTQWI1n7PtRvZw7OxC8wfqV6WGT DeRg== 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 c13si1948564ejm.484.2021.06.16.04.11.59; Wed, 16 Jun 2021 04:12:21 -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 S232218AbhFPLK6 (ORCPT + 99 others); Wed, 16 Jun 2021 07:10:58 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3245 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231460AbhFPLKv (ORCPT ); Wed, 16 Jun 2021 07:10:51 -0400 Received: from fraeml742-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G4j1L1x55z6FB2J; Wed, 16 Jun 2021 19:01:42 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml742-chm.china.huawei.com (10.206.15.223) 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:44 +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:40 +0100 From: John Garry To: , , , , , CC: , , , , , , John Garry Subject: [PATCH v13 2/6] iommu: Print strict or lazy mode at init time Date: Wed, 16 Jun 2021 19:03:53 +0800 Message-ID: <1623841437-211832-3-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 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); -- 2.26.2