Commit 87d2f825 authored by Alon Levy's avatar Alon Levy Committed by Juan Quintela
Browse files

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: default avatarAlon Levy <alevy@redhat.com>
Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
parent 3e508732
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
                            }