|
@@ -56,6 +56,7 @@
|
|
#include "io/channel-file.h"
|
|
#include "io/channel-file.h"
|
|
#include "sysemu/replay.h"
|
|
#include "sysemu/replay.h"
|
|
#include "qjson.h"
|
|
#include "qjson.h"
|
|
|
|
+#include "migration/colo.h"
|
|
|
|
|
|
#ifndef ETH_P_RARP
|
|
#ifndef ETH_P_RARP
|
|
#define ETH_P_RARP 0x8035
|
|
#define ETH_P_RARP 0x8035
|
|
@@ -82,6 +83,7 @@ enum qemu_vm_cmd {
|
|
were previously sent during
|
|
were previously sent during
|
|
precopy but are dirty. */
|
|
precopy but are dirty. */
|
|
MIG_CMD_PACKAGED, /* Send a wrapped stream within this stream */
|
|
MIG_CMD_PACKAGED, /* Send a wrapped stream within this stream */
|
|
|
|
+ MIG_CMD_ENABLE_COLO, /* Enable COLO */
|
|
MIG_CMD_POSTCOPY_RESUME, /* resume postcopy on dest */
|
|
MIG_CMD_POSTCOPY_RESUME, /* resume postcopy on dest */
|
|
MIG_CMD_RECV_BITMAP, /* Request for recved bitmap on dst */
|
|
MIG_CMD_RECV_BITMAP, /* Request for recved bitmap on dst */
|
|
MIG_CMD_MAX
|
|
MIG_CMD_MAX
|
|
@@ -841,6 +843,12 @@ static void qemu_savevm_command_send(QEMUFile *f,
|
|
qemu_fflush(f);
|
|
qemu_fflush(f);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void qemu_savevm_send_colo_enable(QEMUFile *f)
|
|
|
|
+{
|
|
|
|
+ trace_savevm_send_colo_enable();
|
|
|
|
+ qemu_savevm_command_send(f, MIG_CMD_ENABLE_COLO, 0, NULL);
|
|
|
|
+}
|
|
|
|
+
|
|
void qemu_savevm_send_ping(QEMUFile *f, uint32_t value)
|
|
void qemu_savevm_send_ping(QEMUFile *f, uint32_t value)
|
|
{
|
|
{
|
|
uint32_t buf;
|
|
uint32_t buf;
|
|
@@ -1922,6 +1930,12 @@ static int loadvm_handle_recv_bitmap(MigrationIncomingState *mis,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int loadvm_process_enable_colo(MigrationIncomingState *mis)
|
|
|
|
+{
|
|
|
|
+ migration_incoming_enable_colo();
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Process an incoming 'QEMU_VM_COMMAND'
|
|
* Process an incoming 'QEMU_VM_COMMAND'
|
|
* 0 just a normal return
|
|
* 0 just a normal return
|
|
@@ -2001,6 +2015,9 @@ static int loadvm_process_command(QEMUFile *f)
|
|
|
|
|
|
case MIG_CMD_RECV_BITMAP:
|
|
case MIG_CMD_RECV_BITMAP:
|
|
return loadvm_handle_recv_bitmap(mis, len);
|
|
return loadvm_handle_recv_bitmap(mis, len);
|
|
|
|
+
|
|
|
|
+ case MIG_CMD_ENABLE_COLO:
|
|
|
|
+ return loadvm_process_enable_colo(mis);
|
|
}
|
|
}
|
|
|
|
|
|
return 0;
|
|
return 0;
|