From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752329AbcBLSSB (ORCPT ); Fri, 12 Feb 2016 13:18:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52906 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbcBLSR7 (ORCPT ); Fri, 12 Feb 2016 13:17:59 -0500 Date: Fri, 12 Feb 2016 11:17:58 -0700 From: Alex Williamson To: Luis Henriques Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, "linux-pci@vger.kernel.org" Subject: Re: [PATCH] vfio: fix link failures when CONFIG_PCI_MSI is disabled Message-ID: <20160212111758.4b5cb926@t450s.home> In-Reply-To: <20160203205108.GA9181@charon.olymp> References: <20160203205108.GA9181@charon.olymp> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Feb 2016 20:51:08 +0000 Luis Henriques wrote: > The following link failure occurs when CONFIG_PCI_MSI is not set: > > drivers/built-in.o: In function `vfio_msi_set_vector_signal': > :(.text+0x626640): undefined reference to `pci_write_msi_msg' > > Signed-off-by: Luis Henriques > --- > drivers/vfio/pci/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig > index 02912f180c6d..b9dbfc9aeee1 100644 > --- a/drivers/vfio/pci/Kconfig > +++ b/drivers/vfio/pci/Kconfig > @@ -1,6 +1,6 @@ > config VFIO_PCI > tristate "VFIO support for PCI devices" > - depends on VFIO && PCI && EVENTFD > + depends on VFIO && PCI_MSI && EVENTFD > select VFIO_VIRQFD > select IRQ_BYPASS_MANAGER > help > It seems like a better solution would be to have pci stub these out with static inlines when !CONFIG_PCI_MSI, we already do that for quite a lot of MSI and MSI-X callbacks. MSI/X on the device clearly won't work if the host doesn't support MSI, and maybe there are improvements to be made there, but MSI is a subcomponent of vfio-pci, the module itself shouldn't depend on MSI. Thanks, Alex