summary refs log tree commit diff stats
path: root/hw/core/cpu-system.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-21 12:57:16 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-09 17:00:47 +0100
commit72eacd623170dd680557ece6957575c30774cdef (patch)
treeabec4c0ddfdb0283cfa2235deb0264f9026ebcf2 /hw/core/cpu-system.c
parent8f8dbe04bdafdbe265e9ae25737bb18daacc6ca6 (diff)
downloadfocaccia-qemu-72eacd623170dd680557ece6957575c30774cdef.tar.gz
focaccia-qemu-72eacd623170dd680557ece6957575c30774cdef.zip
cpus: Introduce SysemuCPUOps::has_work() handler
SysemuCPUOps::has_work() is similar to CPUClass::has_work(),
but only exposed on system emulation.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250125170125.32855-4-philmd@linaro.org>
Diffstat (limited to 'hw/core/cpu-system.c')
-rw-r--r--hw/core/cpu-system.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c
index c10e3c9ba6..601335fd76 100644
--- a/hw/core/cpu-system.c
+++ b/hw/core/cpu-system.c
@@ -33,6 +33,10 @@
 
 bool cpu_has_work(CPUState *cpu)
 {
+    if (cpu->cc->sysemu_ops->has_work) {
+        return cpu->cc->sysemu_ops->has_work(cpu);
+    }
+
     g_assert(cpu->cc->has_work);
     return cpu->cc->has_work(cpu);
 }