From patchwork Mon Aug 4 08:46:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 34804 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC9D620F2E for ; Mon, 4 Aug 2014 08:58:07 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rl12sf39967566iec.5 for ; Mon, 04 Aug 2014 01:58:07 -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=0nJRgVrqBeLBO2gwwvZzM/NAmOKAqoj6yVVXo27vbZY=; b=Q6l0gG8z/T4YWMGBWxW60OElg3thgFaPT0aEWhiRS/kYc1P0syNTwkymWovSDgFVXi qvJTu22cLfl0OQBiTfTLkriqMbVrMjsYNeoH5jyZhLXN+nxWQUZwRjs5Ch/9sZzqDAnf StowK1sFEZpDrFWpWU/tAg4XBn4qg7IwbPSycMDDjHop+he1FcKRA2bb0SXinJv4NgZn 7wEACQEQgjXHhTiDRSFp2SYLnu3pCF/Bsn8J3a7k3TBQtCa3NvDLB6jO76Au0tDsWsAK uyTrDDQiiA1vjdJ8WvH+90JzxIrA5R9OKfwjsktOy1eSAFF48iXeWC2AmQNBvpE9PKSg dixw== X-Gm-Message-State: ALoCoQmQcO7U4mDpcpGtf6n7Cr4tyGqYA7avyht0TsY7tbxmVx278NpwOUw9Lys7KqJagFJz8cmN X-Received: by 10.182.68.17 with SMTP id r17mr7998662obt.26.1407142687025; Mon, 04 Aug 2014 01:58:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.198 with SMTP id d64ls2246202qge.30.gmail; Mon, 04 Aug 2014 01:58:06 -0700 (PDT) X-Received: by 10.52.136.196 with SMTP id qc4mr18568771vdb.22.1407142686924; Mon, 04 Aug 2014 01:58:06 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id vw2si11556691vcb.54.2014.08.04.01.58.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Aug 2014 01:58:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf12so10365629vcb.26 for ; Mon, 04 Aug 2014 01:58:06 -0700 (PDT) X-Received: by 10.220.97.5 with SMTP id j5mr22107206vcn.16.1407142686826; Mon, 04 Aug 2014 01:58:06 -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.37.5 with SMTP id tc5csp288618vcb; Mon, 4 Aug 2014 01:58:06 -0700 (PDT) X-Received: by 10.70.87.225 with SMTP id bb1mr22481231pdb.67.1407142685864; Mon, 04 Aug 2014 01:58:05 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [198.137.202.9]) by mx.google.com with ESMTPS id gz4si16866783pbb.195.2014.08.04.01.58.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Aug 2014 01:58:05 -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=198.137.202.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 1XEE4M-0002Ct-PB; Mon, 04 Aug 2014 08:56:38 +0000 Received: from mail-lb0-f176.google.com ([209.85.217.176]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEDwf-0002Cf-73 for linux-arm-kernel@lists.infradead.org; Mon, 04 Aug 2014 08:48:41 +0000 Received: by mail-lb0-f176.google.com with SMTP id u10so5093260lbd.35 for ; Mon, 04 Aug 2014 01:48:19 -0700 (PDT) X-Received: by 10.112.204.164 with SMTP id kz4mr21155676lbc.15.1407142099251; Mon, 04 Aug 2014 01:48:19 -0700 (PDT) Received: from localhost.localdomain (188-178-240-98-static.dk.customer.tdc.net. [188.178.240.98]) by mx.google.com with ESMTPSA id px1sm26731207lbb.46.2014.08.04.01.48.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Aug 2014 01:48:18 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , Gleb Natapov Subject: [GIT PULL 36/51] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Mon, 4 Aug 2014 10:46:53 +0200 Message-Id: <1407142028-31105-37-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1407142028-31105-1-git-send-email-christoffer.dall@linaro.org> References: <1407142028-31105-1-git-send-email-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140804_014841_437042_026DF2A8 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.176 listed in list.dnswl.org] -0.7 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.217.176 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Marc Zyngier , Victor Kamensky , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org 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: christoffer.dall@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.181 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 From: Victor Kamensky 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 Signed-off-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 5945f3b..7874e02 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -762,7 +762,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]