monitor/qmp: Update comment for commit 4eaca8de268
[qemu/armbru.git] / include / migration / misc.h
blobb9d8e787af71830a3a50ffd4bf6d279337580bee
1 /*
2 * QEMU migration miscellaneus exported functions
4 * Copyright IBM, Corp. 2008
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #ifndef MIGRATION_MISC_H
15 #define MIGRATION_MISC_H
17 #include "qemu/notify.h"
18 #include "qapi/qapi-types-net.h"
20 /* migration/ram.c */
22 typedef enum PrecopyNotifyReason {
23 PRECOPY_NOTIFY_SETUP = 0,
24 PRECOPY_NOTIFY_BEFORE_BITMAP_SYNC = 1,
25 PRECOPY_NOTIFY_AFTER_BITMAP_SYNC = 2,
26 PRECOPY_NOTIFY_COMPLETE = 3,
27 PRECOPY_NOTIFY_CLEANUP = 4,
28 PRECOPY_NOTIFY_MAX = 5,
29 } PrecopyNotifyReason;
31 typedef struct PrecopyNotifyData {
32 enum PrecopyNotifyReason reason;
33 Error **errp;
34 } PrecopyNotifyData;
36 void precopy_infrastructure_init(void);
37 void precopy_add_notifier(NotifierWithReturn *n);
38 void precopy_remove_notifier(NotifierWithReturn *n);
39 int precopy_notify(PrecopyNotifyReason reason, Error **errp);
40 void precopy_enable_free_page_optimization(void);
42 void ram_mig_init(void);
43 void qemu_guest_free_page_hint(void *addr, size_t len);
45 /* migration/block.c */
47 #ifdef CONFIG_LIVE_BLOCK_MIGRATION
48 void blk_mig_init(void);
49 #else
50 static inline void blk_mig_init(void) {}
51 #endif
53 AnnounceParameters *migrate_announce_params(void);
54 /* migration/savevm.c */
56 void dump_vmstate_json_to_file(FILE *out_fp);
58 /* migration/migration.c */
59 void migration_object_init(void);
60 void migration_shutdown(void);
61 void qemu_start_incoming_migration(const char *uri, Error **errp);
62 bool migration_is_idle(void);
63 void add_migration_state_change_notifier(Notifier *notify);
64 void remove_migration_state_change_notifier(Notifier *notify);
65 bool migration_in_setup(MigrationState *);
66 bool migration_has_finished(MigrationState *);
67 bool migration_has_failed(MigrationState *);
68 /* ...and after the device transmission */
69 bool migration_in_postcopy_after_devices(MigrationState *);
70 void migration_global_dump(Monitor *mon);
72 /* migration/block-dirty-bitmap.c */
73 void dirty_bitmap_mig_init(void);
75 #endif