xref: /openbmc/qemu/include/exec/tb-flush.h (revision ed1d873caa93fde443b14369309cdd4366d4ca08)
1548c9609SAlex Bennée /*
2548c9609SAlex Bennée  * tb-flush prototype for use by the rest of the system.
3548c9609SAlex Bennée  *
4548c9609SAlex Bennée  * Copyright (c) 2022 Linaro Ltd
5548c9609SAlex Bennée  *
6548c9609SAlex Bennée  * SPDX-License-Identifier: GPL-2.0-or-later
7548c9609SAlex Bennée  */
8548c9609SAlex Bennée #ifndef _TB_FLUSH_H_
9548c9609SAlex Bennée #define _TB_FLUSH_H_
10548c9609SAlex Bennée 
11548c9609SAlex Bennée /**
12548c9609SAlex Bennée  * tb_flush() - flush all translation blocks
13548c9609SAlex Bennée  * @cs: CPUState (must be valid, but treated as anonymous pointer)
14548c9609SAlex Bennée  *
15548c9609SAlex Bennée  * Used to flush all the translation blocks in the system. Sometimes
16548c9609SAlex Bennée  * it is simpler to flush everything than work out which individual
17548c9609SAlex Bennée  * translations are now invalid and ensure they are not called
18548c9609SAlex Bennée  * anymore.
19548c9609SAlex Bennée  *
20548c9609SAlex Bennée  * tb_flush() takes care of running the flush in an exclusive context
21548c9609SAlex Bennée  * if it is not already running in one. This means no guest code will
22548c9609SAlex Bennée  * run until this complete.
23548c9609SAlex Bennée  */
24548c9609SAlex Bennée void tb_flush(CPUState *cs);
25548c9609SAlex Bennée 
26*f4f826c0SPhilippe Mathieu-Daudé void tcg_flush_jmp_cache(CPUState *cs);
27*f4f826c0SPhilippe Mathieu-Daudé 
28548c9609SAlex Bennée #endif /* _TB_FLUSH_H_ */
29