From patchwork Tue May 13 16:13:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 30095 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 72E4A20446 for ; Tue, 13 May 2014 16:17:16 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id va2sf2477354obc.5 for ; Tue, 13 May 2014 09:17:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=yMOjzxVpw620N9dZ2ERTFuwKYlVoahN0182+M809JRs=; b=bxZ6SQGVWLiBD9rt/J0m6Ooo/+Cl8h29YpPfXmlm6T+zyOlMSyaIMuyU6tCL3TdYNF efdQaA2SGtqe/YKxs2wNULVv879QpVOjCBwyagU6WHcc5/jpaHzVPFL3OJlCg0VMQ51Q FwpKjycS6YtzBdlDHdCY8uybXTOTPfTrYGoNMrIUT7rUP8GG3JHsERts0TVJiGw2V/3O mgBaZ6xqLr8gJaXasb4pivY5GgkBVLkv7vYiVwhcCZi3sw3vHBYZnsyYMJv7aPiaUQmj z7nyzihFhLMX2RmNN7CpF1EWlCITlCqbFJvykrwyhgDD85p8YXVX07DAS+P2nCDSNxEM WMEQ== X-Gm-Message-State: ALoCoQndtrYSugn5IurjjKw8SeqIOP6Cu85l9Zh/nCEVfxOh/7DWkBthAT+9x7AnasDVNS1m4K10 X-Received: by 10.42.155.137 with SMTP id u9mr15715858icw.12.1399997835442; Tue, 13 May 2014 09:17:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.181 with SMTP id 50ls607424qgr.92.gmail; Tue, 13 May 2014 09:17:15 -0700 (PDT) X-Received: by 10.58.126.4 with SMTP id mu4mr30306134veb.0.1399997835327; Tue, 13 May 2014 09:17:15 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id z4si2735379vcp.24.2014.05.13.09.17.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 09:17:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lg15so753203vcb.7 for ; Tue, 13 May 2014 09:17:15 -0700 (PDT) X-Received: by 10.58.116.175 with SMTP id jx15mr29716965veb.9.1399997835134; Tue, 13 May 2014 09:17:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp164105vcb; Tue, 13 May 2014 09:17:14 -0700 (PDT) X-Received: by 10.224.60.137 with SMTP id p9mr36229774qah.92.1399997834524; Tue, 13 May 2014 09:17:14 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id c2si2461814qas.82.2014.05.13.09.17.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 May 2014 09:17:14 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WkFMM-0002dM-Or; Tue, 13 May 2014 16:15:18 +0000 Received: from mail-pa0-f41.google.com ([209.85.220.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WkFMF-0001Rp-6h for linux-arm-kernel@lists.infradead.org; Tue, 13 May 2014 16:15:12 +0000 Received: by mail-pa0-f41.google.com with SMTP id lj1so457320pab.28 for ; Tue, 13 May 2014 09:14:50 -0700 (PDT) X-Received: by 10.68.240.34 with SMTP id vx2mr6295134pbc.1.1399997690288; Tue, 13 May 2014 09:14:50 -0700 (PDT) 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 dd5sm28958360pbc.85.2014.05.13.09.14.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 May 2014 09:14:49 -0700 (PDT) From: Victor Kamensky To: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, agraf@suse.de Subject: [PATCH v3 01/14] ARM: KVM: switch hypervisor into BE mode in case of BE host Date: Tue, 13 May 2014 09:13:53 -0700 Message-Id: <1399997646-4716-2-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1399997646-4716-1-git-send-email-victor.kamensky@linaro.org> References: <1399997646-4716-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140513_091511_268111_AAA15B5C X-CRM114-Status: UNSURE ( 8.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.41 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Cc: taras.kondratiuk@linaro.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Victor Kamensky 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: victor.kamensky@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Switch hypervisor to run in BE mode if image is compiled with CONFIG_CPU_BIG_ENDIAN. Signed-off-by: Victor Kamensky Reviewed-by: Christoffer Dall Acked-by: Marc Zyngier --- arch/arm/kvm/init.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S index 1b9844d..74f0718 100644 --- a/arch/arm/kvm/init.S +++ b/arch/arm/kvm/init.S @@ -22,6 +22,7 @@ #include #include #include +#include /******************************************************************** * Hypervisor initialization @@ -70,6 +71,8 @@ __do_hyp_init: cmp r0, #0 @ We have a SP? bne phase2 @ Yes, second stage init +ARM_BE8(setend be) @ Switch to Big Endian mode if needed + @ Set the HTTBR to point to the hypervisor PGD pointer passed mcrr p15, 4, r2, r3, c2