From patchwork Thu Jun 12 16:30:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 31847 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9759920AE6 for ; Thu, 12 Jun 2014 16:35:14 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id m5sf1341757qaj.2 for ; Thu, 12 Jun 2014 09:35:14 -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=Tuy4L0pyH7W5ikVCjZXlUi68bdk6/B3TwqbcGKLctVg=; b=f5Owk9QXPWuOhZafQQlhT7es9E0UPL4Vd8KYb5RILYHhPnmo5ISoYs6P6dis4rkXWF yIXi527zZcp4SFqEq0Ck9nn5OOhAGrfcKEiR56xX4T8BpRZjWfGVlQTwA3Svk1SGSQue mxh+Qb5xKG+qjJYxRzkXigiNV1ogH4Srr5C+7ZKrDg/SoP78qHJf5dNX5/ShfyxctjwE tIb3HEFeUgvp9Tm7X+Hcrf4CaRoYsHr4onloIwA7A4zfeFOYsKiOg5GFUyBKbsueIAq9 2x0+vkAzZb5Y4LNLQEOvTxApluQUBbdGOUnBIYqQjbL6Z9wNeYE3UrstBMQNhtr8+1ce R8CA== X-Gm-Message-State: ALoCoQkTR2QO+SDSJeO1B/CN3schqar/HKpU2xlkK6WKTByCwgni0At8f6KKVNooKxfAXy0o/xoJ X-Received: by 10.224.57.142 with SMTP id c14mr4899313qah.7.1402590914396; Thu, 12 Jun 2014 09:35:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.203 with SMTP id h69ls3269783qgh.56.gmail; Thu, 12 Jun 2014 09:35:14 -0700 (PDT) X-Received: by 10.220.253.132 with SMTP id na4mr1034361vcb.39.1402590913677; Thu, 12 Jun 2014 09:35:13 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id b5si479411vec.50.2014.06.12.09.35.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 09:35:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jz11so2081592veb.2 for ; Thu, 12 Jun 2014 09:35:13 -0700 (PDT) X-Received: by 10.58.185.165 with SMTP id fd5mr1265050vec.41.1402590913574; Thu, 12 Jun 2014 09:35:13 -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 vs6csp417125vcb; Thu, 12 Jun 2014 09:35:13 -0700 (PDT) X-Received: by 10.224.0.138 with SMTP id 10mr24045966qab.37.1402590912967; Thu, 12 Jun 2014 09:35:12 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id n104si34762165qgd.74.2014.06.12.09.35.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 09:35:12 -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 1Wv7wH-0000hU-Ib; Thu, 12 Jun 2014 16:33:21 +0000 Received: from mail-pb0-f41.google.com ([209.85.160.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wv7u8-0007sm-2l for linux-arm-kernel@lists.infradead.org; Thu, 12 Jun 2014 16:31:11 +0000 Received: by mail-pb0-f41.google.com with SMTP id ma3so1178068pbc.0 for ; Thu, 12 Jun 2014 09:30:47 -0700 (PDT) X-Received: by 10.66.141.109 with SMTP id rn13mr22688256pab.117.1402590647267; Thu, 12 Jun 2014 09:30:47 -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.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 09:30:46 -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 10/14] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Thu, 12 Jun 2014 09:30:09 -0700 Message-Id: <1402590613-3341-11-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_093108_220235_199DE8FC X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.160.41 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.41 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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.128.171 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 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 Acked-by: Christoffer Dall Acked-by: Marc Zyngier --- 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 2c56012..0620691 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -824,7 +824,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]