Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	"Gomes, Vinicius" <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>
Cc: baolu.lu@linux.intel.com,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@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: Wed, 18 Nov 2026 12:29:10 +0800	[thread overview]
Message-ID: <f9b9ab9e-949a-421a-a6fd-1c01c12bacde@linux.intel.com> (raw)
In-Reply-To: <CO1PR11MB48355713BC88BEA8794279E18C702@CO1PR11MB4835.namprd11.prod.outlook.com>

On 11/12/2026 1:58 PM, Tian, Kevin wrote:
>> From: Baolu Lu <baolu.lu@linux.intel.com>
>> Sent: Monday, November 9, 2026 3:35 PM
>>
>> 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.
>>
> 
> hmm is it a separate fix?

I have added "Fixes: 75ed00055c05" to this patch.

Thanks,
baolu

      reply	other threads:[~2026-11-18  4:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261104051059.1345010-1-baolu.lu@linux.intel.com>
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
2026-11-12  5:58       ` Tian, Kevin
2026-11-18  4:29         ` 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=f9b9ab9e-949a-421a-a6fd-1c01c12bacde@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