summaryrefslogtreecommitdiff
path: root/include/sysemu/sysemu.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:10:52 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 15:00:26 +0100
commit093e3c429693f87fb917424c637ad8f599bd9e67 (patch)
treeaee38b4124b9a52e7cafc9e048d94b6d57194bde /include/sysemu/sysemu.h
parent53dd370ced9b61a8113fc1c19ac8d61ca572a29c (diff)
downloadqemu-093e3c429693f87fb917424c637ad8f599bd9e67.tar.gz
qemu-093e3c429693f87fb917424c637ad8f599bd9e67.tar.bz2
qemu-093e3c429693f87fb917424c637ad8f599bd9e67.zip
Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.
The state of the postcopy process is managed via a series of messages; * Add wrappers and handlers for sending/receiving these messages * Add state variable that track the current state of postcopy Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/sysemu/sysemu.h')
-rw-r--r--include/sysemu/sysemu.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 70473f432a..6225e00af2 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -89,6 +89,16 @@ enum qemu_vm_cmd {
MIG_CMD_INVALID = 0, /* Must be 0 */
MIG_CMD_OPEN_RETURN_PATH, /* Tell the dest to open the Return path */
MIG_CMD_PING, /* Request a PONG on the RP */
+
+ MIG_CMD_POSTCOPY_ADVISE, /* Prior to any page transfers, just
+ warn we might want to do PC */
+ MIG_CMD_POSTCOPY_LISTEN, /* Start listening for incoming
+ pages as it's running. */
+ MIG_CMD_POSTCOPY_RUN, /* Start execution */
+
+ MIG_CMD_POSTCOPY_RAM_DISCARD, /* A list of pages to discard that
+ were previously sent during
+ precopy but are dirty. */
MIG_CMD_MAX
};
@@ -104,6 +114,15 @@ void qemu_savevm_command_send(QEMUFile *f, enum qemu_vm_cmd command,
uint16_t len, uint8_t *data);
void qemu_savevm_send_ping(QEMUFile *f, uint32_t value);
void qemu_savevm_send_open_return_path(QEMUFile *f);
+void qemu_savevm_send_postcopy_advise(QEMUFile *f);
+void qemu_savevm_send_postcopy_listen(QEMUFile *f);
+void qemu_savevm_send_postcopy_run(QEMUFile *f);
+
+void qemu_savevm_send_postcopy_ram_discard(QEMUFile *f, const char *name,
+ uint16_t len,
+ uint64_t *start_list,
+ uint64_t *length_list);
+
int qemu_loadvm_state(QEMUFile *f);
typedef enum DisplayType