search for: vhost_enable_is_l

Displaying 12 results from an estimated 12 matches for "vhost_enable_is_l".

Did you mean: vhost_enable_is_le
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...;user_be = s.num; > + vhost_enable_user_be(vq, !!s.num); > > return 0; > } > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > return 0; > } > > -static void vhost_init_is_le(struct vhost_virtqueue *vq) > +static void vhost_enable_is_le(struct vhost_virtqueue *vq) > { > /* Note for legacy virtio: user_be is initialized at reset time > * according to the host endianness. If userspace does not set an Same thing really. I'd rather add "reset_is_le". > @@ -91,7 +96,7 @@ static void vhost_init_is_le(s...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...;user_be = s.num; > + vhost_enable_user_be(vq, !!s.num); > > return 0; > } > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > return 0; > } > > -static void vhost_init_is_le(struct vhost_virtqueue *vq) > +static void vhost_enable_is_le(struct vhost_virtqueue *vq) > { > /* Note for legacy virtio: user_be is initialized at reset time > * according to the host endianness. If userspace does not set an Same thing really. I'd rather add "reset_is_le". > @@ -91,7 +96,7 @@ static void vhost_init_is_le(s...
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
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...; return 0; > > > } > > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > > > return 0; > > > } > > > > > > -static void vhost_init_is_le(struct vhost_virtqueue *vq) > > > +static void vhost_enable_is_le(struct vhost_virtqueue *vq) > > > { > > > /* Note for legacy virtio: user_be is initialized at reset time > > > * according to the host endianness. If userspace does not set an > > > > Same thing really. I'd rather add "reset_is_le". &g...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...; return 0; > > > } > > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > > > return 0; > > > } > > > > > > -static void vhost_init_is_le(struct vhost_virtqueue *vq) > > > +static void vhost_enable_is_le(struct vhost_virtqueue *vq) > > > { > > > /* Note for legacy virtio: user_be is initialized at reset time > > > * according to the host endianness. If userspace does not set an > > > > Same thing really. I'd rather add "reset_is_le". &g...
2016 Jan 13
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...ST_VRING_BIG_ENDIAN) return -EINVAL; - vq->user_be = s.num; + vhost_enable_user_be(vq, !!s.num); return 0; } @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, return 0; } -static void vhost_init_is_le(struct vhost_virtqueue *vq) +static void vhost_enable_is_le(struct vhost_virtqueue *vq) { /* Note for legacy virtio: user_be is initialized at reset time * according to the host endianness. If userspace does not set an @@ -91,7 +96,7 @@ static void vhost_init_is_le(struct vhost_virtqueue *vq) vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1)...
2016 Feb 10
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...(vq, !!s.num); > > > > return 0; > > } > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > > return 0; > > } > > > > -static void vhost_init_is_le(struct vhost_virtqueue *vq) > > +static void vhost_enable_is_le(struct vhost_virtqueue *vq) > > { > > /* Note for legacy virtio: user_be is initialized at reset time > > * according to the host endianness. If userspace does not set an > > Same thing really. I'd rather add "reset_is_le". > > > @@ -91,7 +9...
2016 Feb 10
2
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...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 void vhost_poll_func(struct file *file, wait_queue_head_t *wqh, > poll_table *pt) > { I'd prefer "vhost_update_is_le" here. "endian" might also mean "user_be". But...
2016 Feb 10
2
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...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 void vhost_poll_func(struct file *file, wait_queue_head_t *wqh, > poll_table *pt) > { I'd prefer "vhost_update_is_le" here. "endian" might also mean "user_be". But...
2016 Jan 13
0
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...ost.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 void vhost_poll_func(struct file *file, wait_queue_head_t *wqh, poll_table *pt) { @@ -1166,12 +1175,9 @@ int vhost_init_used(struct vhost_virtqueue *vq) { __virtio16 last_used_idx; int r; - if (!vq->private_data) { -...
2016 Feb 10
0
[PATCH 2/2] vhost: disentangle vring endianness stuff from the core code
...uct 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 void vhost_poll_func(struct file *file, wait_queue_head_t *wqh, > > poll_table *pt) > > { > > I'd prefer "vhost_update_is_le" here. "endian&quot...