All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/7] target/arm: fully model WFxT instructions for A-profile
@ 2026-06-24 10:30 Alex Bennée
  2026-06-24 10:30 ` [PATCH v9 1/7] hw/arm: use cortex-a9 mpcore base for CBAR on npcm7xx machines Alex Bennée
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Alex Bennée @ 2026-06-24 10:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: kvm, Troy Lee, Peter Maydell, Hao Wu, Kane Chen, Mohamed Mediouni,
	Steven Lee, Joel Stanley, Jamin Lin, Pedro Barbuda, Paolo Bonzini,
	Tyrone Ting, Andrew Jeffery, qemu-arm, Alexander Graf,
	Cédric Le Goater, 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 refactoring from the previous iterations of the patch have now
been merged.

I've dropped trying to fully model the global monitor in favour of
taking advantage of the architectural flexibility to have an IMPDEF
event wake up for any reason. We treat the setting of exclusive_addr
as such a reason because it indicates the current vCPU is in a ldstx
exclusive region and we don't want the guest to deadlock. This does mean
the system won't sleep on WFE enabled locks but people shouldn't be
relying on QEMU to model real world sleep patterns anyway given the
efficiency of emulation compared to real HW.

I've written a test case using kvm-unit-tests:

  Message-ID: <20260527111822.1563679-1-alex.bennee@linaro.org>
  Date: Wed, 27 May 2026 12:18:21 +0100
  Subject: [kvm-unit-tests PATCH v2] arm: add wfx test case
  From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>

The only remaining unreviewed patch is:

  target/arm: ensure we create the wxft_timer for all modes

v9
  - add more r-b's
  - only test arm_feature(env, ARM_FEATURE_V6K)

v8
  - Fixed quanta-gsj model SEV errata failure
  - Update the aspeed_anacapa test case
  - Ensure wake up events for V6K/V7 and plain V8
  - merged trap with implementation

v7
  - more r-b's
  - extended comment for typo fix
v6
  - add typo fix
  - addressed rth's comments

v5
  - addressed rth's comments
  - all but one patch now reviewed

v4
  - precursor refactor patches now merged
  - dropped global monitor emulation
  - addressed other comments
  - tested with check-tcg and kvm-unit-test wfx tests

v3
  - fixed the WFE exception handling

v2
  - I've kept the tests separate, see:

    Message-ID: <20260417164328.1009132-1-alex.bennee@linaro.org>
    Date: Fri, 17 Apr 2026 17:43:20 +0100
    Subject: [PATCH 0/7] tests/tcg: more capabilities for aarch64-softmmu tests
    From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>

  - tweaks to global monitor behaviour
  - STLR/STL will also trigger events to avoid deadlocks
  - see under the --- in the patches for details

Alex.

Alex Bennée (7):
  hw/arm: use cortex-a9 mpcore base for CBAR on npcm7xx machines
  tests/functional: update anacapa-bmc image
  target/arm: do not clear halting reason in has_work helper
  target/arm: ensure we create the wxft_timer for all modes
  target/arm: implements SEV/SEVL for all modes
  target/arm: enable WFE sleeping for A-profile
  target/arm: implement WFET

 include/hw/core/sysemu-cpu-ops.h            |   3 +
 target/arm/cpu.h                            |   2 +-
 target/arm/tcg/helper-defs.h                |   3 +-
 target/arm/tcg/translate.h                  |  18 ++
 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/arm/npcm7xx.c                            |   2 +-
 target/arm/cpu.c                            |  23 +-
 target/arm/tcg/op_helper.c                  | 252 ++++++++++++++++++--
 target/arm/tcg/translate-a64.c              |  42 ++--
 target/arm/tcg/translate.c                  |  34 +--
 tests/functional/arm/test_aspeed_anacapa.py |   4 +-
 14 files changed, 328 insertions(+), 73 deletions(-)

-- 
2.47.3



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

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24 10:30 [PATCH v9 0/7] target/arm: fully model WFxT instructions for A-profile Alex Bennée
2026-06-24 10:30 ` [PATCH v9 1/7] hw/arm: use cortex-a9 mpcore base for CBAR on npcm7xx machines Alex Bennée
2026-06-24 10:30 ` [PATCH v9 2/7] tests/functional: update anacapa-bmc image Alex Bennée
2026-06-24 10:30 ` [PATCH v9 3/7] target/arm: do not clear halting reason in has_work helper Alex Bennée
2026-06-25 15:01   ` Richard Henderson
2026-06-24 10:30 ` [PATCH v9 4/7] target/arm: ensure we create the wxft_timer for all modes Alex Bennée
2026-06-25 15:02   ` Richard Henderson
2026-06-24 10:30 ` [PATCH v9 5/7] target/arm: implements SEV/SEVL " Alex Bennée
2026-06-24 10:30 ` [PATCH v9 6/7] target/arm: enable WFE sleeping for A-profile Alex Bennée
2026-10-26 15:53   ` Thomas Huth
2026-10-26 16:12     ` Alex Bennée
2026-10-26 16:54       ` Thomas Huth
2026-06-24 10:30 ` [PATCH v9 7/7] target/arm: implement WFET Alex Bennée
2026-07-03  9:59 ` [PATCH v9 0/7] target/arm: fully model WFxT instructions for A-profile Peter Maydell

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.