From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: soft-reboot into same mode that we entered the kernel
Date: Tue, 13 Dec 2016 11:30:44 +0000 [thread overview]
Message-ID: <20161213113044.GC19985@leverpostej> (raw)
In-Reply-To: <20161213111115.GX14217@n2100.armlinux.org.uk>
On Tue, Dec 13, 2016 at 11:11:15AM +0000, Russell King - ARM Linux wrote:
> On Tue, Dec 13, 2016 at 10:54:11AM +0000, Mark Rutland wrote:
> > On Fri, Dec 09, 2016 at 07:49:37PM +0000, Russell King wrote:
> > > ENTRY(__hyp_set_vectors)
> > > + tst r0, #31
> > > + bne 1f
> > > __HVC(0)
> > > - ret lr
> > > +1: ret lr
> > > ENDPROC(__hyp_set_vectors)
> >
> > Why the new check? This looks unrelated to the rest of the patch.
>
> It's not unrelated. The ARM32 hyp-stub has a total crap ABI:
>
> - r0 = -1 => read VBAR
> - r0 != -1 => write r0 to VBAR
>
> So, this check is there to ensure that you can't do something stupid
> like:
> __hyp_set_vectors(1)
>
> and inadvertently end up invoking the restart method - the check is
> there to "make room" for the new hyp call in the ABI.
Ok. This is definitely less than ideal.
We should be able to fix that up more generally, and pass separate
parameters (as we do on arm64).
> It hasn't been clear what the scope of the API, or the stub ABI actually
> is - nothing about that is really documented,
The hyp-stub is part of the kernel image, and the API is private to that
particular image, so we can change things -- there's no ABI to worry
about.
> so I didn't want to
> radically redesign the stub ABI to be more sensible and risk breakage
> elsewhere - especially as I'm reliant on others to test this. (All my
> 32-bit platforms enter the kernel in SVC mode from the boot loader, even
> those which are virtualisation-capable.)
Sure. I'm more than willing to review/test patches for this.
Thanks,
Mark.
next prev parent reply other threads:[~2016-12-13 11:30 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 19:49 [PATCH] ARM: soft-reboot into same mode that we entered the kernel Russell King
2016-12-13 10:54 ` Mark Rutland
2016-12-13 11:11 ` Russell King - ARM Linux
2016-12-13 11:30 ` Mark Rutland [this message]
2016-12-14 10:46 ` [PATCH 1/2] ARM: hyp-stub: improve ABI Russell King
2016-12-14 11:49 ` Mark Rutland
2016-12-15 11:18 ` Marc Zyngier
2016-12-15 11:35 ` Russell King - ARM Linux
2016-12-15 11:46 ` Marc Zyngier
2016-12-15 15:15 ` Russell King - ARM Linux
2016-12-15 15:37 ` Marc Zyngier
2016-12-15 18:57 ` Russell King - ARM Linux
2016-12-17 12:07 ` Catalin Marinas
2017-01-02 12:12 ` Russell King - ARM Linux
2017-01-03 9:51 ` Christoffer Dall
2017-01-09 12:26 ` Russell King - ARM Linux
2017-01-09 13:26 ` Christoffer Dall
2017-01-09 14:05 ` Russell King - ARM Linux
2017-01-09 14:10 ` Russell King - ARM Linux
2017-01-09 14:42 ` Russell King - ARM Linux
2017-01-09 14:57 ` Christoffer Dall
2017-01-09 15:01 ` Christoffer Dall
2017-01-09 15:43 ` Russell King - ARM Linux
2017-01-09 12:54 ` Russell King - ARM Linux
2017-01-09 13:14 ` Marc Zyngier
2017-01-09 13:20 ` Russell King - ARM Linux
2017-01-09 13:31 ` Marc Zyngier
2017-01-09 14:28 ` Catalin Marinas
2016-12-14 10:46 ` [PATCH 2/2] ARM: soft-reboot into same mode that we entered the kernel Russell King
2016-12-14 11:56 ` Mark Rutland
2016-12-14 12:05 ` Russell King - ARM Linux
2016-12-14 12:17 ` Mark Rutland
2016-12-14 12:29 ` Russell King - ARM Linux
2016-12-14 12:40 ` Mark Rutland
2016-12-14 12:46 ` Russell King - ARM Linux
2016-12-14 13:42 ` 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=20161213113044.GC19985@leverpostej \
--to=mark.rutland@arm.com \
--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).