[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210201162828.5938-9-mgurtovoy@nvidia.com>
Date: Mon, 1 Feb 2021 16:28:27 +0000
From: Max Gurtovoy <mgurtovoy@...dia.com>
To: <jgg@...dia.com>, <cohuck@...hat.com>, <kvm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <alex.williamson@...hat.com>
CC: <liranl@...dia.com>, <oren@...dia.com>, <tzahio@...dia.com>,
<leonro@...dia.com>, <yarong@...dia.com>, <aviadye@...dia.com>,
<shahafs@...dia.com>, <artemp@...dia.com>, <kwankhede@...dia.com>,
<ACurrid@...dia.com>, <gmataev@...dia.com>, <cjia@...dia.com>,
<mjrosato@...ux.ibm.com>, <yishaih@...dia.com>, <aik@...abs.ru>,
Max Gurtovoy <mgurtovoy@...dia.com>
Subject: [PATCH 8/9] vfio/pci: use x86 naming instead of igd
This patch doesn't change any logic but only align to the concept of
vfio_pci_core extensions. Extensions that are related to a platform
and not to a specific vendor of PCI devices should be part of the core
driver. Extensions that are specific for PCI device vendor should go
to a dedicated vendor vfio-pci driver.
For now, x86 extensions will include only igd.
Signed-off-by: Max Gurtovoy <mgurtovoy@...dia.com>
---
drivers/vfio/pci/Kconfig | 13 ++++++-------
drivers/vfio/pci/Makefile | 2 +-
drivers/vfio/pci/vfio_pci_core.c | 2 +-
drivers/vfio/pci/vfio_pci_private.h | 2 +-
drivers/vfio/pci/{vfio_pci_igd.c => vfio_pci_x86.c} | 0
5 files changed, 9 insertions(+), 10 deletions(-)
rename drivers/vfio/pci/{vfio_pci_igd.c => vfio_pci_x86.c} (100%)
diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
index 6e6c976b9512..c98f2df01a60 100644
--- a/drivers/vfio/pci/Kconfig
+++ b/drivers/vfio/pci/Kconfig
@@ -36,17 +36,16 @@ config VFIO_PCI_INTX
depends on VFIO_PCI_CORE
def_bool y if !S390
-config VFIO_PCI_IGD
- bool "VFIO PCI extensions for Intel graphics (GVT-d)"
+config VFIO_PCI_X86
+ bool "VFIO PCI extensions for Intel X86 platform"
depends on VFIO_PCI_CORE && X86
default y
help
- Support for Intel IGD specific extensions to enable direct
- assignment to virtual machines. This includes exposing an IGD
- specific firmware table and read-only copies of the host bridge
- and LPC bridge config space.
+ Support for Intel X86 specific extensions for VFIO PCI devices.
+ This includes exposing an IGD specific firmware table and
+ read-only copies of the host bridge and LPC bridge config space.
- To enable Intel IGD assignment through vfio-pci, say Y.
+ To enable Intel X86 extensions for vfio-pci-core, say Y.
config VFIO_PCI_NVLINK2
def_bool y
diff --git a/drivers/vfio/pci/Makefile b/drivers/vfio/pci/Makefile
index 90962a495eba..d8ccb70e015a 100644
--- a/drivers/vfio/pci/Makefile
+++ b/drivers/vfio/pci/Makefile
@@ -5,7 +5,7 @@ obj-$(CONFIG_VFIO_PCI) += vfio-pci.o
obj-$(CONFIG_MLX5_VFIO_PCI) += mlx5-vfio-pci.o
vfio-pci-core-y := vfio_pci_core.o vfio_pci_intrs.o vfio_pci_rdwr.o vfio_pci_config.o
-vfio-pci-core-$(CONFIG_VFIO_PCI_IGD) += vfio_pci_igd.o
+vfio-pci-core-$(CONFIG_VFIO_PCI_X86) += vfio_pci_x86.o
vfio-pci-core-$(CONFIG_VFIO_PCI_NVLINK2) += vfio_pci_nvlink2.o
vfio-pci-core-$(CONFIG_VFIO_PCI_ZDEV) += vfio_pci_s390.o
diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
index c559027def2d..e0e258c37fb5 100644
--- a/drivers/vfio/pci/vfio_pci_core.c
+++ b/drivers/vfio/pci/vfio_pci_core.c
@@ -328,7 +328,7 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev)
if (vfio_pci_is_vga(pdev) &&
pdev->vendor == PCI_VENDOR_ID_INTEL &&
- IS_ENABLED(CONFIG_VFIO_PCI_IGD)) {
+ IS_ENABLED(CONFIG_VFIO_PCI_X86)) {
ret = vfio_pci_igd_init(vdev);
if (ret && ret != -ENODEV) {
pci_warn(pdev, "Failed to setup Intel IGD regions\n");
diff --git a/drivers/vfio/pci/vfio_pci_private.h b/drivers/vfio/pci/vfio_pci_private.h
index 7c3c2cd575f8..efc688525784 100644
--- a/drivers/vfio/pci/vfio_pci_private.h
+++ b/drivers/vfio/pci/vfio_pci_private.h
@@ -165,7 +165,7 @@ extern u16 vfio_pci_memory_lock_and_enable(struct vfio_pci_device *vdev);
extern void vfio_pci_memory_unlock_and_restore(struct vfio_pci_device *vdev,
u16 cmd);
-#ifdef CONFIG_VFIO_PCI_IGD
+#ifdef CONFIG_VFIO_PCI_X86
extern int vfio_pci_igd_init(struct vfio_pci_device *vdev);
#else
static inline int vfio_pci_igd_init(struct vfio_pci_device *vdev)
diff --git a/drivers/vfio/pci/vfio_pci_igd.c b/drivers/vfio/pci/vfio_pci_x86.c
similarity index 100%
rename from drivers/vfio/pci/vfio_pci_igd.c
rename to drivers/vfio/pci/vfio_pci_x86.c
--
2.25.4
Powered by blists - more mailing lists