On Mon, 29 Jul 2019 at 15:58, Damien Hedde <damien.he...@greensocs.com> wrote: > > It contains the resetting counter and cold flag status. > > At this point, migration of bus reset related state (counter and cold/warm > flag) is handled by parent device. This done using the post_load > function in the vmsd subsection. > > This is last point allow to add an initial support of migration with part of > qdev/qbus tree in reset state under the following condition: > + time-lasting reset are asserted on Device only > > Note that if this condition is not respected, migration will succeed and > no failure will occurs. The only impact is that the resetting counter > of a bus may lower afer a migration. > > Signed-off-by: Damien Hedde <damien.he...@greensocs.com>
> +const struct VMStateDescription device_vmstate_reset = { > + .name = "device_reset", > + .version_id = 0, > + .minimum_version_id = 0, > + .needed = device_vmstate_reset_needed, > + .post_load = device_vmstate_reset_post_load, > + .fields = (VMStateField[]) { > + VMSTATE_UINT32(resetting, DeviceState), > + VMSTATE_BOOL(reset_is_cold, DeviceState), > + VMSTATE_END_OF_LIST() > + }, > +}; > - Forgot to ask -- why don't we migrate the hold_needed flags? thanks -- PMM