From patchwork Fri Dec 20 16:48:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 3390061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 85CC19F314 for ; Fri, 20 Dec 2013 16:50:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41DB8206DD for ; Fri, 20 Dec 2013 16:50:38 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE87A20610 for ; Fri, 20 Dec 2013 16:50:36 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vu3H7-0005o6-4o; Fri, 20 Dec 2013 16:50:09 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vu3Gx-0001Rd-1t; Fri, 20 Dec 2013 16:49:59 +0000 Received: from mail-pd0-f172.google.com ([209.85.192.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vu3Gb-0001M8-7m for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2013 16:49:39 +0000 Received: by mail-pd0-f172.google.com with SMTP id g10so2738551pdj.31 for ; Fri, 20 Dec 2013 08:49:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HD/qT7k1STr+mFNM22NzNCdCUYPFVoBcQD8oLlAD1Gw=; b=e12MNp9COwYBcO2MzNMITWkDiO7fw738LB06qwWnT9WfgndmMCTuDgKkeNqHqqDqtU HxEmkV1DvPB3sy1XRrsa3bfFZ7265dhAFj8kA9BrsHSTJX2MwQdWbCSctrG1CqroiUjT yRfT95GSXN7C5ltyosqcefd8P47PWl6l3tQ3/T4EsHiErGnkkm5pGXa0IjaL4K7AOD1f mj6SvzKqdW58d5ekcvYWJYDzskomWuoSrev9HalQp6oP27MQm5+DU+hZSvbKZXCMZdmX ltJ4B11EVV2Ib3zcu1vRzIX/xNPQkTkTi14K6MEMxrbb6cAy7R5lvfYojMebWoFneBhu a50Q== X-Gm-Message-State: ALoCoQkTAD2WVCdrtq+0+ZxzFiTqy+jvJdvGEshlUtRyGGBq7ucZqw1Z3mD6FEKQuFSM3WNPVTCg X-Received: by 10.68.218.3 with SMTP id pc3mr9727985pbc.71.1387558151300; Fri, 20 Dec 2013 08:49:11 -0800 (PST) Received: from kamensky-w530.hsd1.ca.comcast.net (c-24-6-79-41.hsd1.ca.comcast.net. [24.6.79.41]) by mx.google.com with ESMTPSA id nw11sm20120833pab.13.2013.12.20.08.49.09 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 20 Dec 2013 08:49:10 -0800 (PST) From: Victor Kamensky To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, christoffer.dall@linaro.org, ben.dooks@codethink.co.uk Subject: [PATCH REPOST 0/5] armv7 BE kvm support Date: Fri, 20 Dec 2013 08:48:40 -0800 Message-Id: <1387558125-3460-1-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131220_114937_514661_442925E1 X-CRM114-Status: GOOD ( 13.46 ) X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, taras.kondratiuk@linaro.org, Victor Kamensky , will.deacon@arm.com, andre.przywara@linaro.org, Dave.Martin@arm.com, rmk@arm.linux.org.uk X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP [repost: adding kvmarm mailing list as per Christoffer's request] Hi Guys, Here is series that enables KVM support for V7 big endian kernels. Mostly it deals with BE KVM host support. Marc Zyngier showed before with his patches how BE guest could run on top LE host. With these patches BE guest runs on top of BE host. If Marc's kvmtool is used with few additional changes I tested that BE host could run LE guest. Also I verified that there were no regressions in BE guest on top of LE host case. Note that posted series covers only kernel side changes. The changes were tested inside of bigger setup with additional changes in qemu and kvmtool. I will post those changes separately in proper aliases but for completeness sake Appendix A gives pointers to git repositories and branches with all needed changes. Please note first patch is not related to BE KVM per se. I've run into an issue of conflicting 'push' identifier use while trying to include assembler.h into KVM .S files. Details of an issue I observed covered in Appendix B. The first patch is my take on solving it. Victor Kamensky (5): ARM: kvm: replace push and pop with stdmb and ldmia instrs to enable assembler.h inclusion ARM: fix KVM assembler files to work in BE case ARM: kvm one_reg coproc set and get BE fixes ARM: kvm vgic mmio should return data in BE format in BE case ARM: kvm MMIO support BE host running LE code arch/arm/include/asm/assembler.h | 7 +++ arch/arm/include/asm/kvm_asm.h | 4 +- arch/arm/include/asm/kvm_emulate.h | 22 +++++++-- arch/arm/kvm/coproc.c | 94 ++++++++++++++++++++++++++++---------- arch/arm/kvm/init.S | 7 ++- arch/arm/kvm/interrupts.S | 50 +++++++++++--------- arch/arm/kvm/interrupts_head.S | 61 +++++++++++++++---------- virt/kvm/arm/vgic.c | 4 +- 8 files changed, 168 insertions(+), 81 deletions(-) diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index ddc1553..5d3b511 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S @@ -25,6 +25,7 @@ #include #include #include +#include #include "interrupts_head.S" .text