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: Victor Kamensky X-Patchwork-Id: 3634221 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 D03679F334 for ; Wed, 12 Feb 2014 05:43:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC2342015D for ; Wed, 12 Feb 2014 05:43:17 +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 066172014A for ; Wed, 12 Feb 2014 05:43:17 +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 1WDSar-0002Dg-BE; 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-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:in-reply-to :references; bh=LwirU7aSkNSEjlBPB2BRmTdLXD4jn7AEF+AnEeP4SH0=; b=HC81/NrNiVdKeq378/yPs5UkNCgBvQlJCHEYHaWHsUzdzVUbrHW5o4ckBq56YlgamJ Na0FsjW2DyNB3ONmd0B4W+B3QGg67XjWRvG2E6kN88LdRk3CwRWm9HteMTOhixcCXBx+ aJHCz6z1y9rB9R9tfpVT7Yh/QBOL5ndxH6OuPVcGOj85sOcp3eIsjdrjc6hSQwb1+Gt2 CLOOJCadRRWGgs0QBmRCwzUUhzybwY5IZWN6GdoXKnr3tPRtqrJh4eumlGDgb2pe1u3w QvyEe5jX6xhEHxdvZFeh653QpxUOlALsHnV57dGOjnqT4WQwpoQKpTx4OoS1PiCTuadZ PsJA== X-Gm-Message-State: ALoCoQkkntD7DMR6hy+PlgDZvlzNha4d1pDZEd6jJY+aMvMztb2mDAE4LsWCVpfacSKQ7OttDsFH 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 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 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 --- 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