[PATCH v3 00/30] accel: Move has_work() from SysemuCPUOps to AccelOpsClass

Philippe Mathieu-Daudé posted 30 patches 2 years, 7 months ago
Only 25 patches received!
There is a newer version of this series
include/hw/core/cpu.h             |  28 +--
include/hw/core/tcg-cpu-ops.h     |   4 +
include/sysemu/accel-ops.h        |   5 +
target/ppc/cpu-qom.h              |   3 +
accel/hvf/hvf-accel-ops.c         |   6 +
accel/kvm/kvm-accel-ops.c         |   6 +
accel/qtest/qtest.c               |   6 +
accel/tcg/cpu-exec.c              |   8 +-
accel/tcg/tcg-accel-ops.c         |  12 ++
accel/xen/xen-all.c               |   6 +
hw/core/cpu-common.c              |   6 -
softmmu/cpus.c                    |  10 +-
target/alpha/cpu.c                |   4 +-
target/arm/cpu.c                  |   7 +-
target/avr/cpu.c                  |   4 +-
target/cris/cpu.c                 |   4 +-
target/hexagon/cpu.c              |   6 -
target/hppa/cpu.c                 |   4 +-
target/i386/cpu.c                 |   6 -
target/i386/hax/hax-accel-ops.c   |   6 +
target/i386/nvmm/nvmm-accel-ops.c |   6 +
target/i386/tcg/tcg-cpu.c         |   8 +-
target/i386/whpx/whpx-accel-ops.c |   6 +
target/m68k/cpu.c                 |   4 +-
target/microblaze/cpu.c           |  10 +-
target/mips/cpu.c                 |   4 +-
target/nios2/cpu.c                |   4 +-
target/openrisc/cpu.c             |   4 +-
target/ppc/cpu_init.c             | 324 +++++++++++++++---------------
target/riscv/cpu.c                |   8 +-
target/rx/cpu.c                   |   4 +-
target/s390x/cpu.c                |   4 +-
target/sh4/cpu.c                  |   7 +-
target/sparc/cpu.c                |   4 +-
target/tricore/cpu.c              |   6 +-
target/xtensa/cpu.c               |  16 +-
36 files changed, 321 insertions(+), 239 deletions(-)
[PATCH v3 00/30] accel: Move has_work() from SysemuCPUOps to AccelOpsClass
Posted by Philippe Mathieu-Daudé 2 years, 7 months ago
Hi,

CPU has_work() is a per-accelerator handler. This series
- explicit the KVM / WHPX implementations
- moves TCG implementations in AccelOpsClass
- explicit missing implementations (returning 'false').

Since v2:
- Full rewrite, no more RFC.

Supersedes: <20210304222323.1954755-1-f4bug@amsat.org>
"cpu: Move CPUClass::has_work() to TCGCPUOps"

Philippe Mathieu-Daudé (30):
  accel/tcg: Restrict cpu_handle_halt() to sysemu
  hw/core: Restrict cpu_has_work() to sysemu
  hw/core: Un-inline cpu_has_work()
  sysemu: Introduce AccelOpsClass::has_work()
  accel/kvm: Implement AccelOpsClass::has_work()
  accel/whpx: Implement AccelOpsClass::has_work()
  accel/tcg: Implement AccelOpsClass::has_work() as stub
  target/alpha: Restrict has_work() handler to sysemu and TCG
  target/arm: Restrict has_work() handler to sysemu and TCG
  target/avr: Restrict has_work() handler to sysemu and TCG
  target/cris: Restrict has_work() handler to sysemu and TCG
  target/hexagon: Remove unused has_work() handler
  target/hppa: Restrict has_work() handler to sysemu and TCG
  target/i386: Restrict has_work() handler to sysemu and TCG
  target/m68k: Restrict has_work() handler to sysemu and TCG
  target/microblaze: Restrict has_work() handler to sysemu and TCG
  target/mips: Restrict has_work() handler to sysemu and TCG
  target/nios2: Restrict has_work() handler to sysemu and TCG
  target/openrisc: Restrict has_work() handler to sysemu and TCG
  target/ppc: Restrict has_work() handler to sysemu and TCG
  target/ppc: Introduce PowerPCCPUClass::has_work()
  target/ppc: Simplify has_work() handlers
  target/riscv: Restrict has_work() handler to sysemu and TCG
  target/rx: Restrict has_work() handler to sysemu and TCG
  target/s390x: Restrict has_work() handler to sysemu and TCG
  target/sh4: Restrict has_work() handler to sysemu and TCG
  target/sparc: Restrict has_work() handler to sysemu and TCG
  target/tricore: Restrict has_work() handler to sysemu and TCG
  target/xtensa: Restrict has_work() handler to sysemu and TCG
  accel: Add missing AccelOpsClass::has_work() and drop SysemuCPUOps one

 include/hw/core/cpu.h             |  28 +--
 include/hw/core/tcg-cpu-ops.h     |   4 +
 include/sysemu/accel-ops.h        |   5 +
 target/ppc/cpu-qom.h              |   3 +
 accel/hvf/hvf-accel-ops.c         |   6 +
 accel/kvm/kvm-accel-ops.c         |   6 +
 accel/qtest/qtest.c               |   6 +
 accel/tcg/cpu-exec.c              |   8 +-
 accel/tcg/tcg-accel-ops.c         |  12 ++
 accel/xen/xen-all.c               |   6 +
 hw/core/cpu-common.c              |   6 -
 softmmu/cpus.c                    |  10 +-
 target/alpha/cpu.c                |   4 +-
 target/arm/cpu.c                  |   7 +-
 target/avr/cpu.c                  |   4 +-
 target/cris/cpu.c                 |   4 +-
 target/hexagon/cpu.c              |   6 -
 target/hppa/cpu.c                 |   4 +-
 target/i386/cpu.c                 |   6 -
 target/i386/hax/hax-accel-ops.c   |   6 +
 target/i386/nvmm/nvmm-accel-ops.c |   6 +
 target/i386/tcg/tcg-cpu.c         |   8 +-
 target/i386/whpx/whpx-accel-ops.c |   6 +
 target/m68k/cpu.c                 |   4 +-
 target/microblaze/cpu.c           |  10 +-
 target/mips/cpu.c                 |   4 +-
 target/nios2/cpu.c                |   4 +-
 target/openrisc/cpu.c             |   4 +-
 target/ppc/cpu_init.c             | 324 +++++++++++++++---------------
 target/riscv/cpu.c                |   8 +-
 target/rx/cpu.c                   |   4 +-
 target/s390x/cpu.c                |   4 +-
 target/sh4/cpu.c                  |   7 +-
 target/sparc/cpu.c                |   4 +-
 target/tricore/cpu.c              |   6 +-
 target/xtensa/cpu.c               |  16 +-
 36 files changed, 321 insertions(+), 239 deletions(-)

-- 
2.31.1