]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
vfio/pci: remove CONFIG_VFIO_PCI_ZDEV from Kconfig
authorMax Gurtovoy <mgurtovoy@nvidia.com>
Thu, 18 Feb 2021 10:44:35 +0000 (10:44 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 19 Feb 2021 17:29:56 +0000 (10:29 -0700)
In case we're running on s390 system always expose the capabilities for
configuration of zPCI devices. In case we're running on different
platform, continue as usual.

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/Kconfig
drivers/vfio/pci/Makefile
drivers/vfio/pci/vfio_pci.c
drivers/vfio/pci/vfio_pci_private.h

index 40a223381ab61d6a787b6153a699ae45d15d2bb3..ac3c1dd3edeff119e6108b15259da040d760a3a9 100644 (file)
@@ -45,15 +45,3 @@ config VFIO_PCI_NVLINK2
        depends on VFIO_PCI && PPC_POWERNV
        help
          VFIO PCI support for P9 Witherspoon machine with NVIDIA V100 GPUs
-
-config VFIO_PCI_ZDEV
-       bool "VFIO PCI ZPCI device CLP support"
-       depends on VFIO_PCI && S390
-       default y
-       help
-         Enabling this option exposes VFIO capabilities containing hardware
-         configuration for zPCI devices. This enables userspace (e.g. QEMU)
-         to supply proper configuration values instead of hard-coded defaults
-         for zPCI devices passed through via VFIO on s390.
-
-         Say Y here.
index 781e0809d6eeefa6dd6f8b228dc5b2a4971133f4..eff97a7cd9f139c5b8deee84defcf294ab1aaaff 100644 (file)
@@ -3,6 +3,6 @@
 vfio-pci-y := vfio_pci.o vfio_pci_intrs.o vfio_pci_rdwr.o vfio_pci_config.o
 vfio-pci-$(CONFIG_VFIO_PCI_IGD) += vfio_pci_igd.o
 vfio-pci-$(CONFIG_VFIO_PCI_NVLINK2) += vfio_pci_nvlink2.o
-vfio-pci-$(CONFIG_VFIO_PCI_ZDEV) += vfio_pci_zdev.o
+vfio-pci-$(CONFIG_S390) += vfio_pci_zdev.o
 
 obj-$(CONFIG_VFIO_PCI) += vfio-pci.o
index 706de3ef94bbffc02073feba3f47bcad0c412662..65e7e6b44578c29b3297225096f6bca07ea1cdc9 100644 (file)
@@ -807,6 +807,7 @@ static long vfio_pci_ioctl(void *device_data,
                struct vfio_device_info info;
                struct vfio_info_cap caps = { .buf = NULL, .size = 0 };
                unsigned long capsz;
+               int ret;
 
                minsz = offsetofend(struct vfio_device_info, num_irqs);
 
@@ -832,13 +833,10 @@ static long vfio_pci_ioctl(void *device_data,
                info.num_regions = VFIO_PCI_NUM_REGIONS + vdev->num_regions;
                info.num_irqs = VFIO_PCI_NUM_IRQS;
 
-               if (IS_ENABLED(CONFIG_VFIO_PCI_ZDEV)) {
-                       int ret = vfio_pci_info_zdev_add_caps(vdev, &caps);
-
-                       if (ret && ret != -ENODEV) {
-                               pci_warn(vdev->pdev, "Failed to setup zPCI info capabilities\n");
-                               return ret;
-                       }
+               ret = vfio_pci_info_zdev_add_caps(vdev, &caps);
+               if (ret && ret != -ENODEV) {
+                       pci_warn(vdev->pdev, "Failed to setup zPCI info capabilities\n");
+                       return ret;
                }
 
                if (caps.size) {
index 5c90e560c5c73b73776c67d37cce38dc36d100a2..9cd1882a05af691988de0f12f4bcb108b15eb28a 100644 (file)
@@ -214,7 +214,7 @@ static inline int vfio_pci_ibm_npu2_init(struct vfio_pci_device *vdev)
 }
 #endif
 
-#ifdef CONFIG_VFIO_PCI_ZDEV
+#ifdef CONFIG_S390
 extern int vfio_pci_info_zdev_add_caps(struct vfio_pci_device *vdev,
                                       struct vfio_info_cap *caps);
 #else