Thread (19 messages) 19 messages, 3 authors, 2021-06-18

Re: [PATCH v13 4/6] iommu/vt-d: Add support for IOMMU default DMA mode build options

From: John Garry <hidden>
Date: 2021-06-18 07:37:35
Also in: linux-iommu, lkml

On 18/06/2021 02:46, Lu Baolu wrote:

Hi baolu,
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help