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: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 4/9] virtio-9p: remove PCI dependencies from hw/9pfs/
Date: Mon, 28 Nov 2011 20:46:17 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> ---

...

> 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



reply via email to

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