From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com>,
peterx@redhat.com, Juraj Marcin <jmarcin@redhat.com>,
Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
Subject: Re: [PATCH RFC v2 05/11] vmstate: Rename VMS_NULLPTR_MARKER to VMS_MARKER_PTR_NULL
Date: Fri, 27 Mar 2026 09:27:04 -0300 [thread overview]
Message-ID: <87mrztihk7.fsf@suse.de> (raw)
In-Reply-To: <20260326210532.379027-6-peterx@redhat.com>
Peter Xu <peterx@redhat.com> writes:
> Prepare for a new MARKER for non-NULL pointer.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
> ---
> include/migration/vmstate.h | 2 +-
> migration/vmstate-types.c | 4 ++--
> tests/unit/test-vmstate.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index b4bc69486d..092e8f7e9a 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -283,7 +283,7 @@ extern const VMStateInfo vmstate_info_uint64;
> extern const VMStateInfo vmstate_info_fd;
>
> /** Put this in the stream when migrating a null pointer.*/
> -#define VMS_NULLPTR_MARKER (0x30U) /* '0' */
> +#define VMS_MARKER_PTR_NULL (0x30U) /* '0' */
> extern const VMStateInfo vmstate_info_nullptr;
>
> extern const VMStateInfo vmstate_info_cpudouble;
> diff --git a/migration/vmstate-types.c b/migration/vmstate-types.c
> index 23f3433696..7622cf8f01 100644
> --- a/migration/vmstate-types.c
> +++ b/migration/vmstate-types.c
> @@ -363,7 +363,7 @@ static bool load_nullptr(QEMUFile *f, void *pv, size_t size,
> const VMStateField *field, Error **errp)
>
> {
> - if (qemu_get_byte(f) == VMS_NULLPTR_MARKER) {
> + if (qemu_get_byte(f) == VMS_MARKER_PTR_NULL) {
> return true;
> }
>
> @@ -377,7 +377,7 @@ static bool save_nullptr(QEMUFile *f, void *pv, size_t size,
>
> {
> if (pv == NULL) {
> - qemu_put_byte(f, VMS_NULLPTR_MARKER);
> + qemu_put_byte(f, VMS_MARKER_PTR_NULL);
> return true;
> }
>
> diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c
> index 6a42cc1a4e..dae15786aa 100644
> --- a/tests/unit/test-vmstate.c
> +++ b/tests/unit/test-vmstate.c
> @@ -620,7 +620,7 @@ static void test_arr_ptr_str_no0_load(void)
>
> static uint8_t wire_arr_ptr_0[] = {
> 0x00, 0x00, 0x00, 0x00,
> - VMS_NULLPTR_MARKER,
> + VMS_MARKER_PTR_NULL,
> 0x00, 0x00, 0x00, 0x02,
> 0x00, 0x00, 0x00, 0x03,
> QEMU_VM_EOF
Reviewed-by: Fabiano Rosas <farosas@suse.de>
next prev parent reply other threads:[~2026-03-27 12:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 21:05 [PATCH RFC v2 00/11] vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC Peter Xu
2026-03-26 21:05 ` [PATCH RFC v2 01/11] vmstate: Pass in struct itself for VMSTATE_ARRAY_OF_POINTER Peter Xu
2026-03-27 12:19 ` Fabiano Rosas
2026-04-01 13:29 ` Philippe Mathieu-Daudé
2026-03-26 21:05 ` [PATCH RFC v2 02/11] vmstate: Pass in struct itself for VMSTATE_VARRAY_OF_POINTER_UINT32 Peter Xu
2026-03-27 12:19 ` Fabiano Rosas
2026-04-01 13:30 ` Philippe Mathieu-Daudé
2026-03-26 21:05 ` [PATCH RFC v2 03/11] vmstate: Do not set size for VMS_ARRAY_OF_POINTER Peter Xu
2026-03-27 12:20 ` Fabiano Rosas
2026-04-01 13:30 ` Philippe Mathieu-Daudé
2026-03-26 21:05 ` [PATCH RFC v2 04/11] vmstate: Update max_elems early and check field compressable once Peter Xu
2026-03-27 12:26 ` Fabiano Rosas
2026-04-01 13:17 ` Alexander Mikhalitsyn
2026-03-26 21:05 ` [PATCH RFC v2 05/11] vmstate: Rename VMS_NULLPTR_MARKER to VMS_MARKER_PTR_NULL Peter Xu
2026-03-27 12:27 ` Fabiano Rosas [this message]
2026-04-01 13:30 ` Philippe Mathieu-Daudé
2026-03-26 21:05 ` [PATCH RFC v2 06/11] vmstate: Introduce vmstate_save_field_with_vmdesc() Peter Xu
2026-03-27 12:27 ` Fabiano Rosas
2026-03-26 21:05 ` [PATCH RFC v2 07/11] vmstate: Allow vmstate_info_nullptr to emit non-NULL markers Peter Xu
2026-03-27 12:29 ` Fabiano Rosas
2026-04-01 13:19 ` Alexander Mikhalitsyn
2026-03-26 21:05 ` [PATCH RFC v2 08/11] vmstate: Implement load of ptr marker in vmstate core Peter Xu
2026-03-27 12:30 ` Fabiano Rosas
2026-04-01 13:21 ` Alexander Mikhalitsyn
2026-03-26 21:05 ` [PATCH RFC v2 09/11] vmstate: Implement VMS_ARRAY_OF_POINTER_AUTO_ALLOC Peter Xu
2026-03-27 13:12 ` Fabiano Rosas
2026-03-27 14:15 ` Peter Xu
2026-03-27 14:18 ` Fabiano Rosas
2026-04-01 13:28 ` Alexander Mikhalitsyn
2026-03-26 21:05 ` [PATCH RFC v2 10/11] vmstate: Stop checking size for nullptr compression Peter Xu
2026-04-01 13:30 ` Alexander Mikhalitsyn
2026-03-26 21:05 ` [PATCH RFC v2 11/11] tests/unit/test-vmstate: add tests for VMS_ARRAY_OF_POINTER_AUTO_ALLOC 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=87mrztihk7.fsf@suse.de \
--to=farosas@suse.de \
--cc=aleksandr.mikhalitsyn@futurfusion.io \
--cc=alexander@mihalicyn.com \
--cc=jmarcin@redhat.com \
--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 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.