diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-09-05 17:57:14 +0200 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2025-09-24 10:29:43 -0700 |
| commit | b773c149a80b11449899b6a4ad3672250d4fcb0f (patch) | |
| tree | 016b995de1814af1a9003d9d9642e1ac6838c11c /include/exec/tb-flush.h | |
| parent | 9d61f61b4fa4dc4cd65fca8b24a9cb70c0c61a88 (diff) | |
| download | focaccia-qemu-b773c149a80b11449899b6a4ad3672250d4fcb0f.tar.gz focaccia-qemu-b773c149a80b11449899b6a4ad3672250d4fcb0f.zip | |
accel/tcg: Split out tb_flush__exclusive_or_serial
Expose a routine to be called when no cpus are running. Simplify the do_tb_flush run_on_cpu callback, because that is explicitly called with start_exclusive; there is no need for the mmap_lock as well. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec/tb-flush.h')
| -rw-r--r-- | include/exec/tb-flush.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/exec/tb-flush.h b/include/exec/tb-flush.h index 142c240d94..090ffc8818 100644 --- a/include/exec/tb-flush.h +++ b/include/exec/tb-flush.h @@ -9,6 +9,21 @@ #define _TB_FLUSH_H_ /** + * tb_flush__exclusive_or_serial() + * + * Used to flush all the translation blocks in the system. Mostly this is + * used to empty the code generation buffer after it is full. Sometimes it + * is used when it is simpler to flush everything than work out which + * individual translations are now invalid. + * + * Must be called from an exclusive or serial context, e.g. start_exclusive, + * vm_stop, or when there is only one vcpu. Note that start_exclusive cannot + * be called from within the cpu run loop, so this cannot be called from + * within target code. + */ +void tb_flush__exclusive_or_serial(void); + +/** * tb_flush() - flush all translation blocks * @cs: CPUState (must be valid, but treated as anonymous pointer) * |