RE: [PATCH v5 18/19] vfio: Compile group optionally

Liu, Yi L
2023-03-01T13:59:44Z

> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Tuesday, February 28, 2023 8:36 PM
>
> On Tue, Feb 28, 2023 at 06:00:09AM +0000, Liu, Yi L wrote:
> > > From: Liu, Yi L <yi.l.liu@intel.com>
> > > Sent: Monday, February 27, 2023 7:12 PM
> > >
> > > group code is not needed for vfio device cdev, so with vfio device cdev
> > > introduced, the group infrastructures can be compiled out if only cdev
> > > is needed.
> > >
> > > Signed-off-by: Yi Liu <yi.l.liu@intel.com>
> > > ---
> > > drivers/vfio/Kconfig | 14 +++++++++
> > > drivers/vfio/Makefile | 2 +-
> > > drivers/vfio/vfio.h | 72
> > > +++++++++++++++++++++++++++++++++++++++++++
> > > include/linux/vfio.h | 24 ++++++++++++++-
> > > 4 files changed, 110 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig
> > > index 169762316513..c3ab06c314ea 100644
> > > --- a/drivers/vfio/Kconfig
> > > +++ b/drivers/vfio/Kconfig
> > > @@ -4,6 +4,8 @@ menuconfig VFIO
> > > select IOMMU_API
> > > depends on IOMMUFD || !IOMMUFD
> > > select INTERVAL_TREE
> > > + select VFIO_GROUP if SPAPR_TCE_IOMMU
> > > + select VFIO_DEVICE_CDEV if !VFIO_GROUP && (X86 || S390 || ARM
> || ARM64)
> >
> > Got below warning when IOMMUFD=n, VFIO_GROUP=n. so may remove
> > this select or needs to let VFIO_DEVICE_CDEV select IOMMUFD instead of
> > depends on IOMMUFD.
>
> Add
>
> select VFIO_GROUP if !IOMMUFD

Done.

Regards,
Yi Liu