Re: [PATCH 1/3] vfio/pci: Cleanup Kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 Jun 2023 20:27:41 -0300
Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:

> On Tue, Jun 06, 2023 at 03:57:04PM -0600, Alex Williamson wrote:
> > > Not really, maybe it creates a sysfs class, but it certainly doesn't
> > > do anything useful unless there is a vfio driver also selected.  
> > 
> > Sorry, I wasn't referring to vfio "core" here, I was thinking more
> > along the lines of when we include the PCI or IOMMU subsystem there's
> > a degree of base functionality included there regardless of what
> > additional options or drivers are selected.    
> 
> Lots of other cases are just like VFIO where it is the subsystem core
> that really doesn't do anything. Look at tpm, infiniband, drm, etc

This is getting a bit absurd, the build system should not be building
modules that have no users.  Maybe it's not a high enough priority to go
to excessive lengths to prevent it, but I don't see that we're doing
that here.
 
> > The current state is that we cannot build vfio-pci-core.ko without
> > vfio-pci.ko, so there's always an in-kernel user.    
> 
> I think I might have done that, and it wasn't done for that reason.. I
> just messed it up and didn't follow the normal pattern - and this
> caused these troubles with the wrong/missing depends/selects.

I didn't assume this was intentional, but the result of requiring a
built user of vfio-pci-core is not entirely bad.

> I view following the usual pattern as more valuable than a one off fix
> for what is really a systemic issue in kconfig. Which is why I made
> the patch to align with how CONFIG_VFIO works :)

Is using a menu and having drivers select the config option for the
core module they depend on really that unusual?  This all seems like
Kconfig 101.

Perhaps we should be more sensitive to this in vfio than other parts of
the kernel exactly because we're providing a userspace driver
interface.  We should disable as much as we can of that interface when
there are no in-kernel users of it.

I'm failing to see how "this is the way we do things" makes it correct
when we can trivially eliminate the possibility of building this
particular shared module when it has no users.  Thanks,

Alex




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux