From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: [PATCH v3 0/9] kvmtool: handle guests of a different endianness Date: Thu, 24 Apr 2014 19:17:14 +0100 Message-ID: <1398363443-3764-1-git-send-email-marc.zyngier@arm.com> Cc: Will Deacon , Pekka Enberg To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Return-path: Received: from fw-tnat.austin.arm.com ([217.140.110.23]:20446 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758784AbaDXSRb (ORCPT ); Thu, 24 Apr 2014 14:17:31 -0400 Sender: kvm-owner@vger.kernel.org List-ID: This patch series adds some infrastructure to kvmtool to allow a BE guest to use virtio-mmio on a LE host, provided that the architecture actually supports such madness. Not all the backend have been converted, only those I actually cared about. Converting them is pretty easy though, and will be done if the method is deemed acceptable. This has been tested on both arm and arm64 (I use this on a daily basis to test BE code). The corresponding kernel changes have all been merged. Also available at: git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/kvmtool-be-on-le >>From v2 (never posted): - Fixed tons of bugs (config space) - Fixed TAP networking >>From v1: - Gave up on the virtio extension after the push back from the PPC guys. Instead, we snapshot the endianness of the vcpu when it tries to reset the device. A bit ugly, but doesn't require any change on the kernel side. Marc Zyngier (9): kvmtool: pass trapped vcpu to MMIO accessors kvmtool: virt_queue configuration based on endianness kvmtool: sample CPU endianness on virtio-mmio device reset kvmtool: add queue endianness initializer kvmtool: convert console backend to support bi-endianness kvmtool: convert 9p backend to support bi-endianness kvmtool: convert blk backend to support bi-endianness kvmtool: convert net backend to support bi-endianness kvmtool: virtio: enable arm/arm64 support for bi-endianness tools/kvm/arm/aarch32/kvm-cpu.c | 14 ++++ tools/kvm/arm/aarch64/include/kvm/kvm-cpu-arch.h | 2 + tools/kvm/arm/aarch64/kvm-cpu.c | 25 ++++++++ tools/kvm/arm/include/arm-common/kvm-arch.h | 2 + tools/kvm/arm/include/arm-common/kvm-cpu-arch.h | 4 +- tools/kvm/arm/kvm-cpu.c | 10 +-- tools/kvm/hw/pci-shmem.c | 2 +- tools/kvm/include/kvm/kvm-cpu.h | 1 + tools/kvm/include/kvm/kvm.h | 4 +- tools/kvm/include/kvm/virtio.h | 82 +++++++++++++++++++++++- tools/kvm/kvm-cpu.c | 10 ++- tools/kvm/mmio.c | 11 ++-- tools/kvm/pci.c | 3 +- tools/kvm/powerpc/include/kvm/kvm-cpu-arch.h | 2 +- tools/kvm/powerpc/kvm-cpu.c | 4 +- tools/kvm/powerpc/spapr_pci.h | 6 +- tools/kvm/virtio/9p.c | 3 + tools/kvm/virtio/blk.c | 31 +++++++-- tools/kvm/virtio/console.c | 8 ++- tools/kvm/virtio/core.c | 59 +++++++++-------- tools/kvm/virtio/mmio.c | 21 ++++-- tools/kvm/virtio/net.c | 45 +++++++++++-- tools/kvm/virtio/pci.c | 6 +- tools/kvm/x86/include/kvm/kvm-cpu-arch.h | 4 +- 24 files changed, 284 insertions(+), 75 deletions(-) -- 1.8.3.4