Message ID | 1434716630-18260-3-git-send-email-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDJONKHTZ4PRB64TSCWAKGQETEKCJ5A@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8735E22903 for <linaro@patches.linaro.org>; Fri, 19 Jun 2015 12:24:28 +0000 (UTC) Received: by laar3 with SMTP id r3sf16432853laa.1 for <linaro@patches.linaro.org>; Fri, 19 Jun 2015 05:24: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:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=AqiNcUSgiF+jMo97tdgQIis/sAEo0F7O/VLcCPrFzdo=; b=bK8Vieui8tuZyTkfiajjkk70LZbLJoiBK9wBMvSzZ53pZZrXHndtDleYryGk0YzmXl +MZTzgjAdwkNttorcor5o96kR5mE3u1zvQFF4NPpbMPO7GPiV79oqOp6PNUQq1U+VHHz 65mY2tyAAAE/acvzFdVhtDkMLBqyRwfQaNpuAK+7zqyhTkl2Z6HXasIVyhya43kOBNoO AgsJNe6mWgcGemWVMuvlQyqL4uE1y9yqWWvSigqjbm9brtZAia2r86jTbRJ1UgFvjUeq R38BVVFH3MCVViQUAQKZkz4Mjh9hMftpjDNf4Ocdkz0MEZbyyKeRAvbwBNYW+pYvMzsY tvCw== X-Gm-Message-State: ALoCoQkGtsLRvyhqcQtxTWAgBlE7uHi38BllKI/onArd9aAA2db3ngo2j0SKrHks+PxA9UN2sw2v X-Received: by 10.194.179.42 with SMTP id dd10mr7620394wjc.7.1434716667476; Fri, 19 Jun 2015 05:24:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.164 with SMTP id az4ls150868lab.16.gmail; Fri, 19 Jun 2015 05:24:27 -0700 (PDT) X-Received: by 10.152.205.67 with SMTP id le3mr17484370lac.50.1434716667276; Fri, 19 Jun 2015 05:24:27 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id bo7si9038915lbb.108.2015.06.19.05.24.27 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2015 05:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbwc1 with SMTP id wc1so71199120lbb.2 for <patchwork-forward@linaro.org>; Fri, 19 Jun 2015 05:24:27 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr17619367lbc.19.1434716667173; Fri, 19 Jun 2015 05:24:27 -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 hn6csp553000lbb; Fri, 19 Jun 2015 05:24:25 -0700 (PDT) X-Received: by 10.70.90.232 with SMTP id bz8mr18645887pdb.120.1434716665189; Fri, 19 Jun 2015 05:24:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si2909431pdi.19.2015.06.19.05.24.19; Fri, 19 Jun 2015 05:24:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S1752717AbbFSMYR (ORCPT <rfc822;matthew.hart@linaro.org> + 30 others); Fri, 19 Jun 2015 08:24:17 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:58737 "EHLO socrates.bennee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbbFSMYJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 19 Jun 2015 08:24:09 -0400 Received: from localhost ([127.0.0.1] helo=zen.linaroharston) by socrates.bennee.com with esmtp (Exim 4.84) (envelope-from <alex.bennee@linaro.org>) id 1Z5vLe-00046o-8L; Fri, 19 Jun 2015 14:24:42 +0200 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org> To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, peter.maydell@linaro.org, agraf@suse.de, drjones@redhat.com, pbonzini@redhat.com, zhichao.huang@linaro.org Cc: jan.kiszka@siemens.com, dahi@linux.vnet.ibm.com, r65777@freescale.com, bp@suse.de, =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>, Gleb Natapov <gleb@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, linux-kernel@vger.kernel.org (open list) Subject: [PATCH v6 02/12] KVM: arm64: fix misleading comments in save/restore Date: Fri, 19 Jun 2015 13:23:40 +0100 Message-Id: <1434716630-18260-3-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1434716630-18260-1-git-send-email-alex.bennee@linaro.org> References: <1434716630-18260-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.bennee@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.174 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index 5befd01..cb9bdd8 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -50,8 +50,8 @@ stp x29, lr, [x3, #80] mrs x19, sp_el0 - mrs x20, elr_el2 // EL1 PC - mrs x21, spsr_el2 // EL1 pstate + mrs x20, elr_el2 // PC before hyp entry + mrs x21, spsr_el2 // pstate before hyp entry stp x19, x20, [x3, #96] str x21, [x3, #112] @@ -82,8 +82,8 @@ ldr x21, [x3, #16] msr sp_el0, x19 - msr elr_el2, x20 // EL1 PC - msr spsr_el2, x21 // EL1 pstate + msr elr_el2, x20 // PC to restore + msr spsr_el2, x21 // pstate to restore add x3, x2, #CPU_XREG_OFFSET(19) ldp x19, x20, [x3]
The elr_el2 and spsr_el2 registers in fact contain the processor state before entry into the hypervisor code. In the case of guest state it could be in either el0 or el1. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- arch/arm64/kvm/hyp.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)