From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV6C2-0006qi-8G for qemu-devel@nongnu.org; Mon, 28 Nov 2011 13:44:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RV6C1-0000Ks-2j for qemu-devel@nongnu.org; Mon, 28 Nov 2011 13:44:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV6C0-0000Kc-Ry for qemu-devel@nongnu.org; Mon, 28 Nov 2011 13:44:41 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pASIidPo022999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 28 Nov 2011 13:44:39 -0500 Date: Mon, 28 Nov 2011 20:46:17 +0200 From: "Michael S. Tsirkin" Message-ID: <20111128184617.GC13778@redhat.com> References: <1322138308-31040-1-git-send-email-pbonzini@redhat.com> <1322138308-31040-5-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1322138308-31040-5-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/9] virtio-9p: remove PCI dependencies from hw/9pfs/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Thu, Nov 24, 2011 at 01:38:23PM +0100, Paolo Bonzini wrote: > Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistency > with the corresponding .c file. > > Signed-off-by: Paolo Bonzini > --- ... > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c > index d5cdc04..78c1790 100644 > --- a/hw/virtio-pci.c > +++ b/hw/virtio-pci.c > @@ -779,6 +779,21 @@ static int virtio_balloon_exit_pci(PCIDevice *pci_dev) > return virtio_exit_pci(pci_dev); > } > > +#ifdef CONFIG_LINUX > +static int virtio_9p_init_pci(PCIDevice *pci_dev) > +{ > + VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); > + VirtIODevice *vdev; > + > + vdev = virtio_9p_init(&pci_dev->qdev, &proxy->fsconf); > + vdev->nvectors = proxy->nvectors; > + virtio_init_pci(proxy, vdev); > + /* make the actual value visible */ > + proxy->nvectors = vdev->nvectors; > + return 0; > +} > +#endif > + This ifdef looks wrong to me - is there no way 9p can thinkably work on non-linux hosts? If yes, we should have a separate config entry for 9p, configure script can make it conditional on linux host. -- MST