summary refs log tree commit diff stats
path: root/include/hw/core
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-07-04 16:57:10 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-07-11 11:41:34 +0100
commit0487c631801bf21e5e2ca8a54bf207fb78bd64bf (patch)
treeec1ee2899f19c2bbd4d6550d2e8b3b641e359721 /include/hw/core
parent4f7b1ecba81c9dab8066e891ead8a4fff95781af (diff)
downloadfocaccia-qemu-0487c631801bf21e5e2ca8a54bf207fb78bd64bf.tar.gz
focaccia-qemu-0487c631801bf21e5e2ca8a54bf207fb78bd64bf.zip
accel/tcg: Make TCGCPUOps::cpu_exec_halt mandatory
Now that all targets set TCGCPUOps::cpu_exec_halt, we can make it
mandatory and remove the fallback handling that calls cpu_has_work.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include/hw/core')
-rw-r--r--include/hw/core/tcg-cpu-ops.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h
index 099de3375e..34318cf0e6 100644
--- a/include/hw/core/tcg-cpu-ops.h
+++ b/include/hw/core/tcg-cpu-ops.h
@@ -122,10 +122,13 @@ struct TCGCPUOps {
      * to do when the CPU is in the halted state.
      *
      * Return true to indicate that the CPU should now leave halt, false
-     * if it should remain in the halted state.
+     * if it should remain in the halted state. (This should generally
+     * be the same value that cpu_has_work() would return.)
      *
-     * If this method is not provided, the default is to do nothing, and
-     * to leave halt if cpu_has_work() returns true.
+     * This method must be provided. If the target does not need to
+     * do anything special for halt, the same function used for its
+     * CPUClass::has_work method can be used here, as they have the
+     * same function signature.
      */
     bool (*cpu_exec_halt)(CPUState *cpu);
     /**