From: Marc Zyngier <marc.zyngier@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
KVM devel mailing list <kvm@vger.kernel.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Russell King <linux@arm.linux.org.uk>,
James Morse <james.morse@arm.com>,
Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [PATCH 10/20] ARM: hyp-stub: Use r1 for the soft-restart address
Date: Sun, 19 Feb 2017 11:09:54 +0000 [thread overview]
Message-ID: <20170219110954.33110f27@why.wild-wind.fr.eu.org> (raw)
In-Reply-To: <CAKv+Gu-u9Y4EPDs0M1od=Sq2_7HoZxRSd+RFi4sEXrvWFXiszQ@mail.gmail.com>
On Sun, 19 Feb 2017 08:22:23 +0000
Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 17 February 2017 at 15:44, Marc Zyngier <marc.zyngier@arm.com> wrote:
> > It is not really obvious why the restart address should be in r3
> > when communicated to the hyp-stub. r1 should be perfectly adequate,
> > and consistent with the rest of the code.
> >
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> > ---
> > arch/arm/kernel/hyp-stub.S | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
> > index 8301db963d83..8fa521bd63d2 100644
> > --- a/arch/arm/kernel/hyp-stub.S
> > +++ b/arch/arm/kernel/hyp-stub.S
> > @@ -214,7 +214,7 @@ __hyp_stub_do_trap:
> >
> > 1: teq r0, #HVC_SOFT_RESTART
> > bne 1f
> > - bx r3
> > + bx r1
> >
> > 1: mov r0, #-1
> >
> > @@ -258,10 +258,8 @@ ENTRY(__hyp_set_vectors)
> > ENDPROC(__hyp_set_vectors)
> >
> > ENTRY(__hyp_soft_restart)
> > - mov r3, r0
> > mov r0, #HVC_SOFT_RESTART
> > __HVC(0)
> > - mov r0, r3
> > ret lr
> > ENDPROC(__hyp_soft_restart)
> >
>
> /me confused. How does the address end up in r1?
I'm now very confused too. I just gave it another go on my A7 platform,
and it restarted just right, even if there is obviously junk in r1.
Guess I'm just bloody lucky.
Thanks for the heads up, I'll fix that for v2.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2017-02-19 11:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 15:44 [PATCH 00/20] arm/arm64: KVM: Rework the hyp-stub API Marc Zyngier
2017-02-17 15:44 ` [PATCH 01/20] arm64: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall Marc Zyngier
2017-02-17 15:44 ` [PATCH 02/20] arm64: KVM: " Marc Zyngier
2017-02-20 16:54 ` James Morse
2017-02-17 15:44 ` [PATCH 03/20] arm64: KVM: Implement HVC_GET_VECTORS in the init code Marc Zyngier
2017-02-17 15:44 ` [PATCH 04/20] arm64: KVM: Allow the main HYP code to use the init hyp stub implementation Marc Zyngier
2017-02-17 15:44 ` [PATCH 05/20] arm64: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors Marc Zyngier
2017-02-17 15:44 ` [PATCH 06/20] arm64: KVM: Implement HVC_SOFT_RESTART in the init code Marc Zyngier
2017-02-17 15:44 ` [PATCH 07/20] ARM: hyp-stub: improve ABI Marc Zyngier
2017-02-17 15:44 ` [PATCH 08/20] ARM: soft-reboot into same mode that we entered the kernel Marc Zyngier
2017-02-17 15:44 ` [PATCH 09/20] ARM: KVM: Convert KVM to use HVC_GET_VECTORS Marc Zyngier
2017-02-17 15:44 ` [PATCH 10/20] ARM: hyp-stub: Use r1 for the soft-restart address Marc Zyngier
2017-02-19 8:22 ` Ard Biesheuvel
2017-02-19 11:09 ` Marc Zyngier [this message]
2017-02-17 15:44 ` [PATCH 11/20] ARM: Expose the VA/IDMAP offset Marc Zyngier
2017-02-17 15:44 ` [PATCH 12/20] ARM: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall Marc Zyngier
2017-02-17 15:44 ` [PATCH 13/20] ARM: KVM: " Marc Zyngier
2017-02-19 8:07 ` Ard Biesheuvel
2017-02-19 11:19 ` Marc Zyngier
2017-02-19 11:42 ` Ard Biesheuvel
2017-02-17 15:44 ` [PATCH 14/20] ARM: KVM: Implement HVC_GET_VECTORS in the init code Marc Zyngier
2017-02-17 15:44 ` [PATCH 15/20] ARM: KVM: Allow the main HYP code to use the init hyp stub implementation Marc Zyngier
2017-02-17 15:44 ` [PATCH 16/20] ARM: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors Marc Zyngier
2017-02-17 15:44 ` [PATCH 17/20] ARM: KVM: Implement HVC_SOFT_RESTART in the init code Marc Zyngier
2017-02-17 15:44 ` [PATCH 18/20] arm/arm64: KVM: Simplify __cpu_reset_hyp_mode Marc Zyngier
2017-02-17 15:44 ` [PATCH 19/20] arm/arm64: KVM: Remove kvm_get_idmap_start Marc Zyngier
2017-02-17 15:44 ` [PATCH 20/20] arm/arm64: Add hyp-stub API documentation Marc Zyngier
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=20170219110954.33110f27@why.wild-wind.fr.eu.org \
--to=marc.zyngier@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
/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