search for: 4e9a186

Displaying 20 results from an estimated 27 matches for "4e9a186".

2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...N_VNET_LE; > + if (tun->flags & TUN_VNET_LE) > + return true; > + return virtio_legacy_is_little_endian(); > } > > static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 6a49960..4e9a186 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -175,7 +175,9 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) > { > - return vhost_has_feature(vq,...
2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...N_VNET_LE; > + if (tun->flags & TUN_VNET_LE) > + return true; > + return virtio_legacy_is_little_endian(); > } > > static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 6a49960..4e9a186 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -175,7 +175,9 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) > { > - return vhost_has_feature(vq,...
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
...+ case VHOST_GET_VRING_ENDIAN_LEGACY: > + r = vhost_get_vring_endian_legacy(vq, idx, argp); > + break; > default: > r = -ENOIOCTLCMD; > } I think we also want to forbid this with a running backend. > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..981ba06 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,9 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* We need to know the device endianness with legacy virti...
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...N_VNET_LE; > + if (tun->flags & TUN_VNET_LE) > + return true; > + return virtio_legacy_is_little_endian(); > } > > static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 6a49960..4e9a186 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -175,7 +175,9 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) > { > - return vhost_has_feature(vq,...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...+ case VHOST_GET_VRING_ENDIAN_LEGACY: > + r = vhost_get_vring_endian_legacy(vq, idx, argp); > + break; > default: > r = -ENOIOCTLCMD; > } I think we also want to forbid this with a running backend. > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..981ba06 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,9 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* We need to know the device endianness with legacy virti...
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...N_VNET_LE; > + if (tun->flags & TUN_VNET_LE) > + return true; > + return virtio_legacy_is_little_endian(); > } > > static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 6a49960..4e9a186 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -175,7 +175,9 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) > > static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) > { > - return vhost_has_feature(vq,...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...= vhost_set_vring_endian_legacy(vq, argp); > + break; > + case VHOST_GET_VRING_ENDIAN_LEGACY: > + r = vhost_get_vring_endian_legacy(vq, idx, argp); > + break; > default: > r = -ENOIOCTLCMD; > } > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..981ba06 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,9 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* We need to know the device endianness with legacy virti...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...= vhost_set_vring_endian_legacy(vq, argp); > + break; > + case VHOST_GET_VRING_ENDIAN_LEGACY: > + r = vhost_get_vring_endian_legacy(vq, idx, argp); > + break; > default: > r = -ENOIOCTLCMD; > } > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..981ba06 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,9 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* We need to know the device endianness with legacy virti...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...te_data) > + if (!vq->private_data) { > + vq->is_le = virtio_legacy_is_little_endian(); > return 0; > + } > + > + vhost_init_is_le(vq); > > r = vhost_update_used_flags(vq); > if (r) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..04b2add 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,14 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* Ring endianness. Defaults to legacy native endianness....
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...te_data) > + if (!vq->private_data) { > + vq->is_le = virtio_legacy_is_little_endian(); > return 0; > + } > + > + vhost_init_is_le(vq); > > r = vhost_update_used_flags(vq); > if (r) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..04b2add 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,14 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* Ring endianness. Defaults to legacy native endianness....
2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...rom_user(&e, argp, sizeof(e))) { > + r = -EFAULT; > + break; > + } > + vq->legacy_big_endian = e.is_big_endian; > + break; > + } > +#endif > default: > r = -ENOIOCTLCMD; > } > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..d50881d 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,9 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* We need to know the device endianness with legacy virti...
2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...rom_user(&e, argp, sizeof(e))) { > + r = -EFAULT; > + break; > + } > + vq->legacy_big_endian = e.is_big_endian; > + break; > + } > +#endif > default: > r = -ENOIOCTLCMD; > } > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 4e9a186..d50881d 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -106,6 +106,9 @@ struct vhost_virtqueue { > /* Log write descriptors */ > void __user *log_base; > struct vhost_log *log; > + > + /* We need to know the device endianness with legacy virti...
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
0
[PATCH v3 7/7] vhost: feature to set the vring endianness
...; + case VHOST_SET_VRING_ENDIAN_LEGACY: + r = vhost_set_vring_endian_legacy(vq, argp); + break; + case VHOST_GET_VRING_ENDIAN_LEGACY: + r = vhost_get_vring_endian_legacy(vq, idx, argp); + break; default: r = -ENOIOCTLCMD; } diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 4e9a186..981ba06 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -106,6 +106,9 @@ struct vhost_virtqueue { /* Log write descriptors */ void __user *log_base; struct vhost_log *log; + + /* We need to know the device endianness with legacy virtio. */ + bool legacy_is_little_endian; }...
2015 Apr 07
0
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...*tun) { - return tun->flags & TUN_VNET_LE; + if (tun->flags & TUN_VNET_LE) + return true; + return virtio_legacy_is_little_endian(); } static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 6a49960..4e9a186 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -175,7 +175,9 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) { - return vhost_has_feature(vq, VIRTIO_F_VERSION_1); + if (vhost_ha...
2015 Apr 10
0
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...*tun) { - return tun->flags & TUN_VNET_LE; + if (tun->flags & TUN_VNET_LE) + return true; + return virtio_legacy_is_little_endian(); } static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 6a49960..4e9a186 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -175,7 +175,9 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit) static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq) { - return vhost_has_feature(vq, VIRTIO_F_VERSION_1); + if (vhost_ha...
2015 Apr 02
0
[PATCH v2 7/7] vhost: feature to set the vring endianness
..._LEGACY)) { + r = -EINVAL; + break; + } + + if (copy_from_user(&e, argp, sizeof(e))) { + r = -EFAULT; + break; + } + vq->legacy_big_endian = e.is_big_endian; + break; + } +#endif default: r = -ENOIOCTLCMD; } diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 4e9a186..d50881d 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -106,6 +106,9 @@ struct vhost_virtqueue { /* Log write descriptors */ void __user *log_base; struct vhost_log *log; + + /* We need to know the device endianness with legacy virtio. */ + bool legacy_big_endian; }; s...