提交 87d2f825 编写于 作者: A Alon Levy 提交者: Juan Quintela

arch_init/ram_load: add error message for block length mismatch

Makes it easier to debug situations where the source and target have
different ram blocks in a device and migration fails due to that, for
instance a BAR size change on a PCI device.
Signed-off-by: NAlon Levy <alevy@redhat.com>
Signed-off-by: NJuan Quintela <quintela@redhat.com>
上级 3e508732
......@@ -808,6 +808,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
if (!strncmp(id, block->idstr, sizeof(id))) {
if (block->length != length) {
fprintf(stderr, "Length mismatch: %s: %ld "
"in != " RAM_ADDR_FMT "\n", id, length,
block->length);
ret = -EINVAL;
goto done;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册