tb-flush.h 794 B

12345678910111213141516171819202122232425262728
  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. * tb_flush() - flush all translation blocks
  12. * @cs: CPUState (must be valid, but treated as anonymous pointer)
  13. *
  14. * Used to flush all the translation blocks in the system. Sometimes
  15. * it is simpler to flush everything than work out which individual
  16. * translations are now invalid and ensure they are not called
  17. * anymore.
  18. *
  19. * tb_flush() takes care of running the flush in an exclusive context
  20. * if it is not already running in one. This means no guest code will
  21. * run until this complete.
  22. */
  23. void tb_flush(CPUState *cs);
  24. void tcg_flush_jmp_cache(CPUState *cs);
  25. #endif /* _TB_FLUSH_H_ */