Re: [PATCH QEMU v22 09/18] vfio: Add save state functions to SaveVMHandlers

2020-05-19 Thread Yan Zhao
On Mon, May 18, 2020 at 11:43:09AM +0530, Kirti Wankhede wrote: <...> > + > +static int vfio_save_buffer(QEMUFile *f, VFIODevice *vbasedev) > +{ > +VFIOMigration *migration = vbasedev->migration; > +VFIORegion *region = >region; > +uint64_t data_offset = 0, data_size = 0; > +int

[PATCH QEMU v22 09/18] vfio: Add save state functions to SaveVMHandlers

2020-05-18 Thread Kirti Wankhede
Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy functions. These functions handles pre-copy and stop-and-copy phase. In _SAVING|_RUNNING device state or pre-copy phase: - read pending_bytes. If pending_bytes > 0, go through below steps. - read data_offset - indicates