From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [RFC PATCH 0/4] vhost_net: support for cross endian guests Date: Wed, 29 Oct 2014 09:38:41 +0100 Message-ID: <1414571925-16918-1-git-send-email-clg@fr.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, agraf@suse.de, paulus@samba.org, gkurz@linux.vnet.ibm.com.patch, aik@ozlabs.ru, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: "Michael S. Tsirkin" Return-path: Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org This patchset adds a VHOST_VRING_F_BYTESWAP flag to inform the host=20 to byteswap data of the vring when the guest and the host have a=20 different endian order. The flag is stored at initialization in an=20 attribute of the virtio queues. It is then used to byteswap, or not,=20 the vring indexes and descriptors shared with the guest OS. The last patch adds the byteswapping of the virtio_net header as it=20 is done in qemu. The patches apply on linux-3.18-rc2 and the tests were done on PowerPC=20 using the following hosts : =20 fedora21/ppc64, utopic/ppc64le =20 with various guests :=20 trusty/ppc64le, utopic/ppc64le, debian/ppc64le,=20 rhel6.5/ppc64, fedora21/ppc64, debian/ppc64 Regressions tests for x86_64 were done a debian host using rhel6.6,=20 fedora20 and debian guests. =09 C=C3=A9dric 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(-) --=20 1.7.10.4