Skip to content

softmmu: Make various objects target agnostic

Philippe Mathieu-Daudé via qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest21 patches 1 replyIn review
  2. v221 patches 17 repliesSuperseded

Since v1 from the cover letter

- Simplify kvm_cpus_are_resettable (Richard)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21accel: Restrict sysemu stubs to system emulationaccel/stubs/meson.build+7 -40 replies
2/21accel/meson: Only build hw virtualization with system emulationaccel/meson.build+7 -50 replies
3/21exec: Declare vaddr as a generic target-agnostic typeinclude/exec/cpu-common.h include/hw/core/cpu.h+13 -120 replies
4/21exec: Make cpu_memory_rw_debug() target agnosticcpu.c include/exec/cpu-all.h include/exec/cpu-common.h +2 more+11 -110 replies
5/21sysemu/memory_mapping: Become target-agnosticinclude/sysemu/memory_mapping.h softmmu/memory_mapping.c+3 -30 replies
6/21sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target agnosticinclude/sysemu/kvm.h+3 -30 replies
7/21accel/kvm: Simplify user-mode #ifdef'ryaccel/stubs/kvm-stub.c+0 -50 replies
8/21accel/hax: Introduce CONFIG_HAX_IS_POSSIBLEaccel/stubs/hax-stub.c include/sysemu/hax.h target/i386/hax/hax-all.c+15 -120 replies
9/21softmmu/cpus: Code movementsoftmmu/cpus.c+5 -50 replies
10/21accel: Introduce AccelOpsClass::cpu_thread_is_idle()accel/kvm/kvm-accel-ops.c include/sysemu/accel-ops.h softmmu/cpus.c +1 more+17 -20 replies
11/21accel: Introduce AccelOpsClass::cpus_are_resettable()accel/kvm/kvm-accel-ops.c include/sysemu/accel-ops.h include/sysemu/hw_accel.h +1 more+12 -60 replies
12/21softmmu/globals: Remove unused 'hw/i386/*' headerssoftmmu/globals.c+0 -20 replies
13/21softmmu/runstate: Clean headerssoftmmu/runstate.c+1 -10 replies
14/21softmmu/physmem: Remove unnecessary includesoftmmu/physmem.c+0 -10 replies
15/21softmmu/cpu-timers: Remove unused 'exec/exec-all.h' headersoftmmu/cpu-timers.c+0 -10 replies
16/21misc: Remove unnecessary "sysemu/cpu-timers.h" includeaccel/qtest/qtest.c target/alpha/translate.c tests/unit/ptimer-test-stubs.c+0 -30 replies
17/21misc: Add missing "sysemu/cpu-timers.h" includeaccel/tcg/tcg-accel-ops-icount.c accel/tcg/tcg-accel-ops-mttcg.c accel/tcg/tcg-accel-ops-rr.c +3 more+5 -10 replies
18/21exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnosticinclude/exec/gdbstub.h+13 -120 replies
19/21exec/cpu: Make address_space_init/reloading_memory_map target agnosticinclude/exec/cpu-common.h include/exec/exec-all.h+23 -250 replies
20/21softmmu: Add qemu_init_arch_modules()include/sysemu/arch_init.h softmmu/arch_init.c softmmu/vl.c+12 -40 replies
21/21softmmu: Build target-agnostic objects oncesoftmmu/meson.build+12 -120 replies

Reviews trailers per patch

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

PatchPaolo BonziniRichard HendersonThomas Huth
1/21R-b R-b R-b
2/21R-b R-b
3/21R-b R-b
4/21R-b R-b
5/21R-b R-b
6/21R-b R-b
7/21R-b R-b
8/21R-b R-b
9/21R-b R-b
10/21R-b R-b
11/21R-b R-b
12/21R-b R-b
13/21R-b R-b
14/21R-b R-b
15/21R-b R-b
16/21R-b R-b
17/21R-b R-b
18/21R-b R-b
19/21R-b R-b
20/21R-b R-b
21/21R-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 v3 thread

