qemu-e2k/migration
Thomas Huth 5c90308f07 migration: Fix return code of ram_save_iterate()
qemu_savevm_state_iterate() expects the iterators to return 1
when they are done, and 0 if there is still something left to do.
However, ram_save_iterate() does not obey this rule and returns
the number of saved pages instead. This causes a fatal hang with
ppc64 guests when you run QEMU like this (also works with TCG):

 qemu-img create -f qcow2  /tmp/test.qcow2 1M
 qemu-system-ppc64 -nographic -nodefaults -m 256 \
                   -hda /tmp/test.qcow2 -serial mon:stdio

... then switch to the monitor by pressing CTRL-a c and try to
save a snapshot with "savevm test1" for example.

After the first iteration, ram_save_iterate() always returns 0 here,
so that qemu_savevm_state_iterate() hangs in an endless loop and you
can only "kill -9" the QEMU process.
Fix it by using proper return values in ram_save_iterate().

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2016-11-14 19:35:41 +01:00
..
block.c
colo-comm.c COLO: Add 'x-colo-lost-heartbeat' command to trigger failover 2016-10-30 15:17:39 +05:30
colo-failover.c COLO: Implement the process of failover for primary VM 2016-10-30 15:17:39 +05:30
colo.c migration: fix compiler warning on uninitialized variable 2016-11-01 09:31:53 +00:00
exec.c migration: set name for all I/O channels created 2016-10-27 09:13:10 +02:00
fd.c migration: set name for all I/O channels created 2016-10-27 09:13:10 +02:00
Makefile.objs COLO: Add 'x-colo-lost-heartbeat' command to trigger failover 2016-10-30 15:17:39 +05:30
migration.c migration: fix missing assignment for has_x_checkpoint_delay 2016-11-14 14:50:56 +01:00
postcopy-ram.c migration/postcopy: Explicitly disallow huge pages 2016-10-13 17:23:53 +02:00
qemu-file-channel.c
qemu-file.c
qjson.c
ram.c migration: Fix return code of ram_save_iterate() 2016-11-14 19:35:41 +01:00
rdma.c migration/rdma: Don't flag an error when we've been told about one 2016-10-13 17:22:38 +02:00
savevm.c Merge qio 2016/10/27 v1 2016-10-28 15:30:55 +01:00
socket.c migration: set name for all I/O channels created 2016-10-27 09:13:10 +02:00
tls.c migration: set name for all I/O channels created 2016-10-27 09:13:10 +02:00
trace-events COLO: Introduce state to record failover process 2016-10-30 15:17:39 +05:30
vmstate.c
xbzrle.c