diff options
| author | Richard Henderson | 2022-10-24 11:43:40 +0200 |
|---|---|---|
| committer | Richard Henderson | 2022-10-26 03:11:28 +0200 |
| commit | d29256896f563683419ae4af04d94d7d0f07c225 (patch) | |
| tree | 123efaad95b498e095feb2ae4fb35de1ec0bbfec /include/hw | |
| parent | accel/tcg: Simplify page_get/alloc_target_data (diff) | |
| download | qemu-d29256896f563683419ae4af04d94d7d0f07c225.tar.gz qemu-d29256896f563683419ae4af04d94d7d0f07c225.tar.xz qemu-d29256896f563683419ae4af04d94d7d0f07c225.zip | |
accel/tcg: Add restore_state_to_opc to TCGCPUOps
Add a tcg_ops hook to replace the restore_state_to_opc
function call. Because these generic hooks cannot depend
on target-specific types, temporarily, copy the current
target_ulong data[] into uint64_t d64[].
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw')
| -rw-r--r-- | include/hw/core/tcg-cpu-ops.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h index 78c6c6635d..20e3c0ffbb 100644 --- a/include/hw/core/tcg-cpu-ops.h +++ b/include/hw/core/tcg-cpu-ops.h @@ -31,6 +31,17 @@ struct TCGCPUOps { * function to restore all the state, and register it here. */ void (*synchronize_from_tb)(CPUState *cpu, const TranslationBlock *tb); + /** + * @restore_state_to_opc: Synchronize state from INDEX_op_start_insn + * + * This is called when we unwind state in the middle of a TB, + * usually before raising an exception. Set all part of the CPU + * state which are tracked insn-by-insn in the target-specific + * arguments to start_insn, passed as @data. + */ + void (*restore_state_to_opc)(CPUState *cpu, const TranslationBlock *tb, + const uint64_t *data); + /** @cpu_exec_enter: Callback for cpu_exec preparation */ void (*cpu_exec_enter)(CPUState *cpu); /** @cpu_exec_exit: Callback for cpu_exec cleanup */ |
