Displaying 12 results from an estimated 12 matches for "vhost_disable_is_l".
Did you mean:
vhost_disable_is_le
2016 Jan 13
7
[PATCH 0/2] vhost: cross-endian code cleanup
This series is a respin of the following patch:
http://patchwork.ozlabs.org/patch/565921/
Patch 1 is preliminary work: it gives better names to the helpers that are
involved in cross-endian support.
Patch 2 is actually a v2 of the original patch. All devices now call a
helper in the generic code, which DTRT according to vq->private_data, as
suggested by Michael.
---
Greg Kurz (2):
2016 Jan 13
7
[PATCH 0/2] vhost: cross-endian code cleanup
This series is a respin of the following patch:
http://patchwork.ozlabs.org/patch/565921/
Patch 1 is preliminary work: it gives better names to the helpers that are
involved in cross-endian support.
Patch 2 is actually a v2 of the original patch. All devices now call a
helper in the generic code, which DTRT according to vq->private_data, as
suggested by Michael.
---
Greg Kurz (2):
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...-static void vhost_init_is_le(struct vhost_virtqueue *vq)
> +static void vhost_enable_is_le(struct vhost_virtqueue *vq)
> {
> if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
> vq->is_le = true;
> }
> #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
>
> +static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> +{
> + vq->is_le = virtio_legacy_is_little_endian();
> +}
> +
> static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> poll_table *pt)
> {
> @@ -276,8 +286,8 @@ static void vhost_vq_reset(struct vhost_dev *dev,
&g...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...-static void vhost_init_is_le(struct vhost_virtqueue *vq)
> +static void vhost_enable_is_le(struct vhost_virtqueue *vq)
> {
> if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
> vq->is_le = true;
> }
> #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
>
> +static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> +{
> + vq->is_le = virtio_legacy_is_little_endian();
> +}
> +
> static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> poll_table *pt)
> {
> @@ -276,8 +286,8 @@ static void vhost_vq_reset(struct vhost_dev *dev,
&g...
2016 Feb 10
2
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...host_init_used(&n->vqs[index]);
>
> mutex_unlock(&vq->mutex);
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index e02e06755ab7..b0a00340309e 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -123,6 +123,15 @@ static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> vq->is_le = virtio_legacy_is_little_endian();
> }
>
> +void vhost_adjust_vring_endian(struct vhost_virtqueue *vq)
> +{
> + if (!vq->private_data)
> + vhost_disable_is_le(vq);
> + else
> + vhost_enable_is_le(vq);
> +}
> +EX...
2016 Feb 10
2
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...host_init_used(&n->vqs[index]);
>
> mutex_unlock(&vq->mutex);
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index e02e06755ab7..b0a00340309e 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -123,6 +123,15 @@ static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> vq->is_le = virtio_legacy_is_little_endian();
> }
>
> +void vhost_adjust_vring_endian(struct vhost_virtqueue *vq)
> +{
> + if (!vq->private_data)
> + vhost_disable_is_le(vq);
> + else
> + vhost_enable_is_le(vq);
> +}
> +EX...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...c void vhost_enable_is_le(struct vhost_virtqueue *vq)
> > > {
> > > if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
> > > vq->is_le = true;
> > > }
> > > #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
> > >
> > > +static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> > > +{
> > > + vq->is_le = virtio_legacy_is_little_endian();
> > > +}
> > > +
> > > static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> > > poll_table *pt)
> > > {
> &g...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...c void vhost_enable_is_le(struct vhost_virtqueue *vq)
> > > {
> > > if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
> > > vq->is_le = true;
> > > }
> > > #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
> > >
> > > +static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> > > +{
> > > + vq->is_le = virtio_legacy_is_little_endian();
> > > +}
> > > +
> > > static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> > > poll_table *pt)
> > > {
> &g...
2016 Jan 13
0
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...adjust_vring_endian(vq);
+
r = vhost_init_used(&n->vqs[index]);
mutex_unlock(&vq->mutex);
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index e02e06755ab7..b0a00340309e 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -123,6 +123,15 @@ static void vhost_disable_is_le(struct vhost_virtqueue *vq)
vq->is_le = virtio_legacy_is_little_endian();
}
+void vhost_adjust_vring_endian(struct vhost_virtqueue *vq)
+{
+ if (!vq->private_data)
+ vhost_disable_is_le(vq);
+ else
+ vhost_enable_is_le(vq);
+}
+EXPORT_SYMBOL_GPL(vhost_adjust_vring_endian);
+
static v...
2016 Jan 13
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...vq, u32 idx,
return -ENOIOCTLCMD;
}
-static void vhost_init_is_le(struct vhost_virtqueue *vq)
+static void vhost_enable_is_le(struct vhost_virtqueue *vq)
{
if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
vq->is_le = true;
}
#endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
+static void vhost_disable_is_le(struct vhost_virtqueue *vq)
+{
+ vq->is_le = virtio_legacy_is_little_endian();
+}
+
static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
poll_table *pt)
{
@@ -276,8 +286,8 @@ static void vhost_vq_reset(struct vhost_dev *dev,
vq->call = NULL;
vq->log_ctx = N...
2016 Feb 10
0
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...]);
> >
> > mutex_unlock(&vq->mutex);
> > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > index e02e06755ab7..b0a00340309e 100644
> > --- a/drivers/vhost/vhost.c
> > +++ b/drivers/vhost/vhost.c
> > @@ -123,6 +123,15 @@ static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> > vq->is_le = virtio_legacy_is_little_endian();
> > }
> >
> > +void vhost_adjust_vring_endian(struct vhost_virtqueue *vq)
> > +{
> > + if (!vq->private_data)
> > + vhost_disable_is_le(vq);
> > + else
> >...
2016 Feb 10
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...ost_virtqueue *vq)
> > +static void vhost_enable_is_le(struct vhost_virtqueue *vq)
> > {
> > if (vhost_has_feature(vq, VIRTIO_F_VERSION_1))
> > vq->is_le = true;
> > }
> > #endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */
> >
> > +static void vhost_disable_is_le(struct vhost_virtqueue *vq)
> > +{
> > + vq->is_le = virtio_legacy_is_little_endian();
> > +}
> > +
> > static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
> > poll_table *pt)
> > {
> > @@ -276,8 +286,8 @@ static void...