qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/9] virtio-9p: remove PCI dependencies from hw/


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 4/9] virtio-9p: remove PCI dependencies from hw/9pfs/
Date: Sun, 01 Jan 2012 22:45:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]