From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cedric Le Goater Subject: Re: [RFC PATCH 0/4] vhost_net: support for cross endian guests Date: Tue, 04 Nov 2014 09:07:47 +0100 Message-ID: <54588953.4060309@fr.ibm.com> References: <1414571925-16918-1-git-send-email-clg@fr.ibm.com> <20141103162349.GB24877@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 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 To: "Michael S. Tsirkin" Return-path: In-Reply-To: <20141103162349.GB24877@redhat.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 11/03/2014 05:23 PM, Michael S. Tsirkin wrote: > On Wed, Oct 29, 2014 at 09:38:41AM +0100, C=E9dric Le Goater wrote: >> 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. >=20 > Hi Cedric, >=20 > Thanks for submitting this. > One general problem with this approach, is that > it adds overhead e.g. for x86 on x86 unconditionally. Yes but it should be possible to #ifdef most of the routines to make them transparent for x86.=20 > I will in a couple of days post a patch adding virtio 1.0 > support for vhost. >=20 > This will serve as a better basis for cross-endian support in > vhost, on top. ok. I will rework the patchset on top of it then. > I'll try to remember to Cc you. Thanks. C. =20 >> The patches apply on linux-3.18-rc2 and the tests were done on Power= PC=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=E9dric 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 >=20