All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-arm] [PATCH 0/2] Fix the last Hyp mode bug and turn it on for A7, A15
@ 2018-11-09 17:35 ` Peter Maydell
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Maydell @ 2018-11-09 17:35 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: Adam Lackorzynski, patches

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-11-12 11:42 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-09 17:35 [Qemu-arm] [PATCH 0/2] Fix the last Hyp mode bug and turn it on for A7, A15 Peter Maydell
2018-11-09 17:35 ` [Qemu-devel] " Peter Maydell
2018-11-09 17:35 ` [Qemu-arm] [PATCH 1/2] target/arm: Hyp mode R14 is shared with User and System Peter Maydell
2018-11-09 17:35   ` [Qemu-devel] " Peter Maydell
2018-11-09 18:15   ` [Qemu-arm] " Peter Maydell
2018-11-09 18:15     ` [Qemu-devel] " Peter Maydell
2018-11-10 19:26     ` Philippe Mathieu-Daudé
2018-11-10 19:26       ` [Qemu-devel] " Philippe Mathieu-Daudé
2018-11-12 11:13     ` Edgar E. Iglesias
2018-11-12 11:13       ` Edgar E. Iglesias
2018-11-12 11:41     ` Alex Bennée
2018-11-12 11:41       ` [Qemu-devel] " Alex Bennée
2018-11-12 11:09   ` Edgar E. Iglesias
2018-11-12 11:09     ` [Qemu-devel] " Edgar E. Iglesias
2018-11-09 17:35 ` [Qemu-arm] [PATCH 2/2] target/arm/cpu: Give Cortex-A15 and -A7 the EL2 feature Peter Maydell
2018-11-09 17:35   ` [Qemu-devel] " Peter Maydell
2018-11-12  0:24   ` [Qemu-arm] " Philippe Mathieu-Daudé
2018-11-12  0:24     ` [Qemu-devel] " Philippe Mathieu-Daudé
2018-11-12 11:10   ` Edgar E. Iglesias
2018-11-12 11:10     ` [Qemu-devel] " Edgar E. Iglesias
2018-11-12  0:32 ` [Qemu-arm] [PATCH 0/2] Fix the last Hyp mode bug and turn it on for A7, A15 Philippe Mathieu-Daudé
2018-11-12  0:32   ` [Qemu-devel] " Philippe Mathieu-Daudé
2018-11-12  9:05 ` [Qemu-arm] [Qemu-devel] " Richard Henderson
2018-11-12  9:05   ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.