[PATCH for-11.1 0/3] target/arm: Fix SEV/WFE handling for v6K and earlier
Peter Maydell <[email protected]> Tue, 28 Jul 2026 12:16:26 +0100
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
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(-) -- 2.43.0