[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a623fb4b-ce39-4a53-9bed-8568bc3fd076@linux.intel.com>
Date: Thu, 2 Jan 2025 11:13:48 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>, Kevin Tian <kevin.tian@...el.com>,
Yi Liu <yi.l.liu@...el.com>
Cc: iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Draining PRQ in sva unbind path when FPD
bit set
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@...el.com>
> Signed-off-by: Lu Baolu<baolu.lu@...ux.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.
Powered by blists - more mailing lists