aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-04-05 21:47:50 +0200
committerJuan Quintela <quintela@redhat.com>2017-05-18 18:04:54 +0200
commit709e3fe82581f866350ff3be5198ea73cda09f0d (patch)
tree7ca958d7b159f3689176bde192c49ba324e4fc29
parented1701c6a5a7d08f33148c50c4d28799ee0568c4 (diff)
migration: Create migration/xbzrle.h
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
-rw-r--r--include/migration/migration.h4
-rw-r--r--migration/ram.c1
-rw-r--r--migration/xbzrle.c2
-rw-r--r--migration/xbzrle.h21
-rw-r--r--tests/test-xbzrle.c2
5 files changed, 24 insertions, 6 deletions
diff --git a/include/migration/migration.h b/include/migration/migration.h
index b80a6edbb3..7d1eef717e 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -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);
diff --git a/migration/ram.c b/migration/ram.c
index 59459efe18..c14269fd16 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -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"
diff --git a/migration/xbzrle.c b/migration/xbzrle.c
index c858339259..1ba482ded9 100644
--- a/migration/xbzrle.c
+++ b/migration/xbzrle.c
@@ -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
index 0000000000..a0db507b9c
--- /dev/null
+++ b/migration/xbzrle.h
@@ -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
diff --git a/tests/test-xbzrle.c b/tests/test-xbzrle.c
index 49f64195a6..f5e08de91e 100644
--- a/tests/test-xbzrle.c
+++ b/tests/test-xbzrle.c
@@ -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