qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/28] cpus: Restrict CPU has_work() handlers to system emulation
@ 2025-01-21 14:23 Philippe Mathieu-Daudé
  2025-01-21 14:23 ` [PATCH 01/28] target/hexagon: Ensure not being build on " Philippe Mathieu-Daudé
                   ` (27 more replies)
  0 siblings, 28 replies; 59+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-01-21 14:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-arm, qemu-s390x, qemu-riscv, qemu-ppc, Paolo Bonzini,
	Richard Henderson, Philippe Mathieu-Daudé

On user emulation, threads always have work to do, and
CPUClass::has_work() is never called. Restrict it to system
emulation, allowing to simplify a bit and reduce code built
on user emulation.

Based-on: <20250121114056.53949-1-philmd@linaro.org>
 "cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro"

Philippe Mathieu-Daudé (28):
  target/hexagon: Ensure not being build on system emulation
  target/rx: Ensure not being build on user emulation
  target/tricore: Ensure not being build on user emulation
  cpus: Restrict cpu_get_memory_mapping() to system emulation
  cpus: Restrict cpu_has_work() to system emulation
  cpus: Un-inline cpu_has_work()
  cpus: Introduce SysemuCPUOps::has_work() handler
  target/alpha: Move has_work() from CPUClass to SysemuCPUOps
  target/arm: Move has_work() from CPUClass to SysemuCPUOps
  target/avr: Move has_work() from CPUClass to SysemuCPUOps
  target/hexagon: Remove CPUClass:has_work() handler
  target/hppa: Move has_work() from CPUClass to SysemuCPUOps
  target/i386: Move has_work() from CPUClass to SysemuCPUOps
  target/loongarch: Move has_work() from CPUClass to SysemuCPUOps
  target/m68k: Move has_work() from CPUClass to SysemuCPUOps
  target/microblaze: Move has_work() from CPUClass to SysemuCPUOps
  target/mips: Move has_work() from CPUClass to SysemuCPUOps
  target/openrisc: Move has_work() from CPUClass to SysemuCPUOps
  target/ppc: Move has_work() from CPUClass to SysemuCPUOps
  target/riscv: Move has_work() from CPUClass to SysemuCPUOps
  target/rx: Move has_work() from CPUClass to SysemuCPUOps
  target/s390x: Restrict I/O handler installers to system emulation
  target/s390x: Move has_work() from CPUClass to SysemuCPUOps
  target/sh4: Move has_work() from CPUClass to SysemuCPUOps
  target/sparc: Move has_work() from CPUClass to SysemuCPUOps
  target/tricore: Move has_work() from CPUClass to SysemuCPUOps
  target/xtensa: Move has_work() from CPUClass to SysemuCPUOps
  cpus: Remove CPUClass::has_work() handler

 include/hw/core/cpu.h            | 30 ++++++++++++------------------
 include/hw/core/sysemu-cpu-ops.h |  4 ++++
 target/hexagon/cpu.h             |  4 ++++
 target/i386/cpu.h                |  4 ++--
 target/mips/internal.h           |  4 ++--
 target/riscv/cpu.h               |  9 +++++----
 target/riscv/internals.h         |  3 ---
 target/rx/cpu.h                  |  6 ++++--
 target/s390x/s390x-internal.h    |  5 +++++
 target/tricore/cpu.h             |  4 ++++
 hw/core/cpu-common.c             |  6 ------
 hw/core/cpu-system.c             |  6 ++++++
 target/alpha/cpu.c               |  4 +++-
 target/arm/cpu.c                 |  4 +++-
 target/avr/cpu.c                 |  2 +-
 target/hexagon/cpu.c             |  6 ------
 target/hppa/cpu.c                |  4 +++-
 target/i386/cpu.c                |  8 +++-----
 target/loongarch/cpu.c           |  8 +++-----
 target/m68k/cpu.c                |  4 +++-
 target/microblaze/cpu.c          |  4 +++-
 target/mips/cpu.c                |  4 +++-
 target/openrisc/cpu.c            |  4 +++-
 target/ppc/cpu_init.c            |  4 +++-
 target/riscv/cpu.c               |  8 +++-----
 target/rx/cpu.c                  |  8 +-------
 target/rx/helper.c               |  4 ----
 target/s390x/cpu-system.c        | 18 ++++++++++++++++++
 target/s390x/cpu.c               | 18 ------------------
 target/s390x/interrupt.c         |  8 ++------
 target/sh4/cpu.c                 |  4 ++--
 target/sparc/cpu.c               |  4 +++-
 target/tricore/cpu.c             |  2 +-
 target/xtensa/cpu.c              | 12 +++++-------
 34 files changed, 114 insertions(+), 113 deletions(-)

