search for: vq_notify

Displaying 20 results from an estimated 33 matches for "vq_notify".

Did you mean: vp_notify
2020 Apr 16
0
[PATCH v2 5/8] tools/virtio: Use __vring_new_virtqueue in virtio_test.c
...nfo->ring, 0, vring_legacy_size(num, 4096)); > vring_legacy_init(&info->vring, num, info->ring, 4096); > - info->vq = vring_new_virtqueue(info->idx, > - info->vring.num, 4096, &dev->vdev, > - true, false, info->ring, > - vq_notify, vq_callback, "test"); > + info->vq = > + __vring_new_virtqueue(info->idx, info->vring, &dev->vdev, true, > + false, vq_notify, vq_callback, "test"); > assert(info->vq); > info->vq->priv = info; > vhost_vq_setup(dev, inf...
2013 Oct 24
0
[PATCH V2 RFC 1/9] virtio_ring: change host notification API
...name); void vring_del_virtqueue(struct virtqueue *vq); diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index da7a195..8e3e432 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -41,13 +41,14 @@ struct vdev_info { struct vhost_memory *mem; }; -void vq_notify(struct virtqueue *vq) +int vq_notify(struct virtqueue *vq) { struct vq_info *info = vq->priv; unsigned long long v = 1; int r; r = write(info->kick, &v, sizeof v); assert(r == sizeof v); + return 0; } void vq_callback(struct virtqueue *vq) diff --git a/tools/virtio/vringh_t...
2013 Oct 28
2
[PATCH V2 RFC 1/9] virtio_ring: change host notification API
Rusty, here is just patch 1 (using bool as return value in notify API). Thanks. Heinz Graalfs (9): virtio_ring: change host notification API virtio_ring: let virtqueue_{kick()/notify()} return a bool virtio_net: verify if virtqueue_kick() succeeded virtio_test: verify if virtqueue_kick() succeeded virtio_ring: add new function virtqueue_is_broken() virtio_blk: verify if queue is
2013 Oct 28
2
[PATCH V2 RFC 1/9] virtio_ring: change host notification API
Rusty, here is just patch 1 (using bool as return value in notify API). Thanks. Heinz Graalfs (9): virtio_ring: change host notification API virtio_ring: let virtqueue_{kick()/notify()} return a bool virtio_net: verify if virtqueue_kick() succeeded virtio_test: verify if virtqueue_kick() succeeded virtio_ring: add new function virtqueue_is_broken() virtio_blk: verify if queue is
2020 Apr 16
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...id *__kmalloc_fake, *__kfree_ignore_start, *__kfree_ignore_end; > @@ -49,6 +48,7 @@ struct vdev_info { > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > backend = { .fd = 1 }; > +static const struct vhost_vring_state null_state = {}; > > bool vq_notify(struct virtqueue *vq) > { > @@ -174,14 +174,19 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, > unsigned len; > long long spurious = 0; > const bool random_batch = batch == RANDOM_BATCH; > + > r = ioctl(dev->control, VHOST_TEST_RUN, &test); &...
2017 Apr 17
0
[PATCH] tools/virtio: fix build breakage
...id vq_info_add(struct vdev_info *dev, int num) vring_init(&info->vring, num, info->ring, 4096); info->vq = vring_new_virtqueue(info->idx, info->vring.num, 4096, &dev->vdev, - true, info->ring, + true, false, info->ring, vq_notify, vq_callback, "test"); assert(info->vq); info->vq->priv = info; diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c index 5f94f5105678..9476c616d064 100644 --- a/tools/virtio/vringh_test.c +++ b/tools/virtio/vringh_test.c @@ -314,7 +314,8 @@ static int parall...
2017 Apr 17
0
[PATCH] tools/virtio: fix build breakage
...id vq_info_add(struct vdev_info *dev, int num) vring_init(&info->vring, num, info->ring, 4096); info->vq = vring_new_virtqueue(info->idx, info->vring.num, 4096, &dev->vdev, - true, info->ring, + true, false, info->ring, vq_notify, vq_callback, "test"); assert(info->vq); info->vq->priv = info; diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c index 5f94f5105678..9476c616d064 100644 --- a/tools/virtio/vringh_test.c +++ b/tools/virtio/vringh_test.c @@ -314,7 +314,8 @@ static int parall...
2020 Apr 17
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...,7 @@ struct vdev_info { > > > > > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > > > backend = { .fd = 1 }; > > > +static const struct vhost_vring_state null_state = {}; > > > > > > bool vq_notify(struct virtqueue *vq) > > > { > > > @@ -174,14 +174,19 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, > > > unsigned len; > > > long long spurious = 0; > > > const bool random_batch = batch == RANDOM_BATCH; > &gt...
2020 Apr 02
0
[PATCH v4 7/7] tools/virtio: Make --reset reset ring idx
...ools/virtio/virtio_test.c > +++ b/tools/virtio/virtio_test.c > @@ -49,6 +49,7 @@ struct vdev_info { > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > backend = { .fd = 1 }; > +static const struct vhost_vring_state null_state = {}; > > bool vq_notify(struct virtqueue *vq) > { > @@ -218,10 +219,33 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, > } > > if (reset) { > + struct vhost_vring_state s = { .index = 0 }; > + int i; > + vq->vring.avail->idx = 0; > + vq->vq->...
2013 Feb 24
3
[PATCH dontapply 0/2] tools/virtio updates for API testing
Here's a patchset to update tools/virtio with changes in 3.8, as well as the proposed API extension. Useful to see whether the extra level of indirection adds measureable overhead. I will upstream at least patch 1 soon. Michael S. Tsirkin (2): tools/virtio: fix build for 3.8 tools/virtio: update for the new virtio API drivers/vhost/test.c | 4 +++- tools/virtio/Makefile
2013 Feb 24
3
[PATCH dontapply 0/2] tools/virtio updates for API testing
Here's a patchset to update tools/virtio with changes in 3.8, as well as the proposed API extension. Useful to see whether the extra level of indirection adds measureable overhead. I will upstream at least patch 1 soon. Michael S. Tsirkin (2): tools/virtio: fix build for 3.8 tools/virtio: update for the new virtio API drivers/vhost/test.c | 4 +++- tools/virtio/Makefile
2013 Oct 24
12
[PATCH V2 RFC 0/9] virtio: fix hang(loop) after hot-unplug vlan
Hi, this patch-set solves a hang situation when a vlan network device is hot-unplugged from a KVM guest. On System z there exists no handshake mechanism between host and guest when a device is hot-unplugged. The device is removed and no further I/O is possible. The guest is notified about the hard removal with a CRW machine check. As per architecture, the host must repond to any I/O operation
2013 Oct 24
12
[PATCH V2 RFC 0/9] virtio: fix hang(loop) after hot-unplug vlan
Hi, this patch-set solves a hang situation when a vlan network device is hot-unplugged from a KVM guest. On System z there exists no handshake mechanism between host and guest when a device is hot-unplugged. The device is removed and no further I/O is possible. The guest is notified about the hard removal with a CRW machine check. As per architecture, the host must repond to any I/O operation
2014 Feb 11
6
[PATCH 0/3] tools/virtio: build fixes for virtio_test
Recent changes to drivers/virtio broke compilation for the tests in tools/virtio. The following patches are build fixes for those changes, as well as a fix for a typo that would have never built. The changes were tested on my amd64 system against 3.14-rc2. Joel Stanley (3): tools/virtio: update internal copies of headers tools/virtio: fix missing kmemleak_ignore symbol tools/virtio: add a
2014 Feb 11
6
[PATCH 0/3] tools/virtio: build fixes for virtio_test
Recent changes to drivers/virtio broke compilation for the tests in tools/virtio. The following patches are build fixes for those changes, as well as a fix for a typo that would have never built. The changes were tested on my amd64 system against 3.14-rc2. Joel Stanley (3): tools/virtio: update internal copies of headers tools/virtio: fix missing kmemleak_ignore symbol tools/virtio: add a
2010 Nov 16
1
[PATCH RFC] tools/virtio: virtio_ring testing tool
...t idx; + void *ring; + /* copy used for control */ + struct vring vring; + struct virtqueue *vq; +}; + +struct vdev_info { + struct virtio_device vdev; + int control; + struct pollfd fds[1]; + struct vq_info vqs[1]; + int nvqs; + void *buf; + size_t buf_size; + struct vhost_memory *mem; +}; + +void vq_notify(struct virtqueue *vq) +{ + struct vq_info *info = vq->priv; + unsigned long long v = 1; + int r; + r = write(info->kick, &v, sizeof v); + assert(r == sizeof v); +} + +void vq_callback(struct virtqueue *vq) +{ +} + + +void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) +{ + st...
2010 Nov 16
1
[PATCH RFC] tools/virtio: virtio_ring testing tool
...t idx; + void *ring; + /* copy used for control */ + struct vring vring; + struct virtqueue *vq; +}; + +struct vdev_info { + struct virtio_device vdev; + int control; + struct pollfd fds[1]; + struct vq_info vqs[1]; + int nvqs; + void *buf; + size_t buf_size; + struct vhost_memory *mem; +}; + +void vq_notify(struct virtqueue *vq) +{ + struct vq_info *info = vq->priv; + unsigned long long v = 1; + int r; + r = write(info->kick, &v, sizeof v); + assert(r == sizeof v); +} + +void vq_callback(struct virtqueue *vq) +{ +} + + +void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) +{ + st...
2011 Dec 21
0
[PATCH] virtio: harsher barriers for virtio-mmio.
...ize(num, 4096)); vring_init(&info->vring, num, info->ring, 4096); - info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, info->ring, + info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, + true, info->ring, vq_notify, vq_callback, "test"); assert(info->vq); info->vq->priv = info;
2011 Dec 21
0
[PATCH] virtio: harsher barriers for virtio-mmio.
...ize(num, 4096)); vring_init(&info->vring, num, info->ring, 4096); - info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, info->ring, + info->vq = vring_new_virtqueue(info->vring.num, 4096, &dev->vdev, + true, info->ring, vq_notify, vq_callback, "test"); assert(info->vq); info->vq->priv = info;
2010 Nov 29
5
[PATCH 0/2] tools/virtio: virtio_ring testing tool
This implements a virtio simulator: - adds stubs for enough support functions to compile virtio ring in userspace. - Adds a stub vhost based module this can talk to. This should help us decide things like which ring layout works best. Communication is currently done using an eventfd descriptor. This means there's a shared spinlock there: what I would like to do in the future, is run