From patchwork Tue Jun 2 14:48:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49381 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 33C7720BD1 for ; Tue, 2 Jun 2015 14:49:28 +0000 (UTC) Received: by lani11 with SMTP id i11sf46055994lan.3 for ; Tue, 02 Jun 2015 07:49:27 -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=lKN11bzncI+J30e3vs+Tfy8L9Pc1zrCOl89QpKFji/6LqSiwD/xnTHtCRILsiTLgI/ n5FbZ764gzzafUNaYeCuUTMpDFzs1F2OuWPt6+Is1uOfBUl7D45rBKzvHmon7ZxzSCOh YKhQZe+gYXUeHGbv6Fz2Ikc3wXNfvBW5LAG3TkBoE92AsQLSWGUhfgsFx+YZUnyATl8e xWPkGQthK4HIwa47nFzIT0JMbvvckRAXNxAeGvgYw/A0C5D7tbxDkJKcG7+FDcHTH593 MpclPjGNnOmgqiEWLn7EQ6XWr7zMt99CHwyEpQmh3ED+O/INV3YoCjHA4giltmCByPTk vxOg== X-Gm-Message-State: ALoCoQl3rvcIEISFxXbwg4L7C+pXN9rJRgi1cSWzlokyDbu+JWWb1Hir1P3cuwzezYDuMrZKyefx X-Received: by 10.112.161.105 with SMTP id xr9mr26188900lbb.20.1433256567009; Tue, 02 Jun 2015 07:49:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.129 with SMTP id m1ls712779laf.76.gmail; Tue, 02 Jun 2015 07:49:26 -0700 (PDT) X-Received: by 10.112.13.3 with SMTP id d3mr26778643lbc.89.1433256566841; Tue, 02 Jun 2015 07:49:26 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id ql5si11201400lbb.165.2015.06.02.07.49.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 07:49:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbuc2 with SMTP id uc2so106129858lbb.2 for ; Tue, 02 Jun 2015 07:49:26 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr17026614lac.41.1433256566699; Tue, 02 Jun 2015 07:49:26 -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.108.230 with SMTP id hn6csp3128346lbb; Tue, 2 Jun 2015 07:49:25 -0700 (PDT) X-Received: by 10.68.205.2 with SMTP id lc2mr13309347pbc.147.1433256564906; Tue, 02 Jun 2015 07:49:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hv8si26697315pdb.173.2015.06.02.07.49.24; Tue, 02 Jun 2015 07:49:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759310AbbFBOtX (ORCPT + 2 others); Tue, 2 Jun 2015 10:49:23 -0400 Received: from mail-ob0-f182.google.com ([209.85.214.182]:35388 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932319AbbFBOtW (ORCPT ); Tue, 2 Jun 2015 10:49:22 -0400 Received: by obcnx10 with SMTP id nx10so123889669obc.2 for ; Tue, 02 Jun 2015 07:49:22 -0700 (PDT) X-Received: by 10.202.181.11 with SMTP id e11mr3917553oif.107.1433256561946; Tue, 02 Jun 2015 07:49:21 -0700 (PDT) Received: from localhost ([167.160.116.34]) by mx.google.com with ESMTPSA id w8sm9473277oec.7.2015.06.02.07.49.19 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 07:49:20 -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 06/32] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Tue, 2 Jun 2015 22:48:01 +0800 Message-Id: <1433256507-7856-7-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> References: <1433256507-7856-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.178 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]