Re: [PATCH 08/11] vfio: Enable cdev noiommu mode under iommufd
From: Jacob Pan
Date: Thu Mar 12 2026 - 12:39:48 EST
Hi Jason,
On Thu, 5 Mar 2026 19:38:27 -0400
Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
> On Thu, Mar 05, 2026 at 03:26:14PM -0800, Jacob Pan wrote:
> > Hi Jason,
> >
> > On Fri, 27 Feb 2026 20:35:40 -0400
> > Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
> >
> > > On Sat, Feb 28, 2026 at 08:18:41AM +0800, kernel test robot
> > > wrote:
> > > > Kconfig warnings: (for reference only)
> > > > WARNING: unmet direct dependencies detected for
> > > > IOMMU_PT_AMDV1 Depends on [n]: GENERIC_PT [=y] && IOMMU_PT [=y]
> > > > && !GENERIC_ATOMIC64 [=y] Selected by [y]:
> > > > - VFIO_NOIOMMU [=y] && VFIO [=y] && VFIO_GROUP [=y]
> > >
> > > Some kconfig stuff is missing, the iommufd IOMMU would only work
> > > with GENERIC_ATOMIC64
> > I don't quite understand this dependency on GENERIC_ATOMIC64, or you
> > mean the opposite? since we currently have:
>
> Oh, right the inverse.
>
> > config IOMMU_PT_AMDV1
> > tristate "IOMMU page table for 64-bit AMD IOMMU v1"
> > depends on !GENERIC_ATOMIC64 # for cmpxchg64
> >
> > And I already have noiommu depends on AMDV1 for mock page tables.
>
> I think it is kconfig not being really transitive with select
> dependencies. So things like !GENERIC_ATOMIC64 have to be in the
> parent that uses select too.
>
> You could also possibly use depends to avoid this, IIRC.
I have tried to use "depends on" instead of select but it made
VFIO_NOIOMMU impossible to enable if COMPILE_TEST is not set. I think
it is because:
menuconfig GENERIC_PT
bool "Generic Radix Page Table" if COMPILE_TEST
> > Anyway, this particular build issue can be fixed by adding
> > IOMMU_SUPPORT. i.e.
>
> That feels indirect, but maybe it is needed too..
Yeah, it does feel a bit counterintuitive that noiommu depends on IOMMU
support, but as noiommu mode is made to behave increasingly like full
IOMMU support, this may be unavoidable.
I just sent out v2.
Thanks,
Jacob