A failing store-exclusive means that the global monitor of the PE was
cleared, which generates a WFE wakeup event. QEMU does not set the
event register in this case, so a vCPU spinning in the lock pattern
"WFE, load-exclusive, store-exclusive, on failure back to WFE" can sleep
in WFE forever although the lock is free.
Patch 1 sets the event register on a failed store-exclusive. Patch 2
adds a test case for this lock pattern to the WFxT test.
Changes since v1:
- Add the test case (patch 2).
- Add the Reviewed-by of Alex Bennée to patch 1.
Frank Mehnert (2):
target/arm: set the event register on a failed store-exclusive
tests/tcg/aarch64: test WFE after a failed store-exclusive
target/arm/tcg/translate-a64.c | 7 +-
target/arm/tcg/translate.c | 7 +-
tests/tcg/aarch64/system/meson.build | 2 +-
tests/tcg/aarch64/system/wfxt.c | 103 ++++++++++++++++++++++++++-
4 files changed, 115 insertions(+), 4 deletions(-)
--
2.55.0