Displaying 20 results from an estimated 44 matches for "vhost_vq_reset_user_be".
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...ad2146a9ab2d..e02e06755ab7 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -43,11 +43,16 @@ enum {
> #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
>
> #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> -static void vhost_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();
> }
>
Hmm this doesn't look like an improvement to me.
What does it mean to disable big endian? Make it little endian?
Exi...
2016 Feb 10
3
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...ad2146a9ab2d..e02e06755ab7 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -43,11 +43,16 @@ enum {
> #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
>
> #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> -static void vhost_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();
> }
>
Hmm this doesn't look like an improvement to me.
What does it mean to disable big endian? Make it little endian?
Exi...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...host.c
> > > +++ b/drivers/vhost/vhost.c
> > > @@ -43,11 +43,16 @@ enum {
> > > #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
> > >
> > > #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> > > -static void vhost_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();
> > > }
> > >
> >
> > Hmm this doesn't look like an improvement to...
2016 Feb 10
1
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...host.c
> > > +++ b/drivers/vhost/vhost.c
> > > @@ -43,11 +43,16 @@ enum {
> > > #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
> > >
> > > #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> > > -static void vhost_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();
> > > }
> > >
> >
> > Hmm this doesn't look like an improvement to...
2015 Apr 24
0
[PATCH v6 7/8] vhost: cross-endian support for legacy devices
...d to override the default when activating the ring of a legacy
device. It has no effect on modern devices.
Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com>
---
Changes since v5:
- fixed description in Kconfig
- fixed error description in uapi header
- dropped useless semi-colon in the vhost_vq_reset_user_be() stub
drivers/vhost/Kconfig | 15 ++++++++
drivers/vhost/vhost.c | 85 +++++++++++++++++++++++++++++++++++++++++++-
drivers/vhost/vhost.h | 11 +++++-
include/uapi/linux/vhost.h | 14 +++++++
4 files changed, 122 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/Kc...
2016 Jan 13
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...st.c b/drivers/vhost/vhost.c
index ad2146a9ab2d..e02e06755ab7 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -43,11 +43,16 @@ enum {
#define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
-static void vhost_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_endia...
2016 Feb 10
0
[PATCH 1/2] vhost: helpers to enable/disable vring endianness
...gt; > --- a/drivers/vhost/vhost.c
> > +++ b/drivers/vhost/vhost.c
> > @@ -43,11 +43,16 @@ enum {
> > #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
> >
> > #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> > -static void vhost_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();
> > }
> >
>
> Hmm this doesn't look like an improvement to me.
> What does it mean to disa...
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 Apr 23
0
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...ost.c
+++ b/drivers/vhost/vhost.c
@@ -36,6 +36,78 @@ enum {
#define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num])
#define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
+#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
+static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
+{
+ vq->user_be = !virtio_legacy_is_little_endian();
+}
+
+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))...
2015 Apr 24
2
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...st.c
> @@ -36,6 +36,78 @@ enum {
> #define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num])
> #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
>
> +#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> +static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> +{
> + vq->user_be = !virtio_legacy_is_little_endian();
> +}
> +
> +static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
> +{
> + struct vhost_vring_state s;
> +
> + if (vq->private_data)
> + return -EBUS...
2015 Apr 24
2
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...st.c
> @@ -36,6 +36,78 @@ enum {
> #define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num])
> #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
>
> +#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> +static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> +{
> + vq->user_be = !virtio_legacy_is_little_endian();
> +}
> +
> +static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
> +{
> + struct vhost_vring_state s;
> +
> + if (vq->private_data)
> + return -EBUS...
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
2015 Apr 24
0
[PATCH v5 7/8] vhost: cross-endian support for legacy devices
...@@ enum {
> > #define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num])
> > #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
> >
> > +#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> > +static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> > +{
> > + vq->user_be = !virtio_legacy_is_little_endian();
> > +}
> > +
> > +static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
> > +{
> > + struct vhost_vring_state s;
> > +
> > +...
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...;ring[vq->num])
#define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
+INTERVAL_TREE_DEFINE(struct vhost_umem_node,
+ rb, __u64, __subtree_last,
+ START, LAST, , vhost_umem_interval_tree);
+
#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
{
@@ -275,7 +280,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
vq->call_ctx = NULL;
vq->call = NULL;
vq->log_ctx = NULL;
- vq->memory = NULL;
+ vq->umem = NULL;
vq->is_le = virtio_legacy_is_little_endian();
vhost_vq_reset_user_be(vq)...
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...;ring[vq->num])
#define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
+INTERVAL_TREE_DEFINE(struct vhost_umem_node,
+ rb, __u64, __subtree_last,
+ START, LAST, , vhost_umem_interval_tree);
+
#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
{
@@ -275,7 +280,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
vq->call_ctx = NULL;
vq->call = NULL;
vq->log_ctx = NULL;
- vq->memory = NULL;
+ vq->umem = NULL;
vq->is_le = virtio_legacy_is_little_endian();
vhost_vq_reset_user_be(vq)...
2016 Mar 25
0
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
...;ring[vq->num])
#define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
+INTERVAL_TREE_DEFINE(struct vhost_umem_node,
+ rb, __u64, __subtree_last,
+ START, LAST, , vhost_umem_interval_tree);
+
#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
{
@@ -275,7 +280,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
vq->call_ctx = NULL;
vq->call = NULL;
vq->log_ctx = NULL;
- vq->memory = NULL;
+ vq->umem = NULL;
vq->is_le = virtio_legacy_is_little_endian();
vhost_vq_reset_user_be(vq)...
2016 Jan 19
0
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...vail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
>
> +INTERVAL_TREE_DEFINE(struct vhost_umem_node,
> + rb, __u64, __subtree_last,
> + START, LAST, , vhost_umem_interval_tree);
> +
> #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> static void vhost_vq_reset_user_be(struct vhost_virtqueue *vq)
> {
> @@ -275,7 +280,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
> vq->call_ctx = NULL;
> vq->call = NULL;
> vq->log_ctx = NULL;
> - vq->memory = NULL;
> + vq->umem = NULL;
> vq->is_le = virtio_legacy_is_littl...
2015 Apr 24
27
[PATCH v6 0/8] vhost: support for cross endian guests
Only cosmetic and documentation changes since v5.
---
Greg Kurz (8):
virtio: introduce virtio_is_little_endian() helper
tun: add tun_is_little_endian() helper
macvtap: introduce macvtap_is_little_endian() helper
vringh: introduce vringh_is_little_endian() helper
vhost: introduce vhost_is_little_endian() helper
virtio: add explicit big-endian support to memory