Displaying 20 results from an estimated 69 matches for "vhost_is_little_endian".
2015 Apr 23
0
[PATCH v5 5/8] vhost: introduce vhost_is_little_endian() helper
...st/vhost.h b/drivers/vhost/vhost.h
index 8c1c792..6a49960 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -173,34 +173,39 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
return vq->acked_features & (1ULL << bit);
}
+static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
+{
+ return vhost_has_feature(vq, VIRTIO_F_VERSION_1);
+}
+
/* Memory accessors */
static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val)
{
- return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val);
+ return __virtio16_to_cpu(vho...
2015 Apr 24
0
[PATCH v6 5/8] vhost: introduce vhost_is_little_endian() helper
...st/vhost.h b/drivers/vhost/vhost.h
index 8c1c792..6a49960 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -173,34 +173,39 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
return vq->acked_features & (1ULL << bit);
}
+static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
+{
+ return vhost_has_feature(vq, VIRTIO_F_VERSION_1);
+}
+
/* Memory accessors */
static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val)
{
- return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val);
+ return __virtio16_to_cpu(vho...
2015 Feb 20
0
[PATCH 2/3] vhost: add support for legacy virtio
Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com>
---
drivers/vhost/vhost.h | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
Michael,
The vhost_is_little_endian() helper adds unconditionnal overhead to fixed
endian architectures: that is all architectures except arm and ppc64. This
was addressed in QEMU with a TARGET_IS_BIENDIAN macro. Please give an
advice about how to address this in the vhost code.
Thanks.
diff --git a/drivers/vhost/vhost.h b/drivers/...
2015 Feb 20
0
[PATCH 2/3] vhost: add support for legacy virtio
Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com>
---
drivers/vhost/vhost.h | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
Michael,
The vhost_is_little_endian() helper adds unconditionnal overhead to fixed
endian architectures: that is all architectures except arm and ppc64. This
was addressed in QEMU with a TARGET_IS_BIENDIAN macro. Please give an
advice about how to address this in the vhost code.
Thanks.
diff --git a/drivers/vhost/vhost.h b/drivers/...
2015 Oct 27
4
[PATCH] vhost: fix performance on LE hosts
commit 2751c9882b947292fcfb084c4f604e01724af804 ("vhost: cross-endian
support for legacy devices") introduced a minor regression: even with
cross-endian disabled, and even on LE host, vhost_is_little_endian is
checking is_le flag so there's always a branch.
To fix, simply check virtio_legacy_is_little_endian first.
Cc: Greg Kurz <gkurz at linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/vhost/vhost.h | 7 +++++++
1 file changed, 7 insertions(+)...
2015 Oct 27
4
[PATCH] vhost: fix performance on LE hosts
commit 2751c9882b947292fcfb084c4f604e01724af804 ("vhost: cross-endian
support for legacy devices") introduced a minor regression: even with
cross-endian disabled, and even on LE host, vhost_is_little_endian is
checking is_le flag so there's always a branch.
To fix, simply check virtio_legacy_is_little_endian first.
Cc: Greg Kurz <gkurz at linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/vhost/vhost.h | 7 +++++++
1 file changed, 7 insertions(+)...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...G_ALL) |
- (1ULL << VIRTIO_F_ANY_LAYOUT) |
- (1ULL << VIRTIO_F_VERSION_1)
-};
-
-static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
-{
- return vq->acked_features & (1ULL << bit);
-}
-
-#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
-static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
-{
- return vq->is_le;
-}
-#else
-static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
-{
- return virtio_legacy_is_little_endian() || vq->is_le;
-}
-#endif
-
-/* Memory accessors */
-static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __v...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...G_ALL) |
- (1ULL << VIRTIO_F_ANY_LAYOUT) |
- (1ULL << VIRTIO_F_VERSION_1)
-};
-
-static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
-{
- return vq->acked_features & (1ULL << bit);
-}
-
-#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
-static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
-{
- return vq->is_le;
-}
-#else
-static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
-{
- return virtio_legacy_is_little_endian() || vq->is_le;
-}
-#endif
-
-/* Memory accessors */
-static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __v...
2015 Feb 20
8
[PATCH 0/3] vhost_net: support for cross endian guests
Hi,
This patchset allows vhost_net to be used with legacy virtio
when guest and host have a different endianness. It is based
on previous work by C?dric Le Goater:
https://www.mail-archive.com/kvm-ppc at vger.kernel.org/msg09848.html
As suggested by MST:
- the API now asks for a specific format (big endian) instead of the hint
whether byteswap is needed or not (patch 1)
- rebased on top of
2015 Feb 20
8
[PATCH 0/3] vhost_net: support for cross endian guests
Hi,
This patchset allows vhost_net to be used with legacy virtio
when guest and host have a different endianness. It is based
on previous work by C?dric Le Goater:
https://www.mail-archive.com/kvm-ppc at vger.kernel.org/msg09848.html
As suggested by MST:
- the API now asks for a specific format (big endian) instead of the hint
whether byteswap is needed or not (patch 1)
- rebased on top of
2017 Mar 10
0
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...|
> - (1ULL << VIRTIO_F_VERSION_1)
> -};
> -
> -static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
> -{
> - return vq->acked_features & (1ULL << bit);
> -}
> -
> -#ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
> -static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
> -{
> - return vq->is_le;
> -}
> -#else
> -static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
> -{
> - return virtio_legacy_is_little_endian() || vq->is_le;
> -}
> -#endif
> -
> -/* Memory accessors */
> -stat...
2015 Apr 23
16
[PATCH v5 0/8] vhost: support for cross endian guests
...series could make it to 4.1.
Cheers.
---
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 accessors
vhost: cross-endian support for legacy devices
macvtap/tun: cross-endian support for little-endian hosts
drivers/net/Kconfig | 14 ++++++
drivers/net/macvtap.c | 68 ++++++++++++++++...
2015 Apr 23
16
[PATCH v5 0/8] vhost: support for cross endian guests
...series could make it to 4.1.
Cheers.
---
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 accessors
vhost: cross-endian support for legacy devices
macvtap/tun: cross-endian support for little-endian hosts
drivers/net/Kconfig | 14 ++++++
drivers/net/macvtap.c | 68 ++++++++++++++++...
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
...nged
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() helper
vringh: introduce vringh_is_little_endian() helper
vhost: introduce vhost_is_little_endian() helper
virtio: add explicit big-endian support to memory accessors
vhost: feature to set the vring endianness
drivers/net/macvtap.c | 11 ++++++--
drivers/net/tun.c | 11 ++++++--
drivers/vhost/Kconfig | 10 +++++++
drivers/vhost/vhost.c...
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
...nged
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() helper
vringh: introduce vringh_is_little_endian() helper
vhost: introduce vhost_is_little_endian() helper
virtio: add explicit big-endian support to memory accessors
vhost: feature to set the vring endianness
drivers/net/macvtap.c | 11 ++++++--
drivers/net/tun.c | 11 ++++++--
drivers/vhost/Kconfig | 10 +++++++
drivers/vhost/vhost.c...
2015 Apr 02
9
[PATCH v2 0/7] vhost: support for cross endian guests
...atchset I'm currently working on.
---
Greg Kurz (7):
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 accessors
vhost: feature to set the vring endianness
drivers/net/macvtap.c | 11 +++++++++--
drivers/net/tun.c | 11 +++++++++--
drivers/vhost/Kconfig | 10 ++++++++++
drivers/vhost/...
2015 Apr 02
9
[PATCH v2 0/7] vhost: support for cross endian guests
...atchset I'm currently working on.
---
Greg Kurz (7):
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 accessors
vhost: feature to set the vring endianness
drivers/net/macvtap.c | 11 +++++++++--
drivers/net/tun.c | 11 +++++++++--
drivers/vhost/Kconfig | 10 ++++++++++
drivers/vhost/...
2015 Apr 10
16
[PATCH v4 0/8] vhost: support for cross endian guests
...ice-versa on ppc64
and ppc64le hosts.
---
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 accessors
vhost: feature to set the vring endianness
macvtap/tun: add VNET_BE flag
drivers/net/Kconfig | 12 ++++++
drivers/net/macvtap.c | 69 ++++++++++++++++++++++++++++++++++-
drivers/net...
2015 Apr 10
16
[PATCH v4 0/8] vhost: support for cross endian guests
...ice-versa on ppc64
and ppc64le hosts.
---
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 accessors
vhost: feature to set the vring endianness
macvtap/tun: add VNET_BE flag
drivers/net/Kconfig | 12 ++++++
drivers/net/macvtap.c | 69 ++++++++++++++++++++++++++++++++++-
drivers/net...
2015 May 12
2
[PATCH v6 0/8] vhost: support for cross endian guests
...urz (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 accessors
> > vhost: cross-endian support for legacy devices
> > macvtap/tun: cross-endian support for little-endian hosts
> >
> >
> > drivers/net/Kconfig | 14 ++++...