[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b654480e-d5ac-9e4c-1074-1158cccc5806@huawei.com>
Date: Fri, 18 Jun 2021 08:31:05 +0100
From: John Garry <john.garry@...wei.com>
To: Lu Baolu <baolu.lu@...ux.intel.com>, <joro@...tes.org>,
<will@...nel.org>, <dwmw2@...radead.org>, <robin.murphy@....com>,
<corbet@....net>
CC: <linux-kernel@...r.kernel.org>, <iommu@...ts.linux-foundation.org>,
<linuxarm@...wei.com>, <thunder.leizhen@...wei.com>,
<chenxiang66@...ilicon.com>, <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v13 4/6] iommu/vt-d: Add support for IOMMU default DMA
mode build options
On 18/06/2021 02:46, Lu Baolu wrote:
Hi baolu,
>> I need to change that. How about this:
>>
>> bool print_warning = false;
>>
>> for_each_active_iommu(iommu, drhd) {
>> /*
>> * The flush queue implementation does not perform
>> * page-selective invalidations that are required for efficient
>> * TLB flushes in virtual environments. The benefit of batching
>> * is likely to be much lower than the overhead of synchronizing
>> * the virtual and physical IOMMU page-tables.
>> */
>> if (!print_warning && cap_caching_mode(iommu->cap)) {
>> pr_warn("IOMMU batching disallowed due to virtualization\n");
>> iommu_set_dma_strict(true);
>> print_warning = true;
>> }
>> ...
>> }
>>
>> or use pr_warn_once().
>
> From my p.o.v, pr_xxxx_once() is better.
>
> How about using a pr_info_once()? I don't think it's a warning, it's
> just a policy choice in VM environment.
ok, I can go with that, which Robin mostly agrees with.
Thanks,
John
Powered by blists - more mailing lists