From patchwork Thu Apr 30 12:12:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 47828 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0E5032121F for ; Thu, 30 Apr 2015 12:21:10 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf14591286wgt.1 for ; Thu, 30 Apr 2015 05:21:09 -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: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=0kGWqN+dYJwceSAUgE2Y7XwMprOnA7Upl8OfUEvGiT0=; b=cKIjGsDiz8VNiSlRvy3nLEbMDUu9rbUsn5MR5N7w3YWN4x2scL7fI9l0yCW9v3o24L coSijHmbrOKHK5nB9h5wNBWAE4733FyrFbCeJVst8rcIsTbNKZhpJVgoykmYpInz9uGL 38AnZj0TShJGr2t19DaHOrf5iTpZay8fGS1GPWMZPW9dhkQ15eCj+Ve+GvZ4kkdyaFC/ k7X5SZxCwhjXxtQImzzoIoAMk2OYZVJZoHCNeDBxo9tnVxhmTBEV3DG4HYgwvF0qSUYF IDvf2V61I8Wf1HLla0tMk7tGb0BpIiZw5/r2rwehkSyrOszmRm3W4GHVL2FxrRmMPf7x iBqg== X-Gm-Message-State: ALoCoQlyWWJf7u4wjIYg9vB2thPTxnV/ZK8Mcmsoo+OcvIXhgx1/1BG8bGUl0u4JO/8Mq9KQOcby X-Received: by 10.152.26.134 with SMTP id l6mr2399935lag.10.1430396469264; Thu, 30 Apr 2015 05:21:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.67 with SMTP id da3ls413443lad.49.gmail; Thu, 30 Apr 2015 05:21:09 -0700 (PDT) X-Received: by 10.152.36.2 with SMTP id m2mr3559430laj.72.1430396469120; Thu, 30 Apr 2015 05:21:09 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id t5si1657568lbb.35.2015.04.30.05.21.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 05:21:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lagv1 with SMTP id v1so42662056lag.3 for ; Thu, 30 Apr 2015 05:21:08 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr3509046lak.117.1430396468826; Thu, 30 Apr 2015 05:21:08 -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 l1csp3078958lbt; Thu, 30 Apr 2015 05:21:07 -0700 (PDT) X-Received: by 10.70.103.230 with SMTP id fz6mr7827381pdb.1.1430396461402; Thu, 30 Apr 2015 05:21:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si3234120par.230.2015.04.30.05.20.59; Thu, 30 Apr 2015 05:21:01 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S1752452AbbD3MU4 (ORCPT + 28 others); Thu, 30 Apr 2015 08:20:56 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:53651 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751410AbbD3MMe (ORCPT ); Thu, 30 Apr 2015 08:12:34 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YnnKT-0008CG-7A; Thu, 30 Apr 2015 14:12:33 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Victor Kamensky , Marc Zyngier , Shannon Zhao , Jiri Slaby Subject: [PATCH 3.12 39/63] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Thu, 30 Apr 2015 14:12:08 +0200 Message-Id: X-Mailer: git-send-email 2.3.5 In-Reply-To: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> References: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.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.42 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 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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 Signed-off-by: Jiri Slaby --- 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 1144e4412838..caf3cca922c9 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]