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: vkamensky X-Patchwork-Id: 22682 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8645E202AE for ; Fri, 20 Dec 2013 16:49:14 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f11sf3961132qae.3 for ; Fri, 20 Dec 2013 08:49:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=HD/qT7k1STr+mFNM22NzNCdCUYPFVoBcQD8oLlAD1Gw=; b=bJD8TETU+Li2eQWRODgh+PChAZT1MD9WpheK9Pxb7x6uQKVnzkpW9Tl8itZqfLtFOc 4R12WVu1jw3DA/ALW6zOSdduHG4IK27DY2wGIjvw9qQbQi/2EhoAiSbI3z8f8ehoMoyz sBgUudgrfw5jMYtpyN3dNjE1f33fn245/X40ntwPPsJ5uY03GO+W/kj2AE9aVxKNwvoR dxKAjvdXlpSjXcyKz/QM3AaUdebW19vukOI4Q9ZXhVcCX+URIQThymUtiqphA3zeRqNP oyOzlwpxi4uinolE6Bo3B/7jA0c2nsJF+KYi7SHoT+Z/oqPrX+hIHc2zanV4kd6gpth/ NwZg== X-Gm-Message-State: ALoCoQm2HlTb61vhwOcjWiR3tZE2p2+p/CDoXjS+FPusQUPKrmqhDfP9bT9YIzNjG+E+gYY2OZWY X-Received: by 10.58.12.67 with SMTP id w3mr4015836veb.0.1387558153515; Fri, 20 Dec 2013 08:49:13 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.81.229 with SMTP id d5ls763810qey.64.gmail; Fri, 20 Dec 2013 08:49:13 -0800 (PST) X-Received: by 10.221.64.17 with SMTP id xg17mr5574306vcb.5.1387558153439; Fri, 20 Dec 2013 08:49:13 -0800 (PST) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id e3si1630413vek.55.2013.12.20.08.49.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Dec 2013 08:49:13 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db12so1612426veb.36 for ; Fri, 20 Dec 2013 08:49:13 -0800 (PST) X-Received: by 10.220.200.65 with SMTP id ev1mr5546960vcb.13.1387558153352; Fri, 20 Dec 2013 08:49:13 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp75235ved; Fri, 20 Dec 2013 08:49:12 -0800 (PST) X-Received: by 10.68.130.169 with SMTP id of9mr9694481pbb.79.1387558152066; Fri, 20 Dec 2013 08:49:12 -0800 (PST) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx.google.com with ESMTPS id j8si5660195pad.149.2013.12.20.08.49.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Dec 2013 08:49:12 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.45 is neither permitted nor denied by best guess record for domain of victor.kamensky@linaro.org) client-ip=209.85.220.45; Received: by mail-pa0-f45.google.com with SMTP id fb1so2852512pad.18 for ; Fri, 20 Dec 2013 08:49:11 -0800 (PST) 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 Cc: rmk@arm.linux.org.uk, will.deacon@arm.com, Dave.Martin@arm.com, andre.przywara@linaro.org, taras.kondratiuk@linaro.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Victor Kamensky 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: victor.kamensky@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , [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