]> git.proxmox.com Git - qemu.git/commitdiff
arch_init/ram_load: add error message for block length mismatch
authorAlon Levy <alevy@redhat.com>
Sun, 12 May 2013 11:16:28 +0000 (14:16 +0300)
committerJuan Quintela <quintela@redhat.com>
Thu, 27 Jun 2013 00:32:15 +0000 (02:32 +0200)
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>
arch_init.c

index a8b91eed7a63056acb20e2c07f20d715459c1cfc..64421e161961821bda6de41353ff664a4bd339a1 100644 (file)
@@ -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;
                             }