[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c2191a58-5330-406c-b6b0-951a9d370bed@linux.intel.com>
Date: Wed, 25 Jun 2025 12:53:28 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: "Tian, Kevin" <kevin.tian@...el.com>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>
Cc: "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH 1/1] iommu/vt-d: Enable ATS before cache tag assignment
On 6/24/25 16:33, Tian, Kevin wrote:
>> From: Lu Baolu <baolu.lu@...ux.intel.com>
>> Sent: Friday, June 20, 2025 2:08 PM
>>
>> Commit <4f1492efb495> ("iommu/vt-d: Revert ATS timing change to fix boot
>> failure") placed the enabling of ATS in the probe_finalize callback. This
>> occurs after the default domain attachment, which is when the ATS cache
>> tag is assigned. Consequently, the device TLB cache tag is missed when the
>> domain is attached, leading to the device TLB not being invalidated in the
>> iommu_unmap paths.
>>
>> Fix it by moving the ATS enabling to the default domain attachment path,
>> ensuring ATS is enabled before the cache tag assignment.
>
> this means ATS will never be enabled for drivers with driver_managed_dma
> set to '1', as they don't expect their devices attached to the default domain
> automatically.
You are right.
>
> does it make more sense sticking to current way (enabling ATS in
> probe_finalize) and assigning cache tag for device tlb at that point?
>
Yes. I will post v2 with this approach.
Thanks,
baolu
Powered by blists - more mailing lists