All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/35] target/arm: fully model WFxT instructions for A-profile
@ 2026-03-20 13:05 Alex Bennée
  2026-03-20 13:05 ` [RFC PATCH 01/35] target/arm: migrate basic syndrome helpers to registerfields Alex Bennée
                   ` (34 more replies)
  0 siblings, 35 replies; 74+ messages in thread
From: Alex Bennée @ 2026-03-20 13:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Peter Maydell, qemu-arm, Pedro Barbuda,
	Mohamed Mediouni, Alex Bennée

This series fully models the behaviour of WFxT instructions. We
already had support for WFE for M-profile but we left off A-profile as
it has more potential sources of wake-ups. The main one is the event
stream which includes events from significant bits of the timer
ticking over.

The series starts with some refactoring of the syndrome register
helpers to use registerfields. We then expand the WFIT trap handling
to report the register used. We then implement the event stream events
for SEV, global monitor and the timer related ones before enabling WFE
for A-profile and then finally WFET.

Note on AI usage. As an experiment I previously posted a series with
the help of Gemini. This series however is a ground up
re-implementation which takes some different approaches on modelling
the event stream. In particular rather than running multiple timers we
use the same wxft timer and just compute if the timeout or timer event
will come first.

The only bits that remain from the Gemini experiment are the tests at
the end of the series. I've split up the patches and audited the
boot.S changes but I've still to go through the mini-GIC library and
the test case itself.

Alex.

Alex Bennée (35):
  target/arm: migrate basic syndrome helpers to registerfields
  target/arm: migrate system/cp trap syndromes to registerfields
  target/arm: migrate FP/SIMD trap syndromes to registerfields
  target/arm: migrate eret trap syndromes to registerfields
  target/arm: migrate SME trap syndromes to registerfields
  target/arm: migrate PAC trap syndromes to registerfields
  target/arm: migrate BTI trap syndromes to registerfields
  target/arm: migrate BXJ trap syndromes to registerfields
  target/arm: migrate Granule Protection traps to registerfields
  target/arm: migrate fault syndromes to registerfields
  target/arm: migrate debug syndromes to registerfields
  target/arm: migrate wfx syndromes to registerfields
  target/arm: migrate gcs syndromes to registerfields
  target/arm: migrate memory op syndromes to registerfields
  target/arm: migrate check_hcr_el2_trap to use syndrome helper
  target/arm: use syndrome helpers in arm_cpu_do_interrupt_aarch32_hyp
  target/arm: use syndrome helpers to set SAME_EL EC bit
  target/arm: make whpx use syndrome helpers for decode
  target/arm: make hvf use syndrome helpers for decode
  target/arm: use syndrome helpers in merge_syn_data_abort
  target/arm: use syndrome helpers to query VNCR bit
  target/arm: remove old syndrome defines
  target/arm: report register in WFIT syndromes
  target/arm: remove event_register check from arm_cpu_has_work
  target/arm: redefine event stream fields
  target/arm: add gt_calc_next_event_stream
  target/arm: wrap event_register in a union
  target/arm: ensure aarch64 DISAS_WFE will exit
  target/arm: implements SEV/SEVL for all modes
  target/arm: implement global monitor events
  target/arm: enable event stream on WFE instructions
  target/arm: implement WFET
  tests/tcg: split stage 1 between devices and RAM
  tests/tcg: create a mini-gic3 library
  tests/tcg: add basic test for aarch64 wf[ie][t] insns

 target/arm/cpu.h                          |  21 +-
 target/arm/internals.h                    |  12 +-
 target/arm/syndrome.h                     | 587 ++++++++++++++++++----
 target/arm/tcg/helper-defs.h              |   3 +-
 tests/tcg/aarch64/system/lib/gicv3.h      |  56 +++
 target/arm/tcg/a32.decode                 |   5 +-
 target/arm/tcg/a64.decode                 |   5 +-
 target/arm/tcg/t16.decode                 |   4 +-
 target/arm/tcg/t32.decode                 |   4 +-
 hw/intc/armv7m_nvic.c                     |   2 +-
 target/arm/cpu.c                          |  11 +-
 target/arm/helper.c                       |  97 +++-
 target/arm/hvf/hvf.c                      |  14 +-
 target/arm/machine.c                      |   4 +-
 target/arm/tcg/debug.c                    |   2 +-
 target/arm/tcg/m_helper.c                 |   4 +-
 target/arm/tcg/op_helper.c                | 122 ++++-
 target/arm/tcg/tlb_helper.c               |   6 +-
 target/arm/tcg/translate-a64.c            |  60 ++-
 target/arm/tcg/translate.c                |  19 +-
 target/arm/tcg/vfp_helper.c               |   5 +-
 target/arm/whpx/whpx-all.c                |  13 +-
 tests/tcg/aarch64/system/lib/gicv3.c      |  77 +++
 tests/tcg/aarch64/system/wfx.c            | 126 +++++
 tests/tcg/aarch64/Makefile.softmmu-target |  15 +-
 tests/tcg/aarch64/system/boot.S           |  55 +-
 26 files changed, 1116 insertions(+), 213 deletions(-)
 create mode 100644 tests/tcg/aarch64/system/lib/gicv3.h
 create mode 100644 tests/tcg/aarch64/system/lib/gicv3.c
 create mode 100644 tests/tcg/aarch64/system/wfx.c

