xref: /openbmc/qemu/include/exec/tb-flush.h (revision ce799a04)
1 /*
2  * tb-flush prototype for use by the rest of the system.
3  *
4  * Copyright (c) 2022 Linaro Ltd
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 #ifndef _TB_FLUSH_H_
9 #define _TB_FLUSH_H_
10 
11 /**
12  * tb_flush() - flush all translation blocks
13  * @cs: CPUState (must be valid, but treated as anonymous pointer)
14  *
15  * Used to flush all the translation blocks in the system. Sometimes
16  * it is simpler to flush everything than work out which individual
17  * translations are now invalid and ensure they are not called
18  * anymore.
19  *
20  * tb_flush() takes care of running the flush in an exclusive context
21  * if it is not already running in one. This means no guest code will
22  * run until this complete.
23  */
24 void tb_flush(CPUState *cs);
25 
26 #endif /* _TB_FLUSH_H_ */
27