diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2025-07-18 16:05:13 +0100 |
---|---|---|
committer | Fabiano Rosas <farosas@suse.de> | 2025-07-22 19:39:30 -0300 |
commit | eb3618e9e259ef93f5a1a76867fbccae540fcd61 (patch) | |
tree | fc58a133708d3a5499e7b2d6d1f553ac42f8318e | |
parent | edea818371bd7179b55f38d3b113d342251d8f9b (diff) | |
download | qemu-eb3618e9e259ef93f5a1a76867fbccae540fcd61.zip qemu-eb3618e9e259ef93f5a1a76867fbccae540fcd61.tar.gz qemu-eb3618e9e259ef93f5a1a76867fbccae540fcd61.tar.bz2 |
migration: activate TLS thread safety workaround
When either the postcopy or return path capabilities are
enabled, the migration code will use the primary channel
for bidirectional I/O.
If either of those capabilities are enabled, the migration
code needs to mark the channel as expecting concurrent I/O
in order to activate the thread safety workarounds for
GNUTLS bug 1717
Closes: https://gitlab.com/qemu-project/qemu/-/issues/1937
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/qemu-devel/20250718150514.2635338-4-berrange@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
-rw-r--r-- | migration/tls.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/migration/tls.c b/migration/tls.c index 5cbf952..284a619 100644 --- a/migration/tls.c +++ b/migration/tls.c @@ -90,6 +90,10 @@ void migration_tls_channel_process_incoming(MigrationState *s, trace_migration_tls_incoming_handshake_start(); qio_channel_set_name(QIO_CHANNEL(tioc), "migration-tls-incoming"); + if (migrate_postcopy_ram() || migrate_return_path()) { + qio_channel_set_feature(QIO_CHANNEL(tioc), + QIO_CHANNEL_FEATURE_CONCURRENT_IO); + } qio_channel_tls_handshake(tioc, migration_tls_incoming_handshake, NULL, @@ -149,6 +153,11 @@ void migration_tls_channel_connect(MigrationState *s, s->hostname = g_strdup(hostname); trace_migration_tls_outgoing_handshake_start(hostname); qio_channel_set_name(QIO_CHANNEL(tioc), "migration-tls-outgoing"); + + if (migrate_postcopy_ram() || migrate_return_path()) { + qio_channel_set_feature(QIO_CHANNEL(tioc), + QIO_CHANNEL_FEATURE_CONCURRENT_IO); + } qio_channel_tls_handshake(tioc, migration_tls_outgoing_handshake, s, |