From: alex.bennee@linaro.org (Alex Bennée)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 02/12] KVM: arm64: fix misleading comments in save/restore
Date: Fri, 19 Jun 2015 13:23:40 +0100 [thread overview]
Message-ID: <1434716630-18260-3-git-send-email-alex.bennee@linaro.org> (raw)
In-Reply-To: <1434716630-18260-1-git-send-email-alex.bennee@linaro.org>
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(-)
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]
--
2.4.3
next prev parent reply other threads:[~2015-06-19 12:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 12:23 [PATCH v6 00/12] KVM Guest Debug support for arm64 Alex Bennée
2015-06-19 12:23 ` [PATCH v6 01/12] KVM: add comments for kvm_debug_exit_arch struct Alex Bennée
2015-06-19 12:23 ` Alex Bennée [this message]
2015-06-19 12:23 ` [PATCH v6 03/12] KVM: arm64: guest debug, define API headers Alex Bennée
2015-06-19 12:23 ` [PATCH v6 04/12] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl Alex Bennée
2015-06-19 12:23 ` [PATCH v6 05/12] KVM: arm: introduce kvm_arm_init/setup/clear_debug Alex Bennée
2015-06-19 12:23 ` [PATCH v6 06/12] KVM: arm64: guest debug, add SW break point support Alex Bennée
2015-06-19 12:23 ` [PATCH v6 07/12] KVM: arm64: guest debug, add support for single-step Alex Bennée
2015-06-19 12:23 ` [PATCH v6 08/12] KVM: arm64: re-factor hyp.S debug register code Alex Bennée
2015-06-24 20:19 ` Christoffer Dall
2015-06-25 6:34 ` Alex Bennée
2015-06-19 12:23 ` [PATCH v6 09/12] KVM: arm64: introduce vcpu->arch.debug_ptr Alex Bennée
2015-06-24 11:42 ` Christoffer Dall
2015-06-25 6:32 ` Alex Bennée
2015-06-25 7:46 ` Christoffer Dall
2015-06-19 12:23 ` [PATCH v6 10/12] KVM: arm64: guest debug, HW assisted debug support Alex Bennée
2015-06-24 20:22 ` Christoffer Dall
2015-06-25 6:38 ` Alex Bennée
2015-06-25 7:49 ` Christoffer Dall
2015-06-25 10:42 ` Alex Bennée
2015-06-19 12:23 ` [PATCH v6 11/12] KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG Alex Bennée
2015-06-19 12:23 ` [PATCH v6 12/12] KVM: arm64: add trace points for guest_debug debug Alex Bennée
2015-06-24 20:19 ` [PATCH v6 00/12] KVM Guest Debug support for arm64 Christoffer Dall
2015-06-25 6:33 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434716630-18260-3-git-send-email-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).