migration/multifd: Add a compat property for TLS termination
authorFabiano Rosas <farosas@suse.de>
Fri, 7 Feb 2025 13:50:49 +0000 (10:50 -0300)
committerFabiano Rosas <farosas@suse.de>
Fri, 14 Feb 2025 18:19:04 +0000 (15:19 -0300)
commit9b3b192f65b1cf635719a2981dd2d4b70892d2ec
tree2a31b4c7b3e116ce5fda51fcc2b053004ebdfe96
parent48796f6b44df1dd0f78d18757889d5ac478c33e4
migration/multifd: Add a compat property for TLS termination

We're currently changing the way the source multifd migration handles
the shutdown of the multifd channels when TLS is in use to perform a
clean termination by calling gnutls_bye().

Older src QEMUs will always close the channel without terminating the
TLS session. New dst QEMUs treat an unclean termination as an error.

Add multifd_clean_tls_termination (default true) that can be switched
on the destination whenever a src QEMU <= 9.2 is in use.

(Note that the compat property is only strictly necessary for src
QEMUs older than 9.1. Due to synchronization coincidences, src QEMUs
9.1 and 9.2 can put the destination in a condition where it doesn't
see the unclean termination. Still, make the property more inclusive
to facilitate potential backports.)

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
hw/core/machine.c
migration/migration.h
migration/multifd.c
migration/multifd.h
migration/options.c