From: Peter Xu <[email protected]> This function is used by both COLO and Xen. Simplify it with two changes:
- Remove checks on qemu_savevm_se_iterable(): this is not needed as vmstate_save() also checks for "save_state() || vmsd" instead. Here, save_setup() (or say, iterable states) should be mutual exclusive to "save_state() || vmsd" [*]. - Remove migrate_error_propagate(): both of the users are not using live migration framework, but raw vmstate operations. Error propagation is only needed for query-migrate persistence. [*] One tricky user is VFIO, who provided _both_ save_state() and save_setup(). However VFIO mustn't have been used in these paths or it means both COLO and Xen have ignored VFIO data instead (that is, qemu_savevm_se_iterable() will return true for VFIO). Hence, this change is safe. Cc: David Woodhouse <[email protected]> Cc: Paul Durrant <[email protected]> Signed-off-by: Peter Xu <[email protected]> Reviewed-by: Fabiano Rosas <[email protected]> Tested-by: Lukas Straub <[email protected]> Link: https://lore.kernel.org/qemu-devel/[email protected] [commit msg: s/not needed for/only needed for] Signed-off-by: Fabiano Rosas <[email protected]> --- migration/savevm.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 130b9764a7..b29272db3b 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1897,13 +1897,8 @@ int qemu_save_device_state(QEMUFile *f) QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { int ret; - if (qemu_savevm_se_iterable(se)) { - continue; - } ret = vmstate_save(f, se, NULL, &local_err); if (ret) { - migrate_error_propagate(migrate_get_current(), - error_copy(local_err)); error_report_err(local_err); return ret; } -- 2.51.0