Cover letter [PATCH v3 00/21] softmmu: Make various objects target agnostic

This is a re-org accel/ and softmmu/ to have more target-agnostic objects.

Series fully reviewed. Paolo, Richard, do you want me to send a pull request for this and the 'Remove "qemu/log.h"' series?

Since v1:
- Simplify kvm_cpus_are_resettable (Richard)

Since RFC:
- Rework accel/meson (Richard)
- Use vaddr in cpu_memory_rw_debug (Richard)
- Introduce CONFIG_HAX_IS_POSSIBLE (Richard)
- Introduce AccelOpsClass::cpu_thread_is_idle (Richard)
- Introduce AccelOpsClass::cpus_are_resettable (Richard)
- Add qemu_init_arch_modules (new)

Philippe Mathieu-Daudé (21):
accel: Restrict sysemu stubs to system emulation accel/meson: Only build hw virtualization with system emulation
exec: Declare vaddr as a generic target-agnostic type
exec: Make cpu_memory_rw_debug() target agnostic sysemu/memory_mapping: Become target-agnostic
sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target
agnostic
accel/kvm: Simplify user-mode #ifdef'ry
accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE
softmmu/cpus: Code movement
accel: Introduce AccelOpsClass::cpu_thread_is_idle()
accel: Introduce AccelOpsClass::cpus_are_resettable() softmmu/globals: Remove unused 'hw/i386/*' headers softmmu/runstate: Clean headers
softmmu/physmem: Remove unnecessary include softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header
misc: Remove unnecessary "sysemu/cpu-timers.h" include
misc: Add missing "sysemu/cpu-timers.h" include exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic exec/cpu: Make address_space_init/reloading_memory_map target agnostic
softmmu: Add qemu_init_arch_modules()
softmmu: Build target-agnostic objects once

 accel/kvm/kvm-accel-ops.c         | 12 ++++++++++
 accel/meson.build                 | 12 ++++++----
 accel/qtest/qtest.c               |  1 -
 accel/stubs/hax-stub.c            |  2 ++
 accel/stubs/kvm-stub.c            |  5 ----
 accel/stubs/meson.build           | 11 +++++----
 accel/tcg/tcg-accel-ops-icount.c  |  1 +
 accel/tcg/tcg-accel-ops-mttcg.c   |  1 +
 accel/tcg/tcg-accel-ops-rr.c      |  1 +
 accel/tcg/tcg-accel-ops.c         |  1 +
 cpu.c                             |  6 ++---
 include/exec/cpu-all.h            |  4 ----
 include/exec/cpu-common.h         | 39 +++++++++++++++++++++++++++++++
 include/exec/exec-all.h           | 26 ---------------------
 include/exec/gdbstub.h            | 25 ++++++++++----------
 include/hw/core/cpu.h             | 13 +----------
 include/sysemu/accel-ops.h        |  3 +++
 include/sysemu/arch_init.h        |  2 ++
 include/sysemu/hax.h              | 18 +++++++++-----
 include/sysemu/hw_accel.h         |  5 ----
 include/sysemu/kvm.h              |  6 ++---
 include/sysemu/memory_mapping.h   |  5 ++--
 softmmu/arch_init.c               |  9 +++++++
 softmmu/cpu-timers.c              |  1 -
 softmmu/cpus.c                    | 23 +++++++++++-------
 softmmu/globals.c                 |  2 --
 softmmu/memory_mapping.c          |  1 +
 softmmu/meson.build               | 24 +++++++++----------
 softmmu/physmem.c                 |  7 +++---
 softmmu/runstate.c                |  2 +-
 softmmu/vl.c                      |  5 +---
 target/alpha/translate.c          |  1 -
 target/i386/hax/hax-all.c         |  7 +-----
 target/i386/whpx/whpx-accel-ops.c |  6 +++++
 target/riscv/csr.c                |  1 +
 tests/unit/ptimer-test-stubs.c    |  1 -
 36 files changed, 159 insertions(+), 130 deletions(-)
Signature · 1 line
2.34.1