migration: Create migration/xbzrle.h
authorJuan Quintela <quintela@redhat.com>
Wed, 5 Apr 2017 19:47:50 +0000 (21:47 +0200)
committerJuan Quintela <quintela@redhat.com>
Thu, 18 May 2017 16:04:54 +0000 (18:04 +0200)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
include/migration/migration.h
migration/ram.c
migration/xbzrle.c
migration/xbzrle.h [new file with mode: 0644]
tests/test-xbzrle.c

index b80a6edbb3a2635a2cbe2056380b09b9bb20359d..7d1eef717e9d7f6168c7514344f425d78f025b8f 100644 (file)
@@ -251,10 +251,6 @@ bool migrate_zero_blocks(void);
 
 bool migrate_auto_converge(void);
 
-int xbzrle_encode_buffer(uint8_t *old_buf, uint8_t *new_buf, int slen,
-                         uint8_t *dst, int dlen);
-int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen);
-
 int migrate_use_xbzrle(void);
 int64_t migrate_xbzrle_cache_size(void);
 bool migrate_colo_enabled(void);
index 59459efe18d3f1057f7d9c721fc760504eec06ac..c14269fd16858e2a65bacbe4de547453dba17945 100644 (file)
@@ -35,6 +35,7 @@
 #include "qemu/bitmap.h"
 #include "qemu/timer.h"
 #include "qemu/main-loop.h"
+#include "xbzrle.h"
 #include "migration/migration.h"
 #include "postcopy-ram.h"
 #include "exec/address-spaces.h"
index c858339259fbc5be710d0c3682f37037023e47a7..1ba482ded9c4ffcfb48fe774396e379bb7726284 100644 (file)
@@ -12,7 +12,7 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
-#include "include/migration/migration.h"
+#include "xbzrle.h"
 
 /*
   page = zrun nzrun
diff --git a/migration/xbzrle.h b/migration/xbzrle.h
new file mode 100644 (file)
index 0000000..a0db507
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * QEMU live migration
+ *
+ * Copyright IBM, Corp. 2008
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef QEMU_MIGRATION_XBZRLE_H
+#define QEMU_MIGRATION_XBZRLE_H
+
+int xbzrle_encode_buffer(uint8_t *old_buf, uint8_t *new_buf, int slen,
+                         uint8_t *dst, int dlen);
+
+int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen);
+#endif
index 49f64195a6fe1a4aaf784a162e72b770db991f8b..f5e08de91ecf94426d691d66d7b8006bfcaff651 100644 (file)
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/cutils.h"
-#include "include/migration/migration.h"
+#include "../migration/xbzrle.h"
 
 #define PAGE_SIZE 4096