search for: config_vhost_set_endian_legacy

Displaying 20 results from an estimated 27 matches for "config_vhost_set_endian_legacy".

2015 Apr 14
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...-- > drivers/vhost/Kconfig | 10 ++++++ > drivers/vhost/vhost.c | 76 +++++++++++++++++++++++++++++++++++++++++++- > drivers/vhost/vhost.h | 12 +++++-- > include/uapi/linux/vhost.h | 9 +++++ > 4 files changed, 103 insertions(+), 4 deletions(-) > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_big_endian(struct vhost_virtqueue *vq, > + int __user *argp) > +{ > + struct vhost_vring_state s; > + > + if (vq->private_data) > + return -EBUSY; > + > + if (copy_from_user(&s, argp, sizeof(s))) > + return -EFAULT; &gt...
2015 Apr 14
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...-- > drivers/vhost/Kconfig | 10 ++++++ > drivers/vhost/vhost.c | 76 +++++++++++++++++++++++++++++++++++++++++++- > drivers/vhost/vhost.h | 12 +++++-- > include/uapi/linux/vhost.h | 9 +++++ > 4 files changed, 103 insertions(+), 4 deletions(-) > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_big_endian(struct vhost_virtqueue *vq, > + int __user *argp) > +{ > + struct vhost_vring_state s; > + > + if (vq->private_data) > + return -EBUSY; > + > + if (copy_from_user(&s, argp, sizeof(s))) > + return -EFAULT; &gt...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...44 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -199,6 +199,10 @@ static void vhost_vq_reset(struct vhost_dev *dev, > vq->call = NULL; > vq->log_ctx = NULL; > vq->memory = NULL; > + vq->is_le = virtio_legacy_is_little_endian(); > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > + vq->user_be = !vq->is_le; > +#endif add a wrapper for this too? > } > > static int vhost_worker(void *data) > @@ -630,6 +634,53 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) > return 0; > } > > +#ifdef CONFIG_V...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...44 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -199,6 +199,10 @@ static void vhost_vq_reset(struct vhost_dev *dev, > vq->call = NULL; > vq->log_ctx = NULL; > vq->memory = NULL; > + vq->is_le = virtio_legacy_is_little_endian(); > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > + vq->user_be = !vq->is_le; > +#endif add a wrapper for this too? > } > > static int vhost_worker(void *data) > @@ -630,6 +634,53 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) > return 0; > } > > +#ifdef CONFIG_V...
2015 Apr 10
0
[PATCH v4 7/8] vhost: feature to set the vring endianness
...host/vhost.c index 2ee2826..3eb756b 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -199,6 +199,10 @@ static void vhost_vq_reset(struct vhost_dev *dev, vq->call = NULL; vq->log_ctx = NULL; vq->memory = NULL; + vq->is_le = virtio_legacy_is_little_endian(); +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY + vq->user_be = !vq->is_le; +#endif } static int vhost_worker(void *data) @@ -630,6 +634,53 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) return 0; } +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY +static long vhost_set_vring_big_endian(struct vhost_virt...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...; drivers/vhost/Kconfig | 10 ++++++++ > drivers/vhost/vhost.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ > drivers/vhost/vhost.h | 17 +++++++++++++- > include/uapi/linux/vhost.h | 5 ++++ > 4 files changed, 86 insertions(+), 1 deletion(-) > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_endian_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))) >...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...; drivers/vhost/Kconfig | 10 ++++++++ > drivers/vhost/vhost.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ > drivers/vhost/vhost.h | 17 +++++++++++++- > include/uapi/linux/vhost.h | 5 ++++ > 4 files changed, 86 insertions(+), 1 deletion(-) > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_endian_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))) >...
2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...LL; > 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; > + > + if (!vhost_has_feature(vq, VHOST_F_SET_ENDIAN_LEGACY)) { > + r = -EINVAL; > + break; > + } > + > + if (copy_from_user(&e, argp, sizeof(e))) { > + r = -EFAULT; > +...
2015 Apr 02
2
[PATCH v2 7/7] vhost: feature to set the vring endianness
...LL; > 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; > + > + if (!vhost_has_feature(vq, VHOST_F_SET_ENDIAN_LEGACY)) { > + r = -EINVAL; > + break; > + } > + > + if (copy_from_user(&e, argp, sizeof(e))) { > + r = -EFAULT; > +...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
.../vhost.c > > > @@ -199,6 +199,10 @@ static void vhost_vq_reset(struct vhost_dev *dev, > > > vq->call = NULL; > > > vq->log_ctx = NULL; > > > vq->memory = NULL; > > > + vq->is_le = virtio_legacy_is_little_endian(); > > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > > > + vq->user_be = !vq->is_le; > > > +#endif > > > > add a wrapper for this too? > > > > Will do. > > > > } > > > > > > static int vhost_worker(void *data) > > > @@ -630,6 +634,53 @@ static long vhost_...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
.../vhost.c > > > @@ -199,6 +199,10 @@ static void vhost_vq_reset(struct vhost_dev *dev, > > > vq->call = NULL; > > > vq->log_ctx = NULL; > > > vq->memory = NULL; > > > + vq->is_le = virtio_legacy_is_little_endian(); > > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > > > + vq->user_be = !vq->is_le; > > > +#endif > > > > add a wrapper for this too? > > > > Will do. > > > > } > > > > > > static int vhost_worker(void *data) > > > @@ -630,6 +634,53 @@ static long vhost_...
2015 Apr 21
0
[PATCH v4 7/8] vhost: feature to set the vring endianness
...> > +++ b/drivers/vhost/vhost.c > > @@ -199,6 +199,10 @@ static void vhost_vq_reset(struct vhost_dev *dev, > > vq->call = NULL; > > vq->log_ctx = NULL; > > vq->memory = NULL; > > + vq->is_le = virtio_legacy_is_little_endian(); > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > > + vq->user_be = !vq->is_le; > > +#endif > > add a wrapper for this too? > Will do. > > } > > > > static int vhost_worker(void *data) > > @@ -630,6 +634,53 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...t;memory = NULL; > + vq->legacy_is_little_endian = virtio_legacy_is_little_endian(); > } > > static int vhost_worker(void *data) > @@ -630,6 +631,54 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) > return 0; > } > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_endian_legacy(struct vhost_virtqueue *vq, > + void __user *argp) > +{ > + struct vhost_vring_state s; > + > + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) > + return -EPERM; EINVAL probably makes more sense? But I'm not sure this is...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...t;memory = NULL; > + vq->legacy_is_little_endian = virtio_legacy_is_little_endian(); > } > > static int vhost_worker(void *data) > @@ -630,6 +631,54 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) > return 0; > } > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_endian_legacy(struct vhost_virtqueue *vq, > + void __user *argp) > +{ > + struct vhost_vring_state s; > + > + if (vhost_has_feature(vq, VIRTIO_F_VERSION_1)) > + return -EPERM; EINVAL probably makes more sense? But I'm not sure this is...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...t;memory = NULL; > + vq->legacy_is_little_endian = virtio_legacy_is_little_endian(); > } > > static int vhost_worker(void *data) > @@ -630,6 +631,54 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) > return 0; > } > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_endian_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))) >...
2015 Apr 07
1
[PATCH v3 7/7] vhost: feature to set the vring endianness
...t;memory = NULL; > + vq->legacy_is_little_endian = virtio_legacy_is_little_endian(); > } > > static int vhost_worker(void *data) > @@ -630,6 +631,54 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) > return 0; > } > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > +static long vhost_set_vring_endian_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))) >...
2015 Apr 14
0
[PATCH v4 7/8] vhost: feature to set the vring endianness
...| 10 ++++++ > > drivers/vhost/vhost.c | 76 +++++++++++++++++++++++++++++++++++++++++++- > > drivers/vhost/vhost.h | 12 +++++-- > > include/uapi/linux/vhost.h | 9 +++++ > > 4 files changed, 103 insertions(+), 4 deletions(-) > > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > > +static long vhost_set_vring_big_endian(struct vhost_virtqueue *vq, > > + int __user *argp) > > +{ > > + struct vhost_vring_state s; > > + > > + if (vq->private_data) > > + return -EBUSY; > > + > > + if (copy_from_user(&s,...
2015 Apr 07
0
[PATCH v3 7/7] vhost: feature to set the vring endianness
...call = NULL; vq->log_ctx = NULL; vq->memory = NULL; + vq->legacy_is_little_endian = virtio_legacy_is_little_endian(); } static int vhost_worker(void *data) @@ -630,6 +631,54 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) return 0; } +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY +static long vhost_set_vring_endian_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_end...
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()