From patchwork Fri Dec 20 07:26:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 22662 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B174723FC0 for ; Fri, 20 Dec 2013 07:27:30 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id jw12sf2419890veb.11 for ; Thu, 19 Dec 2013 23:27:29 -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=XrrYglaCB+cyF2eNpE79smAgi3UdV/Bywz56py45Hbk=; b=Jsrchz/WezEg/d+SVX2FpcRhQZ3VyuwkEUJm40Dn5RDKp8KvBKqudk1No6roKkpZZN nAjsxDbBSoG0x/4hKtwoapVzAk64H+uygDdmd99+6Kqt1Qg2xIxkGdZdSboaOGT/frRL Og+iG4bHStALe3NrEDhhMzGsjQv5YnZiwIJ8EcyHW7YjLgaR4ZUBRLjxsiQk+Sgsm5YU J0KwZoUy15Rrek4Fs06pUeGUqfolncQ35qTantJJabWytuJogfLDMHZPf48HBtQ93sW6 GlV01nuova5WI6/DhyQxuXnkpiMMO2HRLP1Uw5pu8aPC4Msp78toBGfzZgEBdLo0/SSV e+kg== X-Gm-Message-State: ALoCoQnQXJsDbU1IccOCfXNQywH+6JvpMesBLtcFy6/nX9+ABwat6Q0iSm0xi8LohJL/MrIbu2Wk X-Received: by 10.58.34.142 with SMTP id z14mr2474275vei.23.1387524449203; Thu, 19 Dec 2013 23:27:29 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.237 with SMTP id y13ls651137qeu.2.gmail; Thu, 19 Dec 2013 23:27:29 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr499121vcn.21.1387524449124; Thu, 19 Dec 2013 23:27:29 -0800 (PST) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id q19si1299415vea.63.2013.12.19.23.27.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 23:27:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id jw12so1249864veb.38 for ; Thu, 19 Dec 2013 23:27:29 -0800 (PST) X-Received: by 10.220.58.1 with SMTP id e1mr4165093vch.0.1387524448935; Thu, 19 Dec 2013 23:27:28 -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 ey3csp40802ved; Thu, 19 Dec 2013 23:27:28 -0800 (PST) X-Received: by 10.66.139.8 with SMTP id qu8mr6718297pab.157.1387524447042; Thu, 19 Dec 2013 23:27:27 -0800 (PST) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by mx.google.com with ESMTPS id j5si4508222pbs.151.2013.12.19.23.27.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 23:27:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.169 is neither permitted nor denied by best guess record for domain of victor.kamensky@linaro.org) client-ip=209.85.192.169; Received: by mail-pd0-f169.google.com with SMTP id v10so2195356pde.0 for ; Thu, 19 Dec 2013 23:27:26 -0800 (PST) X-Received: by 10.68.203.34 with SMTP id kn2mr6750470pbc.82.1387524446482; Thu, 19 Dec 2013 23:27:26 -0800 (PST) Received: from kamensky-w530.cisco.com (128-107-239-233.cisco.com. [128.107.239.233]) by mx.google.com with ESMTPSA id ic7sm12147339pbc.29.2013.12.19.23.27.24 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 19 Dec 2013 23:27:25 -0800 (PST) From: Victor Kamensky To: linux-arm-kernel@lists.infradead.org, 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 0/5] armv7 BE kvm support Date: Thu, 19 Dec 2013 23:26:54 -0800 Message-Id: <1387524419-4216-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.179 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: , 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