From patchwork Wed Feb 12 05:57:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 24515 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3A10720567 for ; Wed, 12 Feb 2014 06:01:45 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id ii20sf17470022qab.5 for ; Tue, 11 Feb 2014 22:01:45 -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=zvGXatK7ZGMAKJqi/seL1kh0CUhKjqxH6DmMVfsWIuc=; b=G74Pk2goq4VxUKWWMLdVnnOsyph/pLB5L2Wq19t8DFviLAsiO5feK2lfA6ISDQLpLb /H8mm+v+id88pmXGeUO6h9nnxKwy702FDS7Cy+E14lWKLaT3yMIF//3R4jHqto7KOdK3 GuP/PUWtAEFmqTZwMMf+tLjStaBk6zpq8MQejWE6SuF5qKOYw31tr7e2NaOIrYvO2SGV 5be2P62WmExJzMqnDELvNSRrQbo36fyb4ev340OEQJFfzBcS6J4JTlU0nFVC2TSw4uzS jThWt73K6dBqYKvU6L0w/xCmXS9q2p4L1Y13wXiDcKQYra1wxxwITvPh/0N61JwKHIox m1uQ== X-Gm-Message-State: ALoCoQncg3rFJmvz2Ij28VB2M5dW7soaUBIoaqNh2ETo2GOk4CZDrP8ZUS2CnIm6zZvdb6cf4Ct8 X-Received: by 10.58.136.100 with SMTP id pz4mr1110932veb.26.1392184904960; Tue, 11 Feb 2014 22:01:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.162 with SMTP id h31ls2801319qgh.20.gmail; Tue, 11 Feb 2014 22:01:44 -0800 (PST) X-Received: by 10.58.100.100 with SMTP id ex4mr31676407veb.2.1392184904814; Tue, 11 Feb 2014 22:01:44 -0800 (PST) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by mx.google.com with ESMTPS id uq6si6950549vcb.0.2014.02.11.22.01.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 22:01:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.46; Received: by mail-vb0-f46.google.com with SMTP id o19so6580882vbm.19 for ; Tue, 11 Feb 2014 22:01:44 -0800 (PST) X-Received: by 10.220.109.1 with SMTP id h1mr14148081vcp.20.1392184904718; Tue, 11 Feb 2014 22:01:44 -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 u4csp11661vcz; Tue, 11 Feb 2014 22:01:44 -0800 (PST) X-Received: by 10.112.27.176 with SMTP id u16mr111683lbg.81.1392184903325; Tue, 11 Feb 2014 22:01:43 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id li1si11744614lab.2.2014.02.11.22.01.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 22:01:43 -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 1WDSqf-00067B-Gc; Wed, 12 Feb 2014 05:59:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDSqM-0006e2-NF; Wed, 12 Feb 2014 05:58:46 +0000 Received: from mail-oa0-f47.google.com ([209.85.219.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDSqC-0006aO-43 for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2014 05:58:37 +0000 Received: by mail-oa0-f47.google.com with SMTP id m1so10411886oag.34 for ; Tue, 11 Feb 2014 21:58:14 -0800 (PST) X-Received: by 10.182.122.133 with SMTP id ls5mr235052obb.52.1392184694502; Tue, 11 Feb 2014 21:58:14 -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.08 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 21:58:13 -0800 (PST) From: Victor Kamensky To: kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, christoffer.dall@linaro.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Tue, 11 Feb 2014 21:57:21 -0800 Message-Id: <1392184643-6108-4-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_005836_278878_10DC3D48 X-CRM114-Status: UNSURE ( 8.16 ) 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.47 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 , 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+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.212.46 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 esr_el2 field of struct kvm_vcpu_fault_info has u32 type. It should be stored as word. Current code works in LE case because existing puts least significant word of x1 into esr_el2, and it puts most significant work of x1 into next field, which accidentally is OK because it is updated again by next instruction. But existing code breaks in BE case. Signed-off-by: Victor Kamensky --- arch/arm64/kvm/hyp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index 3b47c36..104216c 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -801,7 +801,7 @@ el1_trap: mrs x2, far_el2 2: mrs x0, tpidr_el2 - str x1, [x0, #VCPU_ESR_EL2] + str w1, [x0, #VCPU_ESR_EL2] str x2, [x0, #VCPU_FAR_EL2] str x3, [x0, #VCPU_HPFAR_EL2]