From patchwork Fri Apr 24 05:27:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47524 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AD63020553 for ; Fri, 24 Apr 2015 05:33:16 +0000 (UTC) Received: by wgin8 with SMTP id n8sf9112437wgi.0 for ; Thu, 23 Apr 2015 22:33:16 -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=KMBoeVzic86eo3OQ0WPFe2T0d7BjM7NRR9Q2jO3St6w=; b=TsisepBbtFYTQXHqvlRjiTyOGr76boACffCmBhkZODFUmOoOWNt0tGNwKfxrg0s4N7 GZ8fMX6kMWDbkQSgIFl1Q+O5DaPAMMtwZl/QSjjDA1tdYYTgpvbCu+VZKnY5kLwGgJVD v05mcaywrxubmZ1oxTAtgObLoRpH3S8hlCex5ZTwnpVDLc3oRu3V4vUQNfHPDBW9HWHf b/9t/jhMgNrueCZMm5XGUATohmnhEZS9cz3ORN3MrCN8G/AhRdm3uaQpM6qw/veMuLhG +XJ7+dLaz5Z90hLxEMXEdUW21vuu4xnZVnFbaoRJzc9Wv0WOS/H/VCf6FSDzvmmhJ6jE Qf/A== X-Gm-Message-State: ALoCoQnEy6RvY39xUB34hRLv6xB4rw1ruIq3Kk2wkNLCf72EvX5pj8YZNlA6xbPaCF/H+8jASWzw X-Received: by 10.152.19.67 with SMTP id c3mr3205571lae.7.1429853595960; Thu, 23 Apr 2015 22:33:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.163.65 with SMTP id yg1ls407319lab.26.gmail; Thu, 23 Apr 2015 22:33:15 -0700 (PDT) X-Received: by 10.152.45.97 with SMTP id l1mr5547749lam.55.1429853595679; Thu, 23 Apr 2015 22:33:15 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id e10si7484579lae.15.2015.04.23.22.33.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 22:33:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labbd9 with SMTP id bd9so27572490lab.2 for ; Thu, 23 Apr 2015 22:33:15 -0700 (PDT) X-Received: by 10.152.8.78 with SMTP id p14mr5457003laa.19.1429853595592; Thu, 23 Apr 2015 22:33:15 -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 l1csp978345lbt; Thu, 23 Apr 2015 22:33:15 -0700 (PDT) X-Received: by 10.66.137.2 with SMTP id qe2mr11487268pab.77.1429853594686; Thu, 23 Apr 2015 22:33:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd10si15800741pdb.178.2015.04.23.22.33.13; Thu, 23 Apr 2015 22:33:14 -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 S1754548AbbDXFdN (ORCPT + 2 others); Fri, 24 Apr 2015 01:33:13 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:34341 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754545AbbDXFdN (ORCPT ); Fri, 24 Apr 2015 01:33:13 -0400 Received: by obfe9 with SMTP id e9so30208287obf.1 for ; Thu, 23 Apr 2015 22:33:12 -0700 (PDT) X-Received: by 10.202.83.202 with SMTP id h193mr5408960oib.56.1429853592503; Thu, 23 Apr 2015 22:33:12 -0700 (PDT) Received: from localhost ([167.160.116.36]) by mx.google.com with ESMTPSA id bt6sm6094905obd.0.2015.04.23.22.33.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Apr 2015 22:33:11 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: jslaby@suse.cz, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Victor Kamensky , Marc Zyngier Subject: [PATCH for 3.12.y stable 39/63] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Fri, 24 Apr 2015 13:27:37 +0800 Message-Id: <1429853281-6136-40-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1429853281-6136-1-git-send-email-shannon.zhao@linaro.org> References: <1429853281-6136-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.215.48 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 1144e44..caf3cca 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -817,7 +817,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]