From: Frank Mehnert <frank.mehnert@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org
Subject: Re: [PATCH for-11.2] target/arm: set the event register on a failed store-exclusive
Date: Thu, 26 Nov 2026 15:31:07 +0100 [thread overview]
Message-ID: <zvhsHwoFTq6p6L5AdIM1Eg@gmail.com> (raw)
In-Reply-To: <87wlpzu8cc.fsf@draig.linaro.org>
Hi Alex,
On Donnerstag, 26. November 2026 12:42 Alex Bennée wrote:
> Frank Mehnert <frank.mehnert@gmail.com> writes:
> > [...]
> >
> > Fixes: 01b223f895a7 ("target/arm: enable WFE sleeping for A-profile")
> > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/4938
> > Signed-off-by: Frank Mehnert <frank.mehnert@kernkonzept.com>
>
> Looks good to me - is it possible to extend the wxft test case with a
> test case to exercise this common lock pattern?
Yes. I added a test case to tests/tcg/aarch64/system/wfxt.c and will
send it together with the fix as v2.
The test does not depend on a race between the CPUs. CPU 0 executes
LDAXR on the free lock, then CPU 1, started through PSCI CPU_ON, takes
the lock with a plain store. The following STXR of CPU 0 must fail,
and the WFE after it must complete at once, with interrupts masked and
without any SEV. Like the WFIT/WFET cases, the test uses the virtual
timer interrupt, 1s out, as a watchdog, so a WFE that misses the event
makes the test fail instead of hanging.
The test needs a second CPU, so wfxt.c now runs with -smp 2.
With the fix, the test passed in 80 of 80 runs, with both
multi-threaded and single-threaded TCG, built with -O0 and -O2. With
the fix reverted, it failed in 20 of 20 runs: WFE woke only on the
timer interrupt after 1s.
> For the fix though:
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>
> > [...]
I've added your Reviewed-by to the fix.
Thanks!
Frank
prev parent reply other threads:[~2026-11-26 14:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 8:21 [PATCH for-11.2] target/arm: set the event register on a failed store-exclusive Frank Mehnert
2026-11-26 11:42 ` Alex Bennée
2026-11-26 14:31 ` Frank Mehnert [this message]
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=zvhsHwoFTq6p6L5AdIM1Eg@gmail.com \
--to=frank.mehnert@gmail.com \
--cc=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.