Commit 8cc75183 authored by Alex Williamson's avatar Alex Williamson

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: default avatarCédric Le Goater <clg@redhat.com>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Reviewed-by: default avatarShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20230614193948.477036-2-alex.williamson@redhat.comSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent a5bfe22d
...@@ -10,7 +10,7 @@ vfio-$(CONFIG_VFIO_VIRQFD) += virqfd.o ...@@ -10,7 +10,7 @@ vfio-$(CONFIG_VFIO_VIRQFD) += virqfd.o
obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
obj-$(CONFIG_VFIO_PCI) += pci/ obj-$(CONFIG_VFIO_PCI_CORE) += pci/
obj-$(CONFIG_VFIO_PLATFORM) += platform/ obj-$(CONFIG_VFIO_PLATFORM) += platform/
obj-$(CONFIG_VFIO_MDEV) += mdev/ obj-$(CONFIG_VFIO_MDEV) += mdev/
obj-$(CONFIG_VFIO_FSL_MC) += fsl-mc/ obj-$(CONFIG_VFIO_FSL_MC) += fsl-mc/
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
if PCI && MMU menu "VFIO support for PCI devices"
depends on PCI && MMU
config VFIO_PCI_CORE config VFIO_PCI_CORE
tristate tristate
select VFIO_VIRQFD select VFIO_VIRQFD
...@@ -7,9 +9,11 @@ config VFIO_PCI_CORE ...@@ -7,9 +9,11 @@ config VFIO_PCI_CORE
config VFIO_PCI_MMAP config VFIO_PCI_MMAP
def_bool y if !S390 def_bool y if !S390
depends on VFIO_PCI_CORE
config VFIO_PCI_INTX config VFIO_PCI_INTX
def_bool y if !S390 def_bool y if !S390
depends on VFIO_PCI_CORE
config VFIO_PCI config VFIO_PCI
tristate "Generic VFIO support for any PCI device" tristate "Generic VFIO support for any PCI device"
...@@ -59,4 +63,4 @@ source "drivers/vfio/pci/mlx5/Kconfig" ...@@ -59,4 +63,4 @@ source "drivers/vfio/pci/mlx5/Kconfig"
source "drivers/vfio/pci/hisilicon/Kconfig" source "drivers/vfio/pci/hisilicon/Kconfig"
endif endmenu
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
config HISI_ACC_VFIO_PCI config HISI_ACC_VFIO_PCI
tristate "VFIO PCI support for HiSilicon ACC devices" tristate "VFIO support for HiSilicon ACC PCI devices"
depends on ARM64 || (COMPILE_TEST && 64BIT) depends on ARM64 || (COMPILE_TEST && 64BIT)
depends on VFIO_PCI_CORE
depends on PCI_MSI depends on PCI_MSI
depends on CRYPTO_DEV_HISI_QM depends on CRYPTO_DEV_HISI_QM
depends on CRYPTO_DEV_HISI_HPRE depends on CRYPTO_DEV_HISI_HPRE
depends on CRYPTO_DEV_HISI_SEC2 depends on CRYPTO_DEV_HISI_SEC2
depends on CRYPTO_DEV_HISI_ZIP depends on CRYPTO_DEV_HISI_ZIP
select VFIO_PCI_CORE
help help
This provides generic PCI support for HiSilicon ACC devices This provides generic PCI support for HiSilicon ACC devices
using the VFIO framework. using the VFIO framework.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
config MLX5_VFIO_PCI config MLX5_VFIO_PCI
tristate "VFIO support for MLX5 PCI devices" tristate "VFIO support for MLX5 PCI devices"
depends on MLX5_CORE depends on MLX5_CORE
depends on VFIO_PCI_CORE select VFIO_PCI_CORE
help help
This provides migration support for MLX5 devices using the VFIO This provides migration support for MLX5 devices using the VFIO
framework. framework.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment