public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: Pedro Barbuda <pbarbuda@microsoft.com>,
	 Alexander Graf <agraf@csgraf.de>,
	 Peter Maydell <peter.maydell@linaro.org>,
	 Paolo Bonzini <pbonzini@redhat.com>,
	 Mohamed Mediouni <mohamed@unpredictable.fr>,
	 kvm@vger.kernel.org,  qemu-arm@nongnu.org
Subject: Re: [PATCH v3 00/32] target/arm: fully model WFxT instructions for A-profile
Date: Fri, 24 Apr 2026 19:20:34 +0100	[thread overview]
Message-ID: <87y0ic43v1.fsf@draig.linaro.org> (raw)
In-Reply-To: <20260422125250.1303100-1-alex.bennee@linaro.org> ("Alex Bennée"'s message of "Wed, 22 Apr 2026 13:52:17 +0100")

Alex Bennée <alex.bennee@linaro.org> writes:

> 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 an RFC 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.
>
> 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
>
> v3
>   - fixed the WFE exception handling
>
> Alex.
>
> Alex Bennée (32):
>   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

Peter,

Do you think you could take the patches up to here so I don't need to
hold the re-factoring patches in the tree?

>   target/arm: teach arm_cpu_has_work about halting reasons
>   target/arm: redefine event stream fields
>   target/arm: ensure aarch64 DISAS_WFE will exit
>   target/arm: implements SEV/SEVL for all modes
>   target/arm: hoist event broadcast code into a helper
>   target/arm: implement global monitor events
>   target/arm: enable event stream on WFE instructions
>   target/arm: handle the WFE trap case
>   target/arm: implement WFET
>
>  target/arm/cpu.h               |  27 ++
>  target/arm/internals.h         |  31 +-
>  target/arm/syndrome.h          | 595 +++++++++++++++++++++++++++------
>  target/arm/tcg/helper-defs.h   |   5 +-
>  target/arm/tcg/translate.h     |  32 ++
>  target/arm/tcg/a32.decode      |   5 +-
>  target/arm/tcg/a64.decode      |   5 +-
>  target/arm/tcg/t16.decode      |   4 +-
>  target/arm/tcg/t32.decode      |   4 +-
>  target/arm/arm-powerctl.c      |   4 +-
>  target/arm/cpu.c               |  53 ++-
>  target/arm/helper.c            |  12 +-
>  target/arm/hvf/hvf.c           |  14 +-
>  target/arm/kvm.c               |   5 +-
>  target/arm/machine.c           |   2 +-
>  target/arm/tcg/debug.c         |   2 +-
>  target/arm/tcg/op_helper.c     | 231 +++++++++++--
>  target/arm/tcg/tlb_helper.c    |   6 +-
>  target/arm/tcg/translate-a64.c |  60 +++-
>  target/arm/tcg/translate.c     |  35 +-
>  target/arm/tcg/vfp_helper.c    |   5 +-
>  target/arm/whpx/whpx-all.c     |  13 +-
>  22 files changed, 946 insertions(+), 204 deletions(-)

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

  parent reply	other threads:[~2026-04-24 18:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 12:52 [PATCH v3 00/32] target/arm: fully model WFxT instructions for A-profile Alex Bennée
2026-04-22 12:52 ` [PATCH v3 01/32] target/arm: migrate basic syndrome helpers to registerfields Alex Bennée
2026-04-22 12:52 ` [PATCH v3 02/32] target/arm: migrate system/cp trap syndromes " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 03/32] target/arm: migrate FP/SIMD " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 04/32] target/arm: migrate eret " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 05/32] target/arm: migrate SME " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 06/32] target/arm: migrate PAC " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 07/32] target/arm: migrate BTI " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 08/32] target/arm: migrate BXJ " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 09/32] target/arm: migrate Granule Protection traps " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 10/32] target/arm: migrate fault syndromes " Alex Bennée
2026-04-22 16:54   ` Philippe Mathieu-Daudé
2026-04-22 12:52 ` [PATCH v3 11/32] target/arm: migrate debug " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 12/32] target/arm: migrate wfx " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 13/32] target/arm: migrate gcs " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 14/32] target/arm: migrate memory op " Alex Bennée
2026-04-22 12:52 ` [PATCH v3 15/32] target/arm: migrate check_hcr_el2_trap to use syndrome helper Alex Bennée
2026-04-22 12:52 ` [PATCH v3 16/32] target/arm: use syndrome helpers in arm_cpu_do_interrupt_aarch32_hyp Alex Bennée
2026-04-22 12:52 ` [PATCH v3 17/32] target/arm: use syndrome helpers to set SAME_EL EC bit Alex Bennée
2026-04-22 12:52 ` [PATCH v3 18/32] target/arm: make whpx use syndrome helpers for decode Alex Bennée
2026-04-22 12:52 ` [PATCH v3 19/32] target/arm: make hvf " Alex Bennée
2026-04-22 16:54   ` Philippe Mathieu-Daudé
2026-04-22 12:52 ` [PATCH v3 20/32] target/arm: use syndrome helpers in merge_syn_data_abort Alex Bennée
2026-04-22 12:52 ` [PATCH v3 21/32] target/arm: use syndrome helpers to query VNCR bit Alex Bennée
2026-04-22 12:52 ` [PATCH v3 22/32] target/arm: remove old syndrome defines Alex Bennée
2026-04-22 12:52 ` [PATCH v3 23/32] target/arm: report register in WFIT syndromes Alex Bennée
2026-04-22 12:52 ` [PATCH v3 24/32] target/arm: teach arm_cpu_has_work about halting reasons Alex Bennée
2026-04-22 12:52 ` [PATCH v3 25/32] target/arm: redefine event stream fields Alex Bennée
2026-04-22 12:52 ` [PATCH v3 26/32] target/arm: ensure aarch64 DISAS_WFE will exit Alex Bennée
2026-04-22 16:57   ` Philippe Mathieu-Daudé
2026-04-22 12:52 ` [PATCH v3 27/32] target/arm: implements SEV/SEVL for all modes Alex Bennée
2026-04-22 12:52 ` [PATCH v3 28/32] target/arm: hoist event broadcast code into a helper Alex Bennée
2026-04-22 12:52 ` [PATCH v3 29/32] target/arm: implement global monitor events Alex Bennée
2026-04-22 12:52 ` [PATCH v3 30/32] target/arm: enable event stream on WFE instructions Alex Bennée
2026-04-22 12:52 ` [PATCH v3 31/32] target/arm: handle the WFE trap case Alex Bennée
2026-04-22 12:52 ` [PATCH v3 32/32] target/arm: implement WFET Alex Bennée
2026-04-24 18:20 ` Alex Bennée [this message]
2026-04-27 10:47   ` [PATCH v3 00/32] target/arm: fully model WFxT instructions for A-profile Peter Maydell

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=87y0ic43v1.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=agraf@csgraf.de \
    --cc=kvm@vger.kernel.org \
    --cc=mohamed@unpredictable.fr \
    --cc=pbarbuda@microsoft.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@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