From e8a1ab22c0e7e672fc8a9b0a6ab06f861c380fc1 Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Mon, 6 Apr 2009 09:57:54 -0400 Subject: [PATCH] Propagate errors on failed migration. We're currently ignoring any errors if dirty logging fails. Set error on migration file if we're unable to put dirty logging on. Signed-off-by: Glauber Costa Signed-off-by: Avi Kivity --- vl.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 9e02a43f1e..2e4ceb840e 100644 --- a/vl.c +++ b/vl.c @@ -3226,8 +3226,15 @@ static int ram_save_block(QEMUFile *f) int found = 0; while (addr < phys_ram_size) { - if (kvm_enabled() && current_addr == 0) - kvm_update_dirty_pages_log(); /* FIXME: propagate errors */ + if (kvm_enabled() && current_addr == 0) { + int r; + r = kvm_update_dirty_pages_log(); + if (r) { + fprintf(stderr, "%s: update dirty pages log failed %d\n", __FUNCTION__, r); + qemu_file_set_error(f); + return 0; + } + } if (cpu_physical_memory_get_dirty(current_addr, MIGRATION_DIRTY_FLAG)) { uint8_t ch; -- 2.11.4.GIT