16 Dec, 2014

3 commits


09 Dec, 2014

1 commit

  • It seemed like a good idea to use bitmap for features
    in struct virtio_device, but it's actually a pain,
    and seems to become even more painful when we get more
    than 32 feature bits. Just change it to a u32 for now.

    Based on patch by Rusty.

    Suggested-by: David Hildenbrand
    Signed-off-by: Rusty Russell
    Signed-off-by: Cornelia Huck
    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Cornelia Huck

    Michael S. Tsirkin
     

29 Oct, 2013

1 commit

  • Currently a host kick error is silently ignored and not reflected in
    the virtqueue of a particular virtio device.

    Changing the notify API for guest->host notification seems to be one
    prerequisite in order to be able to handle such errors in the context
    where the kick is triggered.

    This patch changes the notify API. The notify function must return a
    bool return value. It returns false if the host notification failed.

    Signed-off-by: Heinz Graalfs
    Signed-off-by: Rusty Russell

    Heinz Graalfs
     

20 Mar, 2013

3 commits

  • Make the rest of the paths use virtqueue_add_sgs or add_outbuf.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • As expected, the simplified accessors are faster.

    for i in `seq 50`; do /usr/bin/time -f 'Wall time:%e' ./vringh_test --indirect --eventidx --parallel --fast-vringh; done 2>&1 | stats --trim-outliers:

    Before:
    Using CPUS 0 and 3
    Guest: notified 0, pinged 39062-39063(39063)
    Host: notified 39062-39063(39063), pinged 0
    Wall time:1.760000-2.220000(1.789167)

    After:
    Using CPUS 0 and 3
    Guest: notified 0, pinged 39037-39063(39062)
    Host: notified 39037-39063(39062), pinged 0
    Wall time:1.640000-1.810000(1.676875)

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • This is mainly to test the drivers/vhost/vringh.c code, but it also
    uses the drivers/virtio/virtio_ring.c code for the guest side.

    Usage for testing the basic implementation:

    ./vringh_test
    # Test with indirect descriptors
    ./vringh_test --indirect
    # Test with indirect descriptors and event indexex
    ./vringh_test --indirect --eventidx

    You can run a parallel stress test by adding --parallel to any of the
    above options.

    eg ./vringh_test --parallel:
    Using CPUS 0 and 3
    Guest: notified 10107974, pinged 107970
    Host: notified 108158, pinged 3172148

    ./vringh_test --indirect --eventidx --parallel:
    Using CPUS 0 and 3
    Guest: notified 156357, pinged 156251
    Host: notified 156251, pinged 78179

    Average of 50 times doing ./vringh_test --indirect --eventidx --parallel:
    2.840000-3.040000(2.927292)user

    Signed-off-by: Rusty Russell

    Rusty Russell