[{"id":3629515,"web_url":"http://patchwork.ozlabs.org/comment/3629515/","msgid":"<aVLYQGQo2gSRs7Xm@x1.local>","list_archive_url":null,"date":"2025-12-29T19:36:32","subject":"Re: [RFC PATCH 14/25] migration: Remove QEMUFile from channel.c","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Fri, Dec 26, 2025 at 06:19:16PM -0300, Fabiano Rosas wrote:\n> Make channel.c deal only with QIOChannel objects. Move any handling of\n> QEMUFile into migration.c. To achieve this in a clean way:\n> \n> 1) Define a migration_outgoing_setup, analogous to\n> migration_incoming_setup, responsible for creating the QEMUFile from\n> the QIOChannel.\n> \n> 2) Increase the scope of migration_incoming_setup to create not only\n> the main channel, but all the others as well. That is currently being\n> done at migration_ioc_process, so move the code.\n> \n> 3) Adjust RDMA code to pass in the QIOChannel and remove some of the\n> usage of QEMUFile.\n> \n> Signed-off-by: Fabiano Rosas <farosas@suse.de>\n> ---\n>  migration/channel.c   | 21 ++++++-----\n>  migration/migration.c | 88 ++++++++++++++++++++++---------------------\n>  migration/migration.h |  6 ++-\n>  migration/multifd.c   |  7 ++--\n>  migration/multifd.h   |  2 +-\n>  migration/rdma.c      | 28 ++++----------\n>  6 files changed, 73 insertions(+), 79 deletions(-)\n> \n> diff --git a/migration/channel.c b/migration/channel.c\n> index 7243b99108..af6c2cc76e 100644\n> --- a/migration/channel.c\n> +++ b/migration/channel.c\n> @@ -14,7 +14,6 @@\n>  #include \"channel.h\"\n>  #include \"tls.h\"\n>  #include \"migration.h\"\n> -#include \"qemu-file.h\"\n>  #include \"trace.h\"\n>  #include \"qapi/error.h\"\n>  #include \"io/channel-tls.h\"\n> @@ -34,6 +33,7 @@ void migration_channel_process_incoming(QIOChannel *ioc)\n>  {\n>      MigrationIncomingState *mis = migration_incoming_get_current();\n>      Error *local_err = NULL;\n> +    uint8_t ch;\n>  \n>      trace_migration_set_incoming_channel(\n>          ioc, object_get_typename(OBJECT(ioc)));\n> @@ -42,9 +42,16 @@ void migration_channel_process_incoming(QIOChannel *ioc)\n>          migration_tls_channel_process_incoming(ioc, &local_err);\n>      } else {\n>          migration_ioc_register_yank(ioc);\n> -        migration_ioc_process_incoming(ioc, &local_err);\n> -    }\n> +        ch = migration_ioc_process_incoming(ioc, &local_err);\n> +        if (!ch) {\n> +            goto out;\n> +        }\n>  \n> +        if (migration_incoming_setup(ioc, ch, &local_err)) {\n> +            migration_incoming_process();\n> +        }\n> +    }\n> +out:\n>      if (local_err) {\n>          error_report_err(local_err);\n>          migrate_set_state(&mis->state, mis->state, MIGRATION_STATUS_FAILED);\n> @@ -75,14 +82,8 @@ void migration_channel_connect(MigrationState *s, QIOChannel *ioc)\n>          return;\n>      }\n>  \n> -    QEMUFile *f = qemu_file_new_output(ioc);\n> -\n>      migration_ioc_register_yank(ioc);\n> -\n> -    qemu_mutex_lock(&s->qemu_file_lock);\n> -    s->to_dst_file = f;\n> -    qemu_mutex_unlock(&s->qemu_file_lock);\n> -\n> +    migration_outgoing_setup(ioc);\n>      migration_connect(s);\n>  }\n>  \n> diff --git a/migration/migration.c b/migration/migration.c\n> index 5c6c76f110..677581b5a5 100644\n> --- a/migration/migration.c\n> +++ b/migration/migration.c\n> @@ -92,7 +92,7 @@ enum mig_rp_message_type {\n>  };\n>  \n>  /* Migration channel types */\n> -enum { CH_MAIN, CH_MULTIFD, CH_POSTCOPY };\n> +enum { CH_NONE, CH_MAIN, CH_MULTIFD, CH_POSTCOPY };\n>  \n>  /* When we add fault tolerance, we could have several\n>     migrations at once.  For now we don't need to add\n> @@ -934,17 +934,48 @@ out:\n>      migrate_incoming_unref_outgoing_state();\n>  }\n>  \n> -/**\n> - * migration_incoming_setup: Setup incoming migration\n> - * @f: file for main migration channel\n> - */\n> -static void migration_incoming_setup(QEMUFile *f)\n> +static bool migration_has_main_and_multifd_channels(void);\n> +\n> +bool migration_incoming_setup(QIOChannel *ioc, uint8_t channel, Error **errp)\n>  {\n>      MigrationIncomingState *mis = migration_incoming_get_current();\n> +    QEMUFile *f;\n>  \n> -    assert(!mis->from_src_file);\n> -    mis->from_src_file = f;\n> -    qemu_file_set_blocking(f, false, &error_abort);\n> +    switch (channel) {\n> +    case CH_MAIN:\n> +        f = qemu_file_new_input(ioc);\n> +        assert(!mis->from_src_file);\n> +        mis->from_src_file = f;\n> +        qemu_file_set_blocking(f, false, &error_abort);\n> +        break;\n> +\n> +    case CH_MULTIFD:\n> +        if (!multifd_recv_new_channel(ioc, errp)) {\n> +            return false;\n> +        }\n> +        break;\n> +\n> +    case CH_POSTCOPY:\n> +        assert(!mis->postcopy_qemufile_dst);\n> +        f = qemu_file_new_input(ioc);\n> +        postcopy_preempt_new_channel(mis, f);\n> +        return false;\n> +\n> +    default:\n> +        g_assert_not_reached();\n> +    }\n> +\n> +    return migration_has_main_and_multifd_channels();\n> +}\n> +\n> +void migration_outgoing_setup(QIOChannel *ioc)\n> +{\n> +    MigrationState *s = migrate_get_current();\n> +    QEMUFile *f = qemu_file_new_output(ioc);\n> +\n> +    qemu_mutex_lock(&s->qemu_file_lock);\n> +    s->to_dst_file = f;\n> +    qemu_mutex_unlock(&s->qemu_file_lock);\n>  }\n>  \n>  /* Returns true if recovered from a paused migration, otherwise false */\n> @@ -990,12 +1021,6 @@ void migration_incoming_process(void)\n>      qemu_coroutine_enter(co);\n>  }\n>  \n> -void migration_fd_process_incoming(QEMUFile *f)\n> -{\n> -    migration_incoming_setup(f);\n> -    migration_incoming_process();\n> -}\n> -\n>  static bool migration_has_main_and_multifd_channels(void)\n>  {\n>      MigrationIncomingState *mis = migration_incoming_get_current();\n> @@ -1012,12 +1037,10 @@ static bool migration_has_main_and_multifd_channels(void)\n>      return true;\n>  }\n>  \n> -void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n> +uint8_t migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>  {\n>      MigrationIncomingState *mis = migration_incoming_get_current();\n> -    Error *local_err = NULL;\n> -    QEMUFile *f;\n> -    uint8_t channel;\n> +    uint8_t channel = CH_NONE;\n>      uint32_t channel_magic = 0;\n>      int ret = 0;\n>  \n> @@ -1036,7 +1059,7 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>              ret = migration_channel_read_peek(ioc, (void *)&channel_magic,\n>                                                sizeof(channel_magic), errp);\n>              if (ret != 0) {\n> -                return;\n> +                goto out;\n>              }\n>  \n>              channel_magic = be32_to_cpu(channel_magic);\n> @@ -1051,7 +1074,6 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>                  channel = CH_MAIN;\n>              } else {\n>                  error_setg(errp, \"unknown channel magic: %u\", channel_magic);\n> -                return;\n>              }\n>          } else if (mis->from_src_file && migrate_multifd()) {\n>              /*\n> @@ -1063,33 +1085,13 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>              channel = CH_MAIN;\n>          } else {\n>              error_setg(errp, \"non-peekable channel used without multifd\");\n> -            return;\n>          }\n>      } else {\n>          assert(migrate_postcopy_preempt());\n>          channel = CH_POSTCOPY;\n>      }\n> -\n> -    if (channel == CH_MAIN) {\n> -        f = qemu_file_new_input(ioc);\n> -        migration_incoming_setup(f);\n> -    } else if (channel == CH_MULTIFD) {\n> -        /* Multiple connections */\n> -        multifd_recv_new_channel(ioc, &local_err);\n> -        if (local_err) {\n> -            error_propagate(errp, local_err);\n> -            return;\n> -        }\n> -    } else if (channel == CH_POSTCOPY) {\n> -        assert(!mis->postcopy_qemufile_dst);\n> -        f = qemu_file_new_input(ioc);\n> -        postcopy_preempt_new_channel(mis, f);\n> -        return;\n> -    }\n> -\n> -    if (migration_has_main_and_multifd_channels()) {\n> -        migration_incoming_process();\n> -    }\n> +out:\n> +    return channel;\n>  }\n>  \n>  /**\n> diff --git a/migration/migration.h b/migration/migration.h\n> index f340cd518d..d2b82cf54f 100644\n> --- a/migration/migration.h\n> +++ b/migration/migration.h\n> @@ -526,8 +526,10 @@ struct MigrationState {\n>  void migrate_set_state(MigrationStatus *state, MigrationStatus old_state,\n>                         MigrationStatus new_state);\n>  \n> -void migration_fd_process_incoming(QEMUFile *f);\n> -void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp);\n> +void migration_outgoing_setup(QIOChannel *ioc);\n> +bool migration_incoming_setup(QIOChannel *ioc, uint8_t channel, Error **errp);\n> +\n> +uint8_t migration_ioc_process_incoming(QIOChannel *ioc, Error **errp);\n>  void migration_incoming_process(void);\n>  \n>  bool  migration_has_all_channels(void);\n> diff --git a/migration/multifd.c b/migration/multifd.c\n> index 3fb1a07ba9..c6639dbab5 100644\n> --- a/migration/multifd.c\n> +++ b/migration/multifd.c\n> @@ -1521,7 +1521,7 @@ bool multifd_recv_all_channels_created(void)\n>   * Try to receive all multifd channels to get ready for the migration.\n>   * Sets @errp when failing to receive the current channel.\n>   */\n> -void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n> +bool multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>  {\n>      MultiFDRecvParams *p;\n>      Error *local_err = NULL;\n> @@ -1536,7 +1536,7 @@ void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>                                      \"failed to receive packet\"\n>                                      \" via multifd channel %d: \",\n>                                      qatomic_read(&multifd_recv_state->count));\n> -            return;\n> +            return false;\n>          }\n>          trace_multifd_recv_new_channel(id);\n>      } else {\n> @@ -1549,7 +1549,7 @@ void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>                     id);\n>          multifd_recv_terminate_threads(error_copy(local_err));\n>          error_propagate(errp, local_err);\n> -        return;\n> +        return false;\n>      }\n>      p->c = ioc;\n>      object_ref(OBJECT(ioc));\n> @@ -1558,4 +1558,5 @@ void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>      qemu_thread_create(&p->thread, p->name, multifd_recv_thread, p,\n>                         QEMU_THREAD_JOINABLE);\n>      qatomic_inc(&multifd_recv_state->count);\n> +    return true;\n>  }\n> diff --git a/migration/multifd.h b/migration/multifd.h\n> index 9b6d81e7ed..89a395aef2 100644\n> --- a/migration/multifd.h\n> +++ b/migration/multifd.h\n> @@ -42,7 +42,7 @@ int multifd_recv_setup(Error **errp);\n>  void multifd_recv_cleanup(void);\n>  void multifd_recv_shutdown(void);\n>  bool multifd_recv_all_channels_created(void);\n> -void multifd_recv_new_channel(QIOChannel *ioc, Error **errp);\n> +bool multifd_recv_new_channel(QIOChannel *ioc, Error **errp);\n>  void multifd_recv_sync_main(void);\n>  int multifd_send_sync_main(MultiFDSyncReq req);\n>  bool multifd_queue_page(RAMBlock *block, ram_addr_t offset);\n> diff --git a/migration/rdma.c b/migration/rdma.c\n> index 596a1aba0b..7bee871e2b 100644\n> --- a/migration/rdma.c\n> +++ b/migration/rdma.c\n> @@ -384,7 +384,6 @@ struct QIOChannelRDMA {\n>      QIOChannel parent;\n>      RDMAContext *rdmain;\n>      RDMAContext *rdmaout;\n> -    QEMUFile *file;\n>      bool blocking; /* XXX we don't actually honour this yet */\n>  };\n>  \n> @@ -3836,32 +3835,20 @@ static void qio_channel_rdma_register_types(void)\n>  \n>  type_init(qio_channel_rdma_register_types);\n>  \n> -static QEMUFile *rdma_new_input(RDMAContext *rdma)\n> +static QIOChannel *rdma_new_ioc(RDMAContext *rdma)\n>  {\n>      QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(object_new(TYPE_QIO_CHANNEL_RDMA));\n>  \n> -    rioc->file = qemu_file_new_input(QIO_CHANNEL(rioc));\n> -    rioc->rdmain = rdma;\n> -    rioc->rdmaout = rdma->return_path;\n> -\n> -    return rioc->file;\n> -}\n> -\n> -static QEMUFile *rdma_new_output(RDMAContext *rdma)\n> -{\n> -    QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(object_new(TYPE_QIO_CHANNEL_RDMA));\n> -\n> -    rioc->file = qemu_file_new_output(QIO_CHANNEL(rioc));\n>      rioc->rdmaout = rdma;\n>      rioc->rdmain = rdma->return_path;\n\nLikely it was overlooked rdmaout/rdmain was set in reverse order in these\ntwo functions.  I gave it a quick run on rdma and it was indeed broken\nstarting from this patch.\n\nThe goal of the change looks reasonable in general otherwise, said that,\nmaybe there's way to split the patch somehow?\n\n>  \n> -    return rioc->file;\n> +    return QIO_CHANNEL(rioc);\n>  }\n>  \n>  static void rdma_accept_incoming_migration(void *opaque)\n>  {\n>      RDMAContext *rdma = opaque;\n> -    QEMUFile *f;\n> +    QIOChannel *ioc;\n>  \n>      trace_qemu_rdma_accept_incoming_migration();\n>      if (qemu_rdma_accept(rdma) < 0) {\n> @@ -3875,15 +3862,16 @@ static void rdma_accept_incoming_migration(void *opaque)\n>          return;\n>      }\n>  \n> -    f = rdma_new_input(rdma);\n> -    if (f == NULL) {\n> +    ioc = rdma_new_ioc(rdma);\n> +    if (!ioc) {\n>          error_report(\"RDMA ERROR: could not open RDMA for input\");\n>          qemu_rdma_cleanup(rdma);\n>          return;\n>      }\n>  \n>      rdma->migration_started_on_destination = 1;\n> -    migration_fd_process_incoming(f);\n> +    migration_incoming_setup(ioc, 0, NULL);\n> +    migration_incoming_process();\n>  }\n>  \n>  void rdma_start_incoming_migration(InetSocketAddress *host_port,\n> @@ -3995,8 +3983,8 @@ void rdma_start_outgoing_migration(void *opaque,\n>  \n>      trace_rdma_start_outgoing_migration_after_rdma_connect();\n>  \n> -    s->to_dst_file = rdma_new_output(rdma);\n>      s->rdma_migration = true;\n> +    migration_outgoing_setup(rdma_new_ioc(rdma));\n>      migration_connect(s);\n>      return;\n>  return_path_err:\n> -- \n> 2.51.0\n>","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=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=UvTLU3fW;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=su5NAwaZ;\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)"],"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 4dg61R4q9Hz1xpZ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 30 Dec 2025 06:37: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 1vaJ3D-0002Jf-2m; Mon, 29 Dec 2025 14:37:07 -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 <peterx@redhat.com>) id 1vaJ2t-0001zS-Vj\n for qemu-devel@nongnu.org; Mon, 29 Dec 2025 14:36:53 -0500","from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <peterx@redhat.com>) id 1vaJ2n-0008Ps-Vj\n for qemu-devel@nongnu.org; Mon, 29 Dec 2025 14:36:46 -0500","from mail-qv1-f71.google.com (mail-qv1-f71.google.com\n [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-328-6DF2boGsNyWLME0prV0etw-1; Mon, 29 Dec 2025 14:36:38 -0500","by mail-qv1-f71.google.com with SMTP id\n 6a1803df08f44-88a39993e5fso241113766d6.3\n for <qemu-devel@nongnu.org>; Mon, 29 Dec 2025 11:36:38 -0800 (PST)","from x1.local ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-88d9a44fe52sm232667306d6.45.2025.12.29.11.36.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 29 Dec 2025 11:36:33 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1767037000;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=UcjaE1We6/D6i3bWdqH0Bn2loG4hR3iqGdbVqVDOZu8=;\n b=UvTLU3fWEMlKYvDIUEi6xeQsFrxA8TIzHblH0fvJDGfmjDUNJBOmVoUJTYC5F/e6/vgaGA\n YC7e0LTefX4SSaIFtS7CgBRlEtuVkKSR7btiwoeYRNjaFxpNyjExdO7IcUytSBzX0BnIcq\n JhI3M8koKJrvPTmmyjo67v109jiwq94=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1767036998; x=1767641798; darn=nongnu.org;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;\n bh=UcjaE1We6/D6i3bWdqH0Bn2loG4hR3iqGdbVqVDOZu8=;\n b=su5NAwaZSfUDUBc5DjOc6ZElD31RclVElzyEPDvu8bJgk3kwOEKjqe7hZHFwwgeEr9\n qqKk5VmMQOcz5s5jkVGdXMz+AAu9Q/v/14qHWssCQMtzAfszbaAE/A3tq72NTwFcLIBg\n BFBJXuoSNI5RJCoe1pYI9w2zUGfsiR7DSfGWkwJ2b0rdzUm8jEdHgCQkBcaeYeMaUaA/\n iKbRHEGpHS7avQRKq2XUqH6P3rzufcdm3eZxTL4HeC+OyrHj1qhyti/O+jaExbvSm/V3\n s+dvVECJEVYA8DJBaQ4IP03mw9KR43ivL8qJt+dz+AwG+v/pE/jNdeDXloZb2nhfexga\n KswA=="],"X-MC-Unique":"6DF2boGsNyWLME0prV0etw-1","X-Mimecast-MFC-AGG-ID":"6DF2boGsNyWLME0prV0etw_1767036998","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1767036998; x=1767641798;\n h=in-reply-to:content-disposition:mime-version:references:message-id\n :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=UcjaE1We6/D6i3bWdqH0Bn2loG4hR3iqGdbVqVDOZu8=;\n b=sjSyBr/HRgciIuYRGEGmicOapxkbBRvptGT24P0W3IxAXhHn+ZWWHU6LceUFPpi0hZ\n fMxjMi0vg9CkdexvA+6PdWwDd8iWfmB32bDolK5HHfCchLy2jo4iLjSyiQZoAWFWnnN5\n noyi4EDCCyG8FX0Kx6Q876IU5WUJJt/4cwtDTH4Fad2xU4hIZXp2WY02sPgjnmazoOoD\n /3XiS8ecTgC+nmL8W0nSxIjDbDIxR05SPxyulz0dSWBgnZGxLkWKxUneqGy4CrG0svTx\n kYS+G+xEftKAtYCccJ7wfCdt9Z/i2+zn2qUGeRI5kpOWMYMiqa6q/cBfzfKvXmHDCblr\n iD1Q==","X-Gm-Message-State":"AOJu0YxiTvPC8ey1TTGmhoqIdP0kEqOkg+QYONdegF28bSqePPRcqovI\n g4mcI+w8oOe8YXbb+EJVQq7NNngPJ1//25qyhiH4O+zmb1slGwrv/CU1rpropNwU+jhXLfLvJcT\n VbuO5wZfI//R011zcc3B++1xfv+gA/217MS72nxr3rypNbasDy7seQFBiJdDOl6/u","X-Gm-Gg":"AY/fxX4l492POWHzVFHRMORGFtvSm73Wn6BHxZqyzXGuCaTPxhZ0UdFt2UMmxExWKcQ\n UoWVGhvs9jXh7DJf6GNCo6yVX2k5eDyB/yYy4P0Q+uqvcctPjqum7CXWULy8f+hIx9ZjikZ7kaf\n xqBNVFlCk89501BegKowoTqVbHMli00TZ+MLvunSJsiaTWQKp1J/gaz6N2e1RndMp21wa9dL8d8\n 18tM2oUSqqNZBGXHYO5e40WZsEmXFddAjnuK2jH3sZAxHAPECtrB0E4U6TZDqkyVTRttlP27E5l\n HVqAXYP5u3CIT818WcfiCmKof09pjECWVnM6MaGd6iLhs1xD0z62fhBkzNlsqoG8rDcNjhKMuA3\n OFv0=","X-Received":["by 2002:a05:6214:e48:b0:88a:4391:59cc with SMTP id\n 6a1803df08f44-88d868698f2mr498979546d6.50.1767036994100;\n Mon, 29 Dec 2025 11:36:34 -0800 (PST)","by 2002:a05:6214:e48:b0:88a:4391:59cc with SMTP id\n 6a1803df08f44-88d868698f2mr498979246d6.50.1767036993548;\n Mon, 29 Dec 2025 11:36:33 -0800 (PST)"],"X-Google-Smtp-Source":"\n AGHT+IHyil408Lq+ZL8Z7DNlWY2vHGEiQROygBVecRabiNBy4/qyau/z0ipcTe8TaI5uR1961zrR+g==","Date":"Mon, 29 Dec 2025 14:36:32 -0500","From":"Peter Xu <peterx@redhat.com>","To":"Fabiano Rosas <farosas@suse.de>","Cc":"qemu-devel@nongnu.org, Li Zhijian <lizhijian@fujitsu.com>","Subject":"Re: [RFC PATCH 14/25] migration: Remove QEMUFile from channel.c","Message-ID":"<aVLYQGQo2gSRs7Xm@x1.local>","References":"<20251226211930.27565-1-farosas@suse.de>\n <20251226211930.27565-15-farosas@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20251226211930.27565-15-farosas@suse.de>","Received-SPF":"pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","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, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-0.001, 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"}},{"id":3629522,"web_url":"http://patchwork.ozlabs.org/comment/3629522/","msgid":"<87a4z183sh.fsf@suse.de>","list_archive_url":null,"date":"2025-12-29T19:51:42","subject":"Re: [RFC PATCH 14/25] migration: Remove QEMUFile from channel.c","submitter":{"id":85343,"url":"http://patchwork.ozlabs.org/api/people/85343/","name":"Fabiano Rosas","email":"farosas@suse.de"},"content":"Peter Xu <peterx@redhat.com> writes:\n\n> On Fri, Dec 26, 2025 at 06:19:16PM -0300, Fabiano Rosas wrote:\n>> Make channel.c deal only with QIOChannel objects. Move any handling of\n>> QEMUFile into migration.c. To achieve this in a clean way:\n>> \n>> 1) Define a migration_outgoing_setup, analogous to\n>> migration_incoming_setup, responsible for creating the QEMUFile from\n>> the QIOChannel.\n>> \n>> 2) Increase the scope of migration_incoming_setup to create not only\n>> the main channel, but all the others as well. That is currently being\n>> done at migration_ioc_process, so move the code.\n>> \n>> 3) Adjust RDMA code to pass in the QIOChannel and remove some of the\n>> usage of QEMUFile.\n>> \n>> Signed-off-by: Fabiano Rosas <farosas@suse.de>\n>> ---\n>>  migration/channel.c   | 21 ++++++-----\n>>  migration/migration.c | 88 ++++++++++++++++++++++---------------------\n>>  migration/migration.h |  6 ++-\n>>  migration/multifd.c   |  7 ++--\n>>  migration/multifd.h   |  2 +-\n>>  migration/rdma.c      | 28 ++++----------\n>>  6 files changed, 73 insertions(+), 79 deletions(-)\n>> \n>> diff --git a/migration/channel.c b/migration/channel.c\n>> index 7243b99108..af6c2cc76e 100644\n>> --- a/migration/channel.c\n>> +++ b/migration/channel.c\n>> @@ -14,7 +14,6 @@\n>>  #include \"channel.h\"\n>>  #include \"tls.h\"\n>>  #include \"migration.h\"\n>> -#include \"qemu-file.h\"\n>>  #include \"trace.h\"\n>>  #include \"qapi/error.h\"\n>>  #include \"io/channel-tls.h\"\n>> @@ -34,6 +33,7 @@ void migration_channel_process_incoming(QIOChannel *ioc)\n>>  {\n>>      MigrationIncomingState *mis = migration_incoming_get_current();\n>>      Error *local_err = NULL;\n>> +    uint8_t ch;\n>>  \n>>      trace_migration_set_incoming_channel(\n>>          ioc, object_get_typename(OBJECT(ioc)));\n>> @@ -42,9 +42,16 @@ void migration_channel_process_incoming(QIOChannel *ioc)\n>>          migration_tls_channel_process_incoming(ioc, &local_err);\n>>      } else {\n>>          migration_ioc_register_yank(ioc);\n>> -        migration_ioc_process_incoming(ioc, &local_err);\n>> -    }\n>> +        ch = migration_ioc_process_incoming(ioc, &local_err);\n>> +        if (!ch) {\n>> +            goto out;\n>> +        }\n>>  \n>> +        if (migration_incoming_setup(ioc, ch, &local_err)) {\n>> +            migration_incoming_process();\n>> +        }\n>> +    }\n>> +out:\n>>      if (local_err) {\n>>          error_report_err(local_err);\n>>          migrate_set_state(&mis->state, mis->state, MIGRATION_STATUS_FAILED);\n>> @@ -75,14 +82,8 @@ void migration_channel_connect(MigrationState *s, QIOChannel *ioc)\n>>          return;\n>>      }\n>>  \n>> -    QEMUFile *f = qemu_file_new_output(ioc);\n>> -\n>>      migration_ioc_register_yank(ioc);\n>> -\n>> -    qemu_mutex_lock(&s->qemu_file_lock);\n>> -    s->to_dst_file = f;\n>> -    qemu_mutex_unlock(&s->qemu_file_lock);\n>> -\n>> +    migration_outgoing_setup(ioc);\n>>      migration_connect(s);\n>>  }\n>>  \n>> diff --git a/migration/migration.c b/migration/migration.c\n>> index 5c6c76f110..677581b5a5 100644\n>> --- a/migration/migration.c\n>> +++ b/migration/migration.c\n>> @@ -92,7 +92,7 @@ enum mig_rp_message_type {\n>>  };\n>>  \n>>  /* Migration channel types */\n>> -enum { CH_MAIN, CH_MULTIFD, CH_POSTCOPY };\n>> +enum { CH_NONE, CH_MAIN, CH_MULTIFD, CH_POSTCOPY };\n>>  \n>>  /* When we add fault tolerance, we could have several\n>>     migrations at once.  For now we don't need to add\n>> @@ -934,17 +934,48 @@ out:\n>>      migrate_incoming_unref_outgoing_state();\n>>  }\n>>  \n>> -/**\n>> - * migration_incoming_setup: Setup incoming migration\n>> - * @f: file for main migration channel\n>> - */\n>> -static void migration_incoming_setup(QEMUFile *f)\n>> +static bool migration_has_main_and_multifd_channels(void);\n>> +\n>> +bool migration_incoming_setup(QIOChannel *ioc, uint8_t channel, Error **errp)\n>>  {\n>>      MigrationIncomingState *mis = migration_incoming_get_current();\n>> +    QEMUFile *f;\n>>  \n>> -    assert(!mis->from_src_file);\n>> -    mis->from_src_file = f;\n>> -    qemu_file_set_blocking(f, false, &error_abort);\n>> +    switch (channel) {\n>> +    case CH_MAIN:\n>> +        f = qemu_file_new_input(ioc);\n>> +        assert(!mis->from_src_file);\n>> +        mis->from_src_file = f;\n>> +        qemu_file_set_blocking(f, false, &error_abort);\n>> +        break;\n>> +\n>> +    case CH_MULTIFD:\n>> +        if (!multifd_recv_new_channel(ioc, errp)) {\n>> +            return false;\n>> +        }\n>> +        break;\n>> +\n>> +    case CH_POSTCOPY:\n>> +        assert(!mis->postcopy_qemufile_dst);\n>> +        f = qemu_file_new_input(ioc);\n>> +        postcopy_preempt_new_channel(mis, f);\n>> +        return false;\n>> +\n>> +    default:\n>> +        g_assert_not_reached();\n>> +    }\n>> +\n>> +    return migration_has_main_and_multifd_channels();\n>> +}\n>> +\n>> +void migration_outgoing_setup(QIOChannel *ioc)\n>> +{\n>> +    MigrationState *s = migrate_get_current();\n>> +    QEMUFile *f = qemu_file_new_output(ioc);\n>> +\n>> +    qemu_mutex_lock(&s->qemu_file_lock);\n>> +    s->to_dst_file = f;\n>> +    qemu_mutex_unlock(&s->qemu_file_lock);\n>>  }\n>>  \n>>  /* Returns true if recovered from a paused migration, otherwise false */\n>> @@ -990,12 +1021,6 @@ void migration_incoming_process(void)\n>>      qemu_coroutine_enter(co);\n>>  }\n>>  \n>> -void migration_fd_process_incoming(QEMUFile *f)\n>> -{\n>> -    migration_incoming_setup(f);\n>> -    migration_incoming_process();\n>> -}\n>> -\n>>  static bool migration_has_main_and_multifd_channels(void)\n>>  {\n>>      MigrationIncomingState *mis = migration_incoming_get_current();\n>> @@ -1012,12 +1037,10 @@ static bool migration_has_main_and_multifd_channels(void)\n>>      return true;\n>>  }\n>>  \n>> -void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>> +uint8_t migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>>  {\n>>      MigrationIncomingState *mis = migration_incoming_get_current();\n>> -    Error *local_err = NULL;\n>> -    QEMUFile *f;\n>> -    uint8_t channel;\n>> +    uint8_t channel = CH_NONE;\n>>      uint32_t channel_magic = 0;\n>>      int ret = 0;\n>>  \n>> @@ -1036,7 +1059,7 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>>              ret = migration_channel_read_peek(ioc, (void *)&channel_magic,\n>>                                                sizeof(channel_magic), errp);\n>>              if (ret != 0) {\n>> -                return;\n>> +                goto out;\n>>              }\n>>  \n>>              channel_magic = be32_to_cpu(channel_magic);\n>> @@ -1051,7 +1074,6 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>>                  channel = CH_MAIN;\n>>              } else {\n>>                  error_setg(errp, \"unknown channel magic: %u\", channel_magic);\n>> -                return;\n>>              }\n>>          } else if (mis->from_src_file && migrate_multifd()) {\n>>              /*\n>> @@ -1063,33 +1085,13 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)\n>>              channel = CH_MAIN;\n>>          } else {\n>>              error_setg(errp, \"non-peekable channel used without multifd\");\n>> -            return;\n>>          }\n>>      } else {\n>>          assert(migrate_postcopy_preempt());\n>>          channel = CH_POSTCOPY;\n>>      }\n>> -\n>> -    if (channel == CH_MAIN) {\n>> -        f = qemu_file_new_input(ioc);\n>> -        migration_incoming_setup(f);\n>> -    } else if (channel == CH_MULTIFD) {\n>> -        /* Multiple connections */\n>> -        multifd_recv_new_channel(ioc, &local_err);\n>> -        if (local_err) {\n>> -            error_propagate(errp, local_err);\n>> -            return;\n>> -        }\n>> -    } else if (channel == CH_POSTCOPY) {\n>> -        assert(!mis->postcopy_qemufile_dst);\n>> -        f = qemu_file_new_input(ioc);\n>> -        postcopy_preempt_new_channel(mis, f);\n>> -        return;\n>> -    }\n>> -\n>> -    if (migration_has_main_and_multifd_channels()) {\n>> -        migration_incoming_process();\n>> -    }\n>> +out:\n>> +    return channel;\n>>  }\n>>  \n>>  /**\n>> diff --git a/migration/migration.h b/migration/migration.h\n>> index f340cd518d..d2b82cf54f 100644\n>> --- a/migration/migration.h\n>> +++ b/migration/migration.h\n>> @@ -526,8 +526,10 @@ struct MigrationState {\n>>  void migrate_set_state(MigrationStatus *state, MigrationStatus old_state,\n>>                         MigrationStatus new_state);\n>>  \n>> -void migration_fd_process_incoming(QEMUFile *f);\n>> -void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp);\n>> +void migration_outgoing_setup(QIOChannel *ioc);\n>> +bool migration_incoming_setup(QIOChannel *ioc, uint8_t channel, Error **errp);\n>> +\n>> +uint8_t migration_ioc_process_incoming(QIOChannel *ioc, Error **errp);\n>>  void migration_incoming_process(void);\n>>  \n>>  bool  migration_has_all_channels(void);\n>> diff --git a/migration/multifd.c b/migration/multifd.c\n>> index 3fb1a07ba9..c6639dbab5 100644\n>> --- a/migration/multifd.c\n>> +++ b/migration/multifd.c\n>> @@ -1521,7 +1521,7 @@ bool multifd_recv_all_channels_created(void)\n>>   * Try to receive all multifd channels to get ready for the migration.\n>>   * Sets @errp when failing to receive the current channel.\n>>   */\n>> -void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>> +bool multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>>  {\n>>      MultiFDRecvParams *p;\n>>      Error *local_err = NULL;\n>> @@ -1536,7 +1536,7 @@ void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>>                                      \"failed to receive packet\"\n>>                                      \" via multifd channel %d: \",\n>>                                      qatomic_read(&multifd_recv_state->count));\n>> -            return;\n>> +            return false;\n>>          }\n>>          trace_multifd_recv_new_channel(id);\n>>      } else {\n>> @@ -1549,7 +1549,7 @@ void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>>                     id);\n>>          multifd_recv_terminate_threads(error_copy(local_err));\n>>          error_propagate(errp, local_err);\n>> -        return;\n>> +        return false;\n>>      }\n>>      p->c = ioc;\n>>      object_ref(OBJECT(ioc));\n>> @@ -1558,4 +1558,5 @@ void multifd_recv_new_channel(QIOChannel *ioc, Error **errp)\n>>      qemu_thread_create(&p->thread, p->name, multifd_recv_thread, p,\n>>                         QEMU_THREAD_JOINABLE);\n>>      qatomic_inc(&multifd_recv_state->count);\n>> +    return true;\n>>  }\n>> diff --git a/migration/multifd.h b/migration/multifd.h\n>> index 9b6d81e7ed..89a395aef2 100644\n>> --- a/migration/multifd.h\n>> +++ b/migration/multifd.h\n>> @@ -42,7 +42,7 @@ int multifd_recv_setup(Error **errp);\n>>  void multifd_recv_cleanup(void);\n>>  void multifd_recv_shutdown(void);\n>>  bool multifd_recv_all_channels_created(void);\n>> -void multifd_recv_new_channel(QIOChannel *ioc, Error **errp);\n>> +bool multifd_recv_new_channel(QIOChannel *ioc, Error **errp);\n>>  void multifd_recv_sync_main(void);\n>>  int multifd_send_sync_main(MultiFDSyncReq req);\n>>  bool multifd_queue_page(RAMBlock *block, ram_addr_t offset);\n>> diff --git a/migration/rdma.c b/migration/rdma.c\n>> index 596a1aba0b..7bee871e2b 100644\n>> --- a/migration/rdma.c\n>> +++ b/migration/rdma.c\n>> @@ -384,7 +384,6 @@ struct QIOChannelRDMA {\n>>      QIOChannel parent;\n>>      RDMAContext *rdmain;\n>>      RDMAContext *rdmaout;\n>> -    QEMUFile *file;\n>>      bool blocking; /* XXX we don't actually honour this yet */\n>>  };\n>>  \n>> @@ -3836,32 +3835,20 @@ static void qio_channel_rdma_register_types(void)\n>>  \n>>  type_init(qio_channel_rdma_register_types);\n>>  \n>> -static QEMUFile *rdma_new_input(RDMAContext *rdma)\n>> +static QIOChannel *rdma_new_ioc(RDMAContext *rdma)\n>>  {\n>>      QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(object_new(TYPE_QIO_CHANNEL_RDMA));\n>>  \n>> -    rioc->file = qemu_file_new_input(QIO_CHANNEL(rioc));\n>> -    rioc->rdmain = rdma;\n>> -    rioc->rdmaout = rdma->return_path;\n>> -\n>> -    return rioc->file;\n>> -}\n>> -\n>> -static QEMUFile *rdma_new_output(RDMAContext *rdma)\n>> -{\n>> -    QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(object_new(TYPE_QIO_CHANNEL_RDMA));\n>> -\n>> -    rioc->file = qemu_file_new_output(QIO_CHANNEL(rioc));\n>>      rioc->rdmaout = rdma;\n>>      rioc->rdmain = rdma->return_path;\n>\n> Likely it was overlooked rdmaout/rdmain was set in reverse order in these\n> two functions.  I gave it a quick run on rdma and it was indeed broken\n> starting from this patch.\n>\n\nI'll remember to test rdma next time, thanks for catching this.\n\n> The goal of the change looks reasonable in general otherwise, said that,\n> maybe there's way to split the patch somehow?\n>\n\nYes, no problem.","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=XoB4WLaF;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=VubipLii;\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=MO47XcR7;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=3vBuywWL;\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-out2.suse.de;\n dkim=pass header.d=suse.de header.s=susede2_rsa header.b=MO47XcR7;\n dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=3vBuywWL"],"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 4dg6Lk2RMrz1xpZ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 30 Dec 2025 06:52:14 +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 1vaJHV-0000fV-1B; Mon, 29 Dec 2025 14:51:53 -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 1vaJHT-0000dP-01\n for qemu-devel@nongnu.org; Mon, 29 Dec 2025 14:51:51 -0500","from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2])\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 1vaJHQ-00025D-O5\n for qemu-devel@nongnu.org; Mon, 29 Dec 2025 14:51: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-out2.suse.de (Postfix) with ESMTPS id 018295BCE2;\n Mon, 29 Dec 2025 19:51:46 +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 6FBE7137C3;\n Mon, 29 Dec 2025 19:51:45 +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 xQxCDNHbUmmxWAAAD6G6ig\n (envelope-from <farosas@suse.de>); Mon, 29 Dec 2025 19:51:45 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1767037907;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=JcjTPBWK0RmOEAEoPN4Fq9MWCiqHV71xMMmWKXhivlA=;\n b=XoB4WLaFG4qfBDZkthtE1b0O7LoK5JTby6Ms8Hy6TrIuSMdELm4uEpIcQp3Y3+3RUws3/z\n j7ehY4W8xHbotF55ikyzbFMaDXbVlvxx/2lI6VfE7zRCaVuDi9CNjDv6NhGkZsEUm+nJW/\n qrDLcJVMYcTMsLhoZL7EhavJ8IAsJN8=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1767037907;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=JcjTPBWK0RmOEAEoPN4Fq9MWCiqHV71xMMmWKXhivlA=;\n b=VubipLiinyCWP5hwDz9wjnT6odyFOrun8pLJH4IY88mxcd9ejvZ7oJP5SPNM1nO1yAabjz\n DSZp+uxz+E4S89BQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1767037906;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=JcjTPBWK0RmOEAEoPN4Fq9MWCiqHV71xMMmWKXhivlA=;\n b=MO47XcR7VCgxW5FAz5u3iGw7oiSi1KZkEEFeN1U9V5HOJK2N4PRX6yYQ0yt/kWfj0CYosT\n nPUTgBYjxtxNXWjDhh/K8nRCuSA/ZE+91c3H43yNGVZtteHW7o+8yN06iBbDLfK6EMamaM\n u0dC2SqcLq3URnlDT2Xo65TrqCBJiho=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1767037906;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=JcjTPBWK0RmOEAEoPN4Fq9MWCiqHV71xMMmWKXhivlA=;\n b=3vBuywWLtVPF25aqQBbP3tE7C+aLKS6I4lliLsy6fSwYAuT6uThABoIZhAaLhiB7E3nuea\n DyfJPNrrFpNAk0DA=="],"From":"Fabiano Rosas <farosas@suse.de>","To":"Peter Xu <peterx@redhat.com>","Cc":"qemu-devel@nongnu.org, Li Zhijian <lizhijian@fujitsu.com>","Subject":"Re: [RFC PATCH 14/25] migration: Remove QEMUFile from channel.c","In-Reply-To":"<aVLYQGQo2gSRs7Xm@x1.local>","References":"<20251226211930.27565-1-farosas@suse.de>\n <20251226211930.27565-15-farosas@suse.de> <aVLYQGQo2gSRs7Xm@x1.local>","Date":"Mon, 29 Dec 2025 16:51:42 -0300","Message-ID":"<87a4z183sh.fsf@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain","X-Spam-Score":"-5.51","X-Rspamd-Queue-Id":"018295BCE2","X-Spamd-Result":"default: False [-5.51 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n NEURAL_HAM_LONG(-1.00)[-1.000];\n DWL_DNSWL_LOW(-1.00)[suse.de:dkim];\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)[];\n URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:dkim,suse.de:email];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n TO_DN_SOME(0.00)[]; ARC_NA(0.00)[];\n FUZZY_RATELIMITED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[];\n DKIM_TRACE(0.00)[suse.de:+];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received];\n RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[];\n RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[];\n MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[];\n RCPT_COUNT_THREE(0.00)[3];\n DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,\n imap1.dmz-prg2.suse.org:helo]","X-Rspamd-Server":"rspamd1.dmz-prg2.suse.org","X-Rspamd-Action":"no action","Received-SPF":"pass client-ip=2a07:de40:b251:101:10:150:64:2;\n envelope-from=farosas@suse.de; helo=smtp-out2.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"}}]