Skip to content

Commit 8cc7518

Browse files
committed
vfio/pci: Cleanup Kconfig
It should be possible to select vfio-pci variant drivers without building vfio-pci itself, which implies each variant driver should select vfio-pci-core. Fix the top level vfio Makefile to traverse pci based on vfio-pci-core rather than vfio-pci. Mark MMAP and INTX options depending on vfio-pci-core to cleanup resulting config if core is not enabled. Push all PCI related vfio options to a sub-menu and make descriptions consistent. Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20230614193948.477036-2-alex.williamson@redhat.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent a5bfe22 commit 8cc7518

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

drivers/vfio/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ vfio-$(CONFIG_VFIO_VIRQFD) += virqfd.o
1010

1111
obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
1212
obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
13-
obj-$(CONFIG_VFIO_PCI) += pci/
13+
obj-$(CONFIG_VFIO_PCI_CORE) += pci/
1414
obj-$(CONFIG_VFIO_PLATFORM) += platform/
1515
obj-$(CONFIG_VFIO_MDEV) += mdev/
1616
obj-$(CONFIG_VFIO_FSL_MC) += fsl-mc/

drivers/vfio/pci/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
if PCI && MMU
2+
menu "VFIO support for PCI devices"
3+
depends on PCI && MMU
4+
35
config VFIO_PCI_CORE
46
tristate
57
select VFIO_VIRQFD
68
select IRQ_BYPASS_MANAGER
79

810
config VFIO_PCI_MMAP
911
def_bool y if !S390
12+
depends on VFIO_PCI_CORE
1013

1114
config VFIO_PCI_INTX
1215
def_bool y if !S390
16+
depends on VFIO_PCI_CORE
1317

1418
config VFIO_PCI
1519
tristate "Generic VFIO support for any PCI device"
@@ -59,4 +63,4 @@ source "drivers/vfio/pci/mlx5/Kconfig"
5963

6064
source "drivers/vfio/pci/hisilicon/Kconfig"
6165

62-
endif
66+
endmenu

drivers/vfio/pci/hisilicon/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config HISI_ACC_VFIO_PCI
3-
tristate "VFIO PCI support for HiSilicon ACC devices"
3+
tristate "VFIO support for HiSilicon ACC PCI devices"
44
depends on ARM64 || (COMPILE_TEST && 64BIT)
5-
depends on VFIO_PCI_CORE
65
depends on PCI_MSI
76
depends on CRYPTO_DEV_HISI_QM
87
depends on CRYPTO_DEV_HISI_HPRE
98
depends on CRYPTO_DEV_HISI_SEC2
109
depends on CRYPTO_DEV_HISI_ZIP
10+
select VFIO_PCI_CORE
1111
help
1212
This provides generic PCI support for HiSilicon ACC devices
1313
using the VFIO framework.

drivers/vfio/pci/mlx5/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
config MLX5_VFIO_PCI
33
tristate "VFIO support for MLX5 PCI devices"
44
depends on MLX5_CORE
5-
depends on VFIO_PCI_CORE
5+
select VFIO_PCI_CORE
66
help
77
This provides migration support for MLX5 devices using the VFIO
88
framework.

0 commit comments

Comments
 (0)