target/arm: Set FPSCR.LTPSIZE for user-mode
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | target/arm: Don't skip M-profile reset entirely in user modetarget/ | +19 | 0 replies | |
| 2/3 | target/arm: Always clear exclusive monitor on resettarget/ | +3 | 0 replies | |
| 3/3 | target/arm: Consolidate ifdef blocks in resettarget/ | +10 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Richard Henderson |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] target/arm: Set FPSCR.LTPSIZE for user-mode
This patchset fixes https://gitlab.com/qemu-project/qemu/-/issues/613
which is a bug where we weren't setting FPSCR.LTPSIZE correctly out of reset for the user-mode emulator. The effect is that when using an M-profile CPU with the low-overhead-branch or MVE extensions (ie the Cortex-M55) with the linux-user QEMU the 'LE' instruction would take a UserFault and MVE instructions would be incorrectly predicated.
This is the result of some over-exuberant ifdeffery in the arm_cpu_reset() function. Patch 1 fixes that so that most of the M-profile-specific reset handling is not ifdeffed, and when we're in user mode we specifically set the FPU state up cleanly. Patches 2 and 3 are just follow-on tidyup.
Christophe, if you are in a position to test this series with:
M55 (has Security, MVE and LOB)
M33 (has Security extension but not MVE/LOB)
M7 or M4 (no Security, but does have FPU)
that would be ideal. I don't really have much in the way of test cases for usermode to hand, so it's possible that I forgot something in the init of the FPU state that might break one of those combinations. (It does fix the test case attached to the bug report.)
thanks
-- PMM
Peter Maydell (3):
target/arm: Don't skip M-profile reset entirely in user mode target/arm: Always clear exclusive monitor on reset target/arm: Consolidate ifdef blocks in reset
target/arm/cpu.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-)
Signature · 1 line
2.20.1