qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] migration: fix parsing snapshots with x-ignore-shared flag
@ 2025-11-25 17:46 Pawel Zmarzly
  2025-11-25 19:35 ` Peter Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Pawel Zmarzly @ 2025-11-25 17:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: peterx, farosas, michel

Snapshots made with mapped-ram and x-ignore-shared flags are
not parsed properly.

Signed-off-by: Pawel Zmarzly <pzmarzly0@gmail.com>
---
 migration/ram.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/migration/ram.c b/migration/ram.c
index 29f016cb25..85fdc810ab 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -4277,6 +4277,11 @@ static int parse_ramblocks(QEMUFile *f, ram_addr_t total_ram_bytes)
         id[len] = 0;
         length = qemu_get_be64(f);
 
+        if (migrate_ignore_shared()) {
+            /* Read and discard the x-ignore-shared memory region address */
+            qemu_get_be64(f);
+        }
+
         block = qemu_ram_block_by_name(id);
         if (block) {
             ret = parse_ramblock(f, block, length);
-- 
2.52.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-26 17:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 17:46 [PATCH] migration: fix parsing snapshots with x-ignore-shared flag Pawel Zmarzly
2025-11-25 19:35 ` Peter Xu
2025-11-25 21:40   ` Fabiano Rosas
2025-11-25 22:29     ` Peter Xu
2025-11-26 12:34       ` Paweł Zmarzły
2025-11-26 12:45       ` Fabiano Rosas
2025-11-26 15:49         ` Paweł Zmarzły
2025-11-26 17:48         ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).