public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Baolu Lu <baolu.lu@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	Kevin Tian <kevin.tian@intel.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Will Deacon <will@kernel.org>,
	patches@lists.linux.dev
Subject: Re: [PATCH 1/4] iommu/intel: Split piotlb invalidation into range and all
Date: Mon, 30 Mar 2026 12:31:26 -0300	[thread overview]
Message-ID: <20260330153126.GU310919@nvidia.com> (raw)
In-Reply-To: <ef82f6be-fecf-469b-9df0-88a7a004923a@linux.intel.com>

On Mon, Mar 30, 2026 at 02:39:50PM +0800, Baolu Lu wrote:
> >   static void qi_batch_add_piotlb(struct intel_iommu *iommu, u16 did, u32 pasid,
> >   				u64 addr, unsigned long npages, bool ih,
> >   				struct qi_batch *batch)
> >   {
> > -	/*
> > -	 * npages == -1 means a PASID-selective invalidation, otherwise,
> > -	 * a positive value for Page-selective-within-PASID invalidation.
> > -	 * 0 is not a valid input.
> > -	 */
> >   	if (!npages)
> >   		return;
> 
> The WARN_ON(!npages) logic is removed from the previous
> qi_flush_piotlb() (see below ...). Could it be added here to keep the
> "npages != 0" check?

The later patches remove this check entirely so I don't think we
should add a WARN_ON then remove it again..

> > @@ -1168,6 +1166,7 @@ void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
> >   void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 pfsid,
> >   			u16 qdep, u64 addr, unsigned mask);
> > +void qi_flush_piotlb_all(struct intel_iommu *iommu, u16 did, u32 pasid);
> 
> [...]
> 
> >   void qi_flush_piotlb(struct intel_iommu *iommu, u16 did, u32 pasid, u64 addr,
> >   		     unsigned long npages, bool ih);
> 
> qi_flush_piotlb() has been removed by this patch. Therefore above
> declaration should also be cleaned.

Ooops that hunk got into a later patch, I shifted it back

Thanks,
Jason

  reply	other threads:[~2026-03-30 15:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27 15:25 [PATCH 0/4] Improve the invalidation path in VT-d Jason Gunthorpe
2026-03-27 15:25 ` [PATCH 1/4] iommu/intel: Split piotlb invalidation into range and all Jason Gunthorpe
2026-03-30  6:39   ` Baolu Lu
2026-03-30 15:31     ` Jason Gunthorpe [this message]
2026-04-02  7:20       ` Baolu Lu
2026-03-27 15:25 ` [PATCH 2/4] iommu/vtd: Pass size_order to qi_desc_piotlb() not npages Jason Gunthorpe
2026-03-30  7:11   ` Baolu Lu
2026-03-27 15:25 ` [PATCH 3/4] iommu/vtd: Remove the remaining pages along the invalidation path Jason Gunthorpe
2026-03-27 15:25 ` [PATCH 4/4] iommu/vt: Simplify calculate_psi_aligned_address() Jason Gunthorpe

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=20260330153126.GU310919@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=patches@lists.linux.dev \
    --cc=robin.murphy@arm.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