Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ

Define dummy MSI related APIs in VFIO CDX driver to build the
driver without enabling CONFIG_GENERIC_MSI_IRQ flag.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508070308.opy5dIFX-lkp@intel.com/
Reviewed-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Link: https://lore.kernel.org/r/20250826043852.2206008-2-nipun.gupta@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

authored by

Nipun Gupta and committed by
Alex Williamson
9f3acb3d ab1d8dda

+19 -1
+5 -1
drivers/vfio/cdx/Makefile
··· 5 5 6 6 obj-$(CONFIG_VFIO_CDX) += vfio-cdx.o 7 7 8 - vfio-cdx-objs := main.o intr.o 8 + vfio-cdx-objs := main.o 9 + 10 + ifdef CONFIG_GENERIC_MSI_IRQ 11 + vfio-cdx-objs += intr.o 12 + endif
+14
drivers/vfio/cdx/private.h
··· 38 38 u8 config_msi; 39 39 }; 40 40 41 + #ifdef CONFIG_GENERIC_MSI_IRQ 41 42 int vfio_cdx_set_irqs_ioctl(struct vfio_cdx_device *vdev, 42 43 u32 flags, unsigned int index, 43 44 unsigned int start, unsigned int count, 44 45 void *data); 45 46 46 47 void vfio_cdx_irqs_cleanup(struct vfio_cdx_device *vdev); 48 + #else 49 + static int vfio_cdx_set_irqs_ioctl(struct vfio_cdx_device *vdev, 50 + u32 flags, unsigned int index, 51 + unsigned int start, unsigned int count, 52 + void *data) 53 + { 54 + return -EINVAL; 55 + } 56 + 57 + static void vfio_cdx_irqs_cleanup(struct vfio_cdx_device *vdev) 58 + { 59 + } 60 + #endif 47 61 48 62 #endif /* VFIO_CDX_PRIVATE_H */