Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post. The current code is based on qemu-kvm.git 2b644fd0e737407133c88054ba498e772ce01f27. On the contrary to the previous version, this series doesn't require any modifications to KVM. The I/O events are caputured in net/block layer instead of device emulation layer. The transmission/transaction protocol, and most of the control logic is implemented in QEMU. We prepared a demonstration video again. This time the guest is Windows XP without virtio drivers. The demonstration scenario is, 1. Play with a guest VM (This guest has e1000 and ide) # The guest image should be a NFS/SAN. 2. Start incoming side with, -incoming <protocol>:<address>:<port>,ft_mode 3. Start Kemari to synchronize the VM by running the following command in QEMU. Just add "-k" option to usual migrate command. migrate -d -k tcp:192.168.0.20:4444 3. Check the status by calling info migrate. 4. Go back to the VM to play the pinball. 5. Kill the the VM. (VNC client also disappears) 6. Press "c" to continue the VM on the other host. 7. Bring up the VNC client (Sorry, it pops outside of video capture.) 8. Confirm that the pinball works, then shutdown. http://www.osrg.net/kemari/download/kemari-kvm-winxp.mov The repository contains all patches we're sending with this message. For those who want to try, pull the following repository. git://kemari.git.sourceforge.net/gitroot/kemari/kemari The changes from v0.1 -> v0.1.1 are: - events are tapped in net/block layer instead of device emulation layer. - Introduce a new option for -incoming to accept FT transaction. - Removed writev() support to QEMUFile and FdMigrationState for now. I would post this work in a different series. - Modified virtio-blk save/load handler to send inuse variable to correctly replay. - Removed configure --enable-ft-mode. - Removed unnecessary check for qemu_realloc(). I hope people like this approach, and looking forward to suggestions/comments. Thanks, Yoshi Yoshiaki Tamura (23): Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty. Introduce cpu_physical_memory_get_dirty_range(). Use cpu_physical_memory_set_dirty_range() to update phys_ram_dirty. Use cpu_physical_memory_get_dirty_range() to check multiple dirty pages. Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer(). Introduce read() to FdMigrationState. Introduce skip_header parameter to qemu_loadvm_state(). Introduce some socket util functions. Introduce fault tolerant VM transaction QEMUFile and ft_mode. Introduce util functions to control ft_transaction from savevm layer. Introduce qemu_savevm_state_all(). Insent event-tap callbacks to net/block layer. Introduce event-tap. Call init handler of event-tap at main(). Insert event_tap_ioport() to ioport_write(). Insert event_tap_mmio() to cpu_physical_memory_rw(). Skip assert() when event_tap_state weren't EVENT_TAP_OFF. Call event_tap_replay() at vm_start(). Introduce ft_tranx_ready(), and modify migrate_fd_put_ready() when ft_mode is on. Modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled. virtio-blk: Modify save/load handler to handle inuse varialble. Introduce -k option to enable FT migration mode (Kemari). Add a parser to accept FT migration incoming mode. Makefile.objs | 1 + Makefile.target | 1 + block.c | 22 +++ block.h | 4 + cpu-all.h | 134 ++++++++++++++++- event-tap.c | 184 ++++++++++++++++++++++++ event-tap.h | 32 ++++ exec.c | 131 +++++++++++++---- ft_transaction.c | 418 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ ft_transaction.h | 54 +++++++ hw/hw.h | 7 + hw/virtio.c | 8 +- ioport.c | 2 + migration-exec.c | 2 +- migration-fd.c | 2 +- migration-tcp.c | 52 +++++++- migration-unix.c | 2 +- migration.c | 110 ++++++++++++++- migration.h | 3 + net/queue.c | 18 +++ net/queue.h | 3 + osdep.c | 13 ++ qemu-char.c | 25 +++- qemu-kvm.c | 23 ++-- qemu-monitor.hx | 7 +- qemu_socket.h | 4 + savevm.c | 146 +++++++++++++++++-- sysemu.h | 3 +- vl.c | 57 +++++--- 29 files changed, 1371 insertions(+), 97 deletions(-) create mode 100644 event-tap.c create mode 100644 event-tap.h create mode 100644 ft_transaction.c create mode 100644 ft_transaction.h -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html