-- 
2.47.1



^ permalink raw reply	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2025-01-24 17:42 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21 14:23 [PATCH 00/28] cpus: Restrict CPU has_work() handlers to system emulation Philippe Mathieu-Daudé
2025-01-21 14:23 ` [PATCH 01/28] target/hexagon: Ensure not being build on " Philippe Mathieu-Daudé
2025-01-21 17:39   ` Brian Cain
2025-01-21 14:23 ` [PATCH 02/28] target/rx: Ensure not being build on user emulation Philippe Mathieu-Daudé
2025-01-24 16:51   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 03/28] target/tricore: " Philippe Mathieu-Daudé
2025-01-24 16:51   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 04/28] cpus: Restrict cpu_get_memory_mapping() to system emulation Philippe Mathieu-Daudé
2025-01-24 16:52   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 05/28] cpus: Restrict cpu_has_work() " Philippe Mathieu-Daudé
2025-01-24 16:52   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 06/28] cpus: Un-inline cpu_has_work() Philippe Mathieu-Daudé
2025-01-24 16:59   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 07/28] cpus: Introduce SysemuCPUOps::has_work() handler Philippe Mathieu-Daudé
2025-01-24 17:05   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 08/28] target/alpha: Move has_work() from CPUClass to SysemuCPUOps Philippe Mathieu-Daudé
2025-01-24 17:06   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 09/28] target/arm: " Philippe Mathieu-Daudé
2025-01-24 17:06   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 10/28] target/avr: " Philippe Mathieu-Daudé
2025-01-24 17:06   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 11/28] target/hexagon: Remove CPUClass:has_work() handler Philippe Mathieu-Daudé
2025-01-24 17:07   ` Richard Henderson
2025-01-24 17:26   ` Brian Cain
2025-01-21 14:23 ` [PATCH 12/28] target/hppa: Move has_work() from CPUClass to SysemuCPUOps Philippe Mathieu-Daudé
2025-01-24 17:08   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 13/28] target/i386: " Philippe Mathieu-Daudé
2025-01-24 17:09   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 14/28] target/loongarch: " Philippe Mathieu-Daudé
2025-01-24 17:09   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 15/28] target/m68k: " Philippe Mathieu-Daudé
2025-01-24 17:11   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 16/28] target/microblaze: " Philippe Mathieu-Daudé
2025-01-24 17:11   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 17/28] target/mips: " Philippe Mathieu-Daudé
2025-01-24 17:12   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 18/28] target/openrisc: " Philippe Mathieu-Daudé
2025-01-24 17:13   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 19/28] target/ppc: " Philippe Mathieu-Daudé
2025-01-24 17:14   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 20/28] target/riscv: " Philippe Mathieu-Daudé
2025-01-24 17:17   ` Richard Henderson
2025-01-24 17:41     ` Philippe Mathieu-Daudé
2025-01-21 14:23 ` [PATCH 21/28] target/rx: " Philippe Mathieu-Daudé
2025-01-24 17:17   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 22/28] target/s390x: Restrict I/O handler installers to system emulation Philippe Mathieu-Daudé
2025-01-24 17:18   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 23/28] target/s390x: Move has_work() from CPUClass to SysemuCPUOps Philippe Mathieu-Daudé
2025-01-24 17:21   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 24/28] target/sh4: " Philippe Mathieu-Daudé
2025-01-24 17:35   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 25/28] target/sparc: " Philippe Mathieu-Daudé
2025-01-24 17:35   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 26/28] target/tricore: " Philippe Mathieu-Daudé
2025-01-24 17:36   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 27/28] target/xtensa: " Philippe Mathieu-Daudé
2025-01-24 17:36   ` Richard Henderson
2025-01-21 14:23 ` [PATCH 28/28] cpus: Remove CPUClass::has_work() handler Philippe Mathieu-Daudé
2025-01-24 17:40   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).