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: Victor Kamensky X-Patchwork-Id: 4169441 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 6F1089F1C0 for ; Tue, 13 May 2014 16:18:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CAA12020A for ; Tue, 13 May 2014 16:18:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 6AB2420251 for ; Tue, 13 May 2014 16:18:29 +0000 (UTC) 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-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=7Zh9Cg4m4Wa0X4/a/WzyCArjA5R7Nu7Urmp220SglXE=; b=HIvJwaTPsYKr07SQ0pCUXU18SrJScTyfuEUGlBBHtCMj1HPVqEkvsw+Sh+rrnCV+Zl 1M9ebqUq5S/yozUSTspMem9pq47s6BBppEbD815qLUX2PiE13D058X8apPhYK2qQ9IDq lC1EkCz944pqXVe6tNRb13CAifsWL0sl3IuDnGs9pGhXuj0pFr+K0Eo4ClUhuPDVharM IMJlTsGOek008TFTBh7onWZkB5fl12YQsqrL7DgW3o1BOSk2TWrDtLXTtFV/CZYTSYwt LS3SQ+DNDWIdHnAwyS7QHhRpgvggoO7kTSgeC5R8Q3mufHrt9DPU8XmCbmxlq+N56crJ 1HNA== X-Gm-Message-State: ALoCoQlCtK3X55K7k43vJkWMgX7mYHVhjn9tKCRPGCxO1l6O2bA/d50rGshs8VweWcFZRwN6o5g5 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 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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