On Tue, Apr 22, 2008 at 4:15 PM, Anthony Liguori <[EMAIL PROTECTED]> wrote:
> This patch changes virtio devices to be multi-function devices whenever
>  possible.  This increases the number of virtio devices we can support now by
>  a factor of 8.
[...]
>  diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c
>  index 9100bb1..9ea14d3 100644
>  --- a/qemu/hw/virtio.c
>  +++ b/qemu/hw/virtio.c
>  @@ -405,9 +405,18 @@ VirtIODevice *virtio_init_pci(PCIBus *bus, const char 
> *name,
>      PCIDevice *pci_dev;
>      uint8_t *config;
>      uint32_t size;
>  +    static int devfn = 7;
>  +
>  +    if ((devfn % 8) == 7)
>  +       devfn = -1;
>  +    else
>  +       devfn++;

This code look strange... devfn should be passed to virtio_init_pci by
virtio-{net,blk} init functions, no?

Luca

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to