From cffe7b3249319003d776481b8a4b72d35db71355 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 13 Sep 2014 09:45:12 -0700 Subject: qom: Add cpu_exec_enter and cpu_exec_exit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation for removing a bunch of ifdefs from cpu_exec. Cc: Andreas Färber Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Message-id: 1410626734-3804-2-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell --- include/qom/cpu.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/qom') diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 370b3eb..0340cf4 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -99,6 +99,8 @@ struct TranslationBlock; * @vmsd: State description for migration. * @gdb_num_core_regs: Number of core registers accessible to GDB. * @gdb_core_xml_file: File name for core registers GDB XML description. + * @cpu_exec_enter: Callback for cpu_exec preparation. + * @cpu_exec_exit: Callback for cpu_exec cleanup. * * Represents a CPU family or model. */ @@ -149,6 +151,9 @@ typedef struct CPUClass { const struct VMStateDescription *vmsd; int gdb_num_core_regs; const char *gdb_core_xml_file; + + void (*cpu_exec_enter)(CPUState *cpu); + void (*cpu_exec_exit)(CPUState *cpu); } CPUClass; #ifdef HOST_WORDS_BIGENDIAN -- cgit v1.1