All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Juraj Marcin <jmarcin@redhat.com>,
	Alexander Mikhalitsyn <alexander@mihalicyn.com>,
	Fabiano Rosas <farosas@suse.de>, Peter Xu <peterx@redhat.com>
Subject: [PATCH 00/11] vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC
Date: Wed,  1 Apr 2026 16:28:33 -0400	[thread overview]
Message-ID: <20260401202844.673494-1-peterx@redhat.com> (raw)

CI: https://gitlab.com/peterx/qemu/-/pipelines/2424266591
    (one checkpatch warning, not relevant to this series)

rfcv1: https://lore.kernel.org/r/20260317232332.15209-1-peterx@redhat.com
rfcv2: https://lore.kernel.org/r/20260326210532.379027-1-peterx@redhat.com

Changelog rfcv2->v1:

- Rebased to latest fabiano's migration-staging branch (bd698d7730)
- Collected new tags
- Patch 1
  - Add space between "_type*" [Phil]
- Patch 9
  - Slight refactoring on vmstate_load_next() [Fabiano]
  - I collected Alexander's tested-by even if strictly I shouldn't when the
    patch changed; if test fails, it's me to blame.

This is v1, I removed RFC as I we should have reached some form of
consensus in general.  It is based on Fabiano's migration-staging branch.
I've pushed this tree here for easier reference:

https://gitlab.com/peterx/qemu/-/tree/vmstate-array-null

This series implements a new vmstate flag that allows real dynamic array of
pointers to be migrated, so that QEMU vmstate core will be able to identify
NULL and non-NULL pointers pointing to any kind of VMSD (or base types),
then properly allocate memory for them on dest QEMU.

The first planned user of such is Alexander's NVMe migration series here:

https://lore.kernel.org/r/20260317102708.126725-1-alexander@mihalicyn.com

This is another alternative to solve this problem.

I tested analyze-migration.py with this version and it works with an idle
dump from the nvme series (after I rebase).

Thanks,

Alexander Mikhalitsyn (1):
  tests/unit/test-vmstate: add tests for VMS_ARRAY_OF_POINTER_AUTO_ALLOC

Fabiano Rosas (1):
  vmstate: Stop checking size for nullptr compression

Peter Xu (9):
  vmstate: Pass in struct itself for VMSTATE_ARRAY_OF_POINTER
  vmstate: Pass in struct itself for VMSTATE_VARRAY_OF_POINTER_UINT32
  vmstate: Do not set size for VMS_ARRAY_OF_POINTER
  vmstate: Update max_elems early and check field compressable once
  vmstate: Rename VMS_NULLPTR_MARKER to VMS_MARKER_PTR_NULL
  vmstate: Introduce vmstate_save_field_with_vmdesc()
  vmstate: Allow vmstate_info_nullptr to emit non-NULL markers
  vmstate: Implement load of ptr marker in vmstate core
  vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC

 include/hw/intc/riscv_aclint.h |   6 +-
 include/migration/vmstate.h    |  88 ++++++++++--
 migration/savevm.c             |  28 ++++
 migration/vmstate-types.c      |  36 ++---
 migration/vmstate.c            | 247 ++++++++++++++++++++++++++-------
 tests/unit/test-vmstate.c      |  90 +++++++++++-
 roms/seabios-hppa              |   2 +-
 scripts/analyze-migration.py   |  22 +--
 8 files changed, 418 insertions(+), 101 deletions(-)

-- 
2.50.1



             reply	other threads:[~2026-04-01 20:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01 20:28 Peter Xu [this message]
2026-04-01 20:28 ` [PATCH 01/11] vmstate: Pass in struct itself for VMSTATE_ARRAY_OF_POINTER Peter Xu
2026-04-20 19:25   ` Fabiano Rosas
2026-04-20 19:50     ` Peter Xu
2026-04-01 20:28 ` [PATCH 02/11] vmstate: Pass in struct itself for VMSTATE_VARRAY_OF_POINTER_UINT32 Peter Xu
2026-04-01 20:28 ` [PATCH 03/11] vmstate: Do not set size for VMS_ARRAY_OF_POINTER Peter Xu
2026-04-01 20:28 ` [PATCH 04/11] vmstate: Update max_elems early and check field compressable once Peter Xu
2026-04-01 20:28 ` [PATCH 05/11] vmstate: Rename VMS_NULLPTR_MARKER to VMS_MARKER_PTR_NULL Peter Xu
2026-04-01 20:28 ` [PATCH 06/11] vmstate: Introduce vmstate_save_field_with_vmdesc() Peter Xu
2026-04-01 20:28 ` [PATCH 07/11] vmstate: Allow vmstate_info_nullptr to emit non-NULL markers Peter Xu
2026-04-01 20:28 ` [PATCH 08/11] vmstate: Implement load of ptr marker in vmstate core Peter Xu
2026-04-01 20:28 ` [PATCH 09/11] vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC Peter Xu
2026-04-01 20:28 ` [PATCH 10/11] vmstate: Stop checking size for nullptr compression Peter Xu
2026-04-01 20:28 ` [PATCH 11/11] tests/unit/test-vmstate: add tests for VMS_ARRAY_OF_POINTER_AUTO_ALLOC Peter Xu
2026-04-08 17:41 ` [PATCH 00/11] vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC Juraj Marcin
2026-04-14  9:31 ` Alexander Mikhalitsyn
2026-04-14 15:23   ` Fabiano Rosas
2026-04-14 15:28     ` Alexander Mikhalitsyn

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=20260401202844.673494-1-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=alexander@mihalicyn.com \
    --cc=farosas@suse.de \
    --cc=jmarcin@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.