qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 80/97] vmstate: Create VMSTATE_SYNTHETIC


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 80/97] vmstate: Create VMSTATE_SYNTHETIC
Date: Mon, 07 Apr 2014 11:50:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

"Dr. David Alan Gilbert" <address@hidden> wrote:
> * Juan Quintela (address@hidden) wrote:
>> It is used for fields that don't exist on the State.  They are
>> generated on the fly for migration.
>
> While it's nicer than what's there before, I don't think this is the
> right fix for these fields, and I'd rather not encourage new uses
> like this.
>
> It still hides the type from the VMSTATE mechanism and ends up with
> the target-* code calling qemu_get*/qemu_put* on simple integers that VMSTATE
> does support.
>
> I was thinking something like:
>   a) Set a .flags entry that this is a synthetic
>   b) Change the .get/.put to post_load/pre_save
>   c) Change the vmstate code to use a temporary if the synthetic flag is
>      set, but then still call the pre_save/post_load on it passing the
>      address of the temporary and of the real data somehow.
>
> That way the vmstate code still sees integers that it knows the type of,
> and we don't use qemu_get/qemu_put any more.

That is what I proposed on the introduction email.  That would also
solve mst VMS_VALIDATE plroblems.

Later, Juan.



reply via email to

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