From patchwork Tue May 13 16:14:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 30104 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6067A20446 for ; Tue, 13 May 2014 16:18:51 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf2597425oag.0 for ; Tue, 13 May 2014 09:18:51 -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=CdEGR8NeRMn+p1Z21whEWjut6TFxxyiVmDPe+zEWWcA=; b=MhN49YddlU3VuVxektQr8GFgZyvl+f8kJKybILvKVAwhzgJpgMszGMPan8ShkfRdW5 cg4VLHLG+YlEqZtAJeQhB6Edrc0juyzXzGvQ7jLvMVFVd4Y8rD0+861X0c10smjCaFw2 fN+hL5XhvlEo8rKzASWJrGELsRFth03mxH4c1f3AkVGxRx1pEP+/2D5j/4gJP4Z4fJFl +ugQPW62t6NuWprsurR1NuccYSR1oQ2PuUsB7msK4UdfG0L5SviNUXNM6z5nJ/0Hmyy3 P1bam5WbwFK2PjQu1URV0pikSbP/TjMaq/lkolXTs0sQcg+ceBqg7QZGDQkSahTqUPJl MVVA== X-Gm-Message-State: ALoCoQkCGVbZWDArzcfYS0i5WVMEbHYAM1Te1AAQcRmNrL2rI+Nqad4o9hdwQpQp4BiMwLJJRmPg X-Received: by 10.43.78.135 with SMTP id zm7mr15754053icb.27.1399997930987; Tue, 13 May 2014 09:18:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.1 with SMTP id p1ls281765qga.97.gmail; Tue, 13 May 2014 09:18:50 -0700 (PDT) X-Received: by 10.58.243.39 with SMTP id wv7mr1153146vec.51.1399997930901; Tue, 13 May 2014 09:18:50 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id an4si986454vdd.152.2014.05.13.09.18.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 09:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db11so731517veb.22 for ; Tue, 13 May 2014 09:18:50 -0700 (PDT) X-Received: by 10.52.227.138 with SMTP id sa10mr25045763vdc.25.1399997930829; Tue, 13 May 2014 09:18:50 -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.220.221.72 with SMTP id ib8csp164230vcb; Tue, 13 May 2014 09:18:50 -0700 (PDT) X-Received: by 10.15.93.142 with SMTP id w14mr42504856eez.1.1399997929997; Tue, 13 May 2014 09:18:49 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id i49si13530044eem.342.2014.05.13.09.18.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 May 2014 09:18:49 -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 1WkFO3-0003f2-8N; Tue, 13 May 2014 16:17:03 +0000 Received: from mail-pb0-f52.google.com ([209.85.160.52]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WkFMW-0002Zb-NB for linux-arm-kernel@lists.infradead.org; Tue, 13 May 2014 16:15:29 +0000 Received: by mail-pb0-f52.google.com with SMTP id rr13so463552pbb.11 for ; Tue, 13 May 2014 09:15:07 -0700 (PDT) X-Received: by 10.66.192.225 with SMTP id hj1mr65979981pac.142.1399997707867; Tue, 13 May 2014 09:15:07 -0700 (PDT) Received: from kamensky-w530.hsd1.ca.comcast.net (c-24-6-79-41.hsd1.ca.comcast.net. [24.6.79.41]) by mx.google.com with ESMTPSA id dd5sm28958360pbc.85.2014.05.13.09.15.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 May 2014 09:15:06 -0700 (PDT) From: Victor Kamensky To: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, agraf@suse.de Subject: [PATCH v3 10/14] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Tue, 13 May 2014 09:14:02 -0700 Message-Id: <1399997646-4716-11-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1399997646-4716-1-git-send-email-victor.kamensky@linaro.org> References: <1399997646-4716-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140513_091528_812712_9A47D8A5 X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.52 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 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.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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 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]