Re: [PATCH 4/4] vfio: Fold vfio_virqfd.ko into vfio.ko

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

 



On Thu, 29 Sep 2022 12:04:58 -0300
Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:

> This is only 1.8k, putting it in its own module is going to waste more
> space rounding up to a PAGE_SIZE than it is worth. Put it in the main
> vfio.ko module now that kbuild can support multiple .c files.
> 
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> ---
>  drivers/vfio/Makefile    |  4 +---
>  drivers/vfio/vfio.h      |  3 +++
>  drivers/vfio/vfio_main.c |  7 +++++++
>  drivers/vfio/virqfd.c    | 16 ++--------------
>  4 files changed, 13 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
> index 50b8e8e3fb10dd..0721ed4831c92f 100644
> --- a/drivers/vfio/Makefile
> +++ b/drivers/vfio/Makefile
> @@ -1,13 +1,11 @@
>  # SPDX-License-Identifier: GPL-2.0
> -vfio_virqfd-y := virqfd.o
> -
>  obj-$(CONFIG_VFIO) += vfio.o
>  
>  vfio-y += vfio_main.o \
>  	  iova_bitmap.o \
>  	  container.o
> +vfio-$(CONFIG_VFIO_VIRQFD) += virqfd.o
>  
> -obj-$(CONFIG_VFIO_VIRQFD) += vfio_virqfd.o
>  obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
>  obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o
>  obj-$(CONFIG_VFIO_PCI) += pci/
> diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h
> index 4a1bac1359a952..038b5f5c8f163d 100644
> --- a/drivers/vfio/vfio.h
> +++ b/drivers/vfio/vfio.h
> @@ -125,6 +125,9 @@ long vfio_container_ioctl_check_extension(struct vfio_container *container,
>  int __init vfio_container_init(void);
>  void vfio_container_cleanup(void);
>  
> +int __init vfio_virqfd_init(void);
> +void vfio_virqfd_exit(void);

It's the specific bus drivers (pci & platform) that create the
dependency on virqfd, we need some stubs in the !IS_ENABLED case.
Thanks,

Alex




[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