arch_init/ram_load: add error message for block length mismatch
PATCH v3 1/1 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 <[email protected]>
---
v3: use RAM_ADDR_FMT
arch_init.c | 3 +++ 1 file changed, 3 insertions(+)
arch_init.c +3 -0
@@ -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; }
Signature · 1 line
1.8.2.1
Quoted 11 lines · Alon Levy
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 <[email protected]>---
v3: useRAM_ADDR_FMTarch_init.c | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by Juan Quintela <[email protected]>
will be included in next pull request. thanks.
Quoted 14 lines
arch_init.c +3
-0@@ -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; }