Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753906AbbDBOXb (ORCPT ); Thu, 2 Apr 2015 10:23:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48960 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753508AbbDBOX1 (ORCPT ); Thu, 2 Apr 2015 10:23:27 -0400 Date: Thu, 2 Apr 2015 16:23:23 +0200 From: "Michael S. Tsirkin" To: Greg Kurz Cc: Rusty Russell , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v2 0/7] vhost: support for cross endian guests Message-ID: <20150402162120-mutt-send-email-mst@redhat.com> References: <20150402131637.24676.60700.stgit@bahia.lab.toulouse-stg.fr.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150402131637.24676.60700.stgit@bahia.lab.toulouse-stg.fr.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2481 Lines: 60 On Thu, Apr 02, 2015 at 03:16:37PM +0200, Greg Kurz wrote: > Hi, > > This patchset allows vhost to be used with legacy virtio when guest and host > have a different endianness. It is a complete rework of my initial post. > > Patches 1 to 5 are preliminary work: we move the endianness check out of all > memory accessors to separate functions. > > Patch 6 changes the semantics of the accessors so that they have explicit big > endian support. > > Patch 7 brings the cross-endian feature, with the following changes since v1: > - conditionnal enablement through a kernel config > - introduction of a new vhost feature to advertise cross-endian to userspace I think adding ioctls is sufficient for this, we don't need to burn up a feature bit. > The tentative to fix vnet headers was dropped for the moment. As a consequnce, > vhost_net still fails to work with cross-endian. It will be fixed in another > patchset I'm currently working on. I think I'll probably hold off on applying this patchset until it all actually works. > --- > > 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/net.c | 5 +++++ > drivers/vhost/scsi.c | 4 ++++ > drivers/vhost/test.c | 4 ++++ > drivers/vhost/vhost.c | 19 +++++++++++++++++++ > drivers/vhost/vhost.h | 32 +++++++++++++++++++++++++------- > include/linux/virtio_byteorder.h | 24 ++++++++++++++---------- > include/linux/virtio_config.h | 19 +++++++++++++------ > include/linux/vringh.h | 19 +++++++++++++------ > include/uapi/linux/vhost.h | 10 ++++++++++ > 12 files changed, 135 insertions(+), 33 deletions(-) > > -- > Greg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/