diff mbox series

[v3,11/11] accel/tcg: Remove do_interrupt_locked() callback

Message ID 20260902152044.31291-12-philmd@oss.qualcomm.com
State New
Headers show
Series accel/tcg: Push BQL down into per-target do_interrupt handlers | expand

Commit Message

Philippe Mathieu-Daudé Sept. 2, 2026, 3:20 p.m. UTC
All targets now manage their own BQL locking via do_interrupt(),
making the do_interrupt_locked() hook unnecessary. Remove it to
simplify the TCGCPUOps interface.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
 include/accel/tcg/cpu-ops.h | 12 ------------
 accel/tcg/cpu-exec.c        | 10 ++--------
 2 files changed, 2 insertions(+), 20 deletions(-)
diff mbox series

Patch

diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h
index e2e67f796f6..89b3a11fd6a 100644
--- a/include/accel/tcg/cpu-ops.h
+++ b/include/accel/tcg/cpu-ops.h
@@ -183,18 +183,6 @@  struct TCGCPUOps {
      */
     void (*do_interrupt)(CPUState *cpu);
 
-    /**
-     * @do_interrupt_locked: Deliver a pending exception/interrupt to the CPU
-     * @cpu: cpu context
-     *
-     * Called when cs->exception_index contains an exception code to deliver.
-     * Updates CPU architectural state (usually before executing a guest
-     * exception handler).
-     *
-     * Called from cpu_handle_exception() with BQL held.
-     */
-    void (*do_interrupt_locked)(CPUState *cpu);
-
     /**
      * @cpu_exec_interrupt: Callback for processing target-specific interrupts
      * @cpu: cpu context
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 4deb7e00571..5d4b26357ff 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -727,13 +727,7 @@  static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
     if (replay_exception()) {
         const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
 
-        if (tcg_ops->do_interrupt) {
-            tcg_ops->do_interrupt(cpu);
-        } else {
-            bql_lock();
-            tcg_ops->do_interrupt_locked(cpu);
-            bql_unlock();
-        }
+        tcg_ops->do_interrupt(cpu);
         cpu->exception_index = -1;
 
         if (unlikely(cpu_single_stepping(cpu))) {
@@ -1063,7 +1057,7 @@  bool tcg_exec_realizefn(CPUState *cpu, Error **errp)
         assert(tcg_ops->cpu_exec_halt);
         assert(tcg_ops->cpu_exec_interrupt);
         assert(tcg_ops->cpu_exec_reset);
-        assert(tcg_ops->do_interrupt || tcg_ops->do_interrupt_locked);
+        assert(tcg_ops->do_interrupt);
         assert(tcg_ops->pointer_wrap);
 #endif /* !CONFIG_USER_ONLY */
         assert(tcg_ops->translate_code);