From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
"Liu, Yi L" <yi.l.liu@intel.com>
Cc: baolu.lu@linux.intel.com,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] iommu/vt-d: Draining PRQ in sva unbind path when FPD bit set
Date: Tue, 17 Dec 2024 16:11:49 +0800 [thread overview]
Message-ID: <4807944c-2855-46da-9ba9-9f425ad30411@linux.intel.com> (raw)
In-Reply-To: <BL1PR11MB52712961A13B55ED1DDCCFE28C042@BL1PR11MB5271.namprd11.prod.outlook.com>
On 2024/12/17 15:39, Tian, Kevin wrote:
>> From: Lu Baolu<baolu.lu@linux.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@intel.com>
>> Signed-off-by: Lu Baolu<baolu.lu@linux.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")
next prev parent reply other threads:[~2024-12-17 8:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 2:42 [PATCH 1/1] iommu/vt-d: Draining PRQ in sva unbind path when FPD bit set Lu Baolu
2024-12-17 7:39 ` Tian, Kevin
2024-12-17 8:11 ` Baolu Lu [this message]
2025-01-02 3:13 ` Baolu Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4807944c-2855-46da-9ba9-9f425ad30411@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yi.l.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox