Re: [PATCH 1/1] iommu: Avoid unnecessary cache invalidations

From: Joerg Roedel
Date: Fri Oct 27 2023 - 02:57:44 EST


On Thu, Oct 26, 2023 at 04:49:42PM +0800, Lu Baolu wrote:
> The iommu_create_device_direct_mappings() only needs to flush the caches
> when the mappings are changed in the affected domain. This is not true
> for non-DMA domains, or for devices attached to the domain that have no
> reserved regions. To avoid unnecessary cache invalidations, add a check
> before iommu_flush_iotlb_all().
>
> Fixes: a48ce36e2786 ("iommu: Prevent RESV_DIRECT devices from blocking domains")
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> ---
> drivers/iommu/iommu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.