[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e478aea8-54d3-bfc6-1bc8-b0c7709e353a@huawei.com>
Date: Tue, 1 Jun 2021 16:50:39 +0100
From: John Garry <john.garry@...wei.com>
To: Robin Murphy <robin.murphy@....com>, <joro@...tes.org>,
<will@...nel.org>
CC: <iommu@...ts.linux-foundation.org>, <linux-kernel@...r.kernel.org>,
<hch@....de>
Subject: Re: [PATCH] iommu: Print default strict or lazy mode at init time
On 01/06/2021 10:09, Robin Murphy wrote:
>> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
>> index 808ab70d5df5..f25fae62f077 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("Default DMA domain mode: %s %s\n",
>
> Nit: I think this might be a little unclear for end-users - *I'm* not
> even sure whether "Default" here is meant to refer to the mode setting
> itself or to default domains (of DMA type). Maybe something like "DMA
> domain TLB invalidation policy"? Certainly it seems like a good idea to
> explicitly mention invalidation to correlate with the documentation of
> the "iommu.strict" parameter.
>
> Ack to the general idea though.
ok, so I'll go with this:
pr_info("DMA domain default TLB invalidation policy: %s mode %s\n",
iommu_dma_strict ? "strict" : "lazy",
(iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ?
"(set via kernel command line)" : "");
I think it's worth mentioning "default" somewhere, as not all IOMMUs or
devices will use lazy mode even if it's default.
Thanks,
John
Powered by blists - more mailing lists