migration: Check migration error after loadvm

We're currently only checking the QEMUFile error after
qemu_loadvm_state(). This was causing a TLS termination error from
multifd recv threads to be ignored.

Start checking the migration error as well to avoid missing further
errors.

Regarding compatibility concerning the TLS termination error that was
being ignored, for QEMUs <= 9.2 - if the old QEMU is being used as
migration source - the recently added migration property
multifd-tls-clean-termination needs to be set to OFF in the
*destination* machine.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
Fabiano Rosas 2025-02-05 13:23:55 -03:00
parent 9b3b192f65
commit e0ad300fe1

View File

@ -2940,7 +2940,11 @@ int qemu_loadvm_state(QEMUFile *f)
/* When reaching here, it must be precopy */ /* When reaching here, it must be precopy */
if (ret == 0) { if (ret == 0) {
ret = qemu_file_get_error(f); if (migrate_has_error(migrate_get_current())) {
ret = -EINVAL;
} else {
ret = qemu_file_get_error(f);
}
} }
/* /*