diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-13 13:51:29 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-13 13:51:29 +0100 |
commit | 735286a4f88255e1463d42ce28d8d14181fd32d4 (patch) | |
tree | 5200eac6b4fb709bdee16bc1bb1f3dea228b766d /include/migration/misc.h | |
parent | e0b4891ae6647b0009b5c0f877255e6723bffed8 (diff) | |
parent | 6666c96aac9151568736226dec99aa8acb14d07c (diff) | |
download | qemu-735286a4f88255e1463d42ce28d8d14181fd32d4.zip qemu-735286a4f88255e1463d42ce28d8d14181fd32d4.tar.gz qemu-735286a4f88255e1463d42ce28d8d14181fd32d4.tar.bz2 |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170613' into staging
migration/next for 20170613
# gpg: Signature made Tue 13 Jun 2017 10:01:45 BST
# gpg: using RSA key 0xF487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg: aka "Juan Quintela <quintela@trasno.org>"
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723
* remotes/juanquintela/tags/migration/20170613:
migration: Move migration.h to migration/
migration: Move remaining exported functions to migration/misc.h
migration: create global_state.c
migration: ram_control_* are implemented in qemu_file
migration: Commands are only used inside migration.c
migration: Move constants to savevm.h
migration: Move dump_vmsate_json_to_file() to misc.h
migration: Split registration functions from vmstate.h
migration: Move self_announce_delay() to misc.h
migration: Remove MigrationState from migration_channel_incomming()
ram: Now POSTCOPY_ACTIVE is the same that STATUS_ACTIVE
ram: Print block stats also in the complete case
migration: Don't try to set *errp directly
migration: isolate return path on src
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/migration/misc.h')
-rw-r--r-- | include/migration/misc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/migration/misc.h b/include/migration/misc.h index d7892b7..d5a433a 100644 --- a/include/migration/misc.h +++ b/include/migration/misc.h @@ -26,4 +26,30 @@ void blk_mig_init(void); static inline void blk_mig_init(void) {} #endif +#define SELF_ANNOUNCE_ROUNDS 5 + +static inline +int64_t self_announce_delay(int round) +{ + assert(round < SELF_ANNOUNCE_ROUNDS && round > 0); + /* delay 50ms, 150ms, 250ms, ... */ + return 50 + (SELF_ANNOUNCE_ROUNDS - round - 1) * 100; +} + +/* migration/savevm.c */ + +void dump_vmstate_json_to_file(FILE *out_fp); +void savevm_skip_section_footers(void); +void savevm_skip_configuration(void); + +/* migration/migration.c */ +void qemu_start_incoming_migration(const char *uri, Error **errp); +bool migration_is_idle(void); +void add_migration_state_change_notifier(Notifier *notify); +void remove_migration_state_change_notifier(Notifier *notify); +bool migration_in_setup(MigrationState *); +bool migration_has_finished(MigrationState *); +bool migration_has_failed(MigrationState *); +/* ...and after the device transmission */ +bool migration_in_postcopy_after_devices(MigrationState *); #endif |