From patchwork Thu Jun 12 16:30:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 4343471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6686ABEEAA for ; Thu, 12 Jun 2014 16:33:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A86FC20351 for ; Thu, 12 Jun 2014 16:33:43 +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 CD393202FF for ; Thu, 12 Jun 2014 16:33:42 +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 1Wv7u7-0007xW-PK; Thu, 12 Jun 2014 16:31:07 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wv7tu-0007sA-0L for linux-arm-kernel@lists.infradead.org; Thu, 12 Jun 2014 16:30:57 +0000 Received: by mail-pd0-f171.google.com with SMTP id ft15so1130887pdb.30 for ; Thu, 12 Jun 2014 09:30:32 -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=ABug1+uea1ABXsifFQai74Vy5hYEn95hMPlH+k/zgxk=; b=mK+hvEp2LtIvbS9v9V/cDHDw9Hbn3tGZg5T08CUOBXJhEwpXI6fRstD23UgC5TtCKM pV7nodCAC/3RWXDtoGYDCxYPY2TOSjGUmkyCOaj33+ejoxHGqxFZzb3vjXXtOzNQbiWu EC1xsFPLJ5skrCrM4+h6XAQyJ/qpAj3eYPv1pNsdasHxSdKQGTldbcUg0z4e0+7LpfPM AD7fYJiIr/81pHO3Y6p1kvXaEfwhFl+nLZ/jH+JjTSs7qduqA3OCAA5udMS3i4Yxj/R6 TdjL9FUZj6gbU29Jv4Xs1PbCAfobi2dDFyW3n8DD2o4zPE080gwguLqvu1JzHfsnsEEv GJjw== X-Gm-Message-State: ALoCoQnTktfbp/Z6KqB1nlEQVxO2/mmqrpKO//IspG0igQ50Uwy9dtKC+KyPZZpc6nbcQsXVfI16 X-Received: by 10.66.146.199 with SMTP id te7mr22547865pab.106.1402590632786; Thu, 12 Jun 2014 09:30:32 -0700 (PDT) Received: from kamensky-w530.cisco.com (128-107-239-235.cisco.com. [128.107.239.235]) by mx.google.com with ESMTPSA id nh8sm81278030pbc.25.2014.06.12.09.30.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 09:30:32 -0700 (PDT) From: Victor Kamensky To: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, agraf@suse.de Subject: [PATCH v4 01/14] ARM: KVM: switch hypervisor into BE mode in case of BE host Date: Thu, 12 Jun 2014 09:30:00 -0700 Message-Id: <1402590613-3341-2-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1402590613-3341-1-git-send-email-victor.kamensky@linaro.org> References: <1402590613-3341-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140612_093054_082343_136832D5 X-CRM114-Status: UNSURE ( 8.32 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) 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.18-1 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