Skip to content

More core code ENV_GET_CPU removals

Peter Crosthwaite qemu-devel 4 versions – Applied

Status from this message: Applied to qom-cpu with the above changes.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 10 repliesApplied
  2. v38 patches 10 repliesSuperseded
  3. v25 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches29 repliesSuperseded

Changes in v4 from the cover letter

Fix C99 declaration.
Drop P8

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/7cpus: Add Error argument to cpu_exec_init()exec.c include/exec/exec-all.h target-alpha/cpu.c +16 more+19 -191 reply
2/7cpus: Convert cpu_index into a bitmapexec.c include/qom/cpu.h qom/cpu.c+58 -52 replies
3/7ppc: Move cpu_exec_init() call to realize functiontarget-ppc/translate_init.c+7 -20 replies
4/7translate-all: Change tb_flush() env argument to cpudtc exec.c gdbstub.c +5 more+10 -154 replies
5/7gdbserver: _fork: Change fn to accept cpu instead of envbsd-user/main.c gdbstub.c include/exec/gdbstub.h +1 more+4 -50 replies
6/7cpus: Change tcg_cpu_exec() arg to cpu, not envcpus.c+3 -40 replies
7/7cpus: Change exec_init() arg to cpu, not envexec.c include/exec/exec-all.h target-alpha/cpu.c +16 more+20 -211 reply

Reviews trailers per patch

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

PatchEduardo HabkostIgor MammedovDavid GibsonPeter CrosthwaitePaolo BonziniAndreas FärberAurelien Jarno
1/7R-b R-b R-b R-b A-b
2/7R-b R-b R-b R-b A-b
3/7R-b R-b A-b
4/7R-b A-b
5/7R-b R-b
6/7R-b R-b
7/7R-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 7 reviewers.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH qom v4 0/7] More core code ENV_GET_CPU removals

Hi All,

I'm moving towards the goal of having no core code usages of ENV_GET_CPU. This has two advantages:

1: It means we are closer to common-obj'ing core code like exec.c, cpus.c and friends.
2: Multi arch is easier if ENV_GET_CPU() stays arch specific. It means I don't need those patches where I reorder the env within the arch specific CPUState. This allows continuing placement of arch specifics before the env in the CPU container (which has TCG perf advantages).

Due to point 1, I'm sending this ahead as I think it has standalone value, rather than send as part of multi-arch.

Regards,
Peter

changed since v3:
Fix C99 declaration.
Drop P8

changed since v2:
Fix CPU_GET_ENV typo
Prepend Bharata's patches

changed since v1 (AF, Eduardo review):
Rebase of Bharata's patches
Add () to fn's in commit messages
Remove uses of ENV_GET_CPU() in target code
Include and complete cpu-exec patch (formerly in multi-arch RFC v2)

Bharata B Rao (3):
cpus: Add Error argument to cpu_exec_init()
cpus: Convert cpu_index into a bitmap
ppc: Move cpu_exec_init() call to realize function

Peter Crosthwaite (4):
translate-all: Change tb_flush() env argument to cpu
gdbserver: _fork: Change fn to accept cpu instead of env
cpus: Change tcg_cpu_exec() arg to cpu, not env
cpus: Change exec_init() arg to cpu, not env

 bsd-user/main.c             |  2 +-
 cpus.c                      |  7 +++--
 dtc                         |  2 +-
 exec.c                      | 63 ++++++++++++++++++++++++++++++++++++++-------
 gdbstub.c                   |  9 +++----
 include/exec/exec-all.h     |  4 +--
 include/exec/gdbstub.h      |  2 +-
 include/qom/cpu.h           |  1 +
 linux-user/main.c           |  2 +-
 linux-user/signal.c         |  2 +-
 qom/cpu.c                   |  7 +++++
 target-alpha/cpu.c          |  2 +-
 target-alpha/sys_helper.c   |  2 +-
 target-arm/cpu.c            |  2 +-
 target-cris/cpu.c           |  2 +-
 target-i386/cpu.c           |  2 +-
 target-i386/translate.c     |  2 +-
 target-lm32/cpu.c           |  2 +-
 target-m68k/cpu.c           |  2 +-
 target-microblaze/cpu.c     |  2 +-
 target-mips/cpu.c           |  2 +-
 target-moxie/cpu.c          |  2 +-
 target-openrisc/cpu.c       |  2 +-
 target-ppc/translate_init.c |  9 +++++--
 target-s390x/cpu.c          |  2 +-
 target-sh4/cpu.c            |  2 +-
 target-sparc/cpu.c          |  2 +-
 target-tricore/cpu.c        |  2 +-
 target-unicore32/cpu.c      |  2 +-
 target-xtensa/cpu.c         |  2 +-
 translate-all.c             |  6 ++---
 31 files changed, 101 insertions(+), 51 deletions(-)
Signature · 1 line
1.9.1