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

Philippe Mathieu-Daudé via posted 21 patches 2 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220207075426.81934-1-f4bug@amsat.org
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(-)
[PATCH v3 00/21] softmmu: Make various objects target agnostic
Posted by Philippe Mathieu-Daudé via 2 years, 2 months ago
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(-)

-- 
2.34.1


Re: [PATCH v3 00/21] softmmu: Make various objects target agnostic
Posted by Philippe Mathieu-Daudé 2 years, 2 months ago
On 7/2/22 08:54, Philippe Mathieu-Daudé wrote:
> 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 soft-freeze is soon, I'm going to send a pull request for
this cleanup. Queuing as 'abstract-arch-cpu'.

> 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