@@ -25,6 +25,7 @@
#include "qapi/qmp/qjson.h"
#include "qapi-event.h"
#include "hw/virtio/virtio-access.h"
+#include "migration/misc.h"
#define VIRTIO_NET_VM_VERSION 11
@@ -22,4 +22,14 @@ void ram_mig_init(void);
void blk_mig_init(void);
+#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;
+}
+
#endif
@@ -1000,8 +1000,6 @@ extern const VMStateInfo vmstate_info_qtailq;
#define VMSTATE_END_OF_LIST() \
{}
-#define SELF_ANNOUNCE_ROUNDS 5
-
void loadvm_free_handlers(MigrationIncomingState *mis);
int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
@@ -1035,14 +1033,6 @@ void vmstate_register_ram(struct MemoryRegion *memory, DeviceState *dev);
void vmstate_unregister_ram(struct MemoryRegion *memory, DeviceState *dev);
void vmstate_register_ram_global(struct MemoryRegion *memory);
-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;
-}
-
void dump_vmstate_json_to_file(FILE *out_fp);
bool vmstate_device_is_migratable(const VMStateDescription *vmsd);
@@ -37,6 +37,7 @@
#include "qemu/timer.h"
#include "migration/migration.h"
#include "migration/snapshot.h"
+#include "migration/misc.h"
#include "ram.h"
#include "qemu-file-channel.h"
#include "qemu-file.h"
Signed-off-by: Juan Quintela <quintela@redhat.com> --- hw/net/virtio-net.c | 1 + include/migration/misc.h | 10 ++++++++++ include/migration/vmstate.h | 10 ---------- migration/savevm.c | 1 + 4 files changed, 12 insertions(+), 10 deletions(-)