Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966345AbbDWP0U (ORCPT ); Thu, 23 Apr 2015 11:26:20 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:41537 "EHLO e06smtp16.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965519AbbDWP0S (ORCPT ); Thu, 23 Apr 2015 11:26:18 -0400 Subject: [PATCH v5 0/8] vhost: support for cross endian guests From: Greg Kurz To: Rusty Russell , "Michael S. Tsirkin" Cc: Cornelia Huck , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Date: Thu, 23 Apr 2015 17:26:08 +0200 Message-ID: <20150423152608.11795.4373.stgit@bahia.local> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042315-0025-0000-0000-000004DC717A Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1932 Lines: 50 Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. It is compatible with modern virtio and can be fully compiled out through kernel config. FWIW, I could flawlessly kexec/reboot guests from ppc64 to ppc64le and back. I could also migrate from a ppc64 to a ppc64le host and back. No regressions on x86 as expected. My experimental QEMU tree is here: https://github.com/gkurz/qemu.git vhost/cross-endian I'd be glad if this 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 +++++++++++++++++++++++++++++- drivers/net/tun.c | 70 ++++++++++++++++++++++++++++++- drivers/vhost/Kconfig | 15 +++++++ drivers/vhost/vhost.c | 86 ++++++++++++++++++++++++++++++++++++++ drivers/vhost/vhost.h | 25 ++++++++--- include/linux/virtio_byteorder.h | 24 ++++++----- include/linux/virtio_config.h | 20 ++++++--- include/linux/vringh.h | 17 +++++--- include/uapi/linux/if_tun.h | 6 +++ include/uapi/linux/vhost.h | 12 +++++ 11 files changed, 324 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/