Re: [PATCH v3] iommu/vt-d: Avoid superfluous IOTLB tracking in lazy mode

From: Ferdinand Schober

Date: Thu Feb 19 2026 - 21:01:23 EST



Hi,

I've stumbled upon this patch trying to figure out how lazy invalidation is implemented in intel IOMMUs.
The patch suggests that lazy invalidation is active whenever iotlb_gather.queued is set.

However, the only place in which gather.queued is written seems to be in dma-iommu.c:

-- drivers/iommu/dma-iommu.c
820: iotlb_gather.queued = READ_ONCE(cookie->fq_domain);
2038: iotlb_gather.queued = free_iova && READ_ONCE(cookie->fq_domain);


Both of these depend on fq_domain but fq_domain is always NULL for intel iommus,
since iommu/intel/iommu.c reports IOMMU_CAP_DEFERRED_FLUSH:

-- drivers/iommu/dma-iommu.c:708
if (domain->type == IOMMU_DOMAIN_DMA_FQ &&
(!device_iommu_capable(dev, IOMMU_CAP_DEFERRED_FLUSH) || iommu_dma_init_fq(domain)))
domain->type = IOMMU_DOMAIN_DMA;


(Above line numbers are from Kernel 6.17).

So I'm not sure, this commit does what it should?
Please let me know what I'm missing here.

Best Regards,
Ferdinand Schober