search for: legacy_is_little_endian

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

2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...+++++++++++++++++++++++ > drivers/vhost/vhost.h | 17 +++++++++++++- > include/uapi/linux/vhost.h | 5 ++++ > 4 files changed, 86 insertions(+), 1 deletion(-) > > Changes since v2: > - fixed typos in Kconfig description > - renamed vq->legacy_big_endian to vq->legacy_is_little_endian > - vq->legacy_is_little_endian reset to default in vhost_vq_reset() > - dropped VHOST_F_SET_ENDIAN_LEGACY feature > - dropped struct vhost_vring_endian from the user API (re-use > struct vhost_vring_state instead) > - added VHOST_GET_VRING_ENDIAN_LEGACY ioctl > - introduced...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...+++++++++++++++++++++++ > drivers/vhost/vhost.h | 17 +++++++++++++- > include/uapi/linux/vhost.h | 5 ++++ > 4 files changed, 86 insertions(+), 1 deletion(-) > > Changes since v2: > - fixed typos in Kconfig description > - renamed vq->legacy_big_endian to vq->legacy_is_little_endian > - vq->legacy_is_little_endian reset to default in vhost_vq_reset() > - dropped VHOST_F_SET_ENDIAN_LEGACY feature > - dropped struct vhost_vring_endian from the user API (re-use > struct vhost_vring_state instead) > - added VHOST_GET_VRING_ENDIAN_LEGACY ioctl > - introduced...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...+++++++++++++++++++++++ > drivers/vhost/vhost.h | 17 +++++++++++++- > include/uapi/linux/vhost.h | 5 ++++ > 4 files changed, 86 insertions(+), 1 deletion(-) > > Changes since v2: > - fixed typos in Kconfig description > - renamed vq->legacy_big_endian to vq->legacy_is_little_endian > - vq->legacy_is_little_endian reset to default in vhost_vq_reset() > - dropped VHOST_F_SET_ENDIAN_LEGACY feature > - dropped struct vhost_vring_endian from the user API (re-use > struct vhost_vring_state instead) > - added VHOST_GET_VRING_ENDIAN_LEGACY ioctl > - introduced...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...+++++++++++++++++++++++ > drivers/vhost/vhost.h | 17 +++++++++++++- > include/uapi/linux/vhost.h | 5 ++++ > 4 files changed, 86 insertions(+), 1 deletion(-) > > Changes since v2: > - fixed typos in Kconfig description > - renamed vq->legacy_big_endian to vq->legacy_is_little_endian > - vq->legacy_is_little_endian reset to default in vhost_vq_reset() > - dropped VHOST_F_SET_ENDIAN_LEGACY feature > - dropped struct vhost_vring_endian from the user API (re-use > struct vhost_vring_state instead) > - added VHOST_GET_VRING_ENDIAN_LEGACY ioctl > - introduced...
2015 Apr 07
0
[PATCH v3 7/7] vhost: feature to set the vring endianness
...c | 55 ++++++++++++++++++++++++++++++++++++++++++++ drivers/vhost/vhost.h | 17 +++++++++++++- include/uapi/linux/vhost.h | 5 ++++ 4 files changed, 86 insertions(+), 1 deletion(-) Changes since v2: - fixed typos in Kconfig description - renamed vq->legacy_big_endian to vq->legacy_is_little_endian - vq->legacy_is_little_endian reset to default in vhost_vq_reset() - dropped VHOST_F_SET_ENDIAN_LEGACY feature - dropped struct vhost_vring_endian from the user API (re-use struct vhost_vring_state instead) - added VHOST_GET_VRING_ENDIAN_LEGACY ioctl - introduced more helpers and stubs to avoi...
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian()
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian()
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...n_legacy(struct vhost_virtqueue *vq, > + void __user *argp) > +{ > + struct vhost_vring_state s; > + > + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) > + return -EPERM; > + > + if (copy_from_user(&s, argp, sizeof(s))) > + return -EFAULT; > + > + vq->legacy_is_little_endian = !!s.num; > + return 0; > +} > + > +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq, > + u32 idx, > + void __user *argp) > +{ > + struct vhost_vring_state s = { > + .index = idx, > + .num = vq->legacy_is_little_endian > + }; &g...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...n_legacy(struct vhost_virtqueue *vq, > + void __user *argp) > +{ > + struct vhost_vring_state s; > + > + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) > + return -EPERM; > + > + if (copy_from_user(&s, argp, sizeof(s))) > + return -EFAULT; > + > + vq->legacy_is_little_endian = !!s.num; > + return 0; > +} > + > +static long vhost_get_vring_endian_legacy(struct vhost_virtqueue *vq, > + u32 idx, > + void __user *argp) > +{ > + struct vhost_vring_state s = { > + .index = idx, > + .num = vq->legacy_is_little_endian > + }; &g...
2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...t; +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > + if (vhost_has_feature(vq, VHOST_F_SET_ENDIAN_LEGACY)) > + return !vq->legacy_big_endian; why do we need to check the feature bit? How about simple return !vq->legacy_big_endian; here? All you need to do is set legacy_big_endian to !virtio_legacy_is_little_endian() on reset. Maybe rename to legacy_is_little_endian so you don't need to reverse the logic. > +#endif > return virtio_legacy_is_little_endian(); > } > > diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h > index bb6a5b4..09d2a48 100644 > --- a/includ...
2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...t; +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > + if (vhost_has_feature(vq, VHOST_F_SET_ENDIAN_LEGACY)) > + return !vq->legacy_big_endian; why do we need to check the feature bit? How about simple return !vq->legacy_big_endian; here? All you need to do is set legacy_big_endian to !virtio_legacy_is_little_endian() on reset. Maybe rename to legacy_is_little_endian so you don't need to reverse the logic. > +#endif > return virtio_legacy_is_little_endian(); > } > > diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h > index bb6a5b4..09d2a48 100644 > --- a/includ...
2015 Apr 02
0
[PATCH v2 7/7] vhost: feature to set the vring endianness
...How about simple > return !vq->legacy_big_endian; > here? This is a runtime feature. Even for powerpc, cross-endian won't be the most common scenario. Userspace may have cleared the bit if it doesn't need/want it. > All you need to do is set legacy_big_endian to > !virtio_legacy_is_little_endian() on reset. > Maybe rename to legacy_is_little_endian so you don't > need to reverse the logic. > Do you mean vhost doesn't need userspace to provide the endianness to be used ? Please elaborate on the meaning of "reset" here... I am confused. > > +#endif > &g...
2015 Apr 02
9
[PATCH v2 0/7] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. It is a complete rework of my initial post. Patches 1 to 5 are preliminary work: we move the endianness check out of all memory accessors to separate functions. Patch 6 changes the semantics of the accessors so that they have explicit big endian support. Patch 7 brings the cross-endian
2015 Apr 02
9
[PATCH v2 0/7] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. It is a complete rework of my initial post. Patches 1 to 5 are preliminary work: we move the endianness check out of all memory accessors to separate functions. Patch 6 changes the semantics of the accessors so that they have explicit big endian support. Patch 7 brings the cross-endian