Skip to content

target/arm: Fix SEV/WFE handling for v6K and earlier

Peter Maydell qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target/arm: Don't NOP the SEV insn on v6K CPUstarget/arm/tcg/translate.c+10 -30 replies
2/3target/arm: Make YIELD, WFI and WFE be NOPs on pre-v6Ktarget/arm/tcg/translate.c+26 -91 reply
3/3target/arm: Remove stale comment about WFE/SEV implementationtarget/arm/cpu.h+0 -11 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard Henderson
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

This is an extension of my previous patch
https://patchew.org/QEMU/[email protected]/
("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(-)
Signature · 1 line
2.43.0