From: Nipun Gupta <nipun.gupta@amd.com>
To: <arnd@arndb.de>, <gregkh@linuxfoundation.org>,
<alex.williamson@redhat.com>, <nikhil.agarwal@amd.com>,
<kvm@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <llvm@lists.linux.dev>,
<oe-kbuild-all@lists.linux.dev>, <robin.murphy@arm.com>,
<krzk@kernel.org>, <tglx@linutronix.de>, <maz@kernel.org>,
<linux@weissschuh.net>, <chenqiuji666@gmail.com>,
<peterz@infradead.org>, <robh@kernel.org>,
<abhijit.gangurde@amd.com>, <nathan@kernel.org>,
Nipun Gupta <nipun.gupta@amd.com>,
kernel test robot <lkp@intel.com>
Subject: [PATCH v4 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
Date: Tue, 26 Aug 2025 10:08:52 +0530 [thread overview]
Message-ID: <20250826043852.2206008-2-nipun.gupta@amd.com> (raw)
In-Reply-To: <20250826043852.2206008-1-nipun.gupta@amd.com>
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>
---
Changes v1->v2:
- fix linking intr.c file in Makefile
Changes v2->v3:
- return error from vfio_cdx_set_irqs_ioctl() when CONFIG_GENERIC_MSI_IRQ
is disabled
Changes v3->v4:
- changed the return value to -EINVAL from -ENODEV
drivers/vfio/cdx/Makefile | 6 +++++-
drivers/vfio/cdx/private.h | 14 ++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/cdx/Makefile b/drivers/vfio/cdx/Makefile
index df92b320122a..dadbef2419ea 100644
--- a/drivers/vfio/cdx/Makefile
+++ b/drivers/vfio/cdx/Makefile
@@ -5,4 +5,8 @@
obj-$(CONFIG_VFIO_CDX) += vfio-cdx.o
-vfio-cdx-objs := main.o intr.o
+vfio-cdx-objs := main.o
+
+ifdef CONFIG_GENERIC_MSI_IRQ
+vfio-cdx-objs += intr.o
+endif
diff --git a/drivers/vfio/cdx/private.h b/drivers/vfio/cdx/private.h
index dc56729b3114..5343eb61bec4 100644
--- a/drivers/vfio/cdx/private.h
+++ b/drivers/vfio/cdx/private.h
@@ -38,11 +38,25 @@ struct vfio_cdx_device {
u8 config_msi;
};
+#ifdef CONFIG_GENERIC_MSI_IRQ
int vfio_cdx_set_irqs_ioctl(struct vfio_cdx_device *vdev,
u32 flags, unsigned int index,
unsigned int start, unsigned int count,
void *data);
void vfio_cdx_irqs_cleanup(struct vfio_cdx_device *vdev);
+#else
+static int vfio_cdx_set_irqs_ioctl(struct vfio_cdx_device *vdev,
+ u32 flags, unsigned int index,
+ unsigned int start, unsigned int count,
+ void *data)
+{
+ return -EINVAL;
+}
+
+static void vfio_cdx_irqs_cleanup(struct vfio_cdx_device *vdev)
+{
+}
+#endif
#endif /* VFIO_CDX_PRIVATE_H */
--
2.34.1
next prev parent reply other threads:[~2025-08-26 4:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 4:38 [PATCH v4 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ Nipun Gupta
2025-08-26 4:38 ` Nipun Gupta [this message]
2025-08-26 16:24 ` [PATCH v4 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ Alex Williamson
2025-08-27 11:04 ` Gupta, Nipun
2025-08-27 18:55 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250826043852.2206008-2-nipun.gupta@amd.com \
--to=nipun.gupta@amd.com \
--cc=abhijit.gangurde@amd.com \
--cc=alex.williamson@redhat.com \
--cc=arnd@arndb.de \
--cc=chenqiuji666@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=krzk@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=nathan@kernel.org \
--cc=nikhil.agarwal@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).