xref: /openbmc/qemu/include/migration/misc.h (revision 709395f8)
1 /*
2  * QEMU migration miscellaneus exported functions
3  *
4  * Copyright IBM, Corp. 2008
5  *
6  * Authors:
7  *  Anthony Liguori   <aliguori@us.ibm.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  *
12  */
13 
14 #ifndef MIGRATION_MISC_H
15 #define MIGRATION_MISC_H
16 
17 #include "qemu/notify.h"
18 #include "qapi/qapi-types-net.h"
19 
20 /* migration/ram.c */
21 
22 void ram_mig_init(void);
23 
24 /* migration/block.c */
25 
26 #ifdef CONFIG_LIVE_BLOCK_MIGRATION
27 void blk_mig_init(void);
28 #else
29 static inline void blk_mig_init(void) {}
30 #endif
31 
32 AnnounceParameters *migrate_announce_params(void);
33 /* migration/savevm.c */
34 
35 void dump_vmstate_json_to_file(FILE *out_fp);
36 
37 /* migration/migration.c */
38 void migration_object_init(void);
39 void migration_object_finalize(void);
40 void qemu_start_incoming_migration(const char *uri, Error **errp);
41 bool migration_is_idle(void);
42 void add_migration_state_change_notifier(Notifier *notify);
43 void remove_migration_state_change_notifier(Notifier *notify);
44 bool migration_in_setup(MigrationState *);
45 bool migration_has_finished(MigrationState *);
46 bool migration_has_failed(MigrationState *);
47 /* ...and after the device transmission */
48 bool migration_in_postcopy_after_devices(MigrationState *);
49 void migration_global_dump(Monitor *mon);
50 
51 /* migration/block-dirty-bitmap.c */
52 void dirty_bitmap_mig_init(void);
53 
54 #endif
55