Skip to content

target/arm: Fix FPCXT_NS accesses when FPU disabled

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7target/arm/translate-vfp.c: Whitespace fixestarget/arm/translate-vfp.c+5 -61 reply
2/7target/arm: Handle FPU being disabled in FPCXT_NS accessestarget/arm/translate-vfp.c+30 -21 reply
3/7target/arm: Don't NOCP fault for FPCXT_NS accessestarget/arm/m-nocp.decode target/arm/translate-a32.h target/arm/translate-m-nocp.c +2 more+542 -5281 reply
4/7target/arm: Handle writeback in VLDR/VSTR sysreg with no memory accesstarget/arm/translate-m-nocp.c+72 -302 replies
5/7target/arm: Factor FP context update code out into helper functiontarget/arm/translate-vfp.c+58 -461 reply
6/7target/arm: Split vfp_access_check() into A and M versionstarget/arm/translate-vfp.c+48 -311 reply
7/7target/arm: Handle FPU check for FPCXT_NS insns via vfp_access_check_m()target/arm/translate-a32.h target/arm/translate-m-nocp.c target/arm/translate-vfp.c+11 -141 reply

Reviews trailers per patch

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

PatchRichard Henderson
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-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 0/7] target/arm: Fix FPCXT_NS accesses when FPU disabled

This patchseries fixes some bugs in v8.1M M-profile sysreg accesses:

(1) When the FPU is disabled and there is no active FP context (as defined by the pseudocode fpInactive flag), accesses to FPCXT_NS should not fail with a NOCP exception
(2) For cases where VLDR/VSTR sysreg don't perform a memory access (VLDR/VSTR of VPR when unprivileged, and VLDR to FPCXT_NS when fpInactive), the "side effects" of the load (update of writeback base register, and stack limit check) still need to happen, but we were skipping them

This patchseries fixes those bugs. Since these were detected by running tests from the gcc testsuite, I've marked the first four patches as cc: stable. The last three are a refactoring which isn't part of the bugfix proper.

Note for backport to stable: the patchset has a semantic dependency on commit 9a486856e9173af, which was not marked as cc-stable because we didn't know we'd need it for a for-stable bugfix. So that needs to be taken as well if this series goes to stable.

thanks
-- PMM

Peter Maydell (7):
target/arm/translate-vfp.c: Whitespace fixes
target/arm: Handle FPU being disabled in FPCXT_NS accesses target/arm: Don't NOCP fault for FPCXT_NS accesses target/arm: Handle writeback in VLDR/VSTR sysreg with no memory access target/arm: Factor FP context update code out into helper function target/arm: Split vfp_access_check() into A and M versions target/arm: Handle FPU check for FPCXT_NS insns via
vfp_access_check_m()

 target/arm/translate-a32.h    |   1 +
 target/arm/m-nocp.decode      |  24 ++
 target/arm/vfp.decode         |  14 -
 target/arm/translate-m-nocp.c | 550 ++++++++++++++++++++++++++++
 target/arm/translate-vfp.c    | 664 ++++++----------------------------
 5 files changed, 681 insertions(+), 572 deletions(-)
Signature · 1 line
2.20.1