summaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-06-11 18:17:23 +0100
committerJuan Quintela <quintela@redhat.com>2015-07-07 14:54:48 +0200
commit632e3a5cd812d6bbd38fd2f3ffc189ff5ea51926 (patch)
tree2a6c855e5db41e88b4df8e20524c33be4a8adeff /migration/ram.c
parentb12f7777981953b7d939496283014740bdd6de64 (diff)
downloadqemu-632e3a5cd812d6bbd38fd2f3ffc189ff5ea51926.tar.gz
Rework ram_control_load_hook to hook during block load
We need the names of RAMBlocks as they're loaded for RDMA, reuse a slightly modified ram_control_load_hook: a) Pass a 'data' parameter to use for the name in the block-reg case b) Only some hook types now require the presence of a hook function. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 57368e1575..644f52ad85 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1477,6 +1477,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
error_report_err(local_err);
}
}
+ ram_control_load_hook(f, RAM_CONTROL_BLOCK_REG,
+ block->idstr);
break;
}
}
@@ -1545,7 +1547,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
break;
default:
if (flags & RAM_SAVE_FLAG_HOOK) {
- ram_control_load_hook(f, flags);
+ ram_control_load_hook(f, RAM_CONTROL_HOOK, NULL);
} else {
error_report("Unknown combination of migration flags: %#x",
flags);