diff options
author | lirans@il.ibm.com | 2009-11-02 14:40:58 +0100 |
---|---|---|
committer | Anthony Liguori | 2009-11-17 15:49:30 +0100 |
commit | c163b5cae98be8eda675b96e2dec4707bfa7fbbf (patch) | |
tree | 7c50d7a326b72c6aa1906e4055ecf049d667fad1 /hw/hw.h | |
parent | Expose a mechanism to trace block writes (diff) | |
download | qemu-c163b5cae98be8eda675b96e2dec4707bfa7fbbf.tar.gz qemu-c163b5cae98be8eda675b96e2dec4707bfa7fbbf.tar.xz qemu-c163b5cae98be8eda675b96e2dec4707bfa7fbbf.zip |
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.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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); |