Displaying 20 results from an estimated 45 matches for "vhost_set_vring_endian".
Did you mean:
vhost_get_vring_endian
2015 Apr 24
0
[PATCH v6 7/8] vhost: cross-endian support for legacy devices
...vhost.
+
+config VHOST_CROSS_ENDIAN_LEGACY
+ bool "Cross-endian support for vhost"
+ default n
+ ---help---
+ This option allows vhost to support guests with a different byte
+ ordering from host while using legacy virtio.
+
+ Userspace programs can control the feature using the
+ VHOST_SET_VRING_ENDIAN and VHOST_GET_VRING_ENDIAN ioctls.
+
+ This is only useful on a few platforms (ppc64 and arm64). Since it
+ adds some overhead, it is disabled by default.
+
+ If unsure, say "N".
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 2ee2826..9e8e004 100644
--- a/drivers/v...
2015 Apr 23
0
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...to access
the core of vhost.
+
+config VHOST_CROSS_ENDIAN_LEGACY
+ bool "Cross-endian support for vhost"
+ default n
+ ---help---
+ This option allows vhost to support guests with a different byte
+ ordering from host.
+
+ Userspace programs can control the feature using the
+ VHOST_SET_VRING_ENDIAN and VHOST_GET_VRING_ENDIAN ioctls.
+
+ This is only useful on a few platforms (ppc64 and arm64). Since it
+ adds some overhead, it is disabled default.
+
+ If unsure, say "N".
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 2ee2826..8c4390d 100644
--- a/drivers/vhos...
2015 Apr 24
2
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...p---
> + This option allows vhost to support guests with a different byte
> + ordering from host.
"...while using legacy virtio."
Might help to explain the "LEGACY" in the config option ;)
> +
> + Userspace programs can control the feature using the
> + VHOST_SET_VRING_ENDIAN and VHOST_GET_VRING_ENDIAN ioctls.
> +
> + This is only useful on a few platforms (ppc64 and arm64). Since it
> + adds some overhead, it is disabled default.
s/default/by default/
> +
> + If unsure, say "N".
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vh...
2015 Apr 24
2
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...p---
> + This option allows vhost to support guests with a different byte
> + ordering from host.
"...while using legacy virtio."
Might help to explain the "LEGACY" in the config option ;)
> +
> + Userspace programs can control the feature using the
> + VHOST_SET_VRING_ENDIAN and VHOST_GET_VRING_ENDIAN ioctls.
> +
> + This is only useful on a few platforms (ppc64 and arm64). Since it
> + adds some overhead, it is disabled default.
s/default/by default/
> +
> + If unsure, say "N".
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vh...
2015 Apr 24
0
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...erent byte
> > + ordering from host.
>
> "...while using legacy virtio."
>
> Might help to explain the "LEGACY" in the config option ;)
>
Makes sense indeed !
> > +
> > + Userspace programs can control the feature using the
> > + VHOST_SET_VRING_ENDIAN and VHOST_GET_VRING_ENDIAN ioctls.
> > +
> > + This is only useful on a few platforms (ppc64 and arm64). Since it
> > + adds some overhead, it is disabled default.
>
> s/default/by default/
>
Ok.
> > +
> > + If unsure, say "N".
> > di...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...at does it mean to disable big endian? Make it little endian?
Existing reset seems to make sense.
> +static void vhost_enable_user_be(struct vhost_virtqueue *vq, bool user_be)
> +{
> + vq->user_be = user_be;
> +}
> +
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;...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...at does it mean to disable big endian? Make it little endian?
Existing reset seems to make sense.
> +static void vhost_enable_user_be(struct vhost_virtqueue *vq, bool user_be)
> +{
> + vq->user_be = user_be;
> +}
> +
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;...
2015 Oct 30
5
[PATCH] vhost: move is_le setup to the backend
...cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases:
1) host is big endian and device is modern virtio
2) host has cross-endian support and device is legacy virtio with a different
endianness than the host
Both cases rely on the VHOST_SET_FEATURES ioctl, but 2) also needs the
VHOST_SET_VRING_ENDIAN ioctl to be called by userspace. Since vq->is_le
is only needed when the backend is active, it was decided to set it at
backend start.
This is currently done in vhost_init_used()->vhost_init_is_le() but it
obfuscates the core vhost code. This patch moves the is_le setup to a
dedicated functi...
2015 Oct 30
5
[PATCH] vhost: move is_le setup to the backend
...cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases:
1) host is big endian and device is modern virtio
2) host has cross-endian support and device is legacy virtio with a different
endianness than the host
Both cases rely on the VHOST_SET_FEATURES ioctl, but 2) also needs the
VHOST_SET_VRING_ENDIAN ioctl to be called by userspace. Since vq->is_le
is only needed when the backend is active, it was decided to set it at
backend start.
This is currently done in vhost_init_used()->vhost_init_is_le() but it
obfuscates the core vhost code. This patch moves the is_le setup to a
dedicated functi...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...> > > + vq->user_be = user_be;
> > > +}
> > > +
> >
> > And this is maybe "init_user_be"?
> >
>
> Anyway I don't mind changing the names to reset/init_user_be if you think 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)
> > > retu...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...> > > + vq->user_be = user_be;
> > > +}
> > > +
> >
> > And this is maybe "init_user_be"?
> >
>
> Anyway I don't mind changing the names to reset/init_user_be if you think 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)
> > > retu...
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 Jan 13
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...host_vq_reset_user_be(struct vhost_virtqueue *vq)
+static void vhost_disable_user_be(struct vhost_virtqueue *vq)
{
vq->user_be = !virtio_legacy_is_little_endian();
}
+static void vhost_enable_user_be(struct 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)...
2016 Feb 10
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...(struct vhost_virtqueue *vq, bool user_be)
> > +{
> > + vq->user_be = user_be;
> > +}
> > +
>
> And this is maybe "init_user_be"?
>
Anyway I don't mind changing the names to reset/init_user_be if you think 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;
> >
&...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...| 76 +++++++++++++++++++++++++++++++++++++++++++-
> > > drivers/vhost/vhost.h | 12 +++++--
> > > include/uapi/linux/vhost.h | 9 +++++
> > > 4 files changed, 103 insertions(+), 4 deletions(-)
> > >
> > > Changes since v3:
> > > - VHOST_SET_VRING_ENDIAN_LEGACY ioctl renamed to VHOST_SET_VRING_BIG_ENDIAN
> > > - ioctl API is now: 0 for le, 1 for be, other values are EINVAL
> > > - ioctl doesn't filter out modern devices
> > > - ioctl stubs return ENOIOCTLCMD
> > > - forbid endianness changes when vring is act...
2015 Apr 21
2
[PATCH v4 7/8] vhost: feature to set the vring endianness
...| 76 +++++++++++++++++++++++++++++++++++++++++++-
> > > drivers/vhost/vhost.h | 12 +++++--
> > > include/uapi/linux/vhost.h | 9 +++++
> > > 4 files changed, 103 insertions(+), 4 deletions(-)
> > >
> > > Changes since v3:
> > > - VHOST_SET_VRING_ENDIAN_LEGACY ioctl renamed to VHOST_SET_VRING_BIG_ENDIAN
> > > - ioctl API is now: 0 for le, 1 for be, other values are EINVAL
> > > - ioctl doesn't filter out modern devices
> > > - ioctl stubs return ENOIOCTLCMD
> > > - forbid endianness changes when vring is act...
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):
2016 Jan 11
2
[PATCH] vhost: move is_le setup to the backend
...cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases:
1) host is big endian and device is modern virtio
2) host has cross-endian support and device is legacy virtio with a different
endianness than the host
Both cases rely on the VHOST_SET_FEATURES ioctl, but 2) also needs the
VHOST_SET_VRING_ENDIAN ioctl to be called by userspace. Since vq->is_le
is only needed when the backend is active, it was decided to set it at
backend start.
This is currently done in vhost_init_used()->vhost_init_is_le() but it
obfuscates the core vhost code. This patch moves the is_le setup to a
dedicated functi...