Re: [PATCH v2 2/8] migration: Introduce VMStateStructMember

Peter Xu <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <[email protected]>
On Tue, Aug 18, 2026 at 03:24:35PM -0300, Fabiano Rosas wrote:
>      /*
> -     * @size or @size_offset specifies the size of the element embeded in
> -     * the field.  Only one of them should be present never both.  When
> -     * @size_offset is used together with VMS_VBUFFER, it means the size is
> -     * dynamic calculated instead of a constant.
> +     * @size directly specifies the size of the element being
> +     * migrated.
>       *
> -     * When the field is an array of any type, this stores the size of one
> -     * element of the array.
> +     * @size_indirect specifies the offset inside a struct where the
> +     * size of the element is stored.
>       *
> -     * NOTE: even if VMS_POINTER or VMS_ARRAY_OF_POINTER may be specified,
> -     * this parameter always reflects the real size of the objects that a
> -     * pointer point to.
> +     *   Only one of the above should be present (except for
> +     *   VMSTATE_MULTIPLY which uses .size as a multiplier). When

VMS_MULTIPLY

> +     *   @size_indirect is used together with VMS_VBUFFER, it means
> +     *   the size is dynamic calculated instead of a constant.
> +     *
> +     *   When the field is an array of any type, these refer to the size
> +     *   of one element of the array.
> +     *
> +     *   NOTE: even if VMS_POINTER or VMS_ARRAY_OF_POINTER may be
> +     *   specified, these parameters always reflect the real size of the
> +     *   objects that a pointer point to.
> +     *
> +     * @num_indirect specifies the offset inside a struct where the
> +     * number of elements of an array is stored.
>       */

-- 
Peter Xu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.