Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfio/pci: introduce CONFIG_VFIO_PCI_ZDEV_KVM

The current contents of vfio-pci-zdev are today only useful in a KVM
environment; let's tie everything currently under vfio-pci-zdev to
this Kconfig statement and require KVM in this case, reducing complexity
(e.g. symbol lookups).

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Link: https://lore.kernel.org/r/20220606203325.110625-11-mjrosato@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>

authored by

Matthew Rosato and committed by
Christian Borntraeger
c435c546 d1038467

+13 -2
+11
drivers/vfio/pci/Kconfig
··· 44 44 To enable Intel IGD assignment through vfio-pci, say Y. 45 45 endif 46 46 47 + config VFIO_PCI_ZDEV_KVM 48 + bool "VFIO PCI extensions for s390x KVM passthrough" 49 + depends on S390 && KVM 50 + default y 51 + help 52 + Support s390x-specific extensions to enable support for enhancements 53 + to KVM passthrough capabilities, such as interpretive execution of 54 + zPCI instructions. 55 + 56 + To enable s390x KVM vfio-pci extensions, say Y. 57 + 47 58 source "drivers/vfio/pci/mlx5/Kconfig" 48 59 49 60 source "drivers/vfio/pci/hisilicon/Kconfig"
+1 -1
drivers/vfio/pci/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 3 vfio-pci-core-y := vfio_pci_core.o vfio_pci_intrs.o vfio_pci_rdwr.o vfio_pci_config.o 4 - vfio-pci-core-$(CONFIG_S390) += vfio_pci_zdev.o 4 + vfio-pci-core-$(CONFIG_VFIO_PCI_ZDEV_KVM) += vfio_pci_zdev.o 5 5 obj-$(CONFIG_VFIO_PCI_CORE) += vfio-pci-core.o 6 6 7 7 vfio-pci-y := vfio_pci.o
+1 -1
include/linux/vfio_pci_core.h
··· 206 206 } 207 207 #endif 208 208 209 - #ifdef CONFIG_S390 209 + #ifdef CONFIG_VFIO_PCI_ZDEV_KVM 210 210 extern int vfio_pci_info_zdev_add_caps(struct vfio_pci_core_device *vdev, 211 211 struct vfio_info_cap *caps); 212 212 #else