From: Baolu Lu <baolu.lu@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Kevin Tian <kevin.tian@intel.com>, Yi Liu <yi.l.liu@intel.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Draining PRQ in sva unbind path when FPD bit set
Date: Thu, 2 Jan 2025 11:13:48 +0800 [thread overview]
Message-ID: <a623fb4b-ce39-4a53-9bed-8568bc3fd076@linux.intel.com> (raw)
In-Reply-To: <20241217024240.139615-1-baolu.lu@linux.intel.com>
On 12/17/24 10:42, Lu Baolu wrote:
> 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>
> ---
> drivers/iommu/intel/pasid.c | 22 +++++++++++++++++++++-
> drivers/iommu/intel/pasid.h | 6 ++++++
> 2 files changed, 27 insertions(+), 1 deletion(-)
Queued for v6.14.
prev parent reply other threads:[~2025-01-02 3:15 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
2025-01-02 3:13 ` Baolu Lu [this message]
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=a623fb4b-ce39-4a53-9bed-8568bc3fd076@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