All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] accel/tcg: Push BQL down into per-target do_interrupt handlers
@ 2026-09-02 15:20 Philippe Mathieu-Daudé
  2026-09-02 15:20 ` [PATCH v3 01/11] target/arm: Call arm*_cpu_do_interrupt directly instead of via TCGCPUOps Philippe Mathieu-Daudé
                   ` (11 more replies)
  0 siblings, 12 replies; 28+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-09-02 15:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: Mark Cave-Ayland, Peter Maydell, Paolo Bonzini, qemu-ppc,
	qemu-s390x, Richard Henderson, Pierrick Bouvier, qemu-riscv,
	qemu-arm, Philippe Mathieu-Daudé

This is a respin of Robert Foley's v2 series from August 2020 [1]
triggered by a broader review of BQL contract in my halt-to-exec
transitions series by Peter [2] and Mark [3].

v3:
- kind of rebase
- rename misleading fake_user_interrupt callback names for clarity
- restrict interrupt handlers to their appropriate modes (system vs user)
- explicitly document that do_interrupt() and cpu_exec_interrupt()
  callbacks are called WITH BQL held (explicit BQL contract in docstrings)

v2 Summary
----------

This series pushes the Big QEMU Lock (BQL) down from the core TCG
cpu_handle_interrupt/cpu_handle_exception paths into per-target
implementations. This allows each architecture to manage BQL locking
granularity independently, reducing contention on a known bottleneck
as measured by QEMU sync profiling (qsp).

The BQL has long been a scaling bottleneck in QEMU, and the
interrupt/exception handling path is one of its heaviest users. By
allowing targets to acquire the BQL only when needed, we enable
future per-target optimizations.

Refs:
[1] https://lore.kernel.org/qemu-devel/20200819182856.4893-1-robert.foley@linaro.org/
[2] https://lore.kernel.org/qemu-devel/CAFEAcA8xk8y1W0UvttpVhKYuoMBSQqZoF_15of0Rrq4wKkWDuw@mail.gmail.com/
[3] https://lore.kernel.org/qemu-devel/69d07179-388e-4285-902b-36788b2b3da1@nutanix.com/

Philippe Mathieu-Daudé (10):
  target/arm: Call arm*_cpu_do_interrupt directly instead of via
    TCGCPUOps
  target/s390x: Restrict interrupt handlers to system mode
  target/i386: Rename fake_do_interrupt to fake_user_exception
  accel/tcg: Document cpu_exec_interrupt() callback contract
  accel/tcg: Document do_interrupt() callback contract
  accel/tcg: Add do_interrupt() wrapper for targets to manage BQL
  target/hexagon: Move to do_interrupt() (BQL acquired internally)
  targets: Move interrupt handlers to do_interrupt()
  targets: Move BQL locking into do_interrupt() handlers
  accel/tcg: Remove do_interrupt_locked() callback

Robert Foley (1):
  accel/tcg: Rename do_interrupt() to do_interrupt_locked()

 include/accel/tcg/cpu-ops.h         | 32 +++++++++++++++++++++++++----
 target/arm/internals.h              |  2 +-
 target/i386/tcg/helper-tcg.h        |  4 +++-
 target/s390x/s390x-internal.h       |  5 ++---
 accel/tcg/cpu-exec.c                |  7 +++----
 target/alpha/helper.c               |  3 +++
 target/arm/cpu-irq.c                |  2 +-
 target/arm/helper.c                 |  1 +
 target/arm/tcg/cpu-v7m.c            |  2 +-
 target/arm/tcg/m_helper.c           |  2 ++
 target/avr/helper.c                 |  3 +++
 target/hppa/int_helper.c            |  2 ++
 target/i386/tcg/system/seg_helper.c |  2 ++
 target/i386/tcg/tcg-cpu.c           |  2 +-
 target/i386/tcg/user/seg_helper.c   |  6 +++---
 target/mips/tcg/system/tlb_helper.c |  3 +++
 target/ppc/excp_helper.c            |  2 ++
 target/rx/helper.c                  |  3 +++
 target/s390x/tcg/excp_helper.c      |  8 +++-----
 target/sh4/helper.c                 |  3 +++
 target/sparc/int32_helper.c         |  2 ++
 target/sparc/int64_helper.c         |  2 ++
 target/xtensa/exc_helper.c          |  2 ++
 23 files changed, 76 insertions(+), 24 deletions(-)

-- 
2.53.0



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

end of thread, other threads:[~2026-09-13  4:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 15:20 [PATCH v3 00/11] accel/tcg: Push BQL down into per-target do_interrupt handlers Philippe Mathieu-Daudé
2026-09-02 15:20 ` [PATCH v3 01/11] target/arm: Call arm*_cpu_do_interrupt directly instead of via TCGCPUOps Philippe Mathieu-Daudé
2026-09-02 19:52   ` Pierrick Bouvier
2026-09-08 16:09   ` Peter Maydell
2026-09-13  2:42   ` Richard Henderson
2026-09-02 15:20 ` [PATCH v3 03/11] target/i386: Rename fake_do_interrupt to fake_user_exception Philippe Mathieu-Daudé
2026-09-13  2:44   ` Richard Henderson
2026-09-02 15:20 ` [PATCH v3 04/11] accel/tcg: Document cpu_exec_interrupt() callback contract Philippe Mathieu-Daudé
2026-09-08 16:25   ` Peter Maydell
2026-09-02 15:20 ` [PATCH v3 05/11] accel/tcg: Document do_interrupt() " Philippe Mathieu-Daudé
2026-09-02 19:54   ` Pierrick Bouvier
2026-09-02 20:48     ` Philippe Mathieu-Daudé
2026-09-13  3:30   ` Richard Henderson
2026-09-02 15:20 ` [PATCH v3 06/11] accel/tcg: Rename do_interrupt() to do_interrupt_locked() Philippe Mathieu-Daudé
2026-09-13  3:31   ` Richard Henderson
2026-09-02 15:20 ` [PATCH v3 07/11] accel/tcg: Add do_interrupt() wrapper for targets to manage BQL Philippe Mathieu-Daudé
2026-09-13  3:50   ` Richard Henderson
2026-09-02 15:20 ` [PATCH v3 08/11] target/hexagon: Move to do_interrupt() (BQL acquired internally) Philippe Mathieu-Daudé
2026-09-03  0:15   ` Brian Cain
2026-09-13  3:55   ` Richard Henderson
2026-09-02 15:20 ` [RFC PATCH v3 09/11] targets: Move interrupt handlers to do_interrupt() Philippe Mathieu-Daudé
2026-09-13  4:00   ` Richard Henderson
2026-09-02 15:20 ` [RFC PATCH v3 10/11] targets: Move BQL locking into do_interrupt() handlers Philippe Mathieu-Daudé
2026-09-02 15:20 ` [PATCH v3 11/11] accel/tcg: Remove do_interrupt_locked() callback Philippe Mathieu-Daudé
2026-09-13  4:00   ` Richard Henderson
2026-09-02 15:33 ` [PATCH v3 00/11] accel/tcg: Push BQL down into per-target do_interrupt handlers Philippe Mathieu-Daudé
     [not found] ` <20260902152044.31291-3-philmd@oss.qualcomm.com>
2026-09-02 19:52   ` [PATCH v3 02/11] target/s390x: Restrict interrupt handlers to system mode Pierrick Bouvier
2026-09-13  2:43   ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.