qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pawel Zmarzly <pzmarzly0@gmail.com>
To: qemu-devel@nongnu.org
Cc: peterx@redhat.com, farosas@suse.de, michel@michel-slm.name
Subject: [PATCH] migration: fix parsing snapshots with x-ignore-shared flag
Date: Tue, 25 Nov 2025 17:46:49 +0000	[thread overview]
Message-ID: <20251125174649.257457-1-pzmarzly0@gmail.com> (raw)

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



             reply	other threads:[~2025-11-25 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 17:46 Pawel Zmarzly [this message]
2025-11-25 19:35 ` [PATCH] migration: fix parsing snapshots with x-ignore-shared flag 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251125174649.257457-1-pzmarzly0@gmail.com \
    --to=pzmarzly0@gmail.com \
    --cc=farosas@suse.de \
    --cc=michel@michel-slm.name \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).