target-microblaze: dec_barrel: Plug TCG temp leak
[qemu/ar7.git] / include / migration / misc.h
blob22551216bb427d5203df6fb039fbe35005c89015
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"
19 /* migration/ram.c */
21 void ram_mig_init(void);
23 /* migration/block.c */
25 #ifdef CONFIG_LIVE_BLOCK_MIGRATION
26 void blk_mig_init(void);
27 #else
28 static inline void blk_mig_init(void) {}
29 #endif
31 #define SELF_ANNOUNCE_ROUNDS 5
33 static inline
34 int64_t self_announce_delay(int round)
36 assert(round < SELF_ANNOUNCE_ROUNDS && round > 0);
37 /* delay 50ms, 150ms, 250ms, ... */
38 return 50 + (SELF_ANNOUNCE_ROUNDS - round - 1) * 100;
41 /* migration/savevm.c */
43 void dump_vmstate_json_to_file(FILE *out_fp);
45 /* migration/migration.c */
46 void migration_object_init(void);
47 void qemu_start_incoming_migration(const char *uri, Error **errp);
48 bool migration_is_idle(void);
49 void add_migration_state_change_notifier(Notifier *notify);
50 void remove_migration_state_change_notifier(Notifier *notify);
51 bool migration_in_setup(MigrationState *);
52 bool migration_has_finished(MigrationState *);
53 bool migration_has_failed(MigrationState *);
54 /* ...and after the device transmission */
55 bool migration_in_postcopy_after_devices(MigrationState *);
56 void migration_only_migratable_set(void);
57 void migration_global_dump(Monitor *mon);
59 #endif