diff options
author | Thomas Huth <thuth@redhat.com> | 2016-11-04 14:10:17 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2016-11-14 19:35:41 +0100 |
commit | 5c90308f07335451a08c030dc40a9eed4698152b (patch) | |
tree | dc4d3d53f0bfe221e259dacde554ece51fa1ca3b /dump.c | |
parent | 8cc49f0302ff23353034b6f9cbf4e5d778239a3d (diff) |
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>
Diffstat (limited to 'dump.c')
0 files changed, 0 insertions, 0 deletions