]> git.proxmox.com Git - mirror_qemu.git/blame - include/migration/misc.h
migration: fix handling for --only-migratable
[mirror_qemu.git] / include / migration / misc.h
CommitLineData
7b1e1a22
JQ
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
1adc1cee
JQ
17#include "qemu/notify.h"
18
7b1e1a22
JQ
19/* migration/ram.c */
20
21void ram_mig_init(void);
22
2c9e6fec
JQ
23/* migration/block.c */
24
25#ifdef CONFIG_LIVE_BLOCK_MIGRATION
26void blk_mig_init(void);
27#else
28static inline void blk_mig_init(void) {}
29#endif
30
f8d806c9
JQ
31#define SELF_ANNOUNCE_ROUNDS 5
32
33static inline
34int64_t self_announce_delay(int round)
35{
36 assert(round < SELF_ANNOUNCE_ROUNDS && round > 0);
37 /* delay 50ms, 150ms, 250ms, ... */
38 return 50 + (SELF_ANNOUNCE_ROUNDS - round - 1) * 100;
39}
40
b7722747
JQ
41/* migration/savevm.c */
42
43void dump_vmstate_json_to_file(FILE *out_fp);
c4b63b7c
JQ
44
45/* migration/migration.c */
e5cb7e76 46void migration_object_init(void);
c4b63b7c
JQ
47void qemu_start_incoming_migration(const char *uri, Error **errp);
48bool migration_is_idle(void);
49void add_migration_state_change_notifier(Notifier *notify);
50void remove_migration_state_change_notifier(Notifier *notify);
51bool migration_in_setup(MigrationState *);
52bool migration_has_finished(MigrationState *);
53bool migration_has_failed(MigrationState *);
54/* ...and after the device transmission */
55bool migration_in_postcopy_after_devices(MigrationState *);
9d18af93 56void migration_global_dump(Monitor *mon);
3df663e5 57
7b1e1a22 58#endif