aboutsummaryrefslogtreecommitdiffstats
path: root/hw/hw.h
diff options
context:
space:
mode:
authorlirans@il.ibm.com <lirans@il.ibm.com>2009-11-02 15:40:58 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-17 08:49:30 -0600
commitc163b5cae98be8eda675b96e2dec4707bfa7fbbf (patch)
tree7c50d7a326b72c6aa1906e4055ecf049d667fad1 /hw/hw.h
parent7cd1e32a860895ccca89eb90a0226efbcd969b55 (diff)
Block live migration
This patch introduces block migration called during live migration. Block are being copied to the destination in an async way. First the code will transfer the whole disk and then transfer all dirty blocks accumulted during the migration. Still need to improve transition from the iterative phase of migration to the end phase. For now transition will take place when all blocks transfered once, all the dirty blocks will be transfered during the end phase (guest is suspended). Changes from v4: - Global variabels moved to a global state structure allocated dynamically. - Minor coding style issues. - Poll block.c for tracking of dirty blocks instead of manage it here. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/hw.h')
-rw-r--r--hw/hw.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/hw.h b/hw/hw.h
index 1d4af2a9d..7889aa3ce 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -43,12 +43,14 @@ typedef int (QEMUFileRateLimit)(void *opaque);
* the old rate otherwise
*/
typedef size_t (QEMUFileSetRateLimit)(void *opaque, size_t new_rate);
+typedef size_t (QEMUFileGetRateLimit)(void *opaque);
QEMUFile *qemu_fopen_ops(void *opaque, QEMUFilePutBufferFunc *put_buffer,
QEMUFileGetBufferFunc *get_buffer,
QEMUFileCloseFunc *close,
QEMUFileRateLimit *rate_limit,
- QEMUFileSetRateLimit *set_rate_limit);
+ QEMUFileSetRateLimit *set_rate_limit,
+ QEMUFileGetRateLimit *get_rate_limit);
QEMUFile *qemu_fopen(const char *filename, const char *mode);
QEMUFile *qemu_fdopen(int fd, const char *mode);
QEMUFile *qemu_fopen_socket(int fd);
@@ -85,6 +87,7 @@ unsigned int qemu_get_be32(QEMUFile *f);
uint64_t qemu_get_be64(QEMUFile *f);
int qemu_file_rate_limit(QEMUFile *f);
size_t qemu_file_set_rate_limit(QEMUFile *f, size_t new_rate);
+size_t qemu_file_get_rate_limit(QEMUFile *f);
int qemu_file_has_error(QEMUFile *f);
void qemu_file_set_error(QEMUFile *f);
@@ -239,6 +242,7 @@ static inline void qemu_get_sbe64s(QEMUFile *f, int64_t *pv)
int64_t qemu_ftell(QEMUFile *f);
int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence);
+typedef void SaveSetParamsHandler(int blk_enable, int shared, void * opaque);
typedef void SaveStateHandler(QEMUFile *f, void *opaque);
typedef int SaveLiveStateHandler(QEMUFile *f, int stage, void *opaque);
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
@@ -253,7 +257,8 @@ int register_savevm(const char *idstr,
int register_savevm_live(const char *idstr,
int instance_id,
int version_id,
- SaveLiveStateHandler *save_live_state,
+ SaveSetParamsHandler *set_params,
+ SaveLiveStateHandler *save_live_state,
SaveStateHandler *save_state,
LoadStateHandler *load_state,
void *opaque);