qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/10] target/arm: Some pieces of support for 32-bit Hyp mode
@ 2018-08-14 12:42 Peter Maydell
  2018-08-14 12:42 ` [Qemu-devel] [PATCH 01/10] target/arm: Correct typo in HAMAIR1 regdef name Peter Maydell
                   ` (11 more replies)
  0 siblings, 12 replies; 36+ messages in thread
From: Peter Maydell @ 2018-08-14 12:42 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: patches, Luc Michel, edgari

Now we have virtualization support in the GICv2 emulation,
I thought I'd have a look at how much we were still missing
for being able to enable EL2 support for AArch32.
This set of patches fixes some minor missing pieces:
 * various small bugs in cp15 registers or places where
   we were missing the 32-bit version of a 64-bit register
 * a bugfix for MSR/MRS (banked), which were not allowing
   Hyp mode to access ELR_Hyp
 * implementation of the ERET instruction for A32/T32
 * support for taking exceptions to Hyp mode (the largest
   of these missing bits)

This isn't complete, but I thought I'd push these patches
out for review. My test setup is that I have another
couple of patches, one which fixes up hw/arm/boot.c to
boot AArch32 kernels in Hyp mode if it exists, and one
which sets ARM_FEATURE_EL2 on our A15 model. With those I
can get an outer kernel to boot with KVM support and try
to run an inner guest kernel. The inner kernel boots OK
but gets random segfaults in its userspace -- I haven't
tracked down why this is yet...

Some bits that are definitely missing:
 * ATS1HR, ATS1HW address translation ops
 * I need to check that the trap semantics for AArch32
   regs line up with their AArch64 counterparts

I also noticed that we fail to implement really quite a lot
of the HCR_EL2 trap semantics for either AArch64 or AArch32,
to the extent that I'm surprised that nested guests work
under AArch64 :-)

This patchset is based on top of my target-arm.for-3.1
branch.

thanks
-- PMM

Peter Maydell (10):
  target/arm: Correct typo in HAMAIR1 regdef name
  target/arm: Add missing .cp = 15 to HMAIR1 and HAMAIR1 regdefs
  target/arm: Implement RAZ/WI HACTLR2
  target/arm: Implement AArch32 HVBAR
  target/arm: Implement AArch32 HCR and HCR2
  target/arm: Implement AArch32 Hyp FARs
  target/arm: Implement ESR_EL2/HSR for AArch32 and no-EL2
  target/arm: Permit accesses to ELR_Hyp from Hyp mode via MSR/MRS
    (banked)
  target/arm: Implement AArch32 ERET instruction
  target/arm: Implement support for taking exceptions to Hyp mode

 target/arm/helper.c    | 226 ++++++++++++++++++++++++++++++++++-------
 target/arm/op_helper.c |  22 ++--
 target/arm/translate.c |  41 +++++++-
 3 files changed, 236 insertions(+), 53 deletions(-)

-- 
2.18.0

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

end of thread, other threads:[~2018-08-17 10:15 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14 12:42 [Qemu-devel] [PATCH 00/10] target/arm: Some pieces of support for 32-bit Hyp mode Peter Maydell
2018-08-14 12:42 ` [Qemu-devel] [PATCH 01/10] target/arm: Correct typo in HAMAIR1 regdef name Peter Maydell
2018-08-14 14:33   ` Edgar E. Iglesias
2018-08-15  9:02   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 02/10] target/arm: Add missing .cp = 15 to HMAIR1 and HAMAIR1 regdefs Peter Maydell
2018-08-14 14:41   ` Edgar E. Iglesias
2018-08-14 14:45     ` Peter Maydell
2018-08-15  9:10   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 03/10] target/arm: Implement RAZ/WI HACTLR2 Peter Maydell
2018-08-14 14:44   ` Edgar E. Iglesias
2018-08-15 12:14   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 04/10] target/arm: Implement AArch32 HVBAR Peter Maydell
2018-08-14 14:46   ` Edgar E. Iglesias
2018-08-15 12:26   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 05/10] target/arm: Implement AArch32 HCR and HCR2 Peter Maydell
2018-08-14 14:52   ` Edgar E. Iglesias
2018-08-16  8:55   ` Luc Michel
2018-08-16  9:02     ` Peter Maydell
2018-08-14 12:42 ` [Qemu-devel] [PATCH 06/10] target/arm: Implement AArch32 Hyp FARs Peter Maydell
2018-08-14 14:57   ` Edgar E. Iglesias
2018-08-16  9:01   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 07/10] target/arm: Implement ESR_EL2/HSR for AArch32 and no-EL2 Peter Maydell
2018-08-14 14:59   ` Edgar E. Iglesias
2018-08-16  9:16   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 08/10] target/arm: Permit accesses to ELR_Hyp from Hyp mode via MSR/MRS (banked) Peter Maydell
2018-08-14 15:07   ` Edgar E. Iglesias
2018-08-16  7:58   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 09/10] target/arm: Implement AArch32 ERET instruction Peter Maydell
2018-08-15 11:00   ` Edgar E. Iglesias
2018-08-16  8:10   ` Luc Michel
2018-08-14 12:42 ` [Qemu-devel] [PATCH 10/10] target/arm: Implement support for taking exceptions to Hyp mode Peter Maydell
2018-08-15 10:54   ` Edgar E. Iglesias
2018-08-15 10:58     ` Peter Maydell
2018-08-15 11:04 ` [Qemu-devel] [PATCH 00/10] target/arm: Some pieces of support for 32-bit " Edgar E. Iglesias
2018-08-15 11:13   ` Peter Maydell
2018-08-17 10:15 ` [Qemu-devel] [Qemu-arm] " Peter Maydell

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).