Re: [Qemu-devel] [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin, commit}.

2011-01-14 Thread Yoshiaki Tamura
2011/1/14 Blue Swirl : > On Thu, Jan 13, 2011 at 5:15 PM, Yoshiaki Tamura > wrote: >> Introduce qemu_savevm_state_{begin,commit} to send the memory and >> device info together, while avoiding cancelling memory state tracking. >> >> Signed-off-by: Yoshiaki Tamu

[PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-14 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests sent from device emulators. Signed-off-by: Yoshiaki Tamura --- block.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..85bd8b8 100644 --- a/block.c +++ b/block.c

[PATCH 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-14 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15 insertions(+), 13 deletions

[PATCH 06/19] virtio: decrement last_avail_idx with inuse before saving.

2011-01-14 Thread Yoshiaki Tamura
to make it repeat the last inuse requests. Signed-off-by: Michael S. Tsirkin Signed-off-by: Yoshiaki Tamura --- hw/virtio.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 07dbf86..b6cf4e5 100644 --- a/hw/virtio.c +++ b/hw/virtio.c

[PATCH 13/19] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-01-14 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 9ba5be2..1176124 100644 --- a/net.c +++ b/net.c @@ -36,6 +36,7 @@ #include "qemu-common.h"

[PATCH 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-14 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0292184..8bbb785 100644

[PATCH 16/19] migration: introduce migrate_ft_trans_{put,get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-14 Thread Yoshiaki Tamura
from the receiver. Signed-off-by: Yoshiaki Tamura --- migration.c | 265 ++- 1 files changed, 264 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 9740cb6..fb73b2d 100644 --- a/migration.c +++ b/migration.c @@ -21,6

[PATCH 00/19] Kemari for KVM v0.2.5

2011-01-14 Thread Yoshiaki Tamura
://kemari.git.sourceforge.net/gitroot/kemari/kemari next Thanks, Yoshi Yoshiaki Tamura (19): 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(). qemu-char: e

[PATCH 09/19] Introduce event-tap.

2011-01-14 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei

[PATCH 08/19] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-01-14 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 149 ++ 2 files changed, 154 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h

[PATCH 04/19] qemu-char: export socket_set_nodelay().

2011-01-14 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index edc9ad6..737d347 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2116,7 +2116,7 @@ static void tcp_chr_telnet_init(int

[PATCH 11/19] ioport: insert event_tap_ioport() to ioport_write().

2011-01-14 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index aa4188a..74aebf5 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "iop

[PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-01-14 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 49c28b1..4a171cc 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h"

[PATCH 07/19] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-01-14 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-14 Thread Yoshiaki Tamura
The option looks like, -incoming ::,ft_mode Signed-off-by: Yoshiaki Tamura --- migration.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 11bbdf8..7275f02 100644 --- a/migration.c +++ b/migration.c @@ -45,6 +45,12 @@ int

[PATCH 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-01-14 Thread Yoshiaki Tamura
When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). Signed-off-by: Yoshiaki Tamura --- hmp-commands.hx |7 --- migration.c |4 qmp-commands.hx |7 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a

[PATCH 10/19] Call init handler of event-tap at main() in vl.c.

2011-01-14 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8bbb785..9faeb27 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cp

[PATCH 01/19] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-01-14 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 163a683..a506688 100644 --- a/hw

[PATCH 02/19] Introduce read() to FdMigrationState.

2011-01-14 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 13 + migration.h |3 +++ 3 files changed, 31 insertions(

[PATCH 17/19] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-01-14 Thread Yoshiaki Tamura
. vm_change_state_handler is added to turn off ft_mode when cont is pressed. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 67 ++- 1 files changed, 66 insertions(+), 1 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 55777c8

[PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-14 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura --- savevm.c | 93 ++ sysemu.h |2 + 2 files changed, 95

[PATCH 00/19] Kemari for KVM v0.2.6

2011-01-18 Thread Yoshiaki Tamura
y for posting yet. To remove the dirty bitmap optimization, please look at HEAD~5 of the tree. git://kemari.git.sourceforge.net/gitroot/kemari/kemari next Thanks, Yoshi Yoshiaki Tamura (19): Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer(). In

[PATCH 02/19] Introduce read() to FdMigrationState.

2011-01-18 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 13 + migration.h |3 +++ 3 files changed, 31 insertions(

[PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-01-18 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 49c28b1..4a171cc 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h"

[PATCH 07/19] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-01-18 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[PATCH 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-01-18 Thread Yoshiaki Tamura
When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). Signed-off-by: Yoshiaki Tamura --- hmp-commands.hx |7 --- migration.c |4 qmp-commands.hx |7 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a

[PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-18 Thread Yoshiaki Tamura
The option looks like, -incoming ::,ft_mode Signed-off-by: Yoshiaki Tamura --- migration.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 11bbdf8..7275f02 100644 --- a/migration.c +++ b/migration.c @@ -45,6 +45,12 @@ int

[PATCH 09/19] Introduce event-tap.

2011-01-18 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei

[PATCH 10/19] Call init handler of event-tap at main() in vl.c.

2011-01-18 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8bbb785..9faeb27 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cp

[PATCH 13/19] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-01-18 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 9ba5be2..1176124 100644 --- a/net.c +++ b/net.c @@ -36,6 +36,7 @@ #include "qemu-common.h"

[PATCH 16/19] migration: introduce migrate_ft_trans_{put,get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-18 Thread Yoshiaki Tamura
from the receiver. Signed-off-by: Yoshiaki Tamura --- migration.c | 265 ++- 1 files changed, 264 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 9740cb6..fb73b2d 100644 --- a/migration.c +++ b/migration.c @@ -21,6

[PATCH 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-18 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0292184..8bbb785 100644

[PATCH 06/19] virtio: decrement last_avail_idx with inuse before saving.

2011-01-18 Thread Yoshiaki Tamura
to make it repeat the last inuse requests. Signed-off-by: Michael S. Tsirkin Signed-off-by: Yoshiaki Tamura --- hw/virtio.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 07dbf86..b6cf4e5 100644 --- a/hw/virtio.c +++ b/hw/virtio.c

[PATCH 01/19] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-01-18 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 163a683..a506688 100644 --- a/hw

[PATCH 08/19] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-01-18 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 149 ++ 2 files changed, 154 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h

[PATCH 17/19] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-01-18 Thread Yoshiaki Tamura
. vm_change_state_handler is added to turn off ft_mode when cont is pressed. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 67 ++- 1 files changed, 66 insertions(+), 1 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 55777c8

[PATCH 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-18 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15 insertions(+), 13 deletions

[PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-18 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests sent from device emulators. Signed-off-by: Yoshiaki Tamura --- block.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..85bd8b8 100644 --- a/block.c +++ b/block.c

[PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-18 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura --- savevm.c | 93 ++ sysemu.h |2 + 2 files changed, 95

[PATCH 11/19] ioport: insert event_tap_ioport() to ioport_write().

2011-01-18 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index aa4188a..74aebf5 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "iop

[PATCH 04/19] qemu-char: export socket_set_nodelay().

2011-01-18 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index edc9ad6..737d347 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2116,7 +2116,7 @@ static void tcp_chr_telnet_init(int

Re: [Qemu-devel] [PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-19 Thread Yoshiaki Tamura
2011/1/19 Kevin Wolf : > Am 19.01.2011 06:44, schrieb Yoshiaki Tamura: >> event-tap function is called only when it is on, and requests sent >> from device emulators. >> >> Signed-off-by: Yoshiaki Tamura >> --- >>  block.c |   11 +++ >>  1

Re: [Qemu-devel] [PATCH 09/19] Introduce event-tap.

2011-01-19 Thread Yoshiaki Tamura
2011/1/19 Kevin Wolf : > Am 19.01.2011 06:44, schrieb Yoshiaki Tamura: >> event-tap controls when to start FT transaction, and provides proxy >> functions to called from net/block devices.  While FT transaction, it >> queues up net/block requests, and flush them when

Re: [Qemu-devel] [PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-19 Thread Yoshiaki Tamura
2011/1/19 Kevin Wolf : > Am 19.01.2011 06:44, schrieb Yoshiaki Tamura: >> event-tap function is called only when it is on, and requests sent >> from device emulators. >> >> Signed-off-by: Yoshiaki Tamura >> --- >>  block.c |   11 +++ >>  1

Re: [Qemu-devel] [PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-19 Thread Yoshiaki Tamura
2011/1/19 Kevin Wolf : > Am 19.01.2011 14:16, schrieb Yoshiaki Tamura: >> 2011/1/19 Kevin Wolf : >>> Am 19.01.2011 06:44, schrieb Yoshiaki Tamura: >>>> event-tap function is called only when it is on, and requests sent >>>> from device emulators

Re: [Qemu-devel] [PATCH 09/19] Introduce event-tap.

2011-01-19 Thread Yoshiaki Tamura
2011/1/19 Kevin Wolf : > Am 19.01.2011 14:04, schrieb Yoshiaki Tamura: >>>> +static void event_tap_blk_flush(EventTapBlkReq *blk_req) >>>> +{ >>>> +    BlockDriverState *bs; >>>> + >>>> +    bs = bdrv_find(blk_req->device_name); >

Re: [Qemu-devel] [PATCH 09/19] Introduce event-tap.

2011-01-20 Thread Yoshiaki Tamura
2011/1/20 Kevin Wolf : > Am 20.01.2011 06:19, schrieb Yoshiaki Tamura: >>>>>> +        return; >>>>>> +    } >>>>>> + >>>>>> +    bdrv_aio_writev(bs, blk_req->reqs[0].sector, blk_req->reqs[0].q

Re: [Qemu-devel] [PATCH 09/19] Introduce event-tap.

2011-01-20 Thread Yoshiaki Tamura
2011/1/20 Kevin Wolf : > Am 20.01.2011 11:39, schrieb Yoshiaki Tamura: >> 2011/1/20 Kevin Wolf : >>> Am 20.01.2011 06:19, schrieb Yoshiaki Tamura: >>>>>>>> +        return; >>>>>>>> +    } >>>>>>>> +

Re: [Qemu-devel] [PATCH 09/19] Introduce event-tap.

2011-01-20 Thread Yoshiaki Tamura
2011/1/20 Kevin Wolf : > Am 20.01.2011 14:50, schrieb Yoshiaki Tamura: >> 2011/1/20 Kevin Wolf : >>> Am 20.01.2011 11:39, schrieb Yoshiaki Tamura: >>>> 2011/1/20 Kevin Wolf : >>>>> Am 20.01.2011 06:19, schrie

[PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-01-26 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index e950df2..c81fd09 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h"

[PATCH 13/19] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-01-26 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 9ba5be2..1176124 100644 --- a/net.c +++ b/net.c @@ -36,6 +36,7 @@ #include "qemu-common.h"

[PATCH 00/19] Kemari for KVM v0.2.7

2011-01-26 Thread Yoshiaki Tamura
ull the following repository. It also includes dirty bitmap optimization which aren't ready for posting yet. To remove the dirty bitmap optimization, please look at HEAD~5 of the tree. git://kemari.git.sourceforge.net/gitroot/kemari/kemari next Thanks, Yoshi Yoshiaki Tamura (19): Make

[PATCH 08/19] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-01-26 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 149 ++ 2 files changed, 154 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h

[PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-26 Thread Yoshiaki Tamura
The option looks like, -incoming ::,ft_mode Signed-off-by: Yoshiaki Tamura --- migration.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 1752cf4..29d4fb1 100644 --- a/migration.c +++ b/migration.c @@ -45,6 +45,12 @@ int

[PATCH 11/19] ioport: insert event_tap_ioport() to ioport_write().

2011-01-26 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index aa4188a..74aebf5 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "iop

[PATCH 10/19] Call init handler of event-tap at main() in vl.c.

2011-01-26 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8bbb785..9faeb27 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cp

[PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-26 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests sent from device emulators. Signed-off-by: Yoshiaki Tamura --- block.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..e4df9b6 100644 --- a/block.c +++ b

[PATCH 02/19] Introduce read() to FdMigrationState.

2011-01-26 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 13 + migration.h |3 +++ 3 files changed, 31 insertions(

[PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-26 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura --- savevm.c | 93 ++ sysemu.h |2 + 2 files changed, 95

[PATCH 17/19] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-01-26 Thread Yoshiaki Tamura
. vm_change_state_handler is added to turn off ft_mode when cont is pressed. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 67 ++- 1 files changed, 66 insertions(+), 1 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 55777c8

[PATCH 09/19] Introduce event-tap.

2011-01-26 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei

[PATCH 16/19] migration: introduce migrate_ft_trans_{put,get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-26 Thread Yoshiaki Tamura
from the receiver. Signed-off-by: Yoshiaki Tamura --- migration.c | 267 ++- 1 files changed, 266 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index cd02b7e..aa30ecd 100644 --- a/migration.c +++ b/migration.c @@ -21,6

[PATCH 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-26 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15 insertions(+), 13 deletions

[PATCH 01/19] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-01-26 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index dd993de..7f05830 100644 --- a/hw

[PATCH 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-01-26 Thread Yoshiaki Tamura
When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). Signed-off-by: Yoshiaki Tamura --- hmp-commands.hx |7 --- migration.c |4 qmp-commands.hx |7 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a

[PATCH 06/19] virtio: decrement last_avail_idx with inuse before saving.

2011-01-26 Thread Yoshiaki Tamura
to make it repeat the last inuse requests. Signed-off-by: Michael S. Tsirkin Signed-off-by: Yoshiaki Tamura --- hw/virtio.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 31bd9e3..f05d1b6 100644 --- a/hw/virtio.c +++ b/hw/virtio.c

[PATCH 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-26 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0292184..8bbb785 100644

[PATCH 04/19] qemu-char: export socket_set_nodelay().

2011-01-26 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index edc9ad6..737d347 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2116,7 +2116,7 @@ static void tcp_chr_telnet_init(int

[PATCH 07/19] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-01-26 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[PATCH 16/19] migration: introduce migrate_ft_trans_{put,get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-27 Thread Yoshiaki Tamura
from the receiver. Signed-off-by: Yoshiaki Tamura --- migration.c | 267 ++- 1 files changed, 266 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index cd02b7e..aa30ecd 100644 --- a/migration.c +++ b/migration.c @@ -21,6

[PATCH 14/19] block: insert event-tap to bdrv_aio_writev(), bdrv_aio_flush() and bdrv_flush().

2011-01-27 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests were sent from device emulators. Signed-off-by: Yoshiaki Tamura --- block.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..e4df9b6 100644 --- a/block.c +++ b

[PATCH 00/19] Kemari for KVM v0.2.8

2011-01-27 Thread Yoshiaki Tamura
of the tree. git://kemari.git.sourceforge.net/gitroot/kemari/kemari next Thanks, Yoshi Yoshiaki Tamura (19): Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer(). Introduce read() to FdMigrationState. Introduce skip_header parameter to qemu_loadvm_st

[PATCH 02/19] Introduce read() to FdMigrationState.

2011-01-27 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 13 + migration.h |3 +++ 3 files changed, 31 insertions(

[PATCH 04/19] qemu-char: export socket_set_nodelay().

2011-01-27 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index edc9ad6..737d347 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2116,7 +2116,7 @@ static void tcp_chr_telnet_init(int

[PATCH 08/19] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-01-27 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 149 ++ 2 files changed, 154 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h

[PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-27 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura --- savevm.c | 93 ++ sysemu.h |2 + 2 files changed, 95

[PATCH 09/19] Introduce event-tap.

2011-01-27 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei

[PATCH 07/19] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-01-27 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-01-27 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index e950df2..c81fd09 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h"

[PATCH 01/19] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-01-27 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index dd993de..7f05830 100644 --- a/hw

[PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-27 Thread Yoshiaki Tamura
The option looks like, -incoming ::,ft_mode Signed-off-by: Yoshiaki Tamura --- migration.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 1752cf4..29d4fb1 100644 --- a/migration.c +++ b/migration.c @@ -45,6 +45,12 @@ int

[PATCH 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-27 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0292184..8bbb785 100644

[PATCH 17/19] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-01-27 Thread Yoshiaki Tamura
. vm_change_state_handler is added to turn off ft_mode when cont is pressed. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 67 ++- 1 files changed, 66 insertions(+), 1 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 55777c8

[PATCH 06/19] virtio: decrement last_avail_idx with inuse before saving.

2011-01-27 Thread Yoshiaki Tamura
to make it repeat the last inuse requests. Signed-off-by: Michael S. Tsirkin Signed-off-by: Yoshiaki Tamura --- hw/virtio.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 31bd9e3..f05d1b6 100644 --- a/hw/virtio.c +++ b/hw/virtio.c

[PATCH 11/19] ioport: insert event_tap_ioport() to ioport_write().

2011-01-27 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index aa4188a..74aebf5 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "iop

[PATCH 13/19] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-01-27 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 9ba5be2..1176124 100644 --- a/net.c +++ b/net.c @@ -36,6 +36,7 @@ #include "qemu-common.h"

[PATCH 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-27 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15 insertions(+), 13 deletions

[PATCH 10/19] Call init handler of event-tap at main() in vl.c.

2011-01-27 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8bbb785..9faeb27 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cp

[PATCH 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-01-27 Thread Yoshiaki Tamura
When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). Signed-off-by: Yoshiaki Tamura --- hmp-commands.hx |7 --- migration.c |4 qmp-commands.hx |7 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a

Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Yoshiaki Tamura
2011/1/28 Paolo Bonzini : > On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: >> >> +    /* check ft_mode option  */ >> +    p = strstr(uri, "ft_mode"); >> +    if (p&&  !strcmp(p, "ft_mode")) { >> +        ft_mode = FT_INIT; >> +  

Re: [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-28 Thread Yoshiaki Tamura
2011/1/28 Paolo Bonzini : > On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: >> >> +int qemu_savevm_trans_begin(Monitor *mon, QEMUFile *f, int init) >> +{ >> +    SaveStateEntry *se; >> +    int skipped = 0; >> + >> +    QTAILQ_FOREACH(se,&savevm_h

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Yoshiaki Tamura
2011/1/28 Paolo Bonzini : > On 01/28/2011 02:53 PM, Yoshiaki Tamura wrote: >>> >>> >  1) I am not sure what would happen with -incoming exec; >> >> Nothing happens if used with other protocols, but I assume you're >> mentioning that it's not

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini : > On 01/28/2011 04:05 PM, Yoshiaki Tamura wrote: >> >> Having a scheme like "kemari:tcp:host:port" looks quite >> challenging to me.  We can of course add some quick hacks for it, >> but adding a nice layered architecture shoul

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini : > On 01/28/2011 04:31 PM, Yoshiaki Tamura wrote: >> >> That's the hack I was imaging:) > > So your original patch is also a hack? :) TBH, yeah :) I didn't came up better idea that is not over engineered. >> Maybe this is just an

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini : > On 01/29/2011 10:31 AM, Yoshiaki Tamura wrote: >> >> OK, then while keeping "-incoming kemari:tcp::" as a >> strong solution, could you please explain why placing the original >> parser under tcp handler wasn't a good idea

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-29 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini : > On 01/29/2011 12:32 PM, Yoshiaki Tamura wrote: >>> >>> >  But a hypothetical -incoming unix.*,ft_mode would have to be >>> > implemented >>> >  twice. >> >> You mean Kemari should be able to use with unix d

Re: [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-02-01 Thread Yoshiaki Tamura
Paolo, I refactored the savevm functions. Could you give me your comments? Thanks, Yoshi diff --git a/savevm.c b/savevm.c index 5418280..90aae55 100644 --- a/savevm.c +++ b/savevm.c @@ -1602,29 +1602,68 @@ bool qemu_savevm_state_blocked(Monitor *mon) return false; } -int qemu_savevm_sta

Re: [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-02-02 Thread Yoshiaki Tamura
2011/2/2 Paolo Bonzini : > On 02/01/2011 07:21 PM, Yoshiaki Tamura wrote: >> >> Paolo, >> >> I refactored the savevm functions.  Could you give me your >> comments? > > I didn't review it thoroughly, but the abstractions seem okay. Thanks. Since It

[PATCH 00/19] Kemari for KVM v0.2.9

2011-02-08 Thread Yoshiaki Tamura
pository. It also includes dirty bitmap optimization which aren't ready for posting yet. To remove the dirty bitmap optimization, please look at HEAD~4 of the tree. git://kemari.git.sourceforge.net/gitroot/kemari/kemari next Thanks, Yoshi Yoshiaki Tamura (19): Make QEMUFile buf ex

[PATCH 04/19] qemu-char: export socket_set_nodelay().

2011-02-08 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ee4f4ca..7286aeb 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2111,7 +2111,7 @@ static void tcp_chr_telnet_init(int

  1   2   3   4   5   >