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

2010-12-23 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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

[PATCH 06/19] virtio: update last_avail_idx when inuse is decreased.

2010-12-23 Thread Yoshiaki Tamura
. Noth that live migration shouldn't be affected because it waits until flushing all requests. Also in conjunction with event-tap, requests inversion should be avoided. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/virtio.c |8 +++- 1 files changed, 7 insertions(+), 1

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

2010-12-23 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 tamura.yoshi...@lab.ntt.co.jp --- savevm.c | 88 ++ sysemu.h

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

2010-12-23 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |5 ++ savevm.c | 148 ++ 2 files changed, 153 insertions(+), 0 deletions(-) diff

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

2010-12-23 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 tamura.yoshi...@lab.ntt.co.jp --- hmp-commands.hx |7 --- migration.c |3 +++ qmp-commands.hx |7 --- 3 files changed, 11 insertions(+), 6

[PATCH 09/19] Introduce event-tap.

2010-12-23 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 tamura.yoshi...@lab.ntt.co.jp Signed-off

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

2010-12-23 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 tamura.yoshi...@lab.ntt.co.jp --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15

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

2010-12-23 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 tamura.yoshi...@lab.ntt.co.jp Signed-off

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

2010-12-23 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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

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

2010-12-23 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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

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

2010-12-23 Thread Yoshiaki Tamura
The option looks like, -incoming protocol:address:port,ft_mode Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 730af12..32fef86 100644 --- a/migration.c

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

2010-12-23 Thread Yoshiaki Tamura
from the receiver. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c | 259 +- migration.h |2 +- 2 files changed, 255 insertions(+), 6 deletions(-) diff --git a/migration.c b/migration.c index 01b723d..789efd2

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

2010-12-23 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests sent from device emulators. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- block.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 9b5e9e1..39009fc 100644

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

2010-12-23 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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

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

2010-12-23 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8118194..0f57c95 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include qemu-queue.h #include

[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.

2010-12-23 Thread Yoshiaki Tamura
-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c | 45 - 1 files changed, 44 insertions(+), 1 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 96e2411..d5926fb 100644 --- a/migration-tcp.c +++ b/migration-tcp.c

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

2010-12-23 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 tamura.yoshi...@lab.ntt.co.jp --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c

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

2010-12-17 Thread Yoshiaki Tamura
2010/12/17 Stefan Hajnoczi stefa...@gmail.com: On Thu, Dec 16, 2010 at 9:50 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Yoshiaki Tamura tamura.yoshi

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-17 Thread Yoshiaki Tamura
2010/12/17 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 11:28:46PM +0900, Yoshiaki Tamura wrote: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: 2010/12/3

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

2010-12-16 Thread Yoshiaki Tamura
2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:50PM +0900, Yoshiaki Tamura wrote: Record

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-16 Thread Yoshiaki Tamura
2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: 2010/12/3 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/12/2 Michael S. Tsirkin m...@redhat.com: On Wed, Dec 01, 2010 at 05:03:43PM +0900, Yoshiaki Tamura wrote: 2010/11/28

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-16 Thread Yoshiaki Tamura
2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 11:28:46PM +0900, Yoshiaki Tamura wrote: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: 2010/12/3 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/12

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-15 Thread Yoshiaki Tamura
2010/12/3 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/12/2 Michael S. Tsirkin m...@redhat.com: On Wed, Dec 01, 2010 at 05:03:43PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Sun, Nov 28, 2010 at 08:27:58PM +0900, Yoshiaki Tamura wrote: 2010/11/28

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

2010-12-15 Thread Yoshiaki Tamura
2010/11/28 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:50PM +0900, Yoshiaki Tamura wrote: Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Interesting

Re: [Qemu-devel] [PATCH 06/21] vl: add a tmp pointer so that a handler can delete the entry to which it belongs.

2010-12-08 Thread Yoshiaki Tamura
2010/12/8 Isaku Yamahata yamah...@valinux.co.jp: QLIST_FOREACH_SAFE? Thanks! So, it should be, QLIST_FOREACH_SAFE(e, vm_change_state_head, entries, ne) { e-cb(e-opaque, running, reason); } I'll put it in the next spin. Yoshi On Thu, Nov 25, 2010 at 03:06:45PM +0900, Yoshiaki Tamura

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-02 Thread Yoshiaki Tamura
2010/12/2 Michael S. Tsirkin m...@redhat.com: On Wed, Dec 01, 2010 at 05:03:43PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Sun, Nov 28, 2010 at 08:27:58PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-01 Thread Yoshiaki Tamura
2010/11/28 Michael S. Tsirkin m...@redhat.com: On Sun, Nov 28, 2010 at 08:27:58PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:44PM +0900, Yoshiaki Tamura wrote: Modify inuse type to uint16_t, let save/load to handle, and revert

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

2010-11-30 Thread Yoshiaki Tamura
2010/11/30 Marcelo Tosatti mtosa...@redhat.com: On Thu, Nov 25, 2010 at 03:06:48PM +0900, Yoshiaki Tamura wrote: 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

Re: [PATCH 09/21] Introduce event-tap.

2010-11-30 Thread Yoshiaki Tamura
2010/11/29 Stefan Hajnoczi stefa...@gmail.com: On Thu, Nov 25, 2010 at 6:06 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 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

Re: [PATCH 09/21] Introduce event-tap.

2010-11-30 Thread Yoshiaki Tamura
2010/11/30 Stefan Hajnoczi stefa...@gmail.com: On Tue, Nov 30, 2010 at 9:50 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/11/29 Stefan Hajnoczi stefa...@gmail.com: On Thu, Nov 25, 2010 at 6:06 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: event-tap controls when

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

2010-11-30 Thread Yoshiaki Tamura
Marcelo Tosatti wrote: On Tue, Nov 30, 2010 at 06:28:55PM +0900, Yoshiaki Tamura wrote: 2010/11/30 Marcelo Tosattimtosa...@redhat.com: On Thu, Nov 25, 2010 at 03:06:48PM +0900, Yoshiaki Tamura wrote: event-tap controls when to start FT transaction, and provides proxy functions to called from

Re: [Qemu-devel] Re: [PATCH 13/21] dma-helpers: replace bdrv_aio_writev() with bdrv_aio_writev_proxy().

2010-11-29 Thread Yoshiaki Tamura
2010/11/29 Kevin Wolf kw...@redhat.com: Am 28.11.2010 12:55, schrieb Yoshiaki Tamura: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:52PM +0900, Yoshiaki Tamura wrote: Replace bdrv_aio_writev() with bdrv_aio_writev_proxy() to let event-tap capture events from dma

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-29 Thread Yoshiaki Tamura
2010/11/29 Paul Brook p...@codesourcery.com: Could you formulate the constraints so developers are aware of them in the future and can protect the codebase.  How about expanding the Kemari wiki pages? If you like the idea above, I'm happy to make the list also on the wiki page.

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-29 Thread Yoshiaki Tamura
2010/11/29 Paul Brook p...@codesourcery.com: 2010/11/29 Paul Brook p...@codesourcery.com: Could you formulate the constraints so developers are aware of them in the future and can protect the codebase.  How about expanding the Kemari wiki pages? If you like the idea above, I'm

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-29 Thread Yoshiaki Tamura
2010/11/29 Paul Brook p...@codesourcery.com: To answer Stefan's question, there shouldn't be any requirement for a device, but must be tested with Kemari.  If it doesn't work correctly, the problems must be fixed before adding to the list. What exactly are the problems? Is this a device

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-29 Thread Yoshiaki Tamura
2010/11/29 Paul Brook p...@codesourcery.com: If devices incorrectly claim support for live migration, then that should also be fixed, either by removing the broken code or by making it work. I totally agree with you. AFAICT your current proposal is just feeding back the results of some

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-29 Thread Yoshiaki Tamura
2010/11/30 Dor Laor dl...@redhat.com: On 11/29/2010 06:23 PM, Stefan Hajnoczi wrote: On Mon, Nov 29, 2010 at 3:00 PM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp  wrote: 2010/11/29 Paul Brookp...@codesourcery.com: If devices incorrectly claim support for live migration, then that should

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-29 Thread Yoshiaki Tamura
2010/11/30 Anthony Liguori anth...@codemonkey.ws: On 11/29/2010 10:53 AM, Paul Brook wrote: Is this a fair summary: any device that supports live migration workw under Kemari? It might be fair summary but practically we barely have live migration working w/o Kemari. In addition, last I

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-11-28 Thread Yoshiaki Tamura
2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:44PM +0900, Yoshiaki Tamura wrote: Modify inuse type to uint16_t, let save/load to handle, and revert last_avail_idx with inuse if there are outstanding emulation. Signed-off-by: Yoshiaki Tamura tamura.yoshi

Re: [PATCH 15/21] virtio-net: replace qemu_sendv_packet_async() with qemu_sendv_packet_async_proxy().

2010-11-28 Thread Yoshiaki Tamura
2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:54PM +0900, Yoshiaki Tamura wrote: Replace replace qemu_sendv_packet_async() with qemu_sendv_packet_async_proxy() to let event-tap capture events from virtio-net. Signed-off-by: Yoshiaki Tamura tamura.yoshi

Re: [PATCH 13/21] dma-helpers: replace bdrv_aio_writev() with bdrv_aio_writev_proxy().

2010-11-28 Thread Yoshiaki Tamura
2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:52PM +0900, Yoshiaki Tamura wrote: Replace bdrv_aio_writev() with bdrv_aio_writev_proxy() to let event-tap capture events from dma-helpers. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Same comment

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

2010-11-28 Thread Yoshiaki Tamura
2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:50PM +0900, Yoshiaki Tamura wrote: Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Interesting. This will have to be extended to support ioeventfd. Since

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-27 Thread Yoshiaki Tamura
2010/11/27 Stefan Hajnoczi stefa...@gmail.com: On Sat, Nov 27, 2010 at 4:29 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/11/27 Blue Swirl blauwir...@gmail.com: On Thu, Nov 25, 2010 at 6:06 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: Hi, This patch series

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-27 Thread Yoshiaki Tamura
2010/11/27 Blue Swirl blauwir...@gmail.com: On Sat, Nov 27, 2010 at 8:53 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/11/27 Stefan Hajnoczi stefa...@gmail.com: On Sat, Nov 27, 2010 at 4:29 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/11/27 Blue Swirl blauwir

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-27 Thread Yoshiaki Tamura
2010/11/27 Paul Brook p...@codesourcery.com: One question I have about Kemari is whether it adds new constraints to the QEMU codebase?  Fault tolerance seems like a cross-cutting concern - everyone writing device emulation or core QEMU code may need to be aware of new constraints.  For

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-27 Thread Yoshiaki Tamura
2010/11/27 Stefan Hajnoczi stefa...@gmail.com: On Sat, Nov 27, 2010 at 8:53 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/11/27 Stefan Hajnoczi stefa...@gmail.com: On Sat, Nov 27, 2010 at 4:29 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/11/27 Blue Swirl

Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2

2010-11-26 Thread Yoshiaki Tamura
2010/11/27 Blue Swirl blauwir...@gmail.com: On Thu, Nov 25, 2010 at 6:06 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post and KVM Forum 2010.  The current code is based

[PATCH 13/21] dma-helpers: replace bdrv_aio_writev() with bdrv_aio_writev_proxy().

2010-11-24 Thread Yoshiaki Tamura
Replace bdrv_aio_writev() with bdrv_aio_writev_proxy() to let event-tap capture events from dma-helpers. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- dma-helpers.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index

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

2010-11-24 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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

[PATCH 06/21] vl: add a tmp pointer so that a handler can delete the entry to which it belongs.

2010-11-24 Thread Yoshiaki Tamura
By copying the next entry to a tmp pointer, qemu_del_vm_change_state_handler() can be called in the handler. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 805e11f..6b6aec0

[PATCH 14/21] virtio-blk: replace bdrv_aio_multiwrite() with bdrv_aio_multiwrite_proxy().

2010-11-24 Thread Yoshiaki Tamura
Replace replace bdrv_aio_multiwrite() with bdrv_aio_multiwrite_proxy() to let event-tap capture events from virtio-blk. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/virtio-blk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio-blk.c b/hw

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

2010-11-24 Thread Yoshiaki Tamura
The option looks like, -incoming protocol:address:port,ft_mode Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index f0cfa37..58f1158 100644 --- a/migration.c

[PATCH 15/21] virtio-net: replace qemu_sendv_packet_async() with qemu_sendv_packet_async_proxy().

2010-11-24 Thread Yoshiaki Tamura
Replace replace qemu_sendv_packet_async() with qemu_sendv_packet_async_proxy() to let event-tap capture events from virtio-net. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/virtio-net.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio

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

2010-11-24 Thread Yoshiaki Tamura
from the receiver. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c | 256 +-- migration.h |2 +- 2 files changed, 249 insertions(+), 9 deletions(-) diff --git a/migration.c b/migration.c index 40e4945..c03d660

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

2010-11-24 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 tamura.yoshi...@lab.ntt.co.jp --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15

[PATCH 17/21] savevm: introduce qemu_savevm_trans_{begin,commit}.

2010-11-24 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 tamura.yoshi...@lab.ntt.co.jp --- savevm.c | 88 ++ sysemu.h

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

2010-11-24 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 tamura.yoshi...@lab.ntt.co.jp Signed-off

[PATCH 09/21] Introduce event-tap.

2010-11-24 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 tamura.yoshi...@lab.ntt.co.jp Signed-off

[PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-11-24 Thread Yoshiaki Tamura
Modify inuse type to uint16_t, let save/load to handle, and revert last_avail_idx with inuse if there are outstanding emulation. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/virtio.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw

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

2010-11-24 Thread Yoshiaki Tamura
-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c | 43 ++- 1 files changed, 42 insertions(+), 1 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 96e2411..669f9f8 100644 --- a/migration-tcp.c +++ b/migration-tcp.c

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

2010-11-24 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 6b6aec0..ea6fe71 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include qemu-queue.h #include

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

2010-11-24 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- 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 88997f9..8ef4760 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2116,7 +2116,7 @@ static

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

2010-11-24 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 tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c | 15 +++ migration.c | 12 migration.h |3 +++ 3 files

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

2010-11-24 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |5 ++ savevm.c | 165 ++ 2 files changed, 170 insertions(+), 0 deletions(-) diff

[PATCH 00/21] Kemari for KVM 0.2

2010-11-24 Thread Yoshiaki Tamura
with the patch series posted. git://kemari.git.sourceforge.net/gitroot/kemari/kemari As always, I'm looking forward to suggestions/comments. Thanks, Yoshi Yoshiaki Tamura (21): Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer(). Introduce read

[PATCH 16/21] e1000: replace qemu_send_packet() with qemu_send_packet_proxy().

2010-11-24 Thread Yoshiaki Tamura
Replace replace qemu_send_packet() with qemu_send_packet_proxy() to let event-tap capture events from e1000. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/e1000.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index

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

2010-11-24 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |2 ++ savevm.c | 21 - 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index

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

2010-11-24 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index db9ff55..fd8823e 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7

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

2010-11-24 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 tamura.yoshi...@lab.ntt.co.jp --- hmp-commands.hx |7 --- migration.c |3 +++ qmp-commands.hx |7 --- 3 files changed, 11 insertions(+), 6

Re: [Qemu-devel] Re: KVM call minutes for June 15

2010-06-16 Thread Yoshiaki Tamura
2010/6/16 Markus Armbruster arm...@redhat.com: Anthony Liguori anth...@codemonkey.ws writes: On 06/15/2010 10:41 AM, Christoph Hellwig wrote: On Tue, Jun 15, 2010 at 08:18:12AM -0700, Chris Wright wrote: KVM/qemu patches - patch rate is high, documentation is low, review is low - patches

Re: [RFC PATCH 00/23] Kemari for KVM v0.1.1

2010-06-09 Thread Yoshiaki Tamura
are in master branch, and patches for qemu-kvm.git are in kemari-v0.1.1-kvm. I would split 23 patches into small chunks and send it separately to make reviewing easier, and hopefully have feedbacks. Thanks, Yoshi Yoshiaki Tamura wrote: Hi, This patch series is a revised version of Kemari for KVM

Re: [Qemu-devel] [RFC PATCH 2/6] ram_blocks: Convert to a QLIST

2010-06-09 Thread Yoshiaki Tamura
2010/6/10 Alex Williamson alex.william...@redhat.com: On Wed, 2010-06-09 at 14:11 -0600, Cam Macdonell wrote: On Tue, Jun 8, 2010 at 1:15 PM, Alex Williamson diff --git a/cpu-all.h b/cpu-all.h index 77eaf85..458cb4b 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -859,9 +859,21 @@

[RFC PATCH 19/23] Introduce ft_tranx_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2010-05-25 Thread Yoshiaki Tamura
Introduce ft_tranx_ready() which kicks the FT transaction cycle. When ft_mode is on, migrate_fd_put_ready() would open ft_transaction file and turn on event_tap. To end or cancel ft_transaction, ft_mode and event_tap is turned off. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp

[RFC PATCH 23/23] Add a parser to accept FT migration incoming mode.

2010-05-25 Thread Yoshiaki Tamura
The option looks like, -incoming protocol:address:port,ft_mode Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 3334650..a4850f9 100644

[RFC PATCH 16/23] Insert event_tap_mmio() to cpu_physical_memory_rw().

2010-05-25 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index d5c2a05..e9ed477 100644 --- a/exec.c +++ b/exec.c @@ -44,6 +44,7

[RFC PATCH 17/23] Skip assert() when event_tap_state weren't EVENT_TAP_OFF.

2010-05-25 Thread Yoshiaki Tamura
Skip assert(!cpu_single_env) in resume_all_threads() when event_tap_state weren't EVENT_TAP_OFF. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- qemu-kvm.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 1414f49..e28bf59

[RFC PATCH 04/23] Use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-05-25 Thread Yoshiaki Tamura
Modifies ram_save_block() and ram_save_remaining() to use cpu_physical_memory_get_dirty_range() to check multiple dirty and non-dirty pages at once. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Signed-off-by: OHMURA Kei ohmura@lab.ntt.co.jp --- vl.c | 52

[RFC PATCH 00/23] Kemari for KVM v0.1.1

2010-05-25 Thread Yoshiaki Tamura
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

[RFC PATCH 05/23] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-05-25 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |2 ++ savevm.c | 21 - 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index

[RFC PATCH 09/23] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2010-05-25 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 tamura.yoshi...@lab.ntt.co.jp Signed-off

[RFC PATCH 11/23] Introduce qemu_savevm_state_all().

2010-05-25 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_all() to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- savevm.c | 60 sysemu.h |1 + 2

[RFC PATCH 00/23] Kemari for KVM v0.1.1

2010-05-25 Thread Yoshiaki Tamura
/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

[RFC PATCH 13/23] Introduce event-tap.

2010-05-25 Thread Yoshiaki Tamura
event-tap controls when to start ft transaction, and inserts callbacks to the net/block. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- Makefile.target |1 + event-tap.c | 184 +++ event-tap.h | 32 ++ 3

[RFC PATCH 22/23] Introduce -k option to enable FT migration mode (Kemari).

2010-05-25 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 tamura.yoshi...@lab.ntt.co.jp --- migration.c |3 +++ qemu-monitor.hx |7 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git

[RFC PATCH 03/23] Use cpu_physical_memory_set_dirty_range() to update phys_ram_dirty.

2010-05-25 Thread Yoshiaki Tamura
Modifies kvm_get_dirty_pages_log_range to use cpu_physical_memory_set_dirty_range() to update the row of the bit-based phys_ram_dirty bitmap at once. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Signed-off-by: OHMURA Kei ohmura@lab.ntt.co.jp --- qemu-kvm.c | 19

[RFC PATCH 10/23] Introduce util functions to control ft_transaction from savevm layer.

2010-05-25 Thread Yoshiaki Tamura
To utilize ft_transaction function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |5 + savevm.c | 41 + 2 files changed, 46 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b

[RFC PATCH 20/23] Modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2010-05-25 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() receives ft_transaction iteratively. We also need a hack no to close fd before moving to ft_transaction mode, so that we can reuse the fd for it. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c

[RFC PATCH 14/23] Call init handler of event-tap at main().

2010-05-25 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 70a8aed..56d12c7 100644 --- a/vl.c +++ b/vl.c @@ -169,6 +169,8 @@ int main(int argc, char **argv) #include qemu-queue.h

[RFC PATCH 15/23] Insert event_tap_ioport() to ioport_write().

2010-05-25 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index 53dd87a..ad7a017 100644 --- a/ioport.c +++ b/ioport.c @@ -26,6 +26,7

[RFC PATCH 08/23] Introduce some socket util functions.

2010-05-25 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- osdep.c | 13 + qemu-char.c | 25 - qemu_socket.h |4 3 files changed, 41 insertions(+), 1 deletions(-) diff --git a/osdep.c b/osdep.c index 3bab79a..63444e7 100644

[RFC PATCH 18/23] Call event_tap_replay() at vm_start().

2010-05-25 Thread Yoshiaki Tamura
Call event_tap_replay() at vm_start() to replay the last ioport/mmio event upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 56d12c7..762440d 100644 --- a/vl.c +++ b/vl.c

[RFC PATCH 07/23] Introduce skip_header parameter to qemu_loadvm_state().

2010-05-25 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 tamura.yoshi...@lab.ntt.co.jp --- migration-exec.c |2 +- migration-fd.c |2 +- migration-tcp.c |2 +- migration-unix.c |2

[RFC PATCH 12/23] Insent event-tap callbacks to net/block layer.

2010-05-25 Thread Yoshiaki Tamura
Introduce event-tap callbacks to functions which actually fire outputs at net/block layer. By synchronizing VMs before outputs are fired, we can failover to the receiver upon failure. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- block.c | 22

[RFC PATCH 02/23] Introduce cpu_physical_memory_get_dirty_range().

2010-05-25 Thread Yoshiaki Tamura
It checks the first row and puts dirty addr in the array. If the first row is empty, it skips to the first non-dirty row or the end addr, and put the length in the first entry of the array. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Signed-off-by: OHMURA Kei ohmura

[RFC PATCH 21/23] virtio-blk: Modify save/load handler to handle inuse varialble.

2010-05-25 Thread Yoshiaki Tamura
Modify inuse type to uint16_t, let save/load to handle, and revert last_avail_idx with inuse if there are outstanding emulation. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/virtio.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw

Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops().

2010-05-03 Thread Yoshiaki Tamura
2010/4/23 Avi Kivity a...@redhat.com: On 04/23/2010 04:22 PM, Anthony Liguori wrote: I currently don't have data, but I'll prepare it. There were two things I wanted to avoid. 1. Pages to be copied to QEMUFile buf through qemu_put_buffer. 2. Calling write() everytime even when we want to

Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops().

2010-05-03 Thread Yoshiaki Tamura
2010/5/3 Anthony Liguori aligu...@linux.vnet.ibm.com: On 05/03/2010 04:32 AM, Yoshiaki Tamura wrote: 2010/4/23 Avi Kivitya...@redhat.com: On 04/23/2010 04:22 PM, Anthony Liguori wrote: I currently don't have data, but I'll prepare it. There were two things I wanted to avoid. 1. Pages

Re: [PATCH 09/10] kvm: port qemu-kvm's bitmap scanning

2010-04-27 Thread Yoshiaki Tamura
Marcelo Tosatti wrote: On Tue, Apr 27, 2010 at 01:49:15PM +0900, Yoshiaki Tamura wrote: Hi, This patch may conflict with the patch I posted on April 19. http://www.mail-archive.com/qemu-de...@nongnu.org/msg29941.html If Marcelo's is going to be merged, I need to rebase the above

Re: [RFC PATCH 04/20] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-04-26 Thread Yoshiaki Tamura
Avi Kivity wrote: On 04/23/2010 12:59 PM, Yoshiaki Tamura wrote: Avi Kivity wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Why is this needed? The real buffering is in the kernel anyways; this is only

Re: [RFC PATCH 07/20] Introduce qemu_put_vector() and qemu_put_vector_prepare() to use put_vector() in QEMUFile.

2010-04-26 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/22/2010 11:02 PM, Yoshiaki Tamura wrote: Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: For fool proof purpose, qemu_put_vector_parepare should be called before qemu_put_vector. Then, if qemu_put_* functions except this is called after

<    1   2   3   4   5   >