Displaying 20 results from an estimated 143 matches for "signalled_used_valid".
2011 Jun 21
1
[PATCH 1/2] vhost: init used ring after backend was set
...}
-static int init_used(struct vhost_virtqueue *vq,
- struct vring_used __user *used)
+int init_used(struct vhost_virtqueue *vq)
{
- int r = put_user(vq->used_flags, &used->flags);
+ int r = put_user(vq->used_flags, &vq->used->flags);
if (r)
return r;
vq->signalled_used_valid = false;
- return get_user(vq->last_used_idx, &used->idx);
+ return get_user(vq->last_used_idx, &vq->used->idx);
}
static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp)
@@ -701,10 +700,6 @@ static long vhost_set_vring(struct vhost_dev *d, int ioct...
2011 Jun 21
1
[PATCH 1/2] vhost: init used ring after backend was set
...}
-static int init_used(struct vhost_virtqueue *vq,
- struct vring_used __user *used)
+int init_used(struct vhost_virtqueue *vq)
{
- int r = put_user(vq->used_flags, &used->flags);
+ int r = put_user(vq->used_flags, &vq->used->flags);
if (r)
return r;
vq->signalled_used_valid = false;
- return get_user(vq->last_used_idx, &used->idx);
+ return get_user(vq->last_used_idx, &vq->used->idx);
}
static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp)
@@ -701,10 +700,6 @@ static long vhost_set_vring(struct vhost_dev *d, int ioct...
2018 Mar 30
1
[RFC PATCH V2 8/8] vhost: event suppression for packed ring
...ptor Ring Change Event Wrap Counter */
} desc; /* If desc_event_flags set to RING_EVENT_FLAGS_DESC */
le16 {
desc_event_flags : 2, /* Descriptor Ring Change Event Flags */
reserved : 14; /* Reserved, set to 0 */
} flags;
};
> +
> +
> + old = vq->signalled_used;
> + v = vq->signalled_used_valid;
> + new = vq->signalled_used = vq->last_used_idx;
> + vq->signalled_used_valid = true;
> +
> + if (unlikely(!v))
> + return true;
> +
> + return vhost_vring_packed_need_event(vq, new, old, off) &&
> + wrap == vq->used_wrap_counter;
> +}
> +...
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
I see nice performance improvements: e.g. from 12 to 18 Gbit/s host
to guest with netperf, but did not spend a lot of time testing
performance. I hope others will try this out and report.
Note: there
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
I see nice performance improvements: e.g. from 12 to 18 Gbit/s host
to guest with netperf, but did not spend a lot of time testing
performance. I hope others will try this out and report.
Note: there
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...ile,
> + * used index might wrap around. If that happens, invalidate
> + * signalled_used index we stored. TODO: make sure driver
> + * signals at least once in 2^16 and remove this.
> + */
> + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old)))
> + vq->signalled_used_valid = false;
> +
> + /* Make sure buffer is written before we update index. */
> + smp_wmb();
> + if (vhost_put_user(vq, cpu_to_vhost16(vq, vq->last_used_idx),
> + &vq->used->idx)) {
> + vq_err(vq, "Failed to increment used idx");
> + return -EFAULT;
&...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...ile,
> + * used index might wrap around. If that happens, invalidate
> + * signalled_used index we stored. TODO: make sure driver
> + * signals at least once in 2^16 and remove this.
> + */
> + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old)))
> + vq->signalled_used_valid = false;
> +
> + /* Make sure buffer is written before we update index. */
> + smp_wmb();
> + if (vhost_put_user(vq, cpu_to_vhost16(vq, vq->last_used_idx),
> + &vq->used->idx)) {
> + vq_err(vq, "Failed to increment used idx");
> + return -EFAULT;
&...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...vdev->vq[i].vring.avail = 0;
> vdev->vq[i].vring.used = 0;
> vdev->vq[i].last_avail_idx = 0;
> - vdev->vq[i].pa = 0;
> vdev->vq[i].vector = VIRTIO_NO_VECTOR;
> vdev->vq[i].signalled_used = 0;
> vdev->vq[i].signalled_used_valid = false;
> @@ -708,13 +709,21 @@ void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data)
>
> void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr)
> {
> - vdev->vq[n].pa = addr;
> - virtqueue_init(&vdev->vq[n]);
> + vdev-&...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...vdev->vq[i].vring.avail = 0;
> vdev->vq[i].vring.used = 0;
> vdev->vq[i].last_avail_idx = 0;
> - vdev->vq[i].pa = 0;
> vdev->vq[i].vector = VIRTIO_NO_VECTOR;
> vdev->vq[i].signalled_used = 0;
> vdev->vq[i].signalled_used_valid = false;
> @@ -708,13 +709,21 @@ void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data)
>
> void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr)
> {
> - vdev->vq[n].pa = addr;
> - virtqueue_init(&vdev->vq[n]);
> + vdev-&...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200
"Michael S. Tsirkin" <mst at redhat.com> wrote:
> On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote:
> > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num)
> > {
> > + /*
> > + * For virtio-1 devices, the number of buffers may only be
> > + * updated if the ring addresses have
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200
"Michael S. Tsirkin" <mst at redhat.com> wrote:
> On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote:
> > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num)
> > {
> > + /*
> > + * For virtio-1 devices, the number of buffers may only be
> > + * updated if the ring addresses have
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
If you see issues or are just curious, you can
turn the new feature off. For example:
-global virtio-net-pci.event_idx=on
-global virtio-blk-pci.event_idx=off
Also, it's possible to try both
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I
sent earlier. It supercedes the PUBLISH_USED_IDX patches
I sent out earlier.
Support is added in both userspace and vhost-net.
If you see issues or are just curious, you can
turn the new feature off. For example:
-global virtio-net-pci.event_idx=on
-global virtio-blk-pci.event_idx=off
Also, it's possible to try both
2014 Dec 03
1
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...ign = qemu_get_be32(f);
> > > }
> > > - vdev->vq[i].pa = qemu_get_be64(f);
> > > + vdev->vq[i].vring.desc = qemu_get_be64(f);
> > > qemu_get_be16s(f, &vdev->vq[i].last_avail_idx);
> > > vdev->vq[i].signalled_used_valid = false;
> > > vdev->vq[i].notification = true;
> > >
> > > - if (vdev->vq[i].pa) {
> > > - virtqueue_init(&vdev->vq[i]);
> > > + if (vdev->vq[i].vring.desc) {
> > > + /* XXX virtio-...
2014 Dec 03
1
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...ign = qemu_get_be32(f);
> > > }
> > > - vdev->vq[i].pa = qemu_get_be64(f);
> > > + vdev->vq[i].vring.desc = qemu_get_be64(f);
> > > qemu_get_be16s(f, &vdev->vq[i].last_avail_idx);
> > > vdev->vq[i].signalled_used_valid = false;
> > > vdev->vq[i].notification = true;
> > >
> > > - if (vdev->vq[i].pa) {
> > > - virtqueue_init(&vdev->vq[i]);
> > > + if (vdev->vq[i].vring.desc) {
> > > + /* XXX virtio-...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...tio_reset(void *opaque)
vdev->vq[i].vring.avail = 0;
vdev->vq[i].vring.used = 0;
vdev->vq[i].last_avail_idx = 0;
- vdev->vq[i].pa = 0;
vdev->vq[i].vector = VIRTIO_NO_VECTOR;
vdev->vq[i].signalled_used = 0;
vdev->vq[i].signalled_used_valid = false;
@@ -708,13 +709,21 @@ void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data)
void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr)
{
- vdev->vq[n].pa = addr;
- virtqueue_init(&vdev->vq[n]);
+ vdev->vq[n].vring.desc = addr;
+ vi...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...tio_reset(void *opaque)
vdev->vq[i].vring.avail = 0;
vdev->vq[i].vring.used = 0;
vdev->vq[i].last_avail_idx = 0;
- vdev->vq[i].pa = 0;
vdev->vq[i].vector = VIRTIO_NO_VECTOR;
vdev->vq[i].signalled_used = 0;
vdev->vq[i].signalled_used_valid = false;
@@ -708,13 +709,21 @@ void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data)
void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr)
{
- vdev->vq[n].pa = addr;
- virtqueue_init(&vdev->vq[n]);
+ vdev->vq[n].vring.desc = addr;
+ vi...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...urn 0;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_log_write);
> > >
> > > static int vhost_update_used_flags(struct vhost_virtqueue *vq)
> > > {
> > > @@ -1013,6 +1034,7 @@ int vhost_init_used(struct vhost_virtqueue *vq)
> > > vq->signalled_used_valid = false;
> > > return get_user(vq->last_used_idx, &vq->used->idx);
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_init_used);
> > >
> > > static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len,
> > > struct iovec iov...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
...urn 0;
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_log_write);
> > >
> > > static int vhost_update_used_flags(struct vhost_virtqueue *vq)
> > > {
> > > @@ -1013,6 +1034,7 @@ int vhost_init_used(struct vhost_virtqueue *vq)
> > > vq->signalled_used_valid = false;
> > > return get_user(vq->last_used_idx, &vq->used->idx);
> > > }
> > > +EXPORT_SYMBOL_GPL(vhost_init_used);
> > >
> > > static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len,
> > > struct iovec iov...
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...tio_reset(void *opaque)
vdev->vq[i].vring.avail = 0;
vdev->vq[i].vring.used = 0;
vdev->vq[i].last_avail_idx = 0;
- vdev->vq[i].pa = 0;
vdev->vq[i].vector = VIRTIO_NO_VECTOR;
vdev->vq[i].signalled_used = 0;
vdev->vq[i].signalled_used_valid = false;
@@ -708,13 +709,21 @@ void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data)
void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr)
{
- vdev->vq[n].pa = addr;
- virtqueue_init(&vdev->vq[n]);
+ vdev->vq[n].vring.desc = addr;
+ vi...