[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4807944c-2855-46da-9ba9-9f425ad30411@linux.intel.com>
Date: Tue, 17 Dec 2024 16:11:49 +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>,
"Liu, Yi L" <yi.l.liu@...el.com>
Cc: baolu.lu@...ux.intel.com, "iommu@...ts.linux.dev"
<iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] iommu/vt-d: Draining PRQ in sva unbind path when FPD
bit set
On 2024/12/17 15:39, Tian, Kevin wrote:
>> From: Lu Baolu<baolu.lu@...ux.intel.com>
>> Sent: Tuesday, December 17, 2024 10:43 AM
>>
>> When a device uses a PASID for SVA (Shared Virtual Address), it's possible
>> that the PASID entry is marked as non-present and FPD bit set before the
>> device flushes all ongoing DMA requests and removes the SVA domain. This
>> can occur when an exception happens and the process terminates before the
>> device driver stops DMA and calls the iommu driver to unbind the PASID.
>>
>> There's no need to drain the PRQ in the mm release path. Instead, the PRQ
>> will be drained in the SVA unbind path. But in such case,
>> intel_pasid_tear_down_entry() only checks the presence of the pasid entry
>> and returns directly.
>>
>> Add the code to clear the FPD bit and drain the PRQ.
>>
>> Suggested-by: Kevin Tian<kevin.tian@...el.com>
>> Signed-off-by: Lu Baolu<baolu.lu@...ux.intel.com>
> Need a fix tag given the old code doesn't work correctly?
Yes.
Fixes: c43e1ccdebf2 ("iommu/vt-d: Drain PRQs when domain removed from RID")
Powered by blists - more mailing lists