Displaying 7 results from an estimated 7 matches for "init_is_l".
2017 Jan 27
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...>> 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))
> vq->is_le = true;
> else
> vhost_reset_is_le(vq);
>
>
That is a very good point! I have overlooked...
2017 Jan 27
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...>> 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))
> vq->is_le = true;
> else
> vhost_reset_is_le(vq);
>
>
That is a very good point! I have overlooked...
2017 Jan 29
1
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...gt;>
> > >> - 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))
> > > vq->is_le = true;
> > > else
> > >...
2017 Jan 29
1
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...gt;>
> > >> - 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))
> > > vq->is_le = true;
> > > else
> > >...
2017 Jan 27
0
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...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))
> > vq->is_le = true;
> > else
> > vhost_reset_is_le(vq);
> >
>...
2017 Jan 26
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...ccess(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->iotlb &&
!access_ok(VERIFY_READ, &vq->used->idx, sizeof vq->used->idx)) {...
2017 Jan 26
2
[BUG/RFC] vhost: net: big endian viring access despite virtio 1
...ccess(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->iotlb &&
!access_ok(VERIFY_READ, &vq->used->idx, sizeof vq->used->idx)) {...