From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhTDo-0005dM-N7 for qemu-devel@nongnu.org; Sun, 01 Jan 2012 16:45:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RhTDn-0006Cd-KI for qemu-devel@nongnu.org; Sun, 01 Jan 2012 16:45:40 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:44863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhTDn-0006CZ-AQ for qemu-devel@nongnu.org; Sun, 01 Jan 2012 16:45:39 -0500 Received: by eekb45 with SMTP id b45so17544971eek.4 for ; Sun, 01 Jan 2012 13:45:38 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F00D3FF.8070104@redhat.com> Date: Sun, 01 Jan 2012 22:45:35 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1322138308-31040-1-git-send-email-pbonzini@redhat.com> <1322138308-31040-5-git-send-email-pbonzini@redhat.com> <20111128184617.GC13778@redhat.com> <4ED49A13.9050200@redhat.com> <20111129131215.GD19157@redhat.com> In-Reply-To: <20111129131215.GD19157@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 11/29/2011 02:12 PM, Michael S. Tsirkin wrote: > On Tue, Nov 29, 2011 at 09:38:43AM +0100, Paolo Bonzini wrote: >> On 11/28/2011 07:46 PM, Michael S. Tsirkin wrote: >>>>> +#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. >> >> I think it was true in the beginning, but more recent versions >> should only depend on CONFIG_POSIX. I will set up FreeBSD and come >> back. >> >> Paolo > > It might be easier to add CONFIG_VIRTIO_9P. That won't hurt in any case. Actually CONFIG_VIRTFS exists already (Linux dependencies are mostly statfs and d_off in struct dirent, plus extended attributes which are checked separately). Will resend. Paolo