Re: [PATCH V4 06/13] vfio/pci: Split the pci_driver code out of vfio_pci_core.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 25, 2021 at 04:51:32PM +0300, Yishai Hadas wrote:
> From: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
> 
> Split the vfio_pci driver into two logical parts, the 'struct
> pci_driver' (vfio_pci.c) which implements "Generic VFIO support for any
> PCI device" and a library of code (vfio_pci_core.c) that helps
> implementing a struct vfio_device on top of a PCI device.
> 
> vfio_pci.ko continues to present the same interface under sysfs and this
> change should have no functional impact.
> 
> Following patches will turn vfio_pci and vfio_pci_core into a separate
> module.
> 
> This is a preparation for allowing another module to provide the
> pci_driver and allow that module to customize how VFIO is setup, inject
> its own operations, and easily extend vendor specific functionality.
> 
> At this point the vfio_pci_core still contains a lot of vfio_pci
> functionality mixed into it. Following patches will move more of the large
> scale items out, but another cleanup series will be needed to get
> everything.
> 
> Signed-off-by: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxx>
> ---
>  drivers/vfio/pci/Makefile        |   2 +-
>  drivers/vfio/pci/vfio_pci.c      | 223 +++++++++++++++++++++++++
>  drivers/vfio/pci/vfio_pci_core.c | 271 +++++++------------------------
>  drivers/vfio/pci/vfio_pci_core.h |  23 +++
>  4 files changed, 304 insertions(+), 215 deletions(-)
>  create mode 100644 drivers/vfio/pci/vfio_pci.c
> 
> diff --git a/drivers/vfio/pci/Makefile b/drivers/vfio/pci/Makefile
> index 66a40488e967..8aa517b4b671 100644
> --- a/drivers/vfio/pci/Makefile
> +++ b/drivers/vfio/pci/Makefile
> @@ -1,6 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  
> -vfio-pci-y := vfio_pci_core.o vfio_pci_intrs.o vfio_pci_rdwr.o vfio_pci_config.o
> +vfio-pci-y := vfio_pci.o vfio_pci_core.o vfio_pci_intrs.o vfio_pci_rdwr.o vfio_pci_config.o

Please avoid the overly long line.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux