search for: legacy_big_endian

Displaying 19 results from an estimated 19 matches for "legacy_big_endian".

2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...b/drivers/vhost/vhost.c > index 2ee2826..60a0f32 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -199,6 +199,7 @@ static void vhost_vq_reset(struct vhost_dev *dev, > vq->call = NULL; > vq->log_ctx = NULL; > vq->memory = NULL; > + vq->legacy_big_endian = false; > } > > static int vhost_worker(void *data) > @@ -806,6 +807,24 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > } else > filep = eventfp; > break; > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > + case VHOST_SET_VRING_ENDIA...
2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...b/drivers/vhost/vhost.c > index 2ee2826..60a0f32 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -199,6 +199,7 @@ static void vhost_vq_reset(struct vhost_dev *dev, > vq->call = NULL; > vq->log_ctx = NULL; > vq->memory = NULL; > + vq->legacy_big_endian = false; > } > > static int vhost_worker(void *data) > @@ -806,6 +807,24 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > } else > filep = eventfp; > break; > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > + case VHOST_SET_VRING_ENDIA...
2015 Apr 02
0
[PATCH v2 7/7] vhost: feature to set the vring endianness
...2ee2826..60a0f32 100644 > > --- a/drivers/vhost/vhost.c > > +++ b/drivers/vhost/vhost.c > > @@ -199,6 +199,7 @@ static void vhost_vq_reset(struct vhost_dev *dev, > > vq->call = NULL; > > vq->log_ctx = NULL; > > vq->memory = NULL; > > + vq->legacy_big_endian = false; > > } > > > > static int vhost_worker(void *data) > > @@ -806,6 +807,24 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) > > } else > > filep = eventfp; > > break; > > +#ifdef CONFIG_VHOST_SET_ENDIAN_...
2015 Feb 20
8
[PATCH 0/3] vhost_net: support for cross endian guests
...now asks for a specific format (big endian) instead of the hint whether byteswap is needed or not (patch 1) - rebased on top of the virtio-1 accessors (patch 2) Patch 3 is a separate fix: I think it is also valid for virtio-1. Please comment. --- Greg Kurz (3): vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag vhost: add support for legacy virtio vhost_net: fix virtio_net header endianness drivers/vhost/net.c | 32 ++++++++++++++++++++++++++------ drivers/vhost/vhost.c | 6 +++++- drivers/vhost/vhost.h | 23 +++++++++++++++++------ include/uapi/linux/vhost.h |...
2015 Feb 20
8
[PATCH 0/3] vhost_net: support for cross endian guests
...now asks for a specific format (big endian) instead of the hint whether byteswap is needed or not (patch 1) - rebased on top of the virtio-1 accessors (patch 2) Patch 3 is a separate fix: I think it is also valid for virtio-1. Please comment. --- Greg Kurz (3): vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag vhost: add support for legacy virtio vhost_net: fix virtio_net header endianness drivers/vhost/net.c | 32 ++++++++++++++++++++++++++------ drivers/vhost/vhost.c | 6 +++++- drivers/vhost/vhost.h | 23 +++++++++++++++++------ include/uapi/linux/vhost.h |...
2015 Feb 20
0
[PATCH 1/3] vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag
The VHOST_VRING_F_LEGACY_BIG_ENDIAN flag informs the kernel that the associated device is big endian. Of course, this only makes sense for legacy virtio devices since modern virtio devices are always little endian. It will be used by the vhost memory accessors to byteswap vring data when we have a legacy device, in case host and gue...
2015 Feb 20
0
[PATCH 1/3] vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag
The VHOST_VRING_F_LEGACY_BIG_ENDIAN flag informs the kernel that the associated device is big endian. Of course, this only makes sense for legacy virtio devices since modern virtio devices are always little endian. It will be used by the vhost memory accessors to byteswap vring data when we have a legacy device, in case host and gue...
2015 Apr 02
0
[PATCH v2 7/7] vhost: feature to set the vring endianness
...)) { diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2ee2826..60a0f32 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -199,6 +199,7 @@ static void vhost_vq_reset(struct vhost_dev *dev, vq->call = NULL; vq->log_ctx = NULL; vq->memory = NULL; + vq->legacy_big_endian = false; } static int vhost_worker(void *data) @@ -806,6 +807,24 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) } else filep = eventfp; break; +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY + case VHOST_SET_VRING_ENDIAN_LEGACY: + { + struct vhost_vring_endian e;...
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
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...| 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_ENDI...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...| 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_ENDI...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...| 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_ENDI...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...| 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_ENDI...
2015 Feb 20
0
[PATCH 2/3] vhost: add support for legacy virtio
...tatic inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) return vq->acked_features & (1ULL << bit); } +static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) +{ + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) + return true; + else + return !vq->legacy_big_endian; +} + /* Memory accessors */ static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val) { - return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __virtio16_to_cpu(vhost_is_little_endian(vq), val); } static inline __virtio16 cpu_to_vhost16(struc...
2015 Feb 20
0
[PATCH 2/3] vhost: add support for legacy virtio
...tatic inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) return vq->acked_features & (1ULL << bit); } +static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) +{ + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) + return true; + else + return !vq->legacy_big_endian; +} + /* Memory accessors */ static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val) { - return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __virtio16_to_cpu(vhost_is_little_endian(vq), val); } static inline __virtio16 cpu_to_vhost16(struc...
2015 Apr 07
0
[PATCH v3 7/7] vhost: feature to set the vring endianness
...++++++ drivers/vhost/vhost.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 - introdu...
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()