Skip to content

RFC vhost_net: support for cross endian guests

Cédric Le Goater kvm kvm-ppc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vhost: add VHOST_VRING_F_BYTESWAP flagdrivers/vhost/vhost.c drivers/vhost/vhost.h include/uapi/linux/vhost.h+8 -11 reply
2/4vhost: add byteswap routinesdrivers/vhost/vhost.c+93 -01 reply
3/4vhost: byteswap virtqueue attributesdrivers/vhost/vhost.c+40 -121 reply
4/4vhost_net: byteswap virtio_net headerdrivers/vhost/net.c+30 -91 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/4] vhost_net: support for cross endian guests

This patchset adds a VHOST_VRING_F_BYTESWAP flag to inform the host to byteswap data of the vring when the guest and the host have a different endian order. The flag is stored at initialization in an attribute of the virtio queues. It is then used to byteswap, or not, the vring indexes and descriptors shared with the guest OS.

The last patch adds the byteswapping of the virtio_net header as it is done in qemu.

The patches apply on linux-3.18-rc2 and the tests were done on PowerPC using the following hosts :

fedora21/ppc64, utopic/ppc64le

with various guests :

trusty/ppc64le, utopic/ppc64le, debian/ppc64le, rhel6.5/ppc64, fedora21/ppc64, debian/ppc64

Regressions tests for x86_64 were done a debian host using rhel6.6, fedora20 and debian guests.

Cédric Le Goater (4):
vhost: add VHOST_VRING_F_BYTESWAP flag
vhost: add byteswap routines
vhost: byteswap virtqueue attributes
vhost_net: byteswap virtio_net header

 drivers/vhost/net.c        |   39 +++++++++---
 drivers/vhost/vhost.c      |  150 ++++++++++++++++++++++++++++++++++++++++----
 drivers/vhost/vhost.h      |    1 +
 include/uapi/linux/vhost.h |    3 +
 4 files changed, 171 insertions(+), 22 deletions(-)
Signature · 1 line
1.7.10.4