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: vkamensky X-Patchwork-Id: 31836 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CA5F720AE6 for ; Thu, 12 Jun 2014 16:32:35 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id id10sf3304623vcb.11 for ; Thu, 12 Jun 2014 09:32:35 -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=4hmxQtetqqEwxN1M2oFrgoSQ98PZMBg8i8l0VRoWAeo=; b=cwg/jFWsP93HiocCnXf9MbguJNlJKSStE+cL4Q4+m6Ehmg/8kumtT34/WR84k0jj77 XmlAlF0YQ/nYUCTOcknd++SuOASbH40q1F/AGePPsGU+eewT4WXGM+LOT3R16O2cHMqT KOg1NhG9dEiY4UE7CXkQi6gjq1/WivwtSgUzHF3CsV1MXRqpgC5ammDJfB92kZpH/1iT xerGq8VDxj+pgKMSyUKfk+dwZT7i/P9r0u7Dyf/xgxOPouus2h2o4j/ySTDUYxJ+C+JY frvbPC9drikmyK+VaG4dEFnZMALbzcpZ34z9kjlENH06XEkn/laWBsoEfflro2h8YLfH +iVA== X-Gm-Message-State: ALoCoQkB6v+b3nJIoOCQJkI1VWCH8MHVYUyQqQcgp959CDm/+3asTsHgEoy8uf1pi/IXnO5fS7sn X-Received: by 10.58.225.225 with SMTP id rn1mr2775431vec.5.1402590755652; Thu, 12 Jun 2014 09:32:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.111 with SMTP id b102ls3160287qga.31.gmail; Thu, 12 Jun 2014 09:32:35 -0700 (PDT) X-Received: by 10.220.92.193 with SMTP id s1mr1491766vcm.34.1402590755452; Thu, 12 Jun 2014 09:32:35 -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 bw1si481741vcb.18.2014.06.12.09.32.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 09:32:35 -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 ik5so1068986vcb.21 for ; Thu, 12 Jun 2014 09:32:35 -0700 (PDT) X-Received: by 10.58.112.65 with SMTP id io1mr1010505veb.61.1402590755341; Thu, 12 Jun 2014 09:32:35 -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.221.54.6 with SMTP id vs6csp416924vcb; Thu, 12 Jun 2014 09:32:34 -0700 (PDT) X-Received: by 10.224.161.83 with SMTP id q19mr62868711qax.56.1402590754069; Thu, 12 Jun 2014 09:32:34 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id t5si34782589qgd.30.2014.06.12.09.32.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 09:32:34 -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 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-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 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.171 listed in wl.mailspike.net] 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+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