From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Adam Lackorzynski <adam.lackorzynski@kernkonzept.com>
Subject: [Qemu-devel] [PATCH 0/2] Fix the last Hyp mode bug and turn it on for A7, A15
Date: Fri, 9 Nov 2018 17:35:51 +0000 [thread overview]
Message-ID: <20181109173553.22341-1-peter.maydell@linaro.org> (raw)
This patchset fixes the last serious bug in our implementation
of Hyp mode (aka EL2 for AArch32), and turns the feature bit
on for the Cortex-A7 and Cortex-A15 CPUs.
The bug is that Hyp mode is an exception to the previous
general rule that every AArch32 mode (except SYS, which
always shares with USR) has its own banked r13, r14 and
SPSR. Instead Hyp has a banked r13 and SPSR, but r14 is
shared with USR and SYS. We were accidentally implementing
it as banked, which results in remarkably nonobvious
failure modes.
With this fix, I can boot an AArch32 guest that uses KVM to
boot an AArch32 nested guest, and I can also boot an L4Re/
Fiasco guest successfully.
Not entirely sure what to do about this for 3.1 -- maybe
put in the bugfix patch but hold off on actually setting
the feature bit til 4.0?
thanks
-- PMM
Peter Maydell (2):
target/arm: Hyp mode R14 is shared with User and System
target/arm/cpu: Give Cortex-A15 and -A7 the EL2 feature
target/arm/internals.h | 16 ++++++++++++++++
target/arm/cpu.c | 2 ++
target/arm/helper.c | 29 +++++++++++++++--------------
target/arm/kvm32.c | 4 ++--
target/arm/op_helper.c | 2 +-
5 files changed, 36 insertions(+), 17 deletions(-)
--
2.19.1
next reply other threads:[~2018-11-09 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 17:35 Peter Maydell [this message]
2018-11-09 17:35 ` [Qemu-devel] [PATCH 1/2] target/arm: Hyp mode R14 is shared with User and System Peter Maydell
2018-11-09 18:15 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-11-10 19:26 ` Philippe Mathieu-Daudé
2018-11-12 11:13 ` Edgar E. Iglesias
2018-11-12 11:41 ` Alex Bennée
2018-11-12 11:09 ` [Qemu-devel] " Edgar E. Iglesias
2018-11-09 17:35 ` [Qemu-devel] [PATCH 2/2] target/arm/cpu: Give Cortex-A15 and -A7 the EL2 feature Peter Maydell
2018-11-12 0:24 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-11-12 11:10 ` [Qemu-devel] " Edgar E. Iglesias
2018-11-12 0:32 ` [Qemu-devel] [Qemu-arm] [PATCH 0/2] Fix the last Hyp mode bug and turn it on for A7, A15 Philippe Mathieu-Daudé
2018-11-12 9:05 ` [Qemu-devel] " Richard Henderson
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=20181109173553.22341-1-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=adam.lackorzynski@kernkonzept.com \
--cc=edgar.iglesias@gmail.com \
--cc=patches@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.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).