From patchwork Thu Apr 30 09:24:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 47800 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 559E42121F for ; Thu, 30 Apr 2015 09:33:37 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf13484369wgt.1 for ; Thu, 30 Apr 2015 02:33:36 -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=0f2exnlL+1AEQ5wwwU1iV5UdxGLatLe/W/oFBcW3BKw=; b=lS95OH02fvMXQEMolLZJ6gym21YZ0Nd6G0V2Rcb5eLpGpdFCsUSl8R16Dxzl+FK/3q VePh10Vzp8FrzrEDs/Q5VvLE4xS8PJ3lWEyA5T47WMCNs9lsNrwu/4z1XUtdgEh1/te8 FiZfWNmxe7vcyWcafY8aejFQiSaHeq61C+zIhs13U+9i7U/KbxlnCYA6IThhF9/gIh8m ZKArZ6Ecu/otZKkdR6vovBujE6LDlDF1zPaCT2KnjyZJvjUk28yYp80zAzCrpjkFchiw pa8POD0I9GxiUXsfU7a6SX+n55flfnQQwJ2JIq5ISjhWtZvBx4pChqSJeeRsCoX6goFS WWyw== X-Gm-Message-State: ALoCoQmZBPnMOcWvK5fFTeUwyPxw2+lrJCabpSwJBG6FAdu3Su+9DVhBcJujnHj7IrooaD8btYV+ X-Received: by 10.112.166.137 with SMTP id zg9mr2003311lbb.11.1430386416658; Thu, 30 Apr 2015 02:33:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.167 with SMTP id dd7ls299437lad.28.gmail; Thu, 30 Apr 2015 02:33:36 -0700 (PDT) X-Received: by 10.112.167.73 with SMTP id zm9mr2962854lbb.89.1430386416552; Thu, 30 Apr 2015 02:33:36 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id i6si1361851lai.30.2015.04.30.02.33.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 02:33:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbcga7 with SMTP id ga7so40002823lbc.1 for ; Thu, 30 Apr 2015 02:33:36 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr2960866lah.76.1430386416254; Thu, 30 Apr 2015 02:33:36 -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 l1csp2998677lbt; Thu, 30 Apr 2015 02:33:35 -0700 (PDT) X-Received: by 10.66.192.1 with SMTP id hc1mr6592002pac.38.1430385964679; Thu, 30 Apr 2015 02:26:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nf2si2640288pbc.149.2015.04.30.02.26.03; Thu, 30 Apr 2015 02:26:04 -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 S1751417AbbD3JZt (ORCPT + 2 others); Thu, 30 Apr 2015 05:25:49 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:53091 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751429AbbD3JZS (ORCPT ); Thu, 30 Apr 2015 05:25:18 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YnkiW-0005OP-8v; Thu, 30 Apr 2015 11:25:12 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Victor Kamensky , Marc Zyngier , Shannon Zhao , Jiri Slaby Subject: [patch added to the 3.12 stable tree] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Date: Thu, 30 Apr 2015 11:24:47 +0200 Message-Id: <1430385911-20480-39-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1430385911-20480-1-git-send-email-jslaby@suse.cz> References: <1430385911-20480-1-git-send-email-jslaby@suse.cz> 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: patch@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.170 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 This patch has been added to the 3.12 stable tree. If you have any objections, please let us 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]