Skip to content

target/arm: Improve user-mode compatibility with JITs

John Högberg qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2target/arm: Handle IC IVAU to improve compatibility with JITstarget/arm/helper.c+0 -02 replies
2/2tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped codetests/tcg/aarch64/Makefile.target tests/tcg/aarch64/icivau.c+53 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchRichard Henderson
1/2Co-authored-by
2/2

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/2] target/arm: Improve user-mode compatibility with JITs

When running in user-mode QEMU currently fails to emulate JITs that use dual-mapped code to get around W^X restrictions, where one mapping is writable and one is executable. As it has no way of knowing that a write to the writable region is reflected in the executable one, it fails to invalidate previously translated code which leads to a crash at best.

(Note that system mode is unaffected as the softmmu is fully aware of what is going on.)

This patch series catches changes to dual-mapped code by honoring the cache management instructions required to make things work on actual hardware.

See https://gitlab.com/qemu-project/qemu/-/issues/1034 for more details

John Högberg (2):
target/arm: Handle IC IVAU to improve compatibility with JITs tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

 target/arm/helper.c               |  47 ++++++-
 tests/tcg/aarch64/Makefile.target |   3 +-
 tests/tcg/aarch64/icivau.c        | 204 ++++++++++++++++++++++++++++++
 3 files changed, 250 insertions(+), 4 deletions(-)
 create mode 100644 tests/tcg/aarch64/icivau.c
Signature · 1 line
2.34.1