Re: [PATCH 1/2] iommu/vt-d: Set FPD when tearing down a PASID entry with fault_ignore
From: Vinicius Costa Gomes
Date: Thu Nov 05 2026 - 17:05:04 EST
Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx> 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.
Cheers,
--
Vinicius