aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2022-03-01 16:39:05 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2022-03-02 18:20:38 +0000
commitcfc7dc8abfdb71e39e48bdb297b5e86fe2121d97 (patch)
tree24f055f5c236bf33fcfd89e71b1674c188ed6b64 /migration
parent77dadc3f83745cbdc56500efd4384950415a2158 (diff)
migration: Dump ramblock and offset too when non-same-page detected
In ram_load_postcopy() we'll try to detect non-same-page case and dump error. This error is very helpful for debugging. Adding ramblock & offset into the error log too. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20220301083925.33483-6-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> dgilbert: Fix up long line
Diffstat (limited to 'migration')
-rw-r--r--migration/ram.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/migration/ram.c b/migration/ram.c
index fe3de84856..a9d0d100bd 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3707,8 +3707,12 @@ static int ram_load_postcopy(QEMUFile *f)
} else if (tmp_page->host_addr !=
host_page_from_ram_block_offset(block, addr)) {
/* not the 1st TP within the HP */
- error_report("Non-same host page %p/%p", tmp_page->host_addr,
- host_page_from_ram_block_offset(block, addr));
+ error_report("Non-same host page detected. "
+ "Target host page %p, received host page %p "
+ "(rb %s offset 0x"RAM_ADDR_FMT" target_pages %d)",
+ tmp_page->host_addr,
+ host_page_from_ram_block_offset(block, addr),
+ block->idstr, addr, tmp_page->target_pages);
ret = -EINVAL;
break;
}