Re: [PATCH 1/1] iommu/vt-d: Fix missed device TLB cache tag
From: Vasant Hegde
Date: Thu Jun 20 2024 - 06:52:01 EST
Hi,
On 6/20/2024 11:57 AM, Baolu Lu wrote:
> On 2024/6/20 13:54, Vasant Hegde wrote:
>> On 6/20/2024 8:43 AM, Baolu Lu wrote:
>>> On 6/20/24 11:04 AM, Tian, Kevin wrote:
>>>>> From: Baolu Lu<baolu.lu@xxxxxxxxxxxxxxx>
>>>>> Sent: Thursday, June 20, 2024 8:50 AM
>>>>>
.../...
>>>>
>>>> seems that for all domain attaches above is coded in a wrong order
>>>> as ats is enabled after the cache tag is assigned.
>>> Yes, exactly. But simply changing the order isn't future-proof,
>>> considering ATS control will eventually be moved out of iommu drivers.
>> [Unrelated to this patch]
>>
>> You mean ATS setup will be moved to individual device driver? Is there any
>> reason for that?
>
> Not exactly to individual device drivers, but it should be out of the
> iommu drivers.
>
> https://lore.kernel.org/linux-iommu/BL1PR12MB51441FC4303BD0442EDB7A9CF7FFA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
Got it. Thanks.
I remember of this discussion. May be we can provide API from IOMMU driver so
that individual driver can enable/disable ATS (like iommu_dev_enable_feature()).
-Vasant