search for: vq_info

Displaying 20 results from an estimated 55 matches for "vq_info".

Did you mean: ve_info
2020 Apr 16
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...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); > assert(r >= 0); > + if (!reset_n) { > + next_reset = INT_MAX; > + } > + > for (;;) { >...
2020 Apr 17
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...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); > > > assert(r >= 0); > > &...
2017 Apr 29
1
[PATCH] tools/virtio: fix spelling mistake: "wakeus" -> "wakeups"
...2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 76d6f583c249..0fecaec90d0d 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -202,7 +202,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, test = 0; r = ioctl(dev->control, VHOST_TEST_RUN, &test); assert(r >= 0); - fprintf(stderr, "spurious wakeus: 0x%llx\n", spurious); + fprintf(stderr, "spurious wakeups: 0x%llx\n", spurious); } const char optstring[] = "h"; -- 2.11.0
2017 Apr 29
1
[PATCH] tools/virtio: fix spelling mistake: "wakeus" -> "wakeups"
...2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 76d6f583c249..0fecaec90d0d 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -202,7 +202,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, test = 0; r = ioctl(dev->control, VHOST_TEST_RUN, &test); assert(r >= 0); - fprintf(stderr, "spurious wakeus: 0x%llx\n", spurious); + fprintf(stderr, "spurious wakeups: 0x%llx\n", spurious); } const char optstring[] = "h"; -- 2.11.0
2020 Apr 02
0
[PATCH v4 7/7] tools/virtio: Make --reset reset ring idx
...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->num_free = vq->vring.num; > + > + // Put everything in free lists. > + for (i = 0; i < vq->v...
2010 Nov 16
1
[PATCH RFC] tools/virtio: virtio_ring testing tool
...rt.h> +#include <unistd.h> +#include <sys/ioctl.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <fcntl.h> +#include <linux/vhost.h> +#include <linux/virtio.h> +#include <linux/virtio_ring.h> +#include <vhost_null/null.h> + +struct vq_info { + int kick; + int call; + int num; + int 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...
2010 Nov 16
1
[PATCH RFC] tools/virtio: virtio_ring testing tool
...rt.h> +#include <unistd.h> +#include <sys/ioctl.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <fcntl.h> +#include <linux/vhost.h> +#include <linux/virtio.h> +#include <linux/virtio_ring.h> +#include <vhost_null/null.h> + +struct vq_info { + int kick; + int call; + int num; + int 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...
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
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
2013 Oct 24
0
[PATCH V2 RFC 1/9] virtio_ring: change host notification API
...| 13 +++++++++---- 10 files changed, 32 insertions(+), 15 deletions(-) diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index b3256ff..1275f18 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -229,7 +229,7 @@ struct lguest_vq_info { * make a hypercall. We hand the physical address of the virtqueue so the Host * knows which virtqueue we're talking about. */ -static void lg_notify(struct virtqueue *vq) +static int lg_notify(struct virtqueue *vq) { /* * We store our virtqueue information in the "priv"...
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
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 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...gacy_init(&ring, ring_size, p, 0x1000); guest.avail_idx = 0; guest.kicked_avail_idx = -1; diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 93d81cd64ba0..3f1e4e43a615 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -32,7 +32,7 @@ struct vq_info { int idx; void *ring; /* copy used for control */ - struct vring vring; + struct vring_s vring; struct virtqueue *vq; }; diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c index 293653463303..d26dc6530bd4 100644 --- a/tools/virtio/vringh_test.c +++ b/tools/virtio/vring...
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...gacy_init(&ring, ring_size, p, 0x1000); guest.avail_idx = 0; guest.kicked_avail_idx = -1; diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 93d81cd64ba0..3f1e4e43a615 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -32,7 +32,7 @@ struct vq_info { int idx; void *ring; /* copy used for control */ - struct vring vring; + struct vring_s vring; struct virtqueue *vq; }; diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c index 293653463303..d26dc6530bd4 100644 --- a/tools/virtio/vringh_test.c +++ b/tools/virtio/vring...
2014 Oct 07
0
[PATCH RFC 01/11] virtio: use u32, not bitmap for struct virtio_device's features
...->features) + ((dev)->features & (1 << feature)) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr = { .index = info-&g...
2014 Nov 24
0
[PATCH v3 01/41] virtio: use u32, not bitmap for struct virtio_device's features
...atures); + vdev->features &= ~(1 << i); } } } diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr = { .index = info-&g...