From 17ad9b358bceba78ae80f2963c6036eab726010c Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Mon, 6 Aug 2012 21:42:53 +0300 Subject: Add XBZRLE to ram_save_block and ram_save_live In the outgoing migration check to see if the page is cached and changed, then send compressed page by using save_xbrle_page function. In the incoming migration check to see if RAM_SAVE_FLAG_XBZRLE is set and decompress the page (by using load_xbrle function). Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman Signed-off-by: Orit Wasserman Reviewed-by: Luiz Capitulino Reviewed-by: Eric Blake --- migration.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'migration.h') diff --git a/migration.h b/migration.h index 743c366..cdf6787 100644 --- a/migration.h +++ b/migration.h @@ -41,6 +41,7 @@ struct MigrationState MigrationParams params; int64_t total_time; bool enabled_capabilities[MIGRATION_CAPABILITY_MAX]; + int64_t xbzrle_cache_size; }; void process_incoming_migration(QEMUFile *f); @@ -104,4 +105,7 @@ 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); + #endif -- cgit v1.1