qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/6] migration: Add the configuration vmstate to the json


From: Juan Quintela
Subject: Re: [PATCH v2 1/6] migration: Add the configuration vmstate to the json writer
Date: Wed, 11 Oct 2023 15:12:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

Fabiano Rosas <farosas@suse.de> wrote:
> From: Nikolay Borisov <nborisov@suse.com>
>
> Make the migration json writer part of MigrationState struct, allowing
> the 'configuration' object be serialized to json.
>
> This will facilitate the parsing of the 'configuration' object in the
> next patch that fixes analyze-migration.py for arm.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>

Reviewed-by: Juan Quintela <quintela@redhat.com>

queued.

>          qemu_put_byte(f, QEMU_VM_CONFIGURATION);
> -        vmstate_save_state(f, &vmstate_configuration, &savevm_state, 0);
> +
> +        /*
> +         * This starts the main json object and is paired with the
> +         * json_writer_end_object in
> +         * qemu_savevm_state_complete_precopy_non_iterable
> +         */
> +        json_writer_start_object(s->vmdesc, NULL);

This don't depend of this patch, but it is ugly as hell.

Can we create:

json_write_start_main_object(s->vmdesc);

(equivalent for end)

And forbid json_writer_start_object() for taking a NULL parameter?

Later, Juan.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]