summaryrefslogtreecommitdiff
path: root/include/qom/cpu.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-09-13 09:45:12 -0700
committerPeter Maydell <peter.maydell@linaro.org>2014-09-25 18:54:21 +0100
commitcffe7b3249319003d776481b8a4b72d35db71355 (patch)
tree15c476ea6e4480e21877390660319653f7e45a28 /include/qom/cpu.h
parent1ba50f4ea01b26abe9dac95ba531533e17109826 (diff)
downloadqemu-cffe7b3249319003d776481b8a4b72d35db71355.zip
qom: Add cpu_exec_enter and cpu_exec_exit hooks
In preparation for removing a bunch of ifdefs from cpu_exec. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1410626734-3804-2-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qom/cpu.h')
-rw-r--r--include/qom/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 370b3ebee9..0340cf4241 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