Displaying 20 results from an estimated 46 matches for "get_vring_base".
Did you mean:
set_vring_base
2018 Oct 15
2
[PATCH net-next V2 6/8] vhost: packed ring support
...vq->last_avail_idx;
>>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
>>> + vq->last_avail_wrap_counter = wrap_counter;
>>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter;
>>> + }
>>> break;
>>> case VHOST_GET_VRING_BASE:
>>> s.index = idx;
>>> s.num = vq->last_avail_idx;
>>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
>>> + s.num |= vq->last_avail_wrap_counter << 31;
>>> + if (copy_to_user(argp, &s, sizeof(s)))
>>> + r = -EF...
2018 Oct 15
2
[PATCH net-next V2 6/8] vhost: packed ring support
...vq->last_avail_idx;
>>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
>>> + vq->last_avail_wrap_counter = wrap_counter;
>>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter;
>>> + }
>>> break;
>>> case VHOST_GET_VRING_BASE:
>>> s.index = idx;
>>> s.num = vq->last_avail_idx;
>>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
>>> + s.num |= vq->last_avail_wrap_counter << 31;
>>> + if (copy_to_user(argp, &s, sizeof(s)))
>>> + r = -EF...
2019 Jul 17
0
[PATCH V3 00/15] Packed virtqueue support for vhost
....html#x1-610007
>
> This version were tested with:
> - zercopy/datacopy
> - mergeable buffer on/off
> - TCP stream & virtio-user
>
> Changes from V2:
> - rebase on top of vhost metadata accelreation series
> - introduce shadow used ring API
> - new SET_VRING_BASE/GET_VRING_BASE that takes care about warp counter
> and index for both avail and used
> - various twaeaks
>
> Changes from V1:
> - drop uapi patch and use Tiwei's
> - split the enablement of packed virtqueue into a separate patch
>
> Changes from RFC V5:
> - save unnecessary bar...
2018 Oct 15
1
[PATCH net-next V2 6/8] vhost: packed ring support
...(vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
>>>>> + vq->last_avail_wrap_counter = wrap_counter;
>>>>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter;
>>>>> + }
>>>>> break;
>>>>> case VHOST_GET_VRING_BASE:
>>>>> s.index = idx;
>>>>> s.num = vq->last_avail_idx;
>>>>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
>>>>> + s.num |= vq->last_avail_wrap_counter << 31;
>>>>> + if (copy_to_user(argp, &a...
2018 Jul 16
3
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...separate patch
>>
>> Changes from RFC V5:
>>
>> - save unnecessary barriers during vhost_add_used_packed_n()
>> - more compact math for event idx
>> - fix failure of SET_VRING_BASE when avail_wrap_counter is true
>> - fix not copy avail_wrap_counter during GET_VRING_BASE
>> - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx
>> - rename used_wrap_counter to last_used_wrap_counter
>> - rebase to net-next
>>
>> Changes from RFC V4:
>>
>> - fix signalled_used index recording
>> - track avail ind...
2018 Jul 16
3
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...separate patch
>>
>> Changes from RFC V5:
>>
>> - save unnecessary barriers during vhost_add_used_packed_n()
>> - more compact math for event idx
>> - fix failure of SET_VRING_BASE when avail_wrap_counter is true
>> - fix not copy avail_wrap_counter during GET_VRING_BASE
>> - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx
>> - rename used_wrap_counter to last_used_wrap_counter
>> - rebase to net-next
>>
>> Changes from RFC V4:
>>
>> - fix signalled_used index recording
>> - track avail ind...
2018 Oct 15
0
[PATCH net-next V2 6/8] vhost: packed ring support
...+ if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
> > > > + vq->last_avail_wrap_counter = wrap_counter;
> > > > + vq->avail_wrap_counter = vq->last_avail_wrap_counter;
> > > > + }
> > > > break;
> > > > case VHOST_GET_VRING_BASE:
> > > > s.index = idx;
> > > > s.num = vq->last_avail_idx;
> > > > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
> > > > + s.num |= vq->last_avail_wrap_counter << 31;
> > > > + if (copy_to_user(argp, &s, s...
2023 Feb 23
0
[PATCH v2 11/13] vdpa: block migration if dev does not have _F_SUSPEND
...s elegant.
I meant the caller of vhost_vdpa_init() which is net_init_vhost_vdpa().
Thanks
>
> If the parent device does not need to be suspended i'd go with
> exposing a suspend ioctl but do nothing in the parent device. After
> that, it could even choose to return an error for GET_VRING_BASE.
>
> If we want to implement it as a fallback in qemu, I'd go for
> implementing it on top of this series. There are a few operations we
> could move to a device-kind specific ops.
>
> Would it make sense to you?
>
> Thanks!
>
>
>> Thanks
>>
>>
&g...
2018 Jul 16
0
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...of packed virtqueue into a separate patch
>
> Changes from RFC V5:
>
> - save unnecessary barriers during vhost_add_used_packed_n()
> - more compact math for event idx
> - fix failure of SET_VRING_BASE when avail_wrap_counter is true
> - fix not copy avail_wrap_counter during GET_VRING_BASE
> - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx
> - rename used_wrap_counter to last_used_wrap_counter
> - rebase to net-next
>
> Changes from RFC V4:
>
> - fix signalled_used index recording
> - track avail index correctly
> - various mi...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...nged(vdpa);
> + return 0;
> +}
> +
> +static int vhost_get_features(struct vhost_mdev *vdpa, u64 __user *featurep)
> +{
> + if (copy_to_user(featurep, &vdpa->features, sizeof(vdpa->features)))
> + return -EFAULT;
> + return 0;
> +}
> +
> +static int vhost_get_vring_base(struct vhost_mdev *vdpa, void __user *argp)
> +{
> + struct vhost_virtqueue *vq;
> + u32 idx;
> + int r;
> +
> + r = get_user(idx, (u32 __user *)argp);
> + if (r < 0)
> + return r;
> +
> + vq = &vdpa->vqs[idx];
> + vq->last_avail_idx = vdpa->ops->...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...nged(vdpa);
> + return 0;
> +}
> +
> +static int vhost_get_features(struct vhost_mdev *vdpa, u64 __user *featurep)
> +{
> + if (copy_to_user(featurep, &vdpa->features, sizeof(vdpa->features)))
> + return -EFAULT;
> + return 0;
> +}
> +
> +static int vhost_get_vring_base(struct vhost_mdev *vdpa, void __user *argp)
> +{
> + struct vhost_virtqueue *vq;
> + u32 idx;
> + int r;
> +
> + r = get_user(idx, (u32 __user *)argp);
> + if (r < 0)
> + return r;
> +
> + vq = &vdpa->vqs[idx];
> + vq->last_avail_idx = vdpa->ops->...
2019 Sep 25
0
[PATCH V2 0/8] mdev based hardware virtio offloading support
...evice specific ops (device_ops)
> - split device_ops into seperate headers
> - drop the mdev_set_dma_ops()
> - use device_ops to implement the transport API, then it's not a part
> of UAPI any more
> - use GFP_ATOMIC in mvnet sample device and other tweaks
> - set_vring_base/get_vring_base support for mvnet device
>
> Jason Wang (8):
> vringh: fix copy direction of vringh_iov_push_kern()
> mdev: class id support
> mdev: bus uevent support
> modpost: add support for mdev class id
> mdev: introduce device specific ops
> mdev: introduce virtio device...
2018 Jul 16
0
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...t; Changes from RFC V5:
> > >
> > > - save unnecessary barriers during vhost_add_used_packed_n()
> > > - more compact math for event idx
> > > - fix failure of SET_VRING_BASE when avail_wrap_counter is true
> > > - fix not copy avail_wrap_counter during GET_VRING_BASE
> > > - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx
> > > - rename used_wrap_counter to last_used_wrap_counter
> > > - rebase to net-next
> > >
> > > Changes from RFC V4:
> > >
> > > - fix signalled_use...
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
...cached index value. */
> vq->avail_idx = vq->last_avail_idx;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
> + vq->last_avail_wrap_counter = wrap_counter;
> + vq->avail_wrap_counter = vq->last_avail_wrap_counter;
> + }
> break;
> case VHOST_GET_VRING_BASE:
> s.index = idx;
> s.num = vq->last_avail_idx;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
> + s.num |= vq->last_avail_wrap_counter << 31;
> + if (copy_to_user(argp, &s, sizeof(s)))
> + r = -EFAULT;
> + break;
> + case VHOST_SET_VRING_U...
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
...cached index value. */
> vq->avail_idx = vq->last_avail_idx;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) {
> + vq->last_avail_wrap_counter = wrap_counter;
> + vq->avail_wrap_counter = vq->last_avail_wrap_counter;
> + }
> break;
> case VHOST_GET_VRING_BASE:
> s.index = idx;
> s.num = vq->last_avail_idx;
> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED))
> + s.num |= vq->last_avail_wrap_counter << 31;
> + if (copy_to_user(argp, &s, sizeof(s)))
> + r = -EFAULT;
> + break;
> + case VHOST_SET_VRING_U...
2018 Jul 17
1
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...s from RFC V5:
>>>>
>>>> - save unnecessary barriers during vhost_add_used_packed_n()
>>>> - more compact math for event idx
>>>> - fix failure of SET_VRING_BASE when avail_wrap_counter is true
>>>> - fix not copy avail_wrap_counter during GET_VRING_BASE
>>>> - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx
>>>> - rename used_wrap_counter to last_used_wrap_counter
>>>> - rebase to net-next
>>>>
>>>> Changes from RFC V4:
>>>>
>>>> - fix s...
2019 Sep 03
0
[RFC v3] vhost: introduce mdev based hardware vhost backend
...roduce an attribute in $UUID/ to tell the type.
>
>
> > + case VHOST_GET_FEATURES:
> > + ret = vhost_get_features(vdpa, argp);
> > + break;
> > + case VHOST_SET_FEATURES:
> > + ret = vhost_set_features(vdpa, argp);
> > + break;
> > + case VHOST_GET_VRING_BASE:
> > + ret = vhost_get_vring_base(vdpa, argp);
> > + break;
> > + default:
> > + ret = vhost_dev_ioctl(&vdpa->dev, cmd, argp);
> > + if (ret == -ENOIOCTLCMD)
> > + ret = vhost_vring_ioctl(&vdpa->dev, cmd, argp);
> > + }
> > +
>...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...ost_set_features(struct vhost_mdev *m, u64 __user *featurep)
+{
+ u64 features;
+
+ if (copy_from_user(&features, featurep, sizeof(features)))
+ return -EFAULT;
+
+ if (features & ~m->features)
+ return -EINVAL;
+
+ m->acked_features = features;
+
+ return 0;
+}
+
+static long vhost_get_vring_base(struct vhost_mdev *m, void __user *argp)
+{
+ struct vhost_virtqueue *vq;
+ u32 idx;
+ long r;
+
+ r = get_user(idx, (u32 __user *)argp);
+ if (r < 0)
+ return r;
+ if (idx >= m->nvqs)
+ return -ENOBUFS;
+
+ vq = &m->vqs[idx];
+
+ // XXX: we need to support get_vring_base
+ //vq-&...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...u64 features;
> +
> + if (copy_from_user(&features, featurep, sizeof(features)))
> + return -EFAULT;
> +
> + if (features & ~m->features)
> + return -EINVAL;
> +
> + m->acked_features = features;
> +
> + return 0;
> +}
> +
> +static long vhost_get_vring_base(struct vhost_mdev *m, void __user *argp)
> +{
> + struct vhost_virtqueue *vq;
> + u32 idx;
> + long r;
> +
> + r = get_user(idx, (u32 __user *)argp);
> + if (r < 0)
> + return r;
> + if (idx >= m->nvqs)
> + return -ENOBUFS;
> +
> + vq = &m->vqs[...
2019 Sep 20
8
[RFC PATCH V2 0/6] mdev based hardware virtio offloading support
...- add docs for class id and device specific ops (device_ops)
- split device_ops into seperate headers
- drop the mdev_set_dma_ops()
- use device_ops to implement the transport API, then it's not a part
of UAPI any more
- use GFP_ATOMIC in mvnet sample device and other tweaks
- set_vring_base/get_vring_base support for mvnet device
Jason Wang (6):
mdev: class id support
mdev: introduce device specific ops
mdev: introduce virtio device and its device ops
virtio: introudce a mdev based transport
vringh: fix copy direction of vringh_iov_push_kern()
docs: Sample driver to demonstrate how to i...