[PATCH v5 6/6] VT-d: support the device IOTLB

David Woodhouse dwmw2 at infradead.org
Sun Jun 28 07:28:36 PDT 2009


On Mon, 2009-05-18 at 13:51 +0800, Yu Zhao wrote:
> 
> @@ -965,6 +1037,8 @@ static void iommu_flush_iotlb_psi(struct intel_iommu *iommu, u16 did,
>         else
>                 iommu->flush.flush_iotlb(iommu, did, addr, mask,
>                                                 DMA_TLB_PSI_FLUSH);
> +       if (did)
> +               iommu_flush_dev_iotlb(iommu->domains[did], addr, mask);
>  }
>  
>  static void iommu_disable_protect_mem_regions(struct intel_iommu *iommu)

Hm, why 'if (did)' ? 

Domain ID zero is only special in caching mode. Should it be:
	if (!cap_caching_mode(iommu->cap) || did)
?

Either way, it wants a comment.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation



More information about the iommu mailing list