Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2177626/?format=api
{ "id": 2177626, "url": "http://patchwork.ozlabs.org/api/patches/2177626/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20251226211930.27565-6-farosas@suse.de/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20251226211930.27565-6-farosas@suse.de>", "list_archive_url": null, "date": "2025-12-26T21:19:07", "name": "[RFC,05/25] migration: Cleanup TLS handshake hostname passing", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8ae62cc242f299640a96f60b9404c86ed3312844", "submitter": { "id": 85343, "url": "http://patchwork.ozlabs.org/api/people/85343/?format=api", "name": "Fabiano Rosas", "email": "farosas@suse.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20251226211930.27565-6-farosas@suse.de/mbox/", "series": [ { "id": 486505, "url": "http://patchwork.ozlabs.org/api/series/486505/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=486505", "date": "2025-12-26T21:19:04", "name": "migration: Cleanup early connection code", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/486505/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2177626/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2177626/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=TV9GY/Xf;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=DEO96syh;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=JaugkQeI;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=Zpuu4ZDB;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)", "smtp-out1.suse.de;\n dkim=pass header.d=suse.de header.s=susede2_rsa header.b=JaugkQeI;\n dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Zpuu4ZDB" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ddJW74PJGz1y41\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 27 Dec 2025 08:23:15 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vZFE0-0001H9-Sv; Fri, 26 Dec 2025 16:19:52 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1vZFDy-0001G3-Vp\n for qemu-devel@nongnu.org; Fri, 26 Dec 2025 16:19:51 -0500", "from smtp-out1.suse.de ([2a07:de40:b251:101:10:150:64:1])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1vZFDw-0003eI-RC\n for qemu-devel@nongnu.org; Fri, 26 Dec 2025 16:19:50 -0500", "from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id 2BB693368B;\n Fri, 26 Dec 2025 21:19:42 +0000 (UTC)", "from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1CF203EA65;\n Fri, 26 Dec 2025 21:19:40 +0000 (UTC)", "from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id OCKfM+z7TmnwJwAAD6G6ig\n (envelope-from <farosas@suse.de>); Fri, 26 Dec 2025 21:19:40 +0000" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1766783984;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=2YgGzfWRlh8AzeKqv4K3JJnSw8VRFbkS7JbdISke0Po=;\n b=TV9GY/Xf/Q7j7PO4er8yPZZ4W8LbmYlDXJkBQsAketdM8t5T0Q/8gvz2K8zo1L04p3MOMs\n GyDxBHBDFFpEoyHFBNMVV66T/c49lrUuwz4ilFMpBwnUcaxqBglJfsluQvK7cMkdq5dnUq\n bnZbiPLDdzYAQPEgc7Ezc1eAzDrQk9c=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1766783984;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=2YgGzfWRlh8AzeKqv4K3JJnSw8VRFbkS7JbdISke0Po=;\n b=DEO96syhfPYoGB+zfseH173HlukwIGQkw1MFcY4FFRuewFxbbOVHNMWeTc7rYshTBuYScV\n 9ZwkWAEMm+/eN3Ag==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1766783982;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=2YgGzfWRlh8AzeKqv4K3JJnSw8VRFbkS7JbdISke0Po=;\n b=JaugkQeICyCDLf6OpcfLaKZEJP0hPIID50i39N4cHl3YcNCuqYA/x1QVk9+ct/z0L/eKmX\n 7szJ/Cb7GhEz3d8P3QeJqNrKQ/m3o0qlZdM+Iz9V0UhDWeT3MrdqanldyCUiujW6Uek8Vu\n JRrZPdH6ZekXCObQyQ/TdOjcF9gISYA=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1766783982;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=2YgGzfWRlh8AzeKqv4K3JJnSw8VRFbkS7JbdISke0Po=;\n b=Zpuu4ZDBw+okHI+mLBsEpcUo0pw0Mdu6k3qgRGCr+TUeCF1mRGCwmzoZOKB1nSC7x5BGee\n wF2M4ezon/BCoECQ==" ], "From": "Fabiano Rosas <farosas@suse.de>", "To": "qemu-devel@nongnu.org", "Cc": "peterx@redhat.com", "Subject": "[RFC PATCH 05/25] migration: Cleanup TLS handshake hostname passing", "Date": "Fri, 26 Dec 2025 18:19:07 -0300", "Message-ID": "<20251226211930.27565-6-farosas@suse.de>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20251226211930.27565-1-farosas@suse.de>", "References": "<20251226211930.27565-1-farosas@suse.de>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Spamd-Result": "default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000];\n R_MISSING_CHARSET(0.50)[];\n R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n MX_GOOD(-0.01)[]; MIME_TRACE(0.00)[0:+];\n FUZZY_RATELIMITED(0.00)[rspamd.com];\n DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns];\n RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[];\n RCPT_COUNT_TWO(0.00)[2];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n RCVD_TLS_ALL(0.00)[]; TO_DN_NONE(0.00)[];\n RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n DKIM_TRACE(0.00)[suse.de:+]", "X-Rspamd-Action": "no action", "X-Rspamd-Server": "rspamd2.dmz-prg2.suse.org", "X-Rspamd-Queue-Id": "2BB693368B", "X-Spam-Score": "-3.01", "Received-SPF": "pass client-ip=2a07:de40:b251:101:10:150:64:1;\n envelope-from=farosas@suse.de; helo=smtp-out1.suse.de", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "The TLS hostname is doing a tour around the world just to be cached\ninto s->hostname. We're already abusing MigrationState by doing that,\nso incorporate the s->hostname into migration_tls_hostname() and stop\npassing the string around.\n\nThe old route was roughly:\n\n -transport code (socket.c, fd.c, etc):\n if (SOCKET_ADDRESS_TYPE_INET)\n hostname = saddr->u.inet.host\n else\n hostname = NULL\n migration_channel_connect(..., hostname)\n s->hostname = hostname;\n migration_tls_client_create(..., hostname)\n if (migrate_tls_hostname())\n qio_channel_tls_new_client(migrate_tls_hostname())\n else\n qio_channel_tls_new_client(hostname)\n\n -postcopy_preempt_setup:\n postcopy_preempt_send_channel_new\n migration_tls_client_create(..., s->hostname)\n\nNew route is:\n\n -socket.c only:\n if SOCKET_ADDRESS_TYPE_INET\n s->hostname = saddr->u.inet.host\n migration_channel_connect()\n migration_tls_client_create()\n qio_channel_tls_new_client(migrate_tls_hostname())\n\n -postcopy_preempt_setup:\n postcopy_preempt_send_channel_new\n migration_tls_client_create()\n qio_channel_tls_new_client(migrate_tls_hostname())\n\nSigned-off-by: Fabiano Rosas <farosas@suse.de>\n---\n migration/channel.c | 6 ++----\n migration/channel.h | 1 -\n migration/exec.c | 2 +-\n migration/fd.c | 2 +-\n migration/file.c | 2 +-\n migration/multifd.c | 9 +++------\n migration/options.c | 5 +++++\n migration/postcopy-ram.c | 2 +-\n migration/socket.c | 9 +++------\n migration/tls.c | 17 ++++-------------\n migration/tls.h | 2 --\n migration/trace-events | 10 +++++-----\n 12 files changed, 26 insertions(+), 41 deletions(-)", "diff": "diff --git a/migration/channel.c b/migration/channel.c\nindex b4ab676048..ba14f66d85 100644\n--- a/migration/channel.c\n+++ b/migration/channel.c\n@@ -60,20 +60,18 @@ void migration_channel_process_incoming(QIOChannel *ioc)\n *\n * @s: Current migration state\n * @ioc: Channel to which we are connecting\n- * @hostname: Where we want to connect\n * @error: Error indicating failure to connect, free'd here\n */\n void migration_channel_connect(MigrationState *s,\n QIOChannel *ioc,\n- const char *hostname,\n Error *error)\n {\n trace_migration_set_outgoing_channel(\n- ioc, object_get_typename(OBJECT(ioc)), hostname, error);\n+ ioc, object_get_typename(OBJECT(ioc)), error);\n \n if (!error) {\n if (migrate_channel_requires_tls_upgrade(ioc)) {\n- migration_tls_channel_connect(s, ioc, hostname, &error);\n+ migration_tls_channel_connect(s, ioc, &error);\n \n if (!error) {\n /* tls_channel_connect will call back to this\ndiff --git a/migration/channel.h b/migration/channel.h\nindex 5bdb8208a7..2215091323 100644\n--- a/migration/channel.h\n+++ b/migration/channel.h\n@@ -22,7 +22,6 @@ void migration_channel_process_incoming(QIOChannel *ioc);\n \n void migration_channel_connect(MigrationState *s,\n QIOChannel *ioc,\n- const char *hostname,\n Error *error_in);\n \n int migration_channel_read_peek(QIOChannel *ioc,\ndiff --git a/migration/exec.c b/migration/exec.c\nindex 20e6cccf8c..78fe0fff13 100644\n--- a/migration/exec.c\n+++ b/migration/exec.c\n@@ -55,7 +55,7 @@ void exec_start_outgoing_migration(MigrationState *s, strList *command,\n }\n \n qio_channel_set_name(ioc, \"migration-exec-outgoing\");\n- migration_channel_connect(s, ioc, NULL, NULL);\n+ migration_channel_connect(s, ioc, NULL);\n object_unref(OBJECT(ioc));\n }\n \ndiff --git a/migration/fd.c b/migration/fd.c\nindex 9bf9be6acb..c956b260a4 100644\n--- a/migration/fd.c\n+++ b/migration/fd.c\n@@ -70,7 +70,7 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **\n }\n \n qio_channel_set_name(ioc, \"migration-fd-outgoing\");\n- migration_channel_connect(s, ioc, NULL, NULL);\n+ migration_channel_connect(s, ioc, NULL);\n object_unref(OBJECT(ioc));\n }\n \ndiff --git a/migration/file.c b/migration/file.c\nindex bb8031e3c7..c490f2b219 100644\n--- a/migration/file.c\n+++ b/migration/file.c\n@@ -122,7 +122,7 @@ void file_start_outgoing_migration(MigrationState *s,\n return;\n }\n qio_channel_set_name(ioc, \"migration-file-outgoing\");\n- migration_channel_connect(s, ioc, NULL, NULL);\n+ migration_channel_connect(s, ioc, NULL);\n }\n \n static gboolean file_accept_incoming_migration(QIOChannel *ioc,\ndiff --git a/migration/multifd.c b/migration/multifd.c\nindex bf6da85af8..3fb1a07ba9 100644\n--- a/migration/multifd.c\n+++ b/migration/multifd.c\n@@ -814,12 +814,10 @@ static bool multifd_tls_channel_connect(MultiFDSendParams *p,\n QIOChannel *ioc,\n Error **errp)\n {\n- MigrationState *s = migrate_get_current();\n- const char *hostname = s->hostname;\n MultiFDTLSThreadArgs *args;\n QIOChannelTLS *tioc;\n \n- tioc = migration_tls_client_create(ioc, hostname, errp);\n+ tioc = migration_tls_client_create(ioc, errp);\n if (!tioc) {\n return false;\n }\n@@ -829,7 +827,7 @@ static bool multifd_tls_channel_connect(MultiFDSendParams *p,\n * created TLS channel, which has already taken a reference.\n */\n object_unref(OBJECT(ioc));\n- trace_multifd_tls_outgoing_handshake_start(ioc, tioc, hostname);\n+ trace_multifd_tls_outgoing_handshake_start(ioc, tioc);\n qio_channel_set_name(QIO_CHANNEL(tioc), \"multifd-tls-outgoing\");\n \n args = g_new0(MultiFDTLSThreadArgs, 1);\n@@ -876,8 +874,7 @@ static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)\n goto out;\n }\n \n- trace_multifd_set_outgoing_channel(ioc, object_get_typename(OBJECT(ioc)),\n- migrate_get_current()->hostname);\n+ trace_multifd_set_outgoing_channel(ioc, object_get_typename(OBJECT(ioc)));\n \n if (migrate_channel_requires_tls_upgrade(ioc)) {\n ret = multifd_tls_channel_connect(p, ioc, &local_err);\ndiff --git a/migration/options.c b/migration/options.c\nindex 9a5a39c886..881034c289 100644\n--- a/migration/options.c\n+++ b/migration/options.c\n@@ -956,6 +956,11 @@ const char *migrate_tls_hostname(void)\n return s->parameters.tls_hostname->u.s;\n }\n \n+ /* hostname saved from a previously connected channel */\n+ if (s->hostname) {\n+ return s->hostname;\n+ }\n+\n return NULL;\n }\n \ndiff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c\nindex 3623ab9dab..03cb0d8d65 100644\n--- a/migration/postcopy-ram.c\n+++ b/migration/postcopy-ram.c\n@@ -1966,7 +1966,7 @@ postcopy_preempt_send_channel_new(QIOTask *task, gpointer opaque)\n }\n \n if (migrate_channel_requires_tls_upgrade(ioc)) {\n- tioc = migration_tls_client_create(ioc, s->hostname, &local_err);\n+ tioc = migration_tls_client_create(ioc, &local_err);\n if (!tioc) {\n goto out;\n }\ndiff --git a/migration/socket.c b/migration/socket.c\nindex 9e379bf56f..426f363b99 100644\n--- a/migration/socket.c\n+++ b/migration/socket.c\n@@ -44,7 +44,6 @@ void socket_send_channel_create(QIOTaskFunc f, void *data)\n \n struct SocketConnectData {\n MigrationState *s;\n- char *hostname;\n };\n \n static void socket_connect_data_free(void *opaque)\n@@ -53,7 +52,6 @@ static void socket_connect_data_free(void *opaque)\n if (!data) {\n return;\n }\n- g_free(data->hostname);\n g_free(data);\n }\n \n@@ -69,7 +67,7 @@ static void socket_outgoing_migration(QIOTask *task,\n goto out;\n }\n \n- trace_migration_socket_outgoing_connected(data->hostname);\n+ trace_migration_socket_outgoing_connected();\n \n if (migrate_zero_copy_send() &&\n !qio_channel_has_feature(sioc, QIO_CHANNEL_FEATURE_WRITE_ZERO_COPY)) {\n@@ -77,7 +75,7 @@ static void socket_outgoing_migration(QIOTask *task,\n }\n \n out:\n- migration_channel_connect(data->s, sioc, data->hostname, err);\n+ migration_channel_connect(data->s, sioc, err);\n object_unref(OBJECT(sioc));\n }\n \n@@ -96,7 +94,7 @@ void socket_start_outgoing_migration(MigrationState *s,\n outgoing_args.saddr = addr;\n \n if (saddr->type == SOCKET_ADDRESS_TYPE_INET) {\n- data->hostname = g_strdup(saddr->u.inet.host);\n+ s->hostname = g_strdup(saddr->u.inet.host);\n }\n \n qio_channel_set_name(QIO_CHANNEL(sioc), \"migration-socket-outgoing\");\n@@ -180,4 +178,3 @@ void socket_start_incoming_migration(SocketAddress *saddr,\n qapi_free_SocketAddress(address);\n }\n }\n-\ndiff --git a/migration/tls.c b/migration/tls.c\nindex 1df31bdcbb..82f58cbc78 100644\n--- a/migration/tls.c\n+++ b/migration/tls.c\n@@ -112,12 +112,11 @@ static void migration_tls_outgoing_handshake(QIOTask *task,\n } else {\n trace_migration_tls_outgoing_handshake_complete();\n }\n- migration_channel_connect(s, ioc, NULL, err);\n+ migration_channel_connect(s, ioc, err);\n object_unref(OBJECT(ioc));\n }\n \n QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,\n- const char *hostname,\n Error **errp)\n {\n QCryptoTLSCreds *creds;\n@@ -127,29 +126,21 @@ QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,\n return NULL;\n }\n \n- const char *tls_hostname = migrate_tls_hostname();\n- if (tls_hostname) {\n- hostname = tls_hostname;\n- }\n-\n- return qio_channel_tls_new_client(ioc, creds, hostname, errp);\n+ return qio_channel_tls_new_client(ioc, creds, migrate_tls_hostname(), errp);\n }\n \n void migration_tls_channel_connect(MigrationState *s,\n QIOChannel *ioc,\n- const char *hostname,\n Error **errp)\n {\n QIOChannelTLS *tioc;\n \n- tioc = migration_tls_client_create(ioc, hostname, errp);\n+ tioc = migration_tls_client_create(ioc, errp);\n if (!tioc) {\n return;\n }\n \n- /* Save hostname into MigrationState for handshake */\n- s->hostname = g_strdup(hostname);\n- trace_migration_tls_outgoing_handshake_start(hostname);\n+ trace_migration_tls_outgoing_handshake_start();\n qio_channel_set_name(QIO_CHANNEL(tioc), \"migration-tls-outgoing\");\n \n if (migrate_postcopy_ram() || migrate_return_path()) {\ndiff --git a/migration/tls.h b/migration/tls.h\nindex 7607cfe803..7cd9c76013 100644\n--- a/migration/tls.h\n+++ b/migration/tls.h\n@@ -27,12 +27,10 @@\n void migration_tls_channel_process_incoming(QIOChannel *ioc, Error **errp);\n \n QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,\n- const char *hostname,\n Error **errp);\n \n void migration_tls_channel_connect(MigrationState *s,\n QIOChannel *ioc,\n- const char *hostname,\n Error **errp);\n void migration_tls_channel_end(QIOChannel *ioc, Error **errp);\n /* Whether the QIO channel requires further TLS handshake? */\ndiff --git a/migration/trace-events b/migration/trace-events\nindex bf11b62b17..da8f909cac 100644\n--- a/migration/trace-events\n+++ b/migration/trace-events\n@@ -149,10 +149,10 @@ multifd_send_sync_main_wait(uint8_t id) \"channel %u\"\n multifd_send_terminate_threads(void) \"\"\n multifd_send_thread_end(uint8_t id, uint64_t packets) \"channel %u packets %\" PRIu64\n multifd_send_thread_start(uint8_t id) \"%u\"\n-multifd_tls_outgoing_handshake_start(void *ioc, void *tioc, const char *hostname) \"ioc=%p tioc=%p hostname=%s\"\n+multifd_tls_outgoing_handshake_start(void *ioc, void *tioc) \"ioc=%p tioc=%p\"\n multifd_tls_outgoing_handshake_error(void *ioc, const char *err) \"ioc=%p err=%s\"\n multifd_tls_outgoing_handshake_complete(void *ioc) \"ioc=%p\"\n-multifd_set_outgoing_channel(void *ioc, const char *ioctype, const char *hostname) \"ioc=%p ioctype=%s hostname=%s\"\n+multifd_set_outgoing_channel(void *ioc, const char *ioctype) \"ioc=%p ioctype=%s\"\n \n # migration.c\n migrate_set_state(const char *new_state) \"new state %s\"\n@@ -204,7 +204,7 @@ migration_transferred_bytes(uint64_t qemu_file, uint64_t multifd, uint64_t rdma)\n \n # channel.c\n migration_set_incoming_channel(void *ioc, const char *ioctype) \"ioc=%p ioctype=%s\"\n-migration_set_outgoing_channel(void *ioc, const char *ioctype, const char *hostname, void *err) \"ioc=%p ioctype=%s hostname=%s err=%p\"\n+migration_set_outgoing_channel(void *ioc, const char *ioctype, void *err) \"ioc=%p ioctype=%s err=%p\"\n \n # global_state.c\n migrate_state_too_big(void) \"\"\n@@ -328,11 +328,11 @@ migration_file_incoming(const char *filename) \"filename=%s\"\n \n # socket.c\n migration_socket_incoming_accepted(void) \"\"\n-migration_socket_outgoing_connected(const char *hostname) \"hostname=%s\"\n+migration_socket_outgoing_connected(void) \"\"\n migration_socket_outgoing_error(const char *err) \"error=%s\"\n \n # tls.c\n-migration_tls_outgoing_handshake_start(const char *hostname) \"hostname=%s\"\n+migration_tls_outgoing_handshake_start(void) \"\"\n migration_tls_outgoing_handshake_error(const char *err) \"err=%s\"\n migration_tls_outgoing_handshake_complete(void) \"\"\n migration_tls_incoming_handshake_start(void) \"\"\n", "prefixes": [ "RFC", "05/25" ] }