Skip to content

accel: Simplify cpu-target.c (omnibus)

Philippe Mathieu-Daudé kvm qemu-arm qemu-devel qemu-riscv xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20qemu/compiler: Absorb 'clang-tsa.h'block/create.c bsd-user/qemu.h include/block/block_int-common.h +8 more+87 -1250 replies
2/20user: Extract common MMAP API to 'user/mmap.h'bsd-user/qemu.h include/user/mmap.h linux-user/user-mmap.h+35 -282 replies
3/20gdbstub: Check for TCG before calling tb_flush()accel/stubs/tcg-stub.c gdbstub/system.c+4 -52 replies
4/20cpus: Cache CPUClass early in instance_init() handlercpu-target.c hw/core/cpu-common.c+3 -30 replies
5/20cpus: Keep default fields initialization in cpu_common_initfn()cpu-target.c hw/core/cpu-common.c+2 -31 reply
6/20accel/kvm: Remove unused 'system/cpus.h' header in kvm-cpus.haccel/kvm/kvm-cpus.h+0 -21 reply
7/20accel/tcg: Build tcg_flags helpers as common codeaccel/tcg/cpu-exec-common.c accel/tcg/cpu-exec.c+33 -321 reply
8/20accel/tcg: Restrict tlb_init() / destroy() to TCGaccel/tcg/internal-common.h accel/tcg/user-exec-stub.c include/exec/exec-all.h+22 -161 reply
9/20accel/tcg: Restrict 'icount_align_option' global to TCGaccel/tcg/icount-common.c accel/tcg/internal-common.h include/system/cpus.h +1 more+4 -31 reply
10/20accel/tcg: Rename 'hw/core/tcg-cpu-ops.h' -> 'accel/tcg/cpu-ops.h'MAINTAINERS accel/tcg/cpu-exec.c accel/tcg/cputlb.c +33 more+36 -362 replies
11/20accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h'MAINTAINERS accel/accel-target.c cpu-target.c +7 more+11 -111 reply
12/20accel/accel-cpu-target.h: Include missing 'cpu.h' headerinclude/accel/accel-cpu-target.h+3 -01 reply
13/20accel: Forward-declare AccelOpsClass in 'qemu/typedefs.h'accel/accel-system.c accel/hvf/hvf-accel-ops.c accel/kvm/kvm-accel-ops.c +16 more+12 -81 reply
14/20accel/tcg: Move cpu_memory_rw_debug() user implementation to user-exec.caccel/tcg/user-exec.c cpu-target.c+94 -1001 reply
15/20cpus: Fix style in cpu-target.ccpu-target.c+6 -31 reply
16/20cpus: Restrict cpu_common_post_load() code to TCGcpu-target.c+19 -143 replies
17/20cpus: Have cpu_class_init_props() per user / system emulationcpu-target.c hw/core/cpu-system.c hw/core/cpu-user.c +1 more+71 -591 reply
18/20cpus: Have cpu_exec_initfn() per user / system emulationcpu-target.c hw/core/cpu-system.c hw/core/cpu-user.c+12 -91 reply
19/20cpus: Register VMState per user / system emulationcpu-target.c hw/core/cpu-system.c hw/core/cpu-user.c +1 more+139 -1201 reply
20/20cpus: Build cpu_exec_[un]realizefn() methods oncecpu-target.c hw/core/cpu-common.c+26 -301 reply

Reviews trailers per patch

19 of 20 patches have a Reviewed-by or Acked-by.

PatchPierrick BouvierAlex BennéeKevin WolfRichard HendersonWarner Losh
1/20R-b R-b R-b
2/20R-b R-b
3/20R-b R-b
4/20R-b
5/20R-b
6/20R-b
7/20R-b
8/20R-b R-b
9/20R-b
10/20R-b
11/20R-b
12/20A-b
13/20R-b
14/20
15/20R-b
16/20R-b
17/20R-b
18/20R-b
19/20R-b
20/20R-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 5 reviewers.

Read the v1 thread

Cover letter [PATCH 00/20] accel: Simplify cpu-target.c (omnibus)

Yet another cleanup series before respining the "extract TCG fields from CPUState" series. Before that, we try to clarify a bit the code around CPU creation. Target specific code is reduced further. Some intermixed User/System is separated, making maintenance simpler IMHO. Since my local branch is quite big, I tried to group here all the generic patches.

Regards,

Phil.

Based-on: <[email protected]>
"target/ppc: Move TCG code from excp_helper.c to tcg-excp_helper.c"

