2 * QEMU save vm functions
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 * Copyright (c) 2009-2017 Red Hat Inc
8 * Juan Quintela <quintela@redhat.com>
10 * This work is licensed under the terms of the GNU GPL, version 2 or later.
11 * See the COPYING file in the top-level directory.
14 #ifndef MIGRATION_SAVEVM_H
15 #define MIGRATION_SAVEVM_H
17 bool qemu_savevm_state_blocked(Error
**errp
);
18 void qemu_savevm_state_begin(QEMUFile
*f
);
19 void qemu_savevm_state_header(QEMUFile
*f
);
20 int qemu_savevm_state_iterate(QEMUFile
*f
, bool postcopy
);
21 void qemu_savevm_state_cleanup(void);
22 void qemu_savevm_state_complete_postcopy(QEMUFile
*f
);
23 void qemu_savevm_state_complete_precopy(QEMUFile
*f
, bool iterable_only
);
24 void qemu_savevm_state_pending(QEMUFile
*f
, uint64_t max_size
,
25 uint64_t *res_non_postcopiable
,
26 uint64_t *res_postcopiable
);
27 void qemu_savevm_send_ping(QEMUFile
*f
, uint32_t value
);
28 void qemu_savevm_send_open_return_path(QEMUFile
*f
);
29 int qemu_savevm_send_packaged(QEMUFile
*f
, const uint8_t *buf
, size_t len
);
30 void qemu_savevm_send_postcopy_advise(QEMUFile
*f
);
31 void qemu_savevm_send_postcopy_listen(QEMUFile
*f
);
32 void qemu_savevm_send_postcopy_run(QEMUFile
*f
);
34 void qemu_savevm_send_postcopy_ram_discard(QEMUFile
*f
, const char *name
,
37 uint64_t *length_list
);
39 int qemu_loadvm_state(QEMUFile
*f
);