[PATCH for-11.1 0/3] target/arm: Fix SEV/WFE handling for v6K and earlier

Peter Maydell posted 3 patches 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260728111629.1705308-1-peter.maydell@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.h           |  1 -
target/arm/tcg/translate.c | 48 ++++++++++++++++++++++++++++----------
2 files changed, 36 insertions(+), 13 deletions(-)
[PATCH for-11.1 0/3] target/arm: Fix SEV/WFE handling for v6K and earlier
Posted by Peter Maydell 2 months ago
This is an extension of my previous patch
https://patchew.org/QEMU/20260727151325.1428686-1-peter.maydell@linaro.org/
("target/arm: Don't NOP the SEV insn on v6K CPUs") to also get the
architecture version checks right on SEV, WFE and YIELD.  (That then
means all the insns in the NOP-hint space have checks in them).  RTH
suggested that a mismatch in the condition check between WFE and SEV
was more important than I had thought, and I agree.  A guest might
choose to have spinlocks using WFE/SEV regardless of CPU architecture
version, and rely on them degrading to busy-wait loops on older CPUs
because both WFE/SEV are NOPs there; if we make WFE actually wait but
SEV a NOP then that kind of code would deadlock.

Patch 1: same as previous, already reviewed.
Patch 2: add checks to WFE, WFI and YIELD.
Patch 3: trivial comment cleanup.

thanks
-- PMM

Peter Maydell (3):
  target/arm: Don't NOP the SEV insn on v6K CPUs
  target/arm: Make YIELD, WFI and WFE be NOPs on pre-v6K
  target/arm: Remove stale comment about WFE/SEV implementation

 target/arm/cpu.h           |  1 -
 target/arm/tcg/translate.c | 48 ++++++++++++++++++++++++++++----------
 2 files changed, 36 insertions(+), 13 deletions(-)

-- 
2.43.0