From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: Peter Xu <peterx@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Alexandr Moshkov <dtalexundeer@yandex-team.ru>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: [PATCH v2 0/8] migration: Remove extra type-checking from vmstate macros
Date: Tue, 18 Aug 2026 15:24:33 -0300 [thread overview]
Message-ID: <20260818182441.404790-1-farosas@suse.de> (raw)
Changes in v2:
- Removed more unused vmstate macros
- Fixed the type check macro
- Renamed the new structure to something more explicit
- Added a new flag to indicate an empty vmstate
- Added the overflow and overallocation checks
CI run: https://gitlab.com/farosas/qemu/-/pipelines/2769617319
Also tested:
- migration-test --full --thorough
- x86_64 compat run forward and backwards for previous 3 QEMU releases
- s390x compat run forward and backwards for previous 2 QEMU releases
- ppc64 compat run forward and backwards for previous QEMU release
- migration-test smoke ASAN/UBSAN run
v1:
https://lore.kernel.org/r/20260729225227.1170574-1-farosas@suse.de
Hi, this is basically what I ranted about in:
https://lore.kernel.org/r/87jyqeomqz.fsf@suse.de
I'm replacing the per-integer-size type checks with a single "int that
fits in 32bit" check. This allows several lines of duplicated code to
be removed.
I haven't changed the macro names in the device code yet. If this
series gets positive feedback then I'll send per-subsystem patches
doing that.
CI run: https://gitlab.com/farosas/qemu/-/pipelines/2716814081
Also tested:
- migration-test --full --thorough
- x86_64 compat run forwards and backwards for previous 3 QEMU releases
- s390x compat run forwards and backwards for previous 2 QEMU releases
- ppc64 compat run forwards and backwards for previous QEMU release
- migration-test smoke ASAN/UBSAN run
Fabiano Rosas (8):
migration: Remove unused vmstate macros
migration: Introduce VMStateStructMember
migration: Remove redundant flags
migration: Remove duplicate vmstate macros
migration: Add VMS_NO_STATE flag
migration: Check more vmstate flags
migration: Harden vmstate_handle_alloc
migration: Harden vmstate_size
hw/pci/msix.c | 6 +-
hw/scsi/scsi-bus.c | 6 +-
include/migration/vmstate.h | 388 +++++++++++++----------------
migration/savevm.c | 29 ++-
migration/vmstate.c | 103 +++++---
rust/bindings/migration-sys/lib.rs | 17 +-
rust/migration/src/vmstate.rs | 32 ++-
rust/tests/tests/vmstate_tests.rs | 32 +--
8 files changed, 331 insertions(+), 282 deletions(-)
--
2.53.0
next reply other threads:[~2026-08-18 18:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 18:24 Fabiano Rosas [this message]
2026-08-18 18:24 ` [PATCH v2 1/8] migration: Remove unused vmstate macros Fabiano Rosas
2026-08-18 18:24 ` [PATCH v2 2/8] migration: Introduce VMStateStructMember Fabiano Rosas
2026-08-18 19:12 ` Peter Xu
2026-08-18 18:24 ` [PATCH v2 3/8] migration: Remove redundant flags Fabiano Rosas
2026-08-18 18:24 ` [PATCH v2 4/8] migration: Remove duplicate vmstate macros Fabiano Rosas
2026-08-18 18:24 ` [PATCH v2 5/8] migration: Add VMS_NO_STATE flag Fabiano Rosas
2026-08-18 18:24 ` [PATCH v2 6/8] migration: Check more vmstate flags Fabiano Rosas
2026-08-18 18:24 ` [PATCH v2 7/8] migration: Harden vmstate_handle_alloc Fabiano Rosas
2026-08-18 18:24 ` [PATCH v2 8/8] migration: Harden vmstate_size Fabiano Rosas
2026-08-18 19:12 ` [PATCH v2 0/8] migration: Remove extra type-checking from vmstate macros 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=20260818182441.404790-1-farosas@suse.de \
--to=farosas@suse.de \
--cc=dtalexundeer@yandex-team.ru \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/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.