search for: a67bda9792ec

Displaying 19 results from an estimated 19 matches for "a67bda9792ec".

2020 Jun 04
1
[PATCH RFC 07/13] vhost: format-independent API for used buffers
On 2020/6/4 ??5:03, Michael S. Tsirkin wrote: >>> static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) >>> { >>> __u16 old, new; >>> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h >>> index a67bda9792ec..6c10e99ff334 100644 >>> --- a/drivers/vhost/vhost.h >>> +++ b/drivers/vhost/vhost.h >>> @@ -67,6 +67,13 @@ struct vhost_desc { >>> u16 id; >>> }; >>> +struct vhost_buf { >>> + u32 out_len; >>> + u32 in_len; >>>...
2020 Apr 06
2
[PATCH] vhost: force spec specified alignment on types
...hacks). I will push this into next now. Comments? drivers/vhost/vhost.h | 6 ++--- include/uapi/linux/virtio_ring.h | 41 ++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index cc82918158d2..a67bda9792ec 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -74,9 +74,9 @@ struct vhost_virtqueue { /* The actual ring of buffers. */ struct mutex mutex; unsigned int num; - struct vring_desc __user *desc; - struct vring_avail __user *avail; - struct vring_used __user *used; + vring_des...
2020 Apr 06
2
[PATCH] vhost: force spec specified alignment on types
...hacks). I will push this into next now. Comments? drivers/vhost/vhost.h | 6 ++--- include/uapi/linux/virtio_ring.h | 41 ++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index cc82918158d2..a67bda9792ec 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -74,9 +74,9 @@ struct vhost_virtqueue { /* The actual ring of buffers. */ struct mutex mutex; unsigned int num; - struct vring_desc __user *desc; - struct vring_avail __user *avail; - struct vring_used __user *used; + vring_des...
2020 Apr 06
2
[PATCH] vhost: force spec specified alignment on types
...drivers/vhost/vhost.h | 6 ++--- > > include/uapi/linux/virtio_ring.h | 41 ++++++++++++++++++++++++-------- > > 2 files changed, 34 insertions(+), 13 deletions(-) > > > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > > index cc82918158d2..a67bda9792ec 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -74,9 +74,9 @@ struct vhost_virtqueue { > > /* The actual ring of buffers. */ > > struct mutex mutex; > > unsigned int num; > > - struct vring_desc __user *desc; > &gt...
2020 Apr 06
2
[PATCH] vhost: force spec specified alignment on types
...drivers/vhost/vhost.h | 6 ++--- > > include/uapi/linux/virtio_ring.h | 41 ++++++++++++++++++++++++-------- > > 2 files changed, 34 insertions(+), 13 deletions(-) > > > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > > index cc82918158d2..a67bda9792ec 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -74,9 +74,9 @@ struct vhost_virtqueue { > > /* The actual ring of buffers. */ > > struct mutex mutex; > > unsigned int num; > > - struct vring_desc __user *desc; > &gt...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...rn vhost_add_used_n(vq, vq->heads, count); > +} > +EXPORT_SYMBOL_GPL(vhost_put_used_n_bufs); > + > static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > { > __u16 old, new; > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index a67bda9792ec..6c10e99ff334 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -67,6 +67,13 @@ struct vhost_desc { > u16 id; > }; > > +struct vhost_buf { > + u32 out_len; > + u32 in_len; > + u16 descs; > + u16 id; > +}; So it looks to me the stru...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...rn vhost_add_used_n(vq, vq->heads, count); > +} > +EXPORT_SYMBOL_GPL(vhost_put_used_n_bufs); > + > static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > { > __u16 old, new; > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index a67bda9792ec..6c10e99ff334 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -67,6 +67,13 @@ struct vhost_desc { > u16 id; > }; > > +struct vhost_buf { > + u32 out_len; > + u32 in_len; > + u16 descs; > + u16 id; > +}; So it looks to me the stru...
2020 Apr 06
0
[PATCH v2 2/2] vhost: force spec specified alignment on types
...86. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/vhost/vhost.h | 6 +++--- include/linux/virtio_ring.h | 24 +++++++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index cc82918158d2..a67bda9792ec 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -74,9 +74,9 @@ struct vhost_virtqueue { /* The actual ring of buffers. */ struct mutex mutex; unsigned int num; - struct vring_desc __user *desc; - struct vring_avail __user *avail; - struct vring_used __user *used; + vring_des...
2020 Apr 06
0
[PATCH] vhost: force spec specified alignment on types
...rs? Thanks > > drivers/vhost/vhost.h | 6 ++--- > include/uapi/linux/virtio_ring.h | 41 ++++++++++++++++++++++++-------- > 2 files changed, 34 insertions(+), 13 deletions(-) > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index cc82918158d2..a67bda9792ec 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -74,9 +74,9 @@ struct vhost_virtqueue { > /* The actual ring of buffers. */ > struct mutex mutex; > unsigned int num; > - struct vring_desc __user *desc; > - struct vring_avail __user *avail; &g...
2020 Jun 03
2
[PATCH RFC 03/13] vhost: batching fetches
...for (i = vq->first_desc; i < vq->ndescs; ++i) > + if (!(vq->descs[i].flags & VRING_DESC_F_NEXT)) > + vhost_discard_vq_desc(vq, 1); > vq->ndescs = 0; > > return ret; > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 76356edee8e5..a67bda9792ec 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -81,6 +81,7 @@ struct vhost_virtqueue { > > struct vhost_desc *descs; > int ndescs; > + int first_desc; > int max_descs; > > struct file *kick; > @@ -229,7 +230,7 @@ void vhost...
2020 Jun 03
2
[PATCH RFC 03/13] vhost: batching fetches
...for (i = vq->first_desc; i < vq->ndescs; ++i) > + if (!(vq->descs[i].flags & VRING_DESC_F_NEXT)) > + vhost_discard_vq_desc(vq, 1); > vq->ndescs = 0; > > return ret; > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 76356edee8e5..a67bda9792ec 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -81,6 +81,7 @@ struct vhost_virtqueue { > > struct vhost_desc *descs; > int ndescs; > + int first_desc; > int max_descs; > > struct file *kick; > @@ -229,7 +230,7 @@ void vhost...
2020 Apr 06
0
[PATCH] vhost: force spec specified alignment on types
...ost.h | 6 ++--- >>> include/uapi/linux/virtio_ring.h | 41 ++++++++++++++++++++++++-------- >>> 2 files changed, 34 insertions(+), 13 deletions(-) >>> >>> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h >>> index cc82918158d2..a67bda9792ec 100644 >>> --- a/drivers/vhost/vhost.h >>> +++ b/drivers/vhost/vhost.h >>> @@ -74,9 +74,9 @@ struct vhost_virtqueue { >>> /* The actual ring of buffers. */ >>> struct mutex mutex; >>> unsigned int num; >>> - struct vring_des...
2020 Apr 07
0
[PATCH v7 19/19] vhost: batching fetches
...rr: - vhost_discard_vq_desc(vq, 1); + for (i = vq->first_desc; i < vq->ndescs; ++i) + if (!(vq->descs[i].flags & VRING_DESC_F_NEXT)) + vhost_discard_vq_desc(vq, 1); vq->ndescs = 0; return ret; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 76356edee8e5..a67bda9792ec 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -81,6 +81,7 @@ struct vhost_virtqueue { struct vhost_desc *descs; int ndescs; + int first_desc; int max_descs; struct file *kick; @@ -229,7 +230,7 @@ void vhost_iotlb_map_free(struct vhost_iotlb *iotlb, struct vhost...
2020 Apr 07
0
[PATCH v8 19/19] vhost: batching fetches
...rr: - vhost_discard_vq_desc(vq, 1); + for (i = vq->first_desc; i < vq->ndescs; ++i) + if (!(vq->descs[i].flags & VRING_DESC_F_NEXT)) + vhost_discard_vq_desc(vq, 1); vq->ndescs = 0; return ret; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 76356edee8e5..a67bda9792ec 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -81,6 +81,7 @@ struct vhost_virtqueue { struct vhost_desc *descs; int ndescs; + int first_desc; int max_descs; struct file *kick; @@ -229,7 +230,7 @@ void vhost_iotlb_map_free(struct vhost_iotlb *iotlb, struct vhost...
2020 Jun 02
0
[PATCH RFC 03/13] vhost: batching fetches
...rr: - vhost_discard_vq_desc(vq, 1); + for (i = vq->first_desc; i < vq->ndescs; ++i) + if (!(vq->descs[i].flags & VRING_DESC_F_NEXT)) + vhost_discard_vq_desc(vq, 1); vq->ndescs = 0; return ret; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 76356edee8e5..a67bda9792ec 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -81,6 +81,7 @@ struct vhost_virtqueue { struct vhost_desc *descs; int ndescs; + int first_desc; int max_descs; struct file *kick; @@ -229,7 +230,7 @@ void vhost_iotlb_map_free(struct vhost_iotlb *iotlb, struct vhost...
2020 Jun 02
0
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...o_vhost32(vq, bufs[i].in_len); + } + + return vhost_add_used_n(vq, vq->heads, count); +} +EXPORT_SYMBOL_GPL(vhost_put_used_n_bufs); + static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) { __u16 old, new; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index a67bda9792ec..6c10e99ff334 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -67,6 +67,13 @@ struct vhost_desc { u16 id; }; +struct vhost_buf { + u32 out_len; + u32 in_len; + u16 descs; + u16 id; +}; + /* The virtqueue structure describes a queue attached to a device. */ struct vhost_virt...
2020 Jun 04
0
[PATCH RFC 03/13] vhost: batching fetches
...desc; i < vq->ndescs; ++i) > > + if (!(vq->descs[i].flags & VRING_DESC_F_NEXT)) > > + vhost_discard_vq_desc(vq, 1); > > vq->ndescs = 0; > > return ret; > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > > index 76356edee8e5..a67bda9792ec 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -81,6 +81,7 @@ struct vhost_virtqueue { > > struct vhost_desc *descs; > > int ndescs; > > + int first_desc; > > int max_descs; > > struct file *kick; > > @...
2020 Jun 04
0
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...unt); > > +} > > +EXPORT_SYMBOL_GPL(vhost_put_used_n_bufs); > > + > > static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > { > > __u16 old, new; > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > > index a67bda9792ec..6c10e99ff334 100644 > > --- a/drivers/vhost/vhost.h > > +++ b/drivers/vhost/vhost.h > > @@ -67,6 +67,13 @@ struct vhost_desc { > > u16 id; > > }; > > +struct vhost_buf { > > + u32 out_len; > > + u32 in_len; > > + u16 descs; > > + u16...
2020 Jun 02
21
[PATCH RFC 00/13] vhost: format independence
We let the specifics of the ring format seep through to vhost API callers - mostly because there was only one format so it was hard to imagine what an independent API would look like. Now that there's an alternative in form of the packed ring, it's easier to see the issues, and fixing them is perhaps the cleanest way to add support for more formats. This patchset does this by indtroducing