Skip to content

Reduce usage of CPUArchState in cputlb.c

Anton Johansson via qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11target/arm: Replace TARGET_PAGE_ENTRY_EXTRAinclude/exec/cpu-defs.h target/arm/cpu-param.h target/arm/ptw.c +4 more+22 -220 replies
2/11include: Introduce tlb_ptr field to CPUStateinclude/exec/cpu-all.h include/hw/core/cpu.h+18 -02 replies
3/11accel/tcg: Modify tlb_*() to use CPUStateaccel/tcg/cputlb.c include/exec/cpu_ldst.h+107 -1192 replies
4/11accel/tcg: Modify probe_access_internal() to use CPUStateaccel/tcg/cputlb.c+23 -230 replies
5/11accel/tcg: Modifies memory access functions to use CPUStateaccel/tcg/cputlb.c+161 -1632 replies
6/11accel/tcg: Modify atomic_mmu_lookup() to use CPUStateaccel/tcg/atomic_template.h accel/tcg/cputlb.c accel/tcg/user-exec.c+29 -250 replies
7/11accel/tcg: Use CPUState in atomicity helpersaccel/tcg/cputlb.c accel/tcg/ldst_atomicity.c.inc accel/tcg/user-exec.c+62 -620 replies
8/11include/exec: Remove env_tlb()include/exec/cpu-all.h+0 -110 replies
9/11tcg: Update env_tlb() commentstcg/aarch64/tcg-target.c.inc tcg/arm/tcg-target.c.inc+2 -20 replies
10/11accel/tcg: Unify user and softmmu do_[st|ld]*_mmu()accel/tcg/cputlb.c accel/tcg/user-exec.c+117 -820 replies
11/11accel/tcg: move ld/st helpers to ldst_common.c.incaccel/tcg/cputlb.c accel/tcg/ldst_common.c.inc accel/tcg/user-exec.c+225 -4070 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] Reduce usage of CPUArchState in cputlb.c

This patchset reduces the dependence of cputlb.c on the full CPUArchState, instead replacing it with the generic CPUState. Target- facing functions such as probe_access(), cpu_ld*(), etc. are not modified in this patchset, the idea is to try and isolate all usage of CPUArchState into smaller wrapper functions that can eventually be compiled and linked into the target, whilst keeping accel/tcg/ target-independent.

Anton Johansson (11):
target/arm: Replace TARGET_PAGE_ENTRY_EXTRA
include: Introduce tlb_ptr field to CPUState accel/tcg: Modify tlb_*() to use CPUState accel/tcg: Modify probe_access_internal() to use CPUState accel/tcg: Modifies memory access functions to use CPUState accel/tcg: Modify atomic_mmu_lookup() to use CPUState accel/tcg: Use CPUState in atomicity helpers include/exec: Remove env_tlb()
tcg: Update env_tlb() comments
accel/tcg: Unify user and softmmu do_[st|ld]*_mmu() accel/tcg: move ld/st helpers to ldst_common.c.inc

 accel/tcg/atomic_template.h    |  20 +-
 include/exec/cpu-all.h         |  11 +-
 include/exec/cpu-defs.h        |  18 +-
 include/exec/cpu_ldst.h        |   8 +-
 include/hw/core/cpu.h          |   6 +
 target/arm/cpu-param.h         |  12 -
 accel/tcg/cputlb.c             | 756 ++++++++++++---------------------
 accel/tcg/user-exec.c          | 276 +++---------
 target/arm/ptw.c               |   4 +-
 target/arm/tcg/mte_helper.c    |   2 +-
 target/arm/tcg/sve_helper.c    |   2 +-
 target/arm/tcg/tlb_helper.c    |   4 +-
 target/arm/tcg/translate-a64.c |   2 +-
 accel/tcg/ldst_atomicity.c.inc |  88 ++--
 accel/tcg/ldst_common.c.inc    | 225 ++++++++++
 tcg/aarch64/tcg-target.c.inc   |   2 +-
 tcg/arm/tcg-target.c.inc       |   2 +-
 17 files changed, 644 insertions(+), 794 deletions(-)

--
2.41.0