Skip to content

RFC tcg: Move TCG_GUEST_DEFAULT_MO -> TCGCPUOps::guest_default_memory_order

Philippe Mathieu-Daudé qemu-devel 2 versions Applied

Status from this message: Queued to tcg-next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest7 patches 6 repliesApplied
  2. v1 RFC4 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- Do not use tcg_ctx in tcg_req_mo (rth)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/7tcg: Always define TCG_GUEST_DEFAULT_MOaccel/tcg/translate-all.c target/hexagon/cpu-param.h target/m68k/cpu-param.h +3 more+15 -40 replies
2/7tcg: Simplify tcg_req_mo() macroaccel/tcg/internal-target.h accel/tcg/tcg-all.c+1 -110 replies
3/7tcg: Define guest_default_memory_order in TCGCPUOpsinclude/accel/tcg/cpu-ops.h target/alpha/cpu.c target/arm/cpu.c +18 more+45 -00 replies
4/7tcg: Remove use of TCG_GUEST_DEFAULT_MO in tb_gen_code()accel/tcg/translate-all.c+1 -11 reply
5/7tcg: Propagate CPUState argument to cpu_req_mo()accel/tcg/cputlb.c accel/tcg/internal-target.h accel/tcg/user-exec.c+22 -211 reply
6/7tcg: Have tcg_req_mo() use TCGCPUOps::guest_default_memory_orderaccel/tcg/internal-target.h+4 -51 reply
7/7tcg: Remove the TCG_GUEST_DEFAULT_MO definition globallydocs/devel/multi-thread-tcg.rst target/alpha/cpu-param.h target/alpha/cpu.c +37 more+66 -1010 replies

Reviews trailers per patch

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

PatchAnton JohanssonRichard HendersonPierrick Bouvier
1/7R-b R-b R-b
2/7R-b R-b R-b
3/7R-b R-b R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [RFC PATCH-for-10.1 v2 0/7] tcg: Move TCG_GUEST_DEFAULT_MO -> TCGCPUOps::guest_default_memory_order

Since v1:
- Do not use tcg_ctx in tcg_req_mo (rth)

Hi,

In this series we replace the TCG_GUEST_DEFAULT_MO definition from "cpu-param.h" by a 'guest_default_memory_order' field in TCGCPUOps.

Since tcg_req_mo() now accesses tcg_ctx, this impact the cpu_req_mo() calls in accel/tcg/{cputlb,user-exec}.c.

The long term goal is to be able to use targets with distinct guest memory order restrictions.

Philippe Mathieu-Daudé (7):
tcg: Always define TCG_GUEST_DEFAULT_MO
tcg: Simplify tcg_req_mo() macro
tcg: Define guest_default_memory_order in TCGCPUOps
tcg: Remove use of TCG_GUEST_DEFAULT_MO in tb_gen_code()
tcg: Propagate CPUState argument to cpu_req_mo()
tcg: Have tcg_req_mo() use TCGCPUOps::guest_default_memory_order
tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally

 docs/devel/multi-thread-tcg.rst |  4 ++--
 accel/tcg/internal-target.h     | 19 ++++++-------------
 include/accel/tcg/cpu-ops.h     |  8 ++++++++
 target/alpha/cpu-param.h        |  3 ---
 target/arm/cpu-param.h          |  3 ---
 target/avr/cpu-param.h          |  2 --
 target/hppa/cpu-param.h         |  8 --------
 target/i386/cpu-param.h         |  3 ---
 target/loongarch/cpu-param.h    |  2 --
 target/microblaze/cpu-param.h   |  3 ---
 target/mips/cpu-param.h         |  2 --
 target/openrisc/cpu-param.h     |  2 --
 target/ppc/cpu-param.h          |  2 --
 target/riscv/cpu-param.h        |  2 --
 target/s390x/cpu-param.h        |  6 ------
 target/sparc/cpu-param.h        | 23 -----------------------
 target/xtensa/cpu-param.h       |  3 ---
 accel/tcg/cputlb.c              | 20 ++++++++++----------
 accel/tcg/tcg-all.c             |  3 ---
 accel/tcg/translate-all.c       |  6 +-----
 accel/tcg/user-exec.c           | 20 ++++++++++----------
 target/alpha/cpu.c              |  3 +++
 target/arm/cpu.c                |  3 +++
 target/arm/tcg/cpu-v7m.c        |  3 +++
 target/avr/cpu.c                |  1 +
 target/hexagon/cpu.c            |  2 ++
 target/hppa/cpu.c               |  8 ++++++++
 target/i386/tcg/tcg-cpu.c       |  5 +++++
 target/loongarch/cpu.c          |  2 ++
 target/m68k/cpu.c               |  3 +++
 target/microblaze/cpu.c         |  3 +++
 target/mips/cpu.c               |  2 ++
 target/openrisc/cpu.c           |  2 ++
 target/ppc/cpu_init.c           |  2 ++
 target/riscv/tcg/tcg-cpu.c      |  2 ++
 target/rx/cpu.c                 |  3 +++
 target/s390x/cpu.c              |  6 ++++++
 target/sh4/cpu.c                |  3 +++
 target/sparc/cpu.c              | 23 +++++++++++++++++++++++
 target/tricore/cpu.c            |  2 ++
 target/xtensa/cpu.c             |  3 +++
 41 files changed, 118 insertions(+), 107 deletions(-)
Signature · 1 line
2.47.1