diff options
| author | Alex Bennée <alex.bennee@linaro.org> | 2023-03-02 18:57:43 -0800 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2023-03-07 17:06:33 +0000 |
| commit | 548c96095dae2af37c4145ff11f0d010c43e2be2 (patch) | |
| tree | 82f2b64be682868b5dc8af440acc856911b132fe /include/exec/tb-flush.h | |
| parent | 9f56787c12e1b5f594ca790b1d84b8cc43a962d3 (diff) | |
| download | focaccia-qemu-548c96095dae2af37c4145ff11f0d010c43e2be2.tar.gz focaccia-qemu-548c96095dae2af37c4145ff11f0d010c43e2be2.zip | |
includes: move tb_flush into its own header
This aids subsystems (like gdbstub) that want to trigger a flush without pulling target specific headers. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230302190846.2593720-8-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-8-richard.henderson@linaro.org>
Diffstat (limited to 'include/exec/tb-flush.h')
| -rw-r--r-- | include/exec/tb-flush.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/exec/tb-flush.h b/include/exec/tb-flush.h new file mode 100644 index 0000000000..d92d06565b --- /dev/null +++ b/include/exec/tb-flush.h @@ -0,0 +1,26 @@ +/* + * tb-flush prototype for use by the rest of the system. + * + * Copyright (c) 2022 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef _TB_FLUSH_H_ +#define _TB_FLUSH_H_ + +/** + * tb_flush() - flush all translation blocks + * @cs: CPUState (must be valid, but treated as anonymous pointer) + * + * Used to flush all the translation blocks in the system. Sometimes + * it is simpler to flush everything than work out which individual + * translations are now invalid and ensure they are not called + * anymore. + * + * tb_flush() takes care of running the flush in an exclusive context + * if it is not already running in one. This means no guest code will + * run until this complete. + */ +void tb_flush(CPUState *cs); + +#endif /* _TB_FLUSH_H_ */ |