]>
Commit | Line | Data |
---|---|---|
7b1e1a22 JQ |
1 | /* |
2 | * QEMU migration miscellaneus exported functions | |
3 | * | |
4 | * Copyright IBM, Corp. 2008 | |
5 | * | |
6 | * Authors: | |
7 | * Anthony Liguori <[email protected]> | |
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 | ||
6bcb05fc | 17 | #include "exec/cpu-common.h" |
1adc1cee | 18 | #include "qemu/notify.h" |
ee3d96ba | 19 | #include "qapi/qapi-types-net.h" |
1adc1cee | 20 | |
7b1e1a22 JQ |
21 | /* migration/ram.c */ |
22 | ||
bd227060 WW |
23 | typedef enum PrecopyNotifyReason { |
24 | PRECOPY_NOTIFY_SETUP = 0, | |
25 | PRECOPY_NOTIFY_BEFORE_BITMAP_SYNC = 1, | |
26 | PRECOPY_NOTIFY_AFTER_BITMAP_SYNC = 2, | |
27 | PRECOPY_NOTIFY_COMPLETE = 3, | |
28 | PRECOPY_NOTIFY_CLEANUP = 4, | |
29 | PRECOPY_NOTIFY_MAX = 5, | |
30 | } PrecopyNotifyReason; | |
31 | ||
32 | typedef struct PrecopyNotifyData { | |
33 | enum PrecopyNotifyReason reason; | |
34 | Error **errp; | |
35 | } PrecopyNotifyData; | |
36 | ||
37 | void precopy_infrastructure_init(void); | |
38 | void precopy_add_notifier(NotifierWithReturn *n); | |
39 | void precopy_remove_notifier(NotifierWithReturn *n); | |
40 | int precopy_notify(PrecopyNotifyReason reason, Error **errp); | |
6eeb63f7 | 41 | void precopy_enable_free_page_optimization(void); |
bd227060 | 42 | |
7b1e1a22 | 43 | void ram_mig_init(void); |
6bcb05fc | 44 | void qemu_guest_free_page_hint(void *addr, size_t len); |
7b1e1a22 | 45 | |
2c9e6fec JQ |
46 | /* migration/block.c */ |
47 | ||
48 | #ifdef CONFIG_LIVE_BLOCK_MIGRATION | |
49 | void blk_mig_init(void); | |
50 | #else | |
51 | static inline void blk_mig_init(void) {} | |
52 | #endif | |
53 | ||
ee3d96ba | 54 | AnnounceParameters *migrate_announce_params(void); |
b7722747 JQ |
55 | /* migration/savevm.c */ |
56 | ||
57 | void dump_vmstate_json_to_file(FILE *out_fp); | |
c4b63b7c JQ |
58 | |
59 | /* migration/migration.c */ | |
e5cb7e76 | 60 | void migration_object_init(void); |
892ae715 | 61 | void migration_shutdown(void); |
c4b63b7c JQ |
62 | void qemu_start_incoming_migration(const char *uri, Error **errp); |
63 | bool migration_is_idle(void); | |
64 | void add_migration_state_change_notifier(Notifier *notify); | |
65 | void remove_migration_state_change_notifier(Notifier *notify); | |
66 | bool migration_in_setup(MigrationState *); | |
67 | bool migration_has_finished(MigrationState *); | |
68 | bool migration_has_failed(MigrationState *); | |
69 | /* ...and after the device transmission */ | |
70 | bool migration_in_postcopy_after_devices(MigrationState *); | |
9d18af93 | 71 | void migration_global_dump(Monitor *mon); |
3df663e5 | 72 | |
b35ebdf0 VSO |
73 | /* migration/block-dirty-bitmap.c */ |
74 | void dirty_bitmap_mig_init(void); | |
75 | ||
7b1e1a22 | 76 | #endif |