-- 
2.47.3



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

end of thread, other threads:[~2026-04-10 16:20 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 13:05 [RFC PATCH 00/35] target/arm: fully model WFxT instructions for A-profile Alex Bennée
2026-03-20 13:05 ` [RFC PATCH 01/35] target/arm: migrate basic syndrome helpers to registerfields Alex Bennée
2026-04-01  5:36   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 02/35] target/arm: migrate system/cp trap syndromes " Alex Bennée
2026-04-01  5:39   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 03/35] target/arm: migrate FP/SIMD " Alex Bennée
2026-04-01  5:43   ` Richard Henderson
2026-04-01 12:50     ` Alex Bennée
2026-04-01 15:48       ` Peter Maydell
2026-04-01 17:54       ` Pierrick Bouvier
2026-03-20 13:05 ` [RFC PATCH 04/35] target/arm: migrate eret " Alex Bennée
2026-04-05 23:21   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 05/35] target/arm: migrate SME " Alex Bennée
2026-04-05 23:22   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 06/35] target/arm: migrate PAC " Alex Bennée
2026-04-05 23:23   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 07/35] target/arm: migrate BTI " Alex Bennée
2026-04-05 23:28   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 08/35] target/arm: migrate BXJ " Alex Bennée
2026-04-05 23:29   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 09/35] target/arm: migrate Granule Protection traps " Alex Bennée
2026-04-05 23:30   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 10/35] target/arm: migrate fault syndromes " Alex Bennée
2026-04-05 23:32   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 11/35] target/arm: migrate debug " Alex Bennée
2026-04-05 23:37   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 12/35] target/arm: migrate wfx " Alex Bennée
2026-04-05 23:41   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 13/35] target/arm: migrate gcs " Alex Bennée
2026-04-05 23:43   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 14/35] target/arm: migrate memory op " Alex Bennée
2026-04-05 23:44   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 15/35] target/arm: migrate check_hcr_el2_trap to use syndrome helper Alex Bennée
2026-04-06  0:01   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 16/35] target/arm: use syndrome helpers in arm_cpu_do_interrupt_aarch32_hyp Alex Bennée
2026-04-06  0:06   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 17/35] target/arm: use syndrome helpers to set SAME_EL EC bit Alex Bennée
2026-04-06  0:07   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 18/35] target/arm: make whpx use syndrome helpers for decode Alex Bennée
2026-04-06  0:08   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 19/35] target/arm: make hvf " Alex Bennée
2026-04-06  0:08   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 20/35] target/arm: use syndrome helpers in merge_syn_data_abort Alex Bennée
2026-04-06  0:15   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 21/35] target/arm: use syndrome helpers to query VNCR bit Alex Bennée
2026-04-06  0:17   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 22/35] target/arm: remove old syndrome defines Alex Bennée
2026-04-06  0:17   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 23/35] target/arm: report register in WFIT syndromes Alex Bennée
2026-04-06  0:24   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 24/35] target/arm: remove event_register check from arm_cpu_has_work Alex Bennée
2026-04-10  8:47   ` Peter Maydell
2026-04-10  9:35     ` Alex Bennée
2026-04-10 16:19       ` Alex Bennée
2026-03-20 13:05 ` [RFC PATCH 25/35] target/arm: redefine event stream fields Alex Bennée
2026-04-06  0:30   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 26/35] target/arm: add gt_calc_next_event_stream Alex Bennée
2026-04-06  0:34   ` Richard Henderson
2026-03-20 13:05 ` [RFC PATCH 27/35] target/arm: wrap event_register in a union Alex Bennée
2026-04-06  0:37   ` Richard Henderson
2026-04-07 10:35     ` Alex Bennée
2026-04-08  5:41       ` Richard Henderson
2026-04-08  9:57       ` Peter Maydell
2026-03-20 13:05 ` [RFC PATCH 28/35] target/arm: ensure aarch64 DISAS_WFE will exit Alex Bennée
2026-04-06  3:00   ` Richard Henderson
2026-03-20 13:06 ` [RFC PATCH 29/35] target/arm: implements SEV/SEVL for all modes Alex Bennée
2026-04-06  3:22   ` Richard Henderson
2026-03-20 13:06 ` [RFC PATCH 30/35] target/arm: implement global monitor events Alex Bennée
2026-04-10  9:16   ` Peter Maydell
2026-03-20 13:06 ` [RFC PATCH 31/35] target/arm: enable event stream on WFE instructions Alex Bennée
2026-03-20 13:06 ` [RFC PATCH 32/35] target/arm: implement WFET Alex Bennée
2026-03-20 13:06 ` [RFC PATCH 33/35] tests/tcg: split stage 1 between devices and RAM Alex Bennée
2026-03-20 13:06 ` [RFC PATCH 34/35] tests/tcg: create a mini-gic3 library Alex Bennée
2026-03-20 13:06 ` [RFC PATCH 35/35] tests/tcg: add basic test for aarch64 wf[ie][t] insns Alex Bennée

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.