From patchwork Wed Feb 12 05:41:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 24507 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E6F720567 for ; Wed, 12 Feb 2014 05:43:44 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id vb8sf34054404obc.6 for ; Tue, 11 Feb 2014 21:43:43 -0800 (PST) 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=VCDDBU6u1QRX+uzebjD93uoAQqDKmLX0Wqr070lu+Ss=; b=ZA1bx9CJwdHwJUYQja+wCqZLZ9ns7qBhNNaIZvO3If+/yL2wllPW5Xrm+nCWzohcaM jrQKLuzhEmtNW+aCA2NaDHt5CkNeNtUk5yDPNYnUQVXSDT0z6J2Yp7wv0emBwiO4FKlC 8G/H9uyAnx0wGmqbpVb6rM/T44xtz8ELZqPTCWt6GmJMrq12JJoxwJCZ/nXiFu8zI+48 /sQF8BWralQLnaxcse/pXQZGSVLA/Y2vGNMqc6bUn3zsgoyOVkV1fMOxgrp4P11uqznO P+3HmdSQlzHUylYN4AEW5IjbRSLTRW3ll1SxbAqMx0nVOYGQV/5uA81MT7WPapMVIwUW OfXA== X-Gm-Message-State: ALoCoQkTBO0S0NkO5jI7IAX4a1YkxSp4twroFS3mTCKZ/gAnkdmTgowY/5WxWVQ36FQQKOfAEKCG X-Received: by 10.182.24.5 with SMTP id q5mr1004677obf.23.1392183823686; Tue, 11 Feb 2014 21:43:43 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.134 with SMTP id i6ls2836697qge.2.gmail; Tue, 11 Feb 2014 21:43:43 -0800 (PST) X-Received: by 10.220.99.72 with SMTP id t8mr31642359vcn.10.1392183823584; Tue, 11 Feb 2014 21:43:43 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id si7si6915432vdc.24.2014.02.11.21.43.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 21:43:43 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.176 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.176; Received: by mail-ve0-f176.google.com with SMTP id oz11so6823341veb.7 for ; Tue, 11 Feb 2014 21:43:43 -0800 (PST) X-Received: by 10.52.109.193 with SMTP id hu1mr26738460vdb.11.1392183823495; Tue, 11 Feb 2014 21:43:43 -0800 (PST) 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.174.196 with SMTP id u4csp10720vcz; Tue, 11 Feb 2014 21:43:42 -0800 (PST) X-Received: by 10.15.36.70 with SMTP id h46mr575013eev.96.1392183822453; Tue, 11 Feb 2014 21:43:42 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id h44si36498826eew.248.2014.02.11.21.43.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 21:43:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDSar-0002Di-Ii; Wed, 12 Feb 2014 05:42:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDSai-0006F2-VH; Wed, 12 Feb 2014 05:42:36 +0000 Received: from mail-pb0-f43.google.com ([209.85.160.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDSaa-0006Ck-17 for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2014 05:42:29 +0000 Received: by mail-pb0-f43.google.com with SMTP id md12so8786662pbc.30 for ; Tue, 11 Feb 2014 21:42:03 -0800 (PST) X-Received: by 10.68.134.8 with SMTP id pg8mr49883431pbb.84.1392183720529; Tue, 11 Feb 2014 21:42:00 -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 eo11sm152396678pac.0.2014.02.11.21.41.58 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 21:41:59 -0800 (PST) From: Victor Kamensky To: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/7] ARM: KVM: switch hypervisor into BE mode in case of BE host Date: Tue, 11 Feb 2014 21:41:27 -0800 Message-Id: <1392183693-21238-2-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1392183693-21238-1-git-send-email-victor.kamensky@linaro.org> References: <1392183693-21238-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140212_004228_246254_90913CF3 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.43 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linaro-kernel@lists.linaro.org, Victor Kamensky , taras.kondratiuk@linaro.org, will.deacon@arm.com, andre.przywara@linaro.org, ben.dooks@codethink.co.uk, 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+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=neutral (google.com: 209.85.128.176 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 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 --- 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