aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorFei Li <fli@suse.com>2019-01-13 22:08:48 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2019-01-23 15:02:07 +0000
commit91b02dc7507f13d81b23ef2d68c1a0673fe32a66 (patch)
tree15027479356a9fcdcc7a298f19bd6b7b473830dd /migration
parent1398b2e3fe2a1e4e85a3854885c949c7652d7b53 (diff)
downloadqemu-91b02dc7507f13d81b23ef2d68c1a0673fe32a66.zip
qemu-91b02dc7507f13d81b23ef2d68c1a0673fe32a66.tar.gz
qemu-91b02dc7507f13d81b23ef2d68c1a0673fe32a66.tar.bz2
migration: add more error handling for postcopy_ram_enable_notify
Call postcopy_ram_incoming_cleanup() to do the cleanup when postcopy_ram_enable_notify fails. Besides, report the error message when qemu_ram_foreach_migratable_block() fails. Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Fei Li <fli@suse.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190113140849.38339-5-lifei1214@126.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/postcopy-ram.c1
-rw-r--r--migration/savevm.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index e5c02a3..fa09dba 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -1117,6 +1117,7 @@ int postcopy_ram_enable_notify(MigrationIncomingState *mis)
/* Mark so that we get notified of accesses to unwritten areas */
if (qemu_ram_foreach_migratable_block(ram_block_enable_notify, mis)) {
+ error_report("ram_block_enable_notify failed");
return -1;
}
diff --git a/migration/savevm.c b/migration/savevm.c
index 9e45fb4..d784e8a 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1729,6 +1729,7 @@ static int loadvm_postcopy_handle_listen(MigrationIncomingState *mis)
*/
if (migrate_postcopy_ram()) {
if (postcopy_ram_enable_notify(mis)) {
+ postcopy_ram_incoming_cleanup(mis);
return -1;
}
}