Skip to content

arm: Fix a handful of M-profile bugs

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6target/arm: Enforce that M-profile SP low 2 bits are always zerotarget/arm/gdbstub.c target/arm/m_helper.c target/arm/translate.c+15 -61 reply
2/6target/arm: Add missing 'return's after calling v7m_exception_taken()target/arm/m_helper.c+2 -01 reply
3/6target/arm: Report M-profile alignment faults correctly to the guesttarget/arm/m_helper.c+8 -01 reply
4/6hw/intc/armv7m_nvic: ISCR.ISRPENDING is set for non-enabled pending interruptshw/intc/armv7m_nvic.c+4 -51 reply
5/6hw/intc/armv7m_nvic: Correct size of ICSR.VECTPENDINGhw/intc/armv7m_nvic.c+1 -11 reply
6/6hw/intc/armv7m_nvic: for v8.1M VECTPENDING hides S exceptions from NShw/intc/armv7m_nvic.c+24 -71 reply

Reviews trailers per patch

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

PatchRichard Henderson
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-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-6.1 0/6] arm: Fix a handful of M-profile bugs

This patchset fixes a handful of minor M-profile bugs:
* The low 2 bits of SP should not be writeable (they are always 0)
* Missing 'return' statements for some "tail chain to another exception after detecting an error during exception return" cases
* Alignment faults were being incorrectly reported to the guest as MMU faults
* ISCR.ISRPENDING wasn't being set if there was a pending but non-enabled interrupt
* ISCR.VECTPENDING is 9 bits, not 8
* ISCR.VECTPENDING was missing the new-for-v8.1M behaviour where it hides the identity of a pending Secure exception from a NonSecure read of the register

Nothing here is very critical, but they might as well go into 6.1 because they are bugfixes.

thanks
-- PMM

Peter Maydell (6):
target/arm: Enforce that M-profile SP low 2 bits are always zero target/arm: Add missing 'return's after calling v7m_exception_taken() target/arm: Report M-profile alignment faults correctly to the guest hw/intc/armv7m_nvic: ISCR.ISRPENDING is set for non-enabled pending
interrupts
hw/intc/armv7m_nvic: Correct size of ICSR.VECTPENDING hw/intc/armv7m_nvic: for v8.1M VECTPENDING hides S exceptions from NS

 hw/intc/armv7m_nvic.c  | 40 ++++++++++++++++++++++++++++------------
 target/arm/gdbstub.c   |  4 ++++
 target/arm/m_helper.c  | 24 ++++++++++++++++++------
 target/arm/translate.c |  3 +++
 4 files changed, 53 insertions(+), 18 deletions(-)
Signature · 1 line
2.20.1