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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] Re: [patch 0/3] block migration fixes

2010-11-11 Thread Yoshiaki Tamura
Marcelo Tosatti wrote: On Tue, Nov 09, 2010 at 03:02:12PM +0900, Yoshiaki Tamura wrote: Marcelo Tosatti wrote: Following patchset fixes block migration corruption issues. Hi Marcelo, Thanks for looking into this issue. Although we tried your patches, we're still seeing the corruption

[Qemu-devel] Re: [patch 0/3] block migration fixes

2010-11-08 Thread Yoshiaki Tamura
Marcelo Tosatti wrote: Following patchset fixes block migration corruption issues. Hi Marcelo, Thanks for looking into this issue. Although we tried your patches, we're still seeing the corruption. If we execute block migration while copying a file locally, md5sum of the copied file doesn't

Re: [Qemu-devel] qemu: qemu_mutex_lock: Invalid argument

2010-09-15 Thread Yoshiaki Tamura
Hi Rick, 2010/9/15 Corentin Chary corentin.ch...@gmail.com: On Tue, Sep 14, 2010 at 10:00 PM, Rick Vernam ri...@hobi.com wrote: I don't have nearly enough info to file a proper bug report. I am running qemu-kvm-0.13.0 rc1 starting qemu like so: /root/qemu/bin/qemu-system-x86_64 -cpu host

Re: [Qemu-devel] Re: [PATCH] vl.c: set NULL upon deleting handlers in qemu_set_fd_handler2()

2010-09-06 Thread Yoshiaki Tamura
2010/8/23 Corentin Chary corentin.ch...@gmail.com: On Mon, Aug 23, 2010 at 2:55 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: Currently qemu_set_fd_handler2() is only setting ioh-deleted upon deleting.  This may cause a crash when a read handler calls qemu_set_fd_handler2

[Qemu-devel] [PATCH] vl.c: set NULL upon deleting handlers in qemu_set_fd_handler2()

2010-08-22 Thread Yoshiaki Tamura
, and then crashes because of lack of resources. This patch fixes it. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index ccc8d57..7ae69ab 100644 --- a/vl.c +++ b/vl.c @@ -966,6 +966,8 @@ int

[Qemu-devel] [PATCH] vnc: check fd before calling qemu_set_fd_handler2() in vnc_client_write()

2010-08-20 Thread Yoshiaki Tamura
Setting fd = -1 to qemu_set_fd_handler2() causes bus error at FD_SET in main_loop_wait(). Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- ui/vnc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 7fc40ac..c7a1831 100644 --- a/ui

[Qemu-devel] [PATCH 0/2] Cleanups for arch_init and exec

2010-08-18 Thread Yoshiaki Tamura
Replace tabs in arch_init.c and exec.c by spaces. Yoshiaki Tamura (2): arch_init: replace tabs by spaces. exec: replace tabs by spaces. arch_init.c | 12 ++-- exec.c | 56 2 files changed, 34 insertions(+), 34

[Qemu-devel] [PATCH 1/2] arch_init: replace tabs by spaces.

2010-08-18 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- arch_init.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 47bb4b2..1865ae5 100644 --- a/arch_init.c +++ b/arch_init.c @@ -82,12 +82,12 @@ const uint32_t arch_type

[Qemu-devel] [PATCH 2/2] exec: replace tabs by spaces.

2010-08-18 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- exec.c | 56 1 files changed, 28 insertions(+), 28 deletions(-) diff --git a/exec.c b/exec.c index 8636316..4fc96cb 100644 --- a/exec.c +++ b/exec.c @@ -1706,8 +1706,8

[Qemu-devel] [PATCH] exec: remove code duplication in qemu_ram_alloc() and qemu_ram_alloc_from_ptr()

2010-08-18 Thread Yoshiaki Tamura
Since most of the code in qemu_ram_alloc() and qemu_ram_alloc_from_ptr() are duplicated, let qemu_ram_alloc_from_ptr() to switch by checking void *host, and change qemu_ram_alloc() to a wrapper. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- exec.c | 84

[Qemu-devel] [PATCH] block migration: replace tabs by spaces.

2010-07-25 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- block-migration.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block-migration.c b/block-migration.c index 8eda307..0bfdb73 100644 --- a/block-migration.c +++ b/block-migration.c @@ -346,7

[Qemu-devel] [PATCH] block migration: propagate return value when bdrv_write() returns 0

2010-07-20 Thread Yoshiaki Tamura
Currently block_load() doesn't check return value of bdrv_write(), and even the destination weren't prepared to execute block migration, it proceeds and guest boots on the target. This patch fix this issue. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- block-migration.c

