linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfio: cdx: Fix missing GENERIC_MSI_IRQ on compile test
@ 2025-07-17  9:10 Krzysztof Kozlowski
  2025-07-17 19:40 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-17  9:10 UTC (permalink / raw)
  To: Nipun Gupta, Nikhil Agarwal, Alex Williamson,
	Pieter Jansen van Vuuren, kvm, linux-kernel
  Cc: Krzysztof Kozlowski, Randy Dunlap, stable

VFIO_CDX driver uses msi_domain_alloc_irqs() which is provided by
non-user-visible GENERIC_MSI_IRQ, thus it should select that option
directly.

VFIO_CDX depends on CDX_BUS, which also will select GENERIC_MSI_IRQ
(separate fix), nevertheless driver should poll what is being used there
instead of relying on bus Kconfig.

Without the fix on CDX_BUS compile test fails:

  drivers/vfio/cdx/intr.c: In function ‘vfio_cdx_msi_enable’:
  drivers/vfio/cdx/intr.c:41:15: error: implicit declaration of function ‘msi_domain_alloc_irqs’;
    did you mean ‘irq_domain_alloc_irqs’? [-Wimplicit-function-declaration]

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/r/4a6fd102-f8e0-42f3-b789-6e3340897032@infradead.org/
Fixes: 848e447e000c ("vfio/cdx: add interrupt support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/vfio/cdx/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/vfio/cdx/Kconfig b/drivers/vfio/cdx/Kconfig
index e6de0a0caa32..90cf3dee5dba 100644
--- a/drivers/vfio/cdx/Kconfig
+++ b/drivers/vfio/cdx/Kconfig
@@ -9,6 +9,7 @@ config VFIO_CDX
 	tristate "VFIO support for CDX bus devices"
 	depends on CDX_BUS
 	select EVENTFD
+	select GENERIC_MSI_IRQ
 	help
 	  Driver to enable VFIO support for the devices on CDX bus.
 	  This is required to make use of CDX devices present in
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vfio: cdx: Fix missing GENERIC_MSI_IRQ on compile test
  2025-07-17  9:10 [PATCH] vfio: cdx: Fix missing GENERIC_MSI_IRQ on compile test Krzysztof Kozlowski
@ 2025-07-17 19:40 ` Alex Williamson
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2025-07-17 19:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Nipun Gupta, Nikhil Agarwal, Pieter Jansen van Vuuren, kvm,
	linux-kernel, Randy Dunlap, stable

On Thu, 17 Jul 2025 11:10:54 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> VFIO_CDX driver uses msi_domain_alloc_irqs() which is provided by
> non-user-visible GENERIC_MSI_IRQ, thus it should select that option
> directly.
> 
> VFIO_CDX depends on CDX_BUS, which also will select GENERIC_MSI_IRQ
> (separate fix), nevertheless driver should poll what is being used there
> instead of relying on bus Kconfig.

This seems like a recipe for an explosion of Kconfig noise.  If the bus
fundamentally depends on a config option, as proposed in the separate
fix, I don't see that a driver dependent on that bus needs to duplicate
the config selections.  IMO this is sufficiently fixed updating
drivers/cdx/{Kconfig,Makefile}.  Thanks,

Alex
 
> Without the fix on CDX_BUS compile test fails:
> 
>   drivers/vfio/cdx/intr.c: In function ‘vfio_cdx_msi_enable’:
>   drivers/vfio/cdx/intr.c:41:15: error: implicit declaration of function ‘msi_domain_alloc_irqs’;
>     did you mean ‘irq_domain_alloc_irqs’? [-Wimplicit-function-declaration]
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Closes: https://lore.kernel.org/r/4a6fd102-f8e0-42f3-b789-6e3340897032@infradead.org/
> Fixes: 848e447e000c ("vfio/cdx: add interrupt support")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  drivers/vfio/cdx/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/vfio/cdx/Kconfig b/drivers/vfio/cdx/Kconfig
> index e6de0a0caa32..90cf3dee5dba 100644
> --- a/drivers/vfio/cdx/Kconfig
> +++ b/drivers/vfio/cdx/Kconfig
> @@ -9,6 +9,7 @@ config VFIO_CDX
>  	tristate "VFIO support for CDX bus devices"
>  	depends on CDX_BUS
>  	select EVENTFD
> +	select GENERIC_MSI_IRQ
>  	help
>  	  Driver to enable VFIO support for the devices on CDX bus.
>  	  This is required to make use of CDX devices present in


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-17 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17  9:10 [PATCH] vfio: cdx: Fix missing GENERIC_MSI_IRQ on compile test Krzysztof Kozlowski
2025-07-17 19:40 ` Alex Williamson

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).