Received: from eggs.gnu.org ([2001:4830:134:3::10]:43699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjNsQ-0007R5-Vi for qemu-devel@nongnu.org; Tue, 06 Oct 2015 04:45:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjNsM-0004aR-3s for qemu-devel@nongnu.org; Tue, 06 Oct 2015 04:45:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjNsL-0004aE-V7 for qemu-devel@nongnu.org; Tue, 06 Oct 2015 04:45:34 -0400 From: Markus Armbruster References: <1443806441-23519-1-git-send-email-armbru@redhat.com> <87612l95e1.fsf@blackfin.pond.sub.org> <874mi55jgi.fsf@blackfin.pond.sub.org> <5612CF13.8020505@redhat.com> <87612k35yf.fsf@blackfin.pond.sub.org> Date: Tue, 06 Oct 2015 10:45:31 +0200 In-Reply-To: (Peter Maydell's message of "Tue, 6 Oct 2015 09:05:54 +0100") Message-ID: <87d1wsqtas.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PULL 00/10] Fix device introspection regressions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , QEMU Developers Peter Maydell writes: > On 6 October 2015 at 06:46, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> On 5 October 2015 at 20:27, Paolo Bonzini wrote: >>>> >>>> >>>> On 05/10/2015 20:46, Peter Maydell wrote: >>>>> The easy fix is to have some suitable ifdeffery in virtio-pci.c, >>>>> similar to how we only register the virtio_9p_pci and virtio_scsi_pci >>>> >>>> (vhost_scsi_pci) >>>> >>>>> types if they've been configured into this build. >>>> >>>> Hmm, actually there's no reason to limit >>>> >>>> common-obj-$(CONFIG_VIRTIO) += virtio-input.o >>>> common-obj-$(CONFIG_VIRTIO) += virtio-input-hid.o >>>> >>>> to CONFIG_LINUX. Does it work to extract them out of the if (which is >>>> only correct for virtio-input-host.o)? >>> >>> Yes, though as you predicted we then fall over on virtio-input-host-pci. >>> If I bodge that one out in virtio-pci.c then the device-introspect-test >>> passes. >> >> Does this do the trick? If yes, I'll fill out the commit message and >> post it properly. > > This is what I tested, yes, but... > >> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c >> index eda8205..23f131b 100644 >> --- a/hw/virtio/virtio-pci.c >> +++ b/hw/virtio/virtio-pci.c >> @@ -2228,7 +2228,9 @@ static void virtio_pci_register_types(void) >> type_register_static(&virtio_keyboard_pci_info); >> type_register_static(&virtio_mouse_pci_info); >> type_register_static(&virtio_tablet_pci_info); >> +#ifdef CONFIG_LINUX >> type_register_static(&virtio_host_pci_info); >> +#endif >> type_register_static(&virtio_pci_bus_info); >> type_register_static(&virtio_pci_info); >> #ifdef CONFIG_VIRTFS > > ...this will get you warnings about unused variables/data -- you > need to #ifdef out the definition of virtio_host_pci_info and > all the static functions it references too. I'll finish the job and post for real. Thanks!