Philippe Mathieu-Daudé (20):
qemu/compiler: Absorb 'clang-tsa.h'
user: Extract common MMAP API to 'user/mmap.h'
gdbstub: Check for TCG before calling tb_flush()
cpus: Cache CPUClass early in instance_init() handler
cpus: Keep default fields initialization in cpu_common_initfn() accel/kvm: Remove unused 'system/cpus.h' header in kvm-cpus.h accel/tcg: Build tcg_flags helpers as common code accel/tcg: Restrict tlb_init() / destroy() to TCG accel/tcg: Restrict 'icount_align_option' global to TCG accel/tcg: Rename 'hw/core/tcg-cpu-ops.h' -> 'accel/tcg/cpu-ops.h'
accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h' accel/accel-cpu-target.h: Include missing 'cpu.h' header
accel: Forward-declare AccelOpsClass in 'qemu/typedefs.h' accel/tcg: Move cpu_memory_rw_debug() user implementation to
user-exec.c
cpus: Fix style in cpu-target.c
cpus: Restrict cpu_common_post_load() code to TCG
cpus: Have cpu_class_init_props() per user / system emulation
cpus: Have cpu_exec_initfn() per user / system emulation
cpus: Register VMState per user / system emulation
cpus: Build cpu_exec_[un]realizefn() methods once

 MAINTAINERS                                   |   4 +-
 accel/kvm/kvm-cpus.h                          |   2 -
 accel/tcg/internal-common.h                   |  13 +
 bsd-user/qemu.h                               |  13 +-
 .../accel-cpu.h => accel/accel-cpu-target.h}  |   7 +-
 .../tcg-cpu-ops.h => accel/tcg/cpu-ops.h}     |   0
 include/block/block_int-common.h              |   1 -
 include/block/graph-lock.h                    |   2 -
 include/exec/exec-all.h                       |  16 -
 include/exec/page-protection.h                |   2 -
 include/hw/core/cpu.h                         |   2 +
 include/qemu/clang-tsa.h                      | 114 -------
 include/qemu/compiler.h                       |  87 +++++
 include/qemu/thread.h                         |   1 -
 include/qemu/typedefs.h                       |   1 +
 include/system/accel-ops.h                    |   1 -
 include/system/cpus.h                         |   4 -
 include/user/mmap.h                           |  32 ++
 linux-user/user-mmap.h                        |  19 +-
 accel/accel-system.c                          |   1 +
 accel/accel-target.c                          |   2 +-
 accel/hvf/hvf-accel-ops.c                     |   1 +
 accel/kvm/kvm-accel-ops.c                     |   1 +
 accel/qtest/qtest.c                           |   1 +
 accel/stubs/tcg-stub.c                        |   4 -
 accel/tcg/cpu-exec-common.c                   |  34 +-
 accel/tcg/cpu-exec.c                          |  37 +--
 accel/tcg/cputlb.c                            |   2 +-
 accel/tcg/icount-common.c                     |   2 +
 accel/tcg/monitor.c                           |   1 -
 accel/tcg/tcg-accel-ops.c                     |   1 +
 accel/tcg/translate-all.c                     |   3 +-
 accel/tcg/user-exec-stub.c                    |  11 +
 accel/tcg/user-exec.c                         |  94 +++++-
 accel/tcg/watchpoint.c                        |   2 +-
 accel/xen/xen-all.c                           |   1 +
 block/create.c                                |   1 -
 bsd-user/signal.c                             |   2 +-
 cpu-common.c                                  |   1 -
 cpu-target.c                                  | 314 +-----------------
 gdbstub/system.c                              |   6 +-
 hw/core/cpu-common.c                          |  31 ++
 hw/core/cpu-system.c                          | 170 ++++++++++
 hw/core/cpu-user.c                            |  44 +++
 hw/mips/jazz.c                                |   2 +-
 linux-user/signal.c                           |   2 +-
 system/cpus.c                                 |   1 +
 system/globals.c                              |   1 -
 system/physmem.c                              |   2 +-
 target/alpha/cpu.c                            |   2 +-
 target/arm/cpu.c                              |   2 +-
 target/arm/tcg/cpu-v7m.c                      |   2 +-
 target/arm/tcg/cpu32.c                        |   2 +-
 target/arm/tcg/mte_helper.c                   |   2 +-
 target/arm/tcg/sve_helper.c                   |   2 +-
 target/avr/cpu.c                              |   2 +-
 target/avr/helper.c                           |   2 +-
 target/hexagon/cpu.c                          |   2 +-
 target/hppa/cpu.c                             |   2 +-
 target/i386/hvf/hvf-cpu.c                     |   2 +-
 target/i386/kvm/kvm-cpu.c                     |   2 +-
 target/i386/nvmm/nvmm-accel-ops.c             |   1 +
 target/i386/tcg/tcg-cpu.c                     |   4 +-
 target/i386/whpx/whpx-accel-ops.c             |   1 +
 target/loongarch/cpu.c                        |   2 +-
 target/m68k/cpu.c                             |   2 +-
 target/microblaze/cpu.c                       |   2 +-
 target/mips/cpu.c                             |   2 +-
 target/openrisc/cpu.c                         |   2 +-
 target/ppc/cpu_init.c                         |   2 +-
 target/ppc/kvm.c                              |   2 +-
 target/riscv/kvm/kvm-cpu.c                    |   2 +-
 target/riscv/tcg/tcg-cpu.c                    |   4 +-
 target/rx/cpu.c                               |   2 +-
 target/s390x/cpu.c                            |   2 +-
 target/s390x/tcg/mem_helper.c                 |   2 +-
 target/sh4/cpu.c                              |   2 +-
 target/sparc/cpu.c                            |   2 +-
 target/tricore/cpu.c                          |   2 +-
 target/xtensa/cpu.c                           |   2 +-
 tests/unit/test-bdrv-drain.c                  |   1 -
 tests/unit/test-block-iothread.c              |   1 -
 util/qemu-thread-posix.c                      |   1 -
 hw/core/meson.build                           |   5 +-
 84 files changed, 590 insertions(+), 578 deletions(-)
 rename include/{hw/core/accel-cpu.h => accel/accel-cpu-target.h} (92%)
 rename include/{hw/core/tcg-cpu-ops.h => accel/tcg/cpu-ops.h} (100%)
 delete mode 100644 include/qemu/clang-tsa.h
 create mode 100644 include/user/mmap.h
 create mode 100644 hw/core/cpu-user.c
Signature · 1 line
2.47.1