From patchwork Mon May 4 01:52:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47963 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9F8F32121F for ; Mon, 4 May 2015 01:55:30 +0000 (UTC) Received: by wicmx19 with SMTP id mx19sf30479588wic.3 for ; Sun, 03 May 2015 18:55:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=yJKlLbLnGwY8vT2xg5kRvgPnTHfMIGS9KqUxBuJWJqE=; b=Xt9lxJ51edldE3TmvOHNIkH1cbF6Dz1m6x+/ZJg5HzOBDTcVU8HtQ3qV5YUvn//z0R Hcepbrkb9M+OPD5ImAmG9XocmhNuA4xTMiNWniXApeXZxIR6YpmD40XT04x+S1dzQrng 783jqOWS/YErMRKPkhFVjrcly5gr4Oytil68MbmXwh+IOVbZIKGI4GWVvqpgMd9u4UVm LvBylNlqNEJA1ljAg6eNewiLeP1J/RyfMcFCH1D24LKLvVsjDhf5xaqf+zG+e90j8MP0 SDEOk2WvhKEa4gL5p9JmSSxayclvwrY/a9AL1oGL0S2m1nTDEh9SVCQlftvnYu1qouJI tvyA== X-Gm-Message-State: ALoCoQld21YSdWvmkXsTsEgk+r7NRTXKbEdcAfXzPP97+GiUT1vlRSyKsPdsu8Tg7kG3Ab/MDwt3 X-Received: by 10.112.166.137 with SMTP id zg9mr16979772lbb.11.1430704529949; Sun, 03 May 2015 18:55:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.137 with SMTP id o9ls643094lal.16.gmail; Sun, 03 May 2015 18:55:29 -0700 (PDT) X-Received: by 10.112.65.37 with SMTP id u5mr17596767lbs.44.1430704529809; Sun, 03 May 2015 18:55:29 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id re5si9071438lbb.150.2015.05.03.18.55.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbuc2 with SMTP id uc2so95607522lbb.2 for ; Sun, 03 May 2015 18:55:29 -0700 (PDT) X-Received: by 10.152.2.227 with SMTP id 3mr17412892lax.73.1430704529530; Sun, 03 May 2015 18:55:29 -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.112.67.65 with SMTP id l1csp1412945lbt; Sun, 3 May 2015 18:55:28 -0700 (PDT) X-Received: by 10.70.98.233 with SMTP id el9mr38622684pdb.54.1430704507320; Sun, 03 May 2015 18:55:07 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ix6si17838787pac.46.2015.05.03.18.55.06; Sun, 03 May 2015 18:55:07 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751854AbbEDBzF (ORCPT + 2 others); Sun, 3 May 2015 21:55:05 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35724 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751909AbbEDBzF (ORCPT ); Sun, 3 May 2015 21:55:05 -0400 Received: by pabtp1 with SMTP id tp1so147810128pab.2 for ; Sun, 03 May 2015 18:55:04 -0700 (PDT) X-Received: by 10.68.223.165 with SMTP id qv5mr38592691pbc.82.1430704504613; Sun, 03 May 2015 18:55:04 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id da2sm11008162pbb.57.2015.05.03.18.55.02 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:55:03 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Victor Kamensky , Marc Zyngier Subject: [PATCH for 3.14.y stable 21/47] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Mon, 4 May 2015 09:52:16 +0800 Message-Id: <1430704362-6292-22-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> References: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@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.217.182 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Victor Kamensky commit ba083d20d8cfa9e999043cd89c4ebc964ccf8927 upstream. 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 Signed-off-by: Shannon Zhao --- 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 b0d1512..5dfc8331 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -830,7 +830,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]