The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jacob Pan <jacob.pan@linux.microsoft.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Alex Williamson <alex@shazbot.org>,
	Joerg Roedel <joro@8bytes.org>,
	Mostafa Saleh <smostafa@google.com>,
	David Matlack <dmatlack@google.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	"Liu, Yi L" <yi.l.liu@intel.com>,
	Baolu Lu <baolu.lu@linux.intel.com>,
	Saurabh Sengar <ssengar@linux.microsoft.com>,
	"skhawaja@google.com" <skhawaja@google.com>,
	"pasha.tatashin@soleen.com" <pasha.tatashin@soleen.com>,
	Will Deacon <will@kernel.org>,
	jacob.pan@linux.microsoft.com
Subject: Re: [PATCH v7 1/6] iommufd: Support a HWPT without an iommu driver for noiommu
Date: Wed, 3 Jun 2026 09:56:20 -0700	[thread overview]
Message-ID: <20260603095620.00004a2e@linux.microsoft.com> (raw)
In-Reply-To: <DM6PR11MB369077ABB0DBC1633A76E9648C132@DM6PR11MB3690.namprd11.prod.outlook.com>

Hi Kevin,

On Wed, 3 Jun 2026 06:30:57 +0000
"Tian, Kevin" <kevin.tian@intel.com> wrote:

> > From: Jacob Pan <jacob.pan@linux.microsoft.com>
> > Sent: Wednesday, June 3, 2026 1:45 PM
> > 
> > +static const struct iommu_ops *get_iommu_ops(struct iommufd_device
> > *idev)
> > +{
> > +	if (IS_ENABLED(CONFIG_IOMMUFD_NOIOMMU) && !idev->igroup-  
> > >group)  
> > +		return &iommufd_noiommu_ops;
> > +	if (WARN_ON_ONCE(!idev->dev->iommu))
> > +		return NULL;
> > +	return dev_iommu_ops(idev->dev);
> > +}  
> 
> Sashiko gave a valid comment:
> 
> "
> While get_iommu_ops() correctly handles NO-IOMMU devices for
> hw_pagetable allocations, do the vIOMMU and vDevice allocation paths
> also need similar protection against NULL pointer dereferences?
> "
> 
right, will fix in v8.

> with that fixed:
> 
> Reviewed-by: Kevin Tian <kevin.tian@intel.com>


  reply	other threads:[~2026-06-03 16:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  5:44 [PATCH v7 0/6] iommufd: Enable noiommu mode for cdev Jacob Pan
2026-06-03  5:44 ` [PATCH v7 1/6] iommufd: Support a HWPT without an iommu driver for noiommu Jacob Pan
2026-06-03  6:30   ` Tian, Kevin
2026-06-03 16:56     ` Jacob Pan [this message]
2026-06-03  5:44 ` [PATCH v7 2/6] iommufd: Move igroup allocation to a function Jacob Pan
2026-06-03  5:44 ` [PATCH v7 3/6] iommufd: Allow binding to a noiommu device Jacob Pan
2026-06-03  6:32   ` Tian, Kevin
2026-06-03 16:56     ` Jacob Pan
2026-06-03  5:44 ` [PATCH v7 4/6] iommufd: Add an ioctl to query PA from IOVA for noiommu mode Jacob Pan
2026-06-03  6:34   ` Tian, Kevin
2026-06-03  5:44 ` [PATCH v7 5/6] vfio: Enable cdev noiommu mode under iommufd Jacob Pan
2026-06-03  6:38   ` Tian, Kevin
2026-06-03 17:47     ` Jacob Pan
2026-06-03  5:44 ` [PATCH v7 6/6] Documentation: Update VFIO NOIOMMU mode Jacob Pan
2026-06-03  6:42   ` Tian, Kevin
2026-06-03 17:51     ` Jacob Pan

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=20260603095620.00004a2e@linux.microsoft.com \
    --to=jacob.pan@linux.microsoft.com \
    --cc=alex@shazbot.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=dmatlack@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=robin.murphy@arm.com \
    --cc=skhawaja@google.com \
    --cc=smostafa@google.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=will@kernel.org \
    --cc=yi.l.liu@intel.com \
    /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