From: Baolu Lu <baolu.lu@linux.intel.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>
Cc: baolu.lu@linux.intel.com, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] iommu/vt-d: Set FPD when tearing down a PASID entry with fault_ignore
Date: Mon, 9 Nov 2026 15:34:40 +0800 [thread overview]
Message-ID: <7f86b03e-1c99-44ed-8d07-3502a21821fc@linux.intel.com> (raw)
In-Reply-To: <87o6c3uedj.fsf@intel.com>
On 11/6/2026 6:01 AM, Vinicius Costa Gomes wrote:
> Lu Baolu<baolu.lu@linux.intel.com> writes:
>
>> static void
>> pasid_cache_invalidation_with_pasid(struct intel_iommu *iommu,
>> u16 did, u32 pasid)
>> @@ -253,7 +238,6 @@ void intel_pasid_tear_down_entry(struct intel_iommu *iommu, struct device *dev,
>>
>> if (!pasid_pte_is_present(pte)) {
>> if (!pasid_pte_is_fault_disabled(pte)) {
>> - WARN_ON(READ_ONCE(pte->val[0]) != 0);
>> spin_unlock(&iommu->lock);
>> return;
>> }
>> @@ -266,6 +250,8 @@ void intel_pasid_tear_down_entry(struct intel_iommu *iommu, struct device *dev,
>> */
>> pasid_clear_entry(pte);
>> spin_unlock(&iommu->lock);
>> + if (!ecap_coherent(iommu->ecap))
>> + clflush_cache_range(pte, sizeof(*pte));
>> intel_iommu_drain_pasid_prq(dev, pasid);
>>
> I think it's worth documenting in the commit message why both of these
> are needed, removing the warning and adding the flush.
Yes. I will add the following to the commit message:
Also drop the WARN_ON() for a non-present entry without FPD. Since
commit 75ed00055c05 a concurrent teardown can see such an entry before
it is zeroed. Flush the cache after clearing an FPD-only entry, as
other PASID entry updates do on non-coherent hardware.
Thanks,
baolu
next prev parent reply other threads:[~2026-11-09 7:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 5:10 [PATCH 0/2] iommu/vt-d: Fix SVA teardown races with process exit Lu Baolu
2026-11-04 5:10 ` [PATCH 1/2] iommu/vt-d: Set FPD when tearing down a PASID entry with fault_ignore Lu Baolu
2026-11-05 22:01 ` Vinicius Costa Gomes
2026-11-09 7:34 ` Baolu Lu [this message]
2026-11-04 5:10 ` [PATCH 2/2] iommu/vt-d: Serialize SVA unbind teardown with intel_mm_release() Lu Baolu
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=7f86b03e-1c99-44ed-8d07-3502a21821fc@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=stable@vger.kernel.org \
--cc=vinicius.gomes@intel.com \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®