mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
Modify save_live_pending for postcopy
Modify save_live_pending to return separate postcopiable and non-postcopiable counts. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
11cf1d984b
commit
c31b098f64
7 changed files with 38 additions and 14 deletions
|
@ -1053,10 +1053,19 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f)
|
|||
qemu_fflush(f);
|
||||
}
|
||||
|
||||
uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)
|
||||
/* Give an estimate of the amount left to be transferred,
|
||||
* the result is split into the amount for units that can and
|
||||
* for units that can't do postcopy.
|
||||
*/
|
||||
void qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size,
|
||||
uint64_t *res_non_postcopiable,
|
||||
uint64_t *res_postcopiable)
|
||||
{
|
||||
SaveStateEntry *se;
|
||||
uint64_t ret = 0;
|
||||
|
||||
*res_non_postcopiable = 0;
|
||||
*res_postcopiable = 0;
|
||||
|
||||
|
||||
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
|
||||
if (!se->ops || !se->ops->save_live_pending) {
|
||||
|
@ -1067,9 +1076,9 @@ uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
ret += se->ops->save_live_pending(f, se->opaque, max_size);
|
||||
se->ops->save_live_pending(f, se->opaque, max_size,
|
||||
res_non_postcopiable, res_postcopiable);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void qemu_savevm_state_cleanup(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue