search for: vhost_vring_big_endian

Displaying 20 results from an estimated 23 matches for "vhost_vring_big_endian".

2015 Apr 24
2
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...ueue *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; > + > + if (s.num != VHOST_VRING_LITTLE_ENDIAN && > + s.num != VHOST_VRING_BIG_ENDIAN) > + return -EINVAL; > + > + vq->user_be = s.num; > + > + return 0; > +} > + > +static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > + int __user *argp) > +{ > + struct vhost_vring_state s = { > + .index = idx, > + .num = vq-&g...
2015 Apr 24
2
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...ueue *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; > + > + if (s.num != VHOST_VRING_LITTLE_ENDIAN && > + s.num != VHOST_VRING_BIG_ENDIAN) > + return -EINVAL; > + > + vq->user_be = s.num; > + > + return 0; > +} > + > +static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > + int __user *argp) > +{ > + struct vhost_vring_state s = { > + .index = idx, > + .num = vq-&g...
2015 Apr 24
0
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...ruct vhost_vring_state s; > > + > > + if (vq->private_data) > > + return -EBUSY; > > + > > + if (copy_from_user(&s, argp, sizeof(s))) > > + return -EFAULT; > > + > > + if (s.num != VHOST_VRING_LITTLE_ENDIAN && > > + s.num != VHOST_VRING_BIG_ENDIAN) > > + return -EINVAL; > > + > > + vq->user_be = s.num; > > + > > + return 0; > > +} > > + > > +static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > > + int __user *argp) > > +{ > > + struct vhost_vring...
2015 Apr 24
0
[PATCH v6 7/8] vhost: cross-endian support for legacy devices
...+static long vhost_set_vring_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; + + if (s.num != VHOST_VRING_LITTLE_ENDIAN && + s.num != VHOST_VRING_BIG_ENDIAN) + return -EINVAL; + + vq->user_be = s.num; + + return 0; +} + +static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, + int __user *argp) +{ + struct vhost_vring_state s = { + .index = idx, + .num = vq->user_be + }; + + if (copy_to_user(argp, &s, sizeof(s))) +...
2015 Apr 23
0
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...+static long vhost_set_vring_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; + + if (s.num != VHOST_VRING_LITTLE_ENDIAN && + s.num != VHOST_VRING_BIG_ENDIAN) + return -EINVAL; + + vq->user_be = s.num; + + return 0; +} + +static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, + int __user *argp) +{ + struct vhost_vring_state s = { + .index = idx, + .num = vq->user_be + }; + + if (copy_to_user(argp, &s, sizeof(s))) +...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...And this is maybe "init_user_be"? > static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > { > struct vhost_vring_state s; > @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > s.num != VHOST_VRING_BIG_ENDIAN) > return -EINVAL; > > - vq->user_be = s.num; > + vhost_enable_user_be(vq, !!s.num); > > return 0; > } > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > return 0; > } > > -static void vhost_init_is_le(...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...And this is maybe "init_user_be"? > static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > { > struct vhost_vring_state s; > @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > s.num != VHOST_VRING_BIG_ENDIAN) > return -EINVAL; > > - vq->user_be = s.num; > + vhost_enable_user_be(vq, !!s.num); > > return 0; > } > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > return 0; > } > > -static void vhost_init_is_le(...
2015 Apr 23
16
[PATCH v5 0/8] 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 compatible with modern virtio and can be fully compiled out through kernel config. FWIW, I could flawlessly kexec/reboot guests from ppc64 to ppc64le and back. I could also migrate from a ppc64 to a ppc64le host and back. No regressions on x86 as expected. My experimental QEMU tree
2015 Apr 23
16
[PATCH v5 0/8] 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 compatible with modern virtio and can be fully compiled out through kernel config. FWIW, I could flawlessly kexec/reboot guests from ppc64 to ppc64le and back. I could also migrate from a ppc64 to a ppc64le host and back. No regressions on x86 as expected. My experimental QEMU tree
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...> > static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > > > { > > > struct vhost_vring_state s; > > > @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > > > s.num != VHOST_VRING_BIG_ENDIAN) > > > return -EINVAL; > > > > > > - vq->user_be = s.num; > > > + vhost_enable_user_be(vq, !!s.num); > > > > > > return 0; > > > } > > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...> > static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > > > { > > > struct vhost_vring_state s; > > > @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > > > s.num != VHOST_VRING_BIG_ENDIAN) > > > return -EINVAL; > > > > > > - vq->user_be = s.num; > > > + vhost_enable_user_be(vq, !!s.num); > > > > > > return 0; > > > } > > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *...
2016 Feb 16
5
[PATCH v2 0/3] vhost: cross-endian code cleanup
This series is a new tentative to have cleaner cross-endian code. Patches 1/3 is new: it fixes a side-effect in case vhost_init_used() fails. Patch 2/3 comes from v1: it renames cross-endian helpers Patch 3/3 is new: it simply renames vhost_init_used() as suggested by Michael. --- Greg Kurz (3): vhost: fix error path in vhost_init_used() vhost: rename cross-endian helpers
2016 Feb 16
5
[PATCH v2 0/3] vhost: cross-endian code cleanup
This series is a new tentative to have cleaner cross-endian code. Patches 1/3 is new: it fixes a side-effect in case vhost_init_used() fails. Patch 2/3 comes from v1: it renames cross-endian helpers Patch 3/3 is new: it simply renames vhost_init_used() as suggested by Michael. --- Greg Kurz (3): vhost: fix error path in vhost_init_used() vhost: rename cross-endian helpers
2016 Jan 13
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...vhost_virtqueue *vq, bool user_be) +{ + vq->user_be = user_be; +} + static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) { struct vhost_vring_state s; @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) s.num != VHOST_VRING_BIG_ENDIAN) return -EINVAL; - vq->user_be = s.num; + vhost_enable_user_be(vq, !!s.num); return 0; } @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, return 0; } -static void vhost_init_is_le(struct vhost_virtqueue *vq) +static void vhost_enable_is_le(...
2016 Feb 10
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...hink it is clearer. > > static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > > { > > struct vhost_vring_state s; > > @@ -62,7 +67,7 @@ static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) > > s.num != VHOST_VRING_BIG_ENDIAN) > > return -EINVAL; > > > > - vq->user_be = s.num; > > + vhost_enable_user_be(vq, !!s.num); > > > > return 0; > > } > > @@ -81,7 +86,7 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx, > > return 0; >...
2016 Jan 13
7
[PATCH 0/2] vhost: cross-endian code cleanup
This series is a respin of the following patch: http://patchwork.ozlabs.org/patch/565921/ Patch 1 is preliminary work: it gives better names to the helpers that are involved in cross-endian support. Patch 2 is actually a v2 of the original patch. All devices now call a helper in the generic code, which DTRT according to vq->private_data, as suggested by Michael. --- Greg Kurz (2):
2016 Jan 13
7
[PATCH 0/2] vhost: cross-endian code cleanup
This series is a respin of the following patch: http://patchwork.ozlabs.org/patch/565921/ Patch 1 is preliminary work: it gives better names to the helpers that are involved in cross-endian support. Patch 2 is actually a v2 of the original patch. All devices now call a helper in the generic code, which DTRT according to vq->private_data, as suggested by Michael. --- Greg Kurz (2):
2015 May 06
9
[PATCH RFC 0/7] vhost: cross-endian support (vhost-net only)
Hi, This series allows QEMU to use vhost with legacy virtio devices when host and target don't have the same endianness. Only network devices are covered for the moment. I had already posted a series some monthes ago but it never got reviewed. Moreover, the underlying kernel support was entirely re-written and is still waiting to be applied by Michael. I hence post as RFC. The corresponding
2015 May 06
9
[PATCH RFC 0/7] vhost: cross-endian support (vhost-net only)
Hi, This series allows QEMU to use vhost with legacy virtio devices when host and target don't have the same endianness. Only network devices are covered for the moment. I had already posted a series some monthes ago but it never got reviewed. Moreover, the underlying kernel support was entirely re-written and is still waiting to be applied by Michael. I hence post as RFC. The corresponding
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...evice's workers when the device is closed and + * the last reference to the device has been released. + */ +#define VHOST_FREE_WORKER _IOR(VHOST_VIRTIO, 0x9, struct vhost_worker_state) /* Ring setup. */ /* Set number of descriptors in ring. This parameter can not @@ -70,6 +87,11 @@ #define VHOST_VRING_BIG_ENDIAN 1 #define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state) #define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state) +/* Attach a vhost_worker created with VHOST_NEW_WORKER to one of the device's + * virtqueues. This must be done before the vir...