Message ID | 1392184643-6108-5-git-send-email-victor.kamensky@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBD7P3VNW5YERBXM45SLQKGQEKWWXZ3A@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 755FE20567 for <linaro@patches.linaro.org>; Wed, 12 Feb 2014 06:02:06 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id m10sf19017024vbh.4 for <linaro@patches.linaro.org>; Tue, 11 Feb 2014 22:02:05 -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=7G2P/xWKS3StzPQH9WB796eNJuhA2VGAPdoXNL/zTV0=; b=RkyCaMOmJDit9mOuYwLOaJ/cjGRrhSP8okun/3GvkxnPYZKttx/CBJt3fAqCSn9cf2 F92yey2t9Et2YCV3Rj1weJt3e0He6wNcItyVhO/QFhmjRR9Ar6/2KpPjnqvyku2MQ+8k Y4jhUo+1qhIUhIX41gFEH/I9KhHnks8AqQGa/TQZFtqJdEDb8hLsjSiAtwLPQI2GmwaR nb943OTqleVGLIYBDLxIxhSkSDT2pSeDkQVurTRkUPqxItBRdzqTrYKOCNU92BM4OamF 5vp7+RPTm71bUKF46mxzhrHWKARHglO3v23E52/hmvGoZ7Twg/J0hrI/wUa7K3GRanyh QWow== X-Gm-Message-State: ALoCoQkhefE7MmbOXdlOjOUreHk4WeAOWZBXfgJjjjU8j8bkg1StDLHcdQv3e1Qym1TKNqE4fq13 X-Received: by 10.52.37.33 with SMTP id v1mr932047vdj.1.1392184925352; Tue, 11 Feb 2014 22:02:05 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.35 with SMTP id m32ls2652515qgd.81.gmail; Tue, 11 Feb 2014 22:02:05 -0800 (PST) X-Received: by 10.220.58.202 with SMTP id i10mr874001vch.23.1392184925196; Tue, 11 Feb 2014 22:02:05 -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 dd4si6942236vcb.70.2014.02.11.22.02.05 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 22:02:05 -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 oz11so6969605veb.35 for <patchwork-forward@linaro.org>; Tue, 11 Feb 2014 22:02:05 -0800 (PST) X-Received: by 10.58.85.133 with SMTP id h5mr31243799vez.4.1392184924841; Tue, 11 Feb 2014 22:02:04 -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 u4csp11681vcz; Tue, 11 Feb 2014 22:02:04 -0800 (PST) X-Received: by 10.112.22.196 with SMTP id g4mr313562lbf.47.1392184923688; Tue, 11 Feb 2014 22:02:03 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id pc5si11734849lbb.75.2014.02.11.22.02.03 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 22:02:03 -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 1WDSqv-0006Fm-Uk; Wed, 12 Feb 2014 05:59:22 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDSqW-0006fB-IO; Wed, 12 Feb 2014 05:58:56 +0000 Received: from mail-oa0-f50.google.com ([209.85.219.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDSqJ-0006bK-Qh for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2014 05:58:44 +0000 Received: by mail-oa0-f50.google.com with SMTP id n16so10556832oag.9 for <linux-arm-kernel@lists.infradead.org>; Tue, 11 Feb 2014 21:58:22 -0800 (PST) X-Received: by 10.60.93.102 with SMTP id ct6mr24153061oeb.12.1392184700632; Tue, 11 Feb 2014 21:58:20 -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 tr7sm63581349oec.0.2014.02.11.21.58.17 for <multiple recipients> (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 21:58:20 -0800 (PST) From: Victor Kamensky <victor.kamensky@linaro.org> To: kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, christoffer.dall@linaro.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/5] ARM64: KVM: vgic_elrsr and vgic_eisr need to be byteswapped in BE case Date: Tue, 11 Feb 2014 21:57:22 -0800 Message-Id: <1392184643-6108-5-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1392184643-6108-1-git-send-email-victor.kamensky@linaro.org> References: <1392184643-6108-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_005843_916047_AEE5E661 X-CRM114-Status: UNSURE ( 7.28 ) 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.219.50 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 <victor.kamensky@linaro.org>, 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: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index 104216c..667293f 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -415,10 +415,17 @@ CPU_BE( rev w11, w11 ) str w4, [x3, #VGIC_CPU_HCR] str w5, [x3, #VGIC_CPU_VMCR] str w6, [x3, #VGIC_CPU_MISR] +#ifndef CONFIG_CPU_BIG_ENDIAN str w7, [x3, #VGIC_CPU_EISR] str w8, [x3, #(VGIC_CPU_EISR + 4)] str w9, [x3, #VGIC_CPU_ELRSR] str w10, [x3, #(VGIC_CPU_ELRSR + 4)] +#else + str w7, [x3, #(VGIC_CPU_EISR + 4)] + str w8, [x3, #VGIC_CPU_EISR] + str w9, [x3, #(VGIC_CPU_ELRSR + 4)] + str w10, [x3, #VGIC_CPU_ELRSR] +#endif str w11, [x3, #VGIC_CPU_APR] /* Clear GICH_HCR */
On arm64 'u32 vgic_eisr[2];' and 'u32 vgic_elrsr[2]' are accessed as one 'unsigned long *' bit fields, which has 64bit size. So we need to swap least significant word with most significant word when code reads those registers from h/w. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> --- arch/arm64/kvm/hyp.S | 7 +++++++ 1 file changed, 7 insertions(+)