aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2013-05-12 14:16:28 +0300
committerJuan Quintela <quintela@redhat.com>2013-06-27 02:32:15 +0200
commit87d2f8254347879f80b3a834834a6b934dea5ecc (patch)
treebee0b534b9e5cfbdef027e9818bc323122ea509d
parent3e5087329489e0beceecf3426f1216619821937f (diff)
downloadqemu-arm-87d2f8254347879f80b3a834834a6b934dea5ecc.tar.gz
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: Alon Levy <alevy@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r--arch_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch_init.c b/arch_init.c
index a8b91eed7a..64421e1619 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -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;
}