Re: [PATCH 12/12] vfio/pci: Introduce vfio_pci_core.ko
From: Leon Romanovsky <leon@kernel.org>
Date: 2021-07-23 14:13:49
Also in:
kvm, linux-doc, linux-pci, linux-s390
On Thu, Jul 22, 2021 at 12:22:05PM +0300, Max Gurtovoy wrote:
On 7/22/2021 12:06 PM, Yishai Hadas wrote:quoted
On 7/21/2021 8:39 PM, Leon Romanovsky wrote:quoted
On Wed, Jul 21, 2021 at 07:16:09PM +0300, Yishai Hadas wrote:quoted
From: Max Gurtovoy <mgurtovoy@nvidia.com> Now that vfio_pci has been split into two source modules, one focusing on the "struct pci_driver" (vfio_pci.c) and a toolbox library of code (vfio_pci_core.c), complete the split and move them into two different kernel modules. As before vfio_pci.ko continues to present the same interface under sysfs and this change will have no functional impact. Splitting into another module and adding exports allows creating new HW specific VFIO PCI drivers that can implement device specific functionality, such as VFIO migration interfaces or specialized device requirements. Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com> --- drivers/vfio/pci/Kconfig | 30 ++++++++------ drivers/vfio/pci/Makefile | 8 ++-- drivers/vfio/pci/vfio_pci.c | 14 ++----- drivers/vfio/pci/vfio_pci_config.c | 2 +- drivers/vfio/pci/vfio_pci_core.c | 41 ++++++++++++++++--- drivers/vfio/pci/vfio_pci_igd.c | 2 +- drivers/vfio/pci/vfio_pci_intrs.c | 2 +- drivers/vfio/pci/vfio_pci_rdwr.c | 2 +- drivers/vfio/pci/vfio_pci_zdev.c | 2 +- .../pci => include/linux}/vfio_pci_core.h | 2 - 10 files changed, 66 insertions(+), 39 deletions(-) rename {drivers/vfio/pci => include/linux}/vfio_pci_core.h (99%)<...>quoted
-#include "vfio_pci_core.h" +#include <linux/vfio_pci_core.h> + +#define DRIVER_VERSION "0.2"<...>quoted
+MODULE_VERSION(DRIVER_VERSION);Please don't add driver versions to the upstream kernel, they useless. ThanksThis just preserves the code for driver/module version that was in vfio_pci.ko before the split. However, this can be removed in V2 if we may need to have.Right, we already agreed to preserve vfio_pci versioning scheme and we'll not add it to new mlx5_vfio_pci or future drivers.
There is nothing to preserve, instead of keeping this useless code, just delete it. https://lore.kernel.org/ksummit-discuss/CA+55aFx9A=5cc0QZ7CySC4F2K7eYaEfzkdYEc9JaNgCcV25=rg@mail.gmail.com/ Thanks
quoted
Yishai