"Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote: > * Juan Quintela (quint...@redhat.com) 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.