[PATCH] vfio: Fixup kconfig ordering for VFIO_PCI_CORE

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

 



Make VFIO_PCI_CORE the top level menu choice and make it directly
selectable by the user.

This makes a sub menu with all the different PCI driver choices and causes
VFIO_PCI to be enabled by default if the user selects "VFIO support for
PCI devices"

Remove the duplicated 'depends on' from variant drivers and enclose all
the different sub driver choices (including S390 which was wrongly missing
a depends) in a single if block. This makes all the dependencies more
robust.

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
---
 drivers/vfio/pci/Kconfig           | 17 ++++++++++++-----
 drivers/vfio/pci/hisilicon/Kconfig |  1 -
 drivers/vfio/pci/mlx5/Kconfig      |  1 -
 3 files changed, 12 insertions(+), 7 deletions(-)

Slightly different than as discussed as this seem more robust at the cost of
adding another menu layer.

diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
index f9d0c908e738c3..5e9868d5ff1569 100644
--- a/drivers/vfio/pci/Kconfig
+++ b/drivers/vfio/pci/Kconfig
@@ -1,9 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 if PCI && MMU
-config VFIO_PCI_CORE
-	tristate
-	select VFIO_VIRQFD
-	select IRQ_BYPASS_MANAGER
 
 config VFIO_PCI_MMAP
 	def_bool y if !S390
@@ -11,9 +7,19 @@ config VFIO_PCI_MMAP
 config VFIO_PCI_INTX
 	def_bool y if !S390
 
+config VFIO_PCI_CORE
+	tristate "VFIO support for PCI devices"
+	select VFIO_VIRQFD
+	select IRQ_BYPASS_MANAGER
+	help
+	  Base support for VFIO drivers that support PCI devices. At least one
+	  of the implementation drivers must be selected.
+
+if VFIO_PCI_CORE
+
 config VFIO_PCI
 	tristate "Generic VFIO support for any PCI device"
-	select VFIO_PCI_CORE
+	default y
 	help
 	  Support for the generic PCI VFIO bus driver which can connect any
 	  PCI device to the VFIO framework.
@@ -60,3 +66,4 @@ source "drivers/vfio/pci/mlx5/Kconfig"
 source "drivers/vfio/pci/hisilicon/Kconfig"
 
 endif
+endif
diff --git a/drivers/vfio/pci/hisilicon/Kconfig b/drivers/vfio/pci/hisilicon/Kconfig
index 5daa0f45d2f99b..86826513765062 100644
--- a/drivers/vfio/pci/hisilicon/Kconfig
+++ b/drivers/vfio/pci/hisilicon/Kconfig
@@ -2,7 +2,6 @@
 config HISI_ACC_VFIO_PCI
 	tristate "VFIO PCI support for HiSilicon ACC devices"
 	depends on ARM64 || (COMPILE_TEST && 64BIT)
-	depends on VFIO_PCI_CORE
 	depends on PCI_MSI
 	depends on CRYPTO_DEV_HISI_QM
 	depends on CRYPTO_DEV_HISI_HPRE
diff --git a/drivers/vfio/pci/mlx5/Kconfig b/drivers/vfio/pci/mlx5/Kconfig
index 29ba9c504a7560..d36b18d3e21fe7 100644
--- a/drivers/vfio/pci/mlx5/Kconfig
+++ b/drivers/vfio/pci/mlx5/Kconfig
@@ -2,7 +2,6 @@
 config MLX5_VFIO_PCI
 	tristate "VFIO support for MLX5 PCI devices"
 	depends on MLX5_CORE
-	depends on VFIO_PCI_CORE
 	help
 	  This provides migration support for MLX5 devices using the VFIO
 	  framework.

base-commit: 8c1ee346da583718fb0a7791a1f84bdafb103caf
-- 
2.40.1




[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