search for: reset_is_le

Displaying 14 results from an estimated 14 matches for "reset_is_le".

2017 Jan 27
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...a/drivers/vhost/vhost.c >> +++ b/drivers/vhost/vhost.c >> @@ -1714,10 +1714,8 @@ int vhost_vq_init_access(struct vhost_virtqueue *vq) >> int r; >> bool is_le = vq->is_le; >> >> - if (!vq->private_data) { >> - vhost_reset_is_le(vq); >> + if (!vq->private_data) >> return 0; >> - } >> >> vhost_init_is_le(vq); > > > I think you do need to reset it, just maybe within vhost_init_is_le. > > if (vhost_has_feature(vq, VIRTIO_F_VERSION_1...
2017 Jan 27
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...a/drivers/vhost/vhost.c >> +++ b/drivers/vhost/vhost.c >> @@ -1714,10 +1714,8 @@ int vhost_vq_init_access(struct vhost_virtqueue *vq) >> int r; >> bool is_le = vq->is_le; >> >> - if (!vq->private_data) { >> - vhost_reset_is_le(vq); >> + if (!vq->private_data) >> return 0; >> - } >> >> vhost_init_is_le(vq); > > > I think you do need to reset it, just maybe within vhost_init_is_le. > > if (vhost_has_feature(vq, VIRTIO_F_VERSION_1...
2017 Jan 29
1
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...c > > >> @@ -1714,10 +1714,8 @@ int vhost_vq_init_access(struct vhost_virtqueue *vq) > > >> int r; > > >> bool is_le = vq->is_le; > > >> > > >> - if (!vq->private_data) { > > >> - vhost_reset_is_le(vq); > > >> + if (!vq->private_data) > > >> return 0; > > >> - } > > >> > > >> vhost_init_is_le(vq); > > > > > > > > > I think you do need to reset it, just maybe within...
2017 Jan 29
1
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...c > > >> @@ -1714,10 +1714,8 @@ int vhost_vq_init_access(struct vhost_virtqueue *vq) > > >> int r; > > >> bool is_le = vq->is_le; > > >> > > >> - if (!vq->private_data) { > > >> - vhost_reset_is_le(vq); > > >> + if (!vq->private_data) > > >> return 0; > > >> - } > > >> > > >> vhost_init_is_le(vq); > > > > > > > > > I think you do need to reset it, just maybe within...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...nit_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(struct vhost_virtqueue *vq) > vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be; > } > #else > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq) > +static void vhost_disable_user_b...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...nit_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(struct vhost_virtqueue *vq) > vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be; > } > #else > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq) > +static void vhost_disable_user_b...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...oid 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(struct vhost_virtqueue *vq) > > > vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be; > > > } > > > #else > > > -static void vhost_vq_reset_user_be(struct...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...oid 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(struct vhost_virtqueue *vq) > > > vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be; > > > } > > > #else > > > -static void vhost_vq_reset_user_be(struct...
2017 Jan 27
0
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...gt; +++ b/drivers/vhost/vhost.c > >> @@ -1714,10 +1714,8 @@ int vhost_vq_init_access(struct vhost_virtqueue *vq) > >> int r; > >> bool is_le = vq->is_le; > >> > >> - if (!vq->private_data) { > >> - vhost_reset_is_le(vq); > >> + if (!vq->private_data) > >> return 0; > >> - } > >> > >> vhost_init_is_le(vq); > > > > > > I think you do need to reset it, just maybe within vhost_init_is_le. > > > >...
2016 Feb 10
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...*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(struct vhost_virtqueue *vq) > > vq->is_le = vhost_has_feature(vq, VIRTIO_F_VERSION_1) || !vq->user_be; > > } > > #else > > -static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq) > &gt...
2017 Jan 26
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...lock(&vq->mutex); } /*[..] rest of the function */ } from drivers/vhost/vhost.c: int vhost_vq_init_access(struct vhost_virtqueue *vq) { __virtio16 last_used_idx; int r; bool is_le = vq->is_le; if (!vq->private_data) { ==> vhost_reset_is_le(vq); /* resets to native endianness and returns */ return 0; } ==> vhost_init_is_le(vq); /* here we init is_le */ r = vhost_update_used_flags(vq); if (r) goto err; vq->signalled_used_valid = false; if (!vq->iotl...
2017 Jan 26
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...lock(&vq->mutex); } /*[..] rest of the function */ } from drivers/vhost/vhost.c: int vhost_vq_init_access(struct vhost_virtqueue *vq) { __virtio16 last_used_idx; int r; bool is_le = vq->is_le; if (!vq->private_data) { ==> vhost_reset_is_le(vq); /* resets to native endianness and returns */ return 0; } ==> vhost_init_is_le(vq); /* here we init is_le */ r = vhost_update_used_flags(vq); if (r) goto err; vq->signalled_used_valid = false; if (!vq->iotl...
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):