All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org,  qemu-arm@nongnu.org
Subject: Re: [PATCH 5/8] target/arm: extend WFX support for A-profile
Date: Wed, 25 Feb 2026 11:22:40 +0000	[thread overview]
Message-ID: <87pl5t130f.fsf@draig.linaro.org> (raw)
In-Reply-To: <CAFEAcA--YmCZ2+BBy1kM_VjeER4vbX8VMBbSA1aqUQ9-jWp5tQ@mail.gmail.com> (Peter Maydell's message of "Tue, 24 Feb 2026 12:26:41 +0000")

Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 24 Feb 2026 at 12:10, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> This commit extends support for WFI, WFE, WFIT, and WFET instructions
>> for A-profile ARM CPUs, ensuring proper architectural semantics and
>> full ISS (Instruction Specific Syndrome) field support for traps.
>>
>> Key changes:
>> - Update `syn_wfx` in `target/arm/syndrome.h` to include `RN` (register
>>   number) and `RV` (register valid) fields using `registerfields.h`
>>   macros.
>> - Refactor `HELPER(wfi)` and `HELPER(wfit)` to use correct AArch64
>>   syndrome values (CV=0, COND=0xf).
>> - Implement `HELPER(wfet)` and update `trans_WFET` to support the new
>>   Wait For Event with Timeout instruction.
>> - Update `HELPER(wfe)` to implement proper A-profile semantics,
>>   including trap checks and event register handling.
>> - Extend `event_register` handling to all ARM CPUs (not just M-profile)
>>   by updating `HELPER(sev)` and `arm_cpu_has_work`.
>> - Declare WFxT helpers as `TCG_CALL_NO_WG` as they can raise
>>   exceptions.
>
> Yeah, no. This all needs to be split out to be anything
> close to reviewable. In particular "report the right
> syndrome info", "make WFE/SEV not NOPs on A profile like
> they are on M-profile" and "do better with WFET" are all
> separate things.

Yeah it was surprising it didn't follow its own plan which did have a
nice breakdown of patches. When I do my human spin I'll make sure it is
split up better. 

> Also, this doesn't change any of the places that it needs to
> change to implement the places that architecturally set the
> event register (see R_XRZRK in the Arm ARM),

I was having trouble finding that but searching for just XRZRK finds the
subscript text:

  The Event Register for a PE is set by any of the following:
    - A Send Event instruction, SEV, executed by any PE in the system.
    - A Send Event Local instruction, SEVL, executed by the PE
    - An exception return.

These seem easy enough

    - The clearing of the global monitor for the PE

Is this the LSTREX monitor?

  - An event from a Generic Timer event stream, see Event streams.

So this looks like sub-timer events that trigger events but aren't timer
expiry events? I shall have a look to see if the kernel uses this.

  - An event sent by some IMPLEMENTATION DEFINED mechanism.

I assume we don't need to care about IMPDEF cases for our current CPU models?

> so it will
> break code that uses WFE. Notably for A-profile this includes
> generic timer "event streams", which we currently don't implement
> at all.
>
> thanks
> -- PMM

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2026-02-25 11:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 12:10 [PATCH 0/8] arm: implement WFx[T] for aa64 (!!GenAI usage!!) Alex Bennée
2026-02-24 12:10 ` [PATCH 1/8] target/arm: set the correct TI bits for WFIT traps Alex Bennée
2026-02-24 12:10 ` [PATCH 2/8] .eca: basic configuration for Editor Code Assistant Alex Bennée
2026-02-24 12:10 ` [PATCH 3/8] AGENTS.md: add basic AGENTS.md for QEMU Alex Bennée
2026-03-20 16:01   ` Daniel P. Berrangé
2026-03-20 16:55     ` Paolo Bonzini
2026-02-24 12:10 ` [PATCH 4/8] PLAN.md: add plan for the current work Alex Bennée
2026-02-24 12:10 ` [PATCH 5/8] target/arm: extend WFX support for A-profile Alex Bennée
2026-02-24 12:26   ` Peter Maydell
2026-02-25 11:22     ` Alex Bennée [this message]
2026-02-25 11:50       ` Peter Maydell
2026-02-24 12:10 ` [PATCH 6/8] tests/tcg/aarch64: Add WFX instructions system test Alex Bennée
2026-02-24 12:10 ` [PATCH 7/8] tests/tcg/aarch64: fixes for " Alex Bennée
2026-02-24 12:10 ` [PATCH 8/8] target/arm: fixes for WFx[T] support Alex Bennée

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=87pl5t130f.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --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 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.