From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXTzE-0007Nn-68 for qemu-devel@nongnu.org; Tue, 18 Jul 2017 11:00:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXTzA-0003sV-VG for qemu-devel@nongnu.org; Tue, 18 Jul 2017 11:00:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34400) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dXTzA-0003s9-OS for qemu-devel@nongnu.org; Tue, 18 Jul 2017 11:00:28 -0400 References: <20170718142455.32676-1-cohuck@redhat.com> <20170718142455.32676-2-cohuck@redhat.com> From: Thomas Huth Message-ID: <77385052-7626-acdc-fa2b-8085e15f778d@redhat.com> Date: Tue, 18 Jul 2017 17:00:22 +0200 MIME-Version: 1.0 In-Reply-To: <20170718142455.32676-2-cohuck@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC v2 1/9] kvm: remove hard dependency on pci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, agraf@suse.de, pmorel@linux.vnet.ibm.com, zyimin@linux.vnet.ibm.com On 18.07.2017 16:24, Cornelia Huck wrote: > The msi routing code in kvm calls some pci functions: provide > some stubs to enable builds without pci. > > Fixes: e1d4fb2de ("kvm-irqchip: x86: add msi route notify fn") > Fixes: 767a554a0 ("kvm-all: Pass requester ID to MSI routing functions") > Signed-off-by: Cornelia Huck > --- > hw/pci/pci-stub.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c > index ecad664946..bc228ce91e 100644 > --- a/hw/pci/pci-stub.c > +++ b/hw/pci/pci-stub.c > @@ -23,6 +23,7 @@ > #include "monitor/monitor.h" > #include "qapi/qmp/qerror.h" > #include "hw/pci/pci.h" > +#include "hw/pci/msi.h" > #include "qmp-commands.h" > #include "hw/pci/msi.h" > > @@ -38,3 +39,14 @@ void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict) > { > monitor_printf(mon, "PCI devices not supported\n"); > } > + > +/* kvm-all wants this */ > +MSIMessage pci_get_msi_message(PCIDevice *dev, int vector) > +{ > + assert(false); > +} > + > +uint16_t pci_requester_id(PCIDevice *dev) > +{ > + assert(false); > +} > Would it be feasible to move the offending code from kvm-all.c into a new file called kvm-pci.c instead which then only gets compiled for CONFIG_PCI=y ? I think that would be a cleaner solution ... Thomas