Re: [PATCH 1/1] iommu/vt-d: Fix missed device TLB cache tag
From: Jason Gunthorpe
Date: Wed Jun 19 2024 - 12:46:30 EST
On Wed, Jun 19, 2024 at 09:53:45AM +0800, Lu Baolu wrote:
> When a domain is attached to a device, the required cache tags are
> assigned to the domain so that the related caches could be flushed
> whenever it is needed. The device TLB cache tag is created selectively
> by checking the ats_enabled field of the device's iommu data. This
> creates an ordered dependency between attach and ATS enabling paths.
>
> The device TLB cache tag will not be created if device's ATS is enabled
> after the domain attachment. This causes some devices, for example
> intel_vpu, to malfunction.
What? How is this even possible?
ATS is controlled exclusively by the iommu driver, how can it be
changed without the driver knowing??
Jason