Re: [Qemu-devel] [PATCH] block migraton: check sectors before shift operation.

2010-07-19 Thread Yoshiaki Tamura
2010/7/19 Kevin Wolf kw...@redhat.com: Am 19.07.2010 06:45, schrieb Yoshiaki Tamura: Commit d246673dcb9911218ff555bcdf28b250e38fa46c has expanded the types of block drive that can be initialized for block migration.  Although bdrv_getlength() may return 0, current code shifts it without

[Qemu-devel] [PATCH] block migraton: check sectors before shift operation.

2010-07-18 Thread Yoshiaki Tamura
to calling qemu_malloc() with 0 size at bdrv_set_dirty_tracking(). This patch checks the return value of bdrv_getlength() by masking with BDRV_SECTOR_MASK. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- block-migration.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions

Re: [Qemu-devel] [PATCH 00/15] Make migration work with hotplug

2010-06-24 Thread Yoshiaki Tamura
2010/6/24 Alex Williamson alex.william...@redhat.com: Ok, new approach.  I'm going to attempt to extract myself for the canonical device path approach, because we're missing too many pieces to make that work.  Instead, I'll take Anthony's advice and try to simplify.  We still want a unique

Re: [Qemu-devel] [PATCH 00/15] Make migration work with hotplug

2010-06-24 Thread Yoshiaki Tamura
Alex Williamson wrote: On Thu, 2010-06-24 at 09:04 -0600, Alex Williamson wrote: On Thu, 2010-06-24 at 15:02 +0900, Yoshiaki Tamura wrote: Hi Alex, Is there additional overhead to save rams introduce by this series? If so, how much? Yes, there is overhead, but it's typically quite small

[Qemu-devel] [PATCH] virtio-blk: fix the list operation in virtio_blk_load().

2010-06-21 Thread Yoshiaki Tamura
Although it is really rare to get in to the while loop, the list operation in the loop is obviously wrong. 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/virtio-blk.c

[Qemu-devel] [PATCH] net: delete QemuOpts when net_client_init() fails.

2010-06-20 Thread Yoshiaki Tamura
} } This results in DuplicatedId error. Because the first command was invalid, it should be able to reuse the same id, and the second command should work. Reported-by: Luiz Capitulino lcapitul...@redhat.com Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- net.c |4 1 files changed, 4

Re: [Qemu-devel] [PATCH 1/4] savevm: refactor qemu_loadvm_state().

2010-06-16 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 06/14/2010 09:01 PM, Yoshiaki Tamura wrote: Anthony Liguori wrote: On 06/03/2010 02:22 AM, Yoshiaki Tamura wrote: Split qemu_loadvm_state(), and introduce qemu_loadvm_state_{begin,iterate,complete,async}. qemu_loadvm_state_async() is a function to handle a single

[Qemu-devel] [PATCH v6 3/4] Use cpu_physical_memory_set_dirty_range() to update dirty bitmap.

2010-06-16 Thread Yoshiaki Tamura
Modifies kvm_physical_sync_dirty_bitmap to use cpu_physical_memory_set_dirty_range() to update the row of the bit-based dirty bitmap at once. Signed-off-by: OHMURA Kei ohmura@lab.ntt.co.jp Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- kvm-all.c | 24

[Qemu-devel] [PATCH v6 0/4] Introduce bit-based dirty bitmap, and bit-based dirty page checker.

2010-06-16 Thread Yoshiaki Tamura
to (1,2,4,8), and add IDX (0,1,2,3) - Use ffs to convert FLAGS to IDX. - Add a helper function which takes IDX. - Change the behavior of MASTER as a buffer. - Change dirty bitmap access to a loop. - Add brace after if () Yoshiaki Tamura (4): Modify DIRTY_FLAG value and introduce DIRTY_IDX to use

[Qemu-devel] [PATCH v6 1/4] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based dirty bitmap.

2010-06-16 Thread Yoshiaki Tamura
as a buffer, and upon get_diry() or get_dirty_flags(), it calls cpu_physical_memory_sync_master() to update VGA and MIGRATION. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- cpu-all.h | 127 - exec.c| 14

[Qemu-devel] [PATCH v6 4/4] Use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-06-16 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 --- arch_init.c | 58

[Qemu-devel] [PATCH v6 2/4] Introduce cpu_physical_memory_get_dirty_range().

2010-06-16 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

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: [Qemu-devel] [PATCH 1/4] savevm: refactor qemu_loadvm_state().

2010-06-14 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 06/03/2010 02:22 AM, Yoshiaki Tamura wrote: Split qemu_loadvm_state(), and introduce qemu_loadvm_state_{begin,iterate,complete,async}. qemu_loadvm_state_async() is a function to handle a single incoming section. Signed-off-by: Yoshiaki Tamuratamura.yoshi

[Qemu-devel] 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] [PATCH v3 0/5] Add QMP migration events

2010-06-09 Thread Yoshiaki Tamura
Hi Juan, 2010/6/9 Juan Quintela quint...@redhat.com: This is a resent with what we agreed on yesterday call. Migration events would be there for 0.13 until we get proper async command support. Later, Juan. v3: - Add comment that MIGRATION_FAILURE will add a QError for 0.14  (when we get

[Qemu-devel] [Bug 589315] Re: qemu: Improve error reporting when migration can't connect

2010-06-09 Thread Yoshiaki Tamura
** Changed in: qemu Status: Confirmed = In Progress -- qemu: Improve error reporting when migration can't connect https://bugs.launchpad.net/bugs/589315 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: In Progress

Re: [Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-09 Thread Yoshiaki Tamura
2010/6/10 Juan Quintela quint...@redhat.com: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: Hi Juan, I don't know I have addressed the problem correctly, but here is my try to get info migrate on incoming side. http://lists.gnu.org/archive/html/qemu-devel/2010-06/msg00417.html I

[Qemu-devel] [PATCH] migration: use qemu_free() instead of free().

2010-06-08 Thread Yoshiaki Tamura
Although there is no difference, other migration related code use qemu_free(), and it should be better to be consistent. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/migration.c b

[Qemu-devel] [PATCH v5 RESEND 2/4] Introduce cpu_physical_memory_get_dirty_range().

2010-06-06 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

[Qemu-devel] [PATCH v5 RESEND 4/4] Use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-06-06 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 --- arch_init.c | 57

[Qemu-devel] [PATCH v5 RESEND 1/4] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty.

2010-06-06 Thread Yoshiaki Tamura
phys_ram_dirty bitmap. MASTER works as a buffer, and upon get_diry() or get_dirty_flags(), it calls cpu_physical_memory_sync_master() to update VGA and MIGRATION. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- cpu-all.h | 128

[Qemu-devel] [PATCH v5 RESEND 3/4] Use cpu_physical_memory_set_dirty_range() to update phys_ram_dirty.

2010-06-06 Thread Yoshiaki Tamura
Modifies kvm_physical_sync_dirty_bitmap 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: OHMURA Kei ohmura@lab.ntt.co.jp Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- kvm-all.c | 24

[Qemu-devel] [PATCH v5 RESEND 0/4] Introduce bit-based phys_ram_dirty, and bit-based dirty page checker.

2010-06-06 Thread Yoshiaki Tamura
brace after if () Yoshiaki Tamura (4): 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

[Qemu-devel] [PATCH 0/4] Asynchronous tcp incoming migration.

2010-06-03 Thread Yoshiaki Tamura
. This series is based on discussion below. http://permalink.gmane.org/gmane.comp.emulators.qemu/72401 Yoshiaki Tamura (4): savevm: refactor qemu_loadvm_state(). migration-tcp: add support for asynchronous incoming migration. arch_init: calculate transferred bytes at ram_load(). migration: add

[Qemu-devel] [PATCH 1/4] savevm: refactor qemu_loadvm_state().

2010-06-03 Thread Yoshiaki Tamura
Split qemu_loadvm_state(), and introduce qemu_loadvm_state_{begin,iterate,complete,async}. qemu_loadvm_state_async() is a function to handle a single incoming section. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- savevm.c | 206

[Qemu-devel] [PATCH 4/4] migration: add support to print migration info on incoming side.

2010-06-03 Thread Yoshiaki Tamura
Set current_migration after calling tcp_star_incoming_migration(). On incoming side, we don't have to print remaining rams, so introduce incoming flag to switch messages. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c | 18 ++ 1 files changed, 14

[Qemu-devel] [PATCH 3/4] arch_init: calculate transferred bytes at ram_load().

2010-06-03 Thread Yoshiaki Tamura
Currently incoming side of migration doesn't know how many bytes are transferred. To print info migrate on incoming side, we need to calculate transferred bytes at ram_load(). Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- arch_init.c |6 +- 1 files changed, 5

[Qemu-devel] [PATCH 2/4] migration-tcp: add support for asynchronous incoming migration.

2010-06-03 Thread Yoshiaki Tamura
. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c | 109 --- migration.h |2 +- 2 files changed, 80 insertions(+), 31 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 95ce722..b55e891

Re: [Qemu-devel] [Bug 589315] [NEW] qemu: Improve error reporting when migration can't connect

2010-06-03 Thread Yoshiaki Tamura
, and returns allocated mig_state is set to current_migration in migration.c allows us to print info migrate. Reported-by: Cole Robinson crobi...@redhat.com Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp -- qemu: Improve error reporting when migration can't connect https://bugs.launchpad.net

[Qemu-devel] [PATCH 4/4] migration: add support to print migration info on incoming side.

2010-06-01 Thread Yoshiaki Tamura
Set current_migration after calling tcp_star_incoming_migration(). On incoming side, we don't have to print remaining rams, so introduce incoming flag to switch messages. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c | 18 ++ 1 files changed, 14

[Qemu-devel] [PATCH 3/4] arch_init: calculate transferred bytes at ram_load().

2010-06-01 Thread Yoshiaki Tamura
Currently incoming side of migration doesn't know how many bytes are transferred. To print info migrate on incoming side, we need to calculate transferred bytes at ram_load(). Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- arch_init.c |2 ++ 1 files changed, 2 insertions

[Qemu-devel] [PATCH 2/4] migration-tcp: threaded tcp incoming migration.

2010-06-01 Thread Yoshiaki Tamura
to print incoming migration info. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c | 86 ++- migration.h |2 +- 2 files changed, 73 insertions(+), 15 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c

[Qemu-devel] [PATCH 0/4] Threaded tcp incoming migration.

2010-06-01 Thread Yoshiaki Tamura
incoming migration is enable only when --enable-io-thread is set. This series apply on top of patch from Corentin posted on May 29. http://www.mail-archive.com/qemu-devel@nongnu.org/msg33830.html Yoshiaki Tamura (4): qemu-thread: add qemu_thread_join(). migration-tcp: threaded tcp incoming

[Qemu-devel] [PATCH 1/4] qemu-thread: add qemu_thread_join().

2010-06-01 Thread Yoshiaki Tamura
Add missing function to join created thread. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- qemu-thread.c |9 + qemu-thread.h |1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/qemu-thread.c b/qemu-thread.c index afc9933..21953cd 100644

Re: [Qemu-devel] Re: [PATCH 0/4] Threaded tcp incoming migration.

2010-06-01 Thread Yoshiaki Tamura
2010/6/2 Anthony Liguori aligu...@linux.vnet.ibm.com: On 06/01/2010 10:40 AM, Yoshiaki Tamura wrote: Hi, This series add threaded tcp incoming migration.  Currently, tcp migration on incoming side is blocked when outgoing has started on the remote side, and you can't do anything

Re: [Qemu-devel] Re: [PATCH 2/4] migration-tcp: threaded tcp incoming migration.

2010-06-01 Thread Yoshiaki Tamura
2010/6/2 Anthony Liguori aligu...@linux.vnet.ibm.com: On 06/01/2010 10:40 AM, Yoshiaki Tamura wrote: Create a thread to handle tcp incoming migration when CONFIG_IOTHREAD is enabled.  Spawned thread writes it's return status to th_fds[1] before exit, and main thread joins and reads

Re: [Qemu-devel] Re: [PATCH 0/4] Threaded tcp incoming migration.

2010-06-01 Thread Yoshiaki Tamura
2010/6/2 Anthony Liguori aligu...@linux.vnet.ibm.com: On 06/01/2010 11:18 AM, Yoshiaki Tamura wrote: 2010/6/2 Anthony Liguorialigu...@linux.vnet.ibm.com: On 06/01/2010 10:40 AM, Yoshiaki Tamura wrote: Hi, This series add threaded tcp incoming migration.  Currently, tcp migration

Re: [Qemu-devel] Re: [PATCH 2/4] migration-tcp: threaded tcp incoming migration.

2010-06-01 Thread Yoshiaki Tamura
2010/6/2 Anthony Liguori aligu...@linux.vnet.ibm.com: On 06/01/2010 11:23 AM, Yoshiaki Tamura wrote: 2010/6/2 Anthony Liguorialigu...@linux.vnet.ibm.com: On 06/01/2010 10:40 AM, Yoshiaki Tamura wrote: Create a thread to handle tcp incoming migration when CONFIG_IOTHREAD is enabled

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [RFC PATCH 06/23] Introduce read() to FdMigrationState.

2010-05-25 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 | 14 ++ migration.c | 12 migration.h |3 +++ 3 files

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [RFC PATCH 01/23] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty.

2010-05-25 Thread Yoshiaki Tamura
phys_ram_dirty bitmap. MASTER works as a buffer, and upon get_diry() or get_dirty_flags(), it calls cpu_physical_memory_sync_master() to update VGA and MIGRATION. Replaces direct phys_ram_dirty access with wrapper functions to prevent direct access to the phys_ram_dirty bitmap. Signed-off-by: Yoshiaki

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

<    1   2   3   4   5   6   7   >