[{"id":3675412,"web_url":"http://patchwork.ozlabs.org/comment/3675412/","msgid":"<adfd21izXQ_6MJmy@fedora>","list_archive_url":null,"date":"2026-04-09T17:13:20","subject":"Re: [PATCH 06/14] migration: Introduce stopcopy_bytes in\n save_query_pending()","submitter":{"id":89058,"url":"http://patchwork.ozlabs.org/api/people/89058/","name":"Juraj Marcin","email":"jmarcin@redhat.com"},"content":"On 2026-04-08 12:55, Peter Xu wrote:\n> Allow modules to report data that can only be migrated after VM is stopped.\n> \n> When this concept is introduced, we will need to account stopcopy size to\n> be part of pending_size as before.\n> \n> However, when there're data only can be migrated in stopcopy phase, it\n> means the old \"pending_size\" may not always be able to reach low enough to\n> kickoff an slow version of query sync.\n> \n> It used to be almost guaranteed to happen as all prior iterative modules\n> doesn't have stopcopy only data.  VFIO may change that fact by having some\n> data that must be copied during stop phase.\n> \n> So we need to make sure QEMU will kickoff a synchronized version of query\n> pending when all precopy data is migrated.  This might be important to VFIO\n> to keep making progress even if the downtime cannot yet be satisfied.\n> \n> So far, this patch should introduce no functional change, as no module yet\n> report stopcopy size.\n> \n> This paves way for VFIO to properly report its pending data sizes, which\n> will start to include stop-only data.\n> \n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>  include/migration/register.h |  7 +++++\n>  migration/migration.c        | 52 ++++++++++++++++++++++++++++++------\n>  migration/savevm.c           |  7 +++--\n>  migration/trace-events       |  2 +-\n>  4 files changed, 57 insertions(+), 11 deletions(-)\n> \n\nReviewed-by: Juraj Marcin <jmarcin@redhat.com>","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=Z26yn3RN;\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=sv5O0ViQ;\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 (lists1p.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 4fs6376zZXz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 03:13:39 +1000 (AEST)","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 1wAswd-00041P-A4; Thu, 09 Apr 2026 13:13:31 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jmarcin@redhat.com>)\n id 1wAswb-000419-DU\n for qemu-devel@nongnu.org; Thu, 09 Apr 2026 13:13:29 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jmarcin@redhat.com>)\n id 1wAswZ-00006o-Of\n for qemu-devel@nongnu.org; Thu, 09 Apr 2026 13:13:29 -0400","from mail-wr1-f71.google.com (mail-wr1-f71.google.com\n [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-591-l2grSCPXMgqzhx9Dyu-G6w-1; Thu, 09 Apr 2026 13:13:25 -0400","by mail-wr1-f71.google.com with SMTP id\n ffacd0b85a97d-43d121c4271so753534f8f.3\n for <qemu-devel@nongnu.org>; Thu, 09 Apr 2026 10:13:25 -0700 (PDT)","from fedora (nat-88-212-17-233.antik.sk. [88.212.17.233])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43d63de2a69sm278492f8f.4.2026.04.09.10.13.22\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Apr 2026 10:13:23 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775754806;\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=v6uJ6P1y8FNDsY+hG+DSCcGyx1T+cYPq5W7WdzsZtzY=;\n b=Z26yn3RNeUmbR/NOVLerq96IB2IyxR+c6IE7kUvxo01JOrsTpHaqhkDV3yCt+NMnqn7C4L\n 2gpWmqDyEHJRfTma9BeF2Yz4n8fTyrYQsVulTYKKEGPUImVDqxC0uWkM3E09nIi/q4UozO\n Wk2oF+t25r5PeRGeKHqjSUYtnjwcG4s=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1775754804; x=1776359604; 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=v6uJ6P1y8FNDsY+hG+DSCcGyx1T+cYPq5W7WdzsZtzY=;\n b=sv5O0ViQUa9Iz+sAVSbjE6SzDIB4wmUPwLSniMMwCDQt2lTLreBidGEWE9eFYtd4Ks\n +LErJzfZwJqTKJtLwQ7o80js2gjeuQLcmCJvdFo6MtMW8WM652MlYqznersvEAAZzU4G\n q9jwo48CPi+9QQKSHpyWusy4TLNo3Z+HMUMCIDYhcdOOOe7vIFElXLpu2Dz7F9jfLuL7\n hY0kUapp+PfMdxU5QnxfaJ/ZLRNaJ6CNGj0DIldyzTbEG7yCGSnndv4wGo6lssocJIKZ\n 1bDentF2dcu7zcwL60vMnwZycEJ3cgS1yvMEv06brMr8mqWc/+mR5Xc/wPS7GhHdEDs9\n Ucow=="],"X-MC-Unique":"l2grSCPXMgqzhx9Dyu-G6w-1","X-Mimecast-MFC-AGG-ID":"l2grSCPXMgqzhx9Dyu-G6w_1775754804","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775754804; x=1776359604;\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=v6uJ6P1y8FNDsY+hG+DSCcGyx1T+cYPq5W7WdzsZtzY=;\n b=cv394W8aLuEgt2O1vO7bY6GxSpsDrQjuIBfiwnV+HPFCd3/6+Zk77aVkNvecfpz4Fw\n l837RnZcaVrG26vDR9ur8d3LrxVIMKdSk5sMZFSojyPGY1MH9z4gPy0KkERu7kjalTkx\n rs4qjDITE0+BkbG2ujgBjEu5ZSvaA3zTGQcwhUzZzlTYs8WxOBkh7xPUGko61u43e7os\n eslEfa0p13CldWTBDHdP4bMWHqqwwQpbkQb4wQjI/t2kN6mU/CxX7tNEQ/eNKxG9aXNU\n XkpjbmRvcABqVp6SLsXohPVu1GgUfWO2MyLKNYF9CydTQu2k8B7a81glc/WaLdJk6mGn\n EXmg==","X-Gm-Message-State":"AOJu0YyKe97UjPYeXKR2//lP0nc6wsc4+02WdRhLS9omrRA4YCznDFEc\n wRAvbfGMVf6e5OUYdNImkEk6qlaAfbXTLFg6Vu9rTtBIMWh0Tehv12pTJcnYh7ox3i7cIlrI9El\n hcTf4GfOBZMplYX1nwh46FKYJ1swI8wZQQK7+y56iwkCfVqKWVQMUcfsC","X-Gm-Gg":"AeBDietQG6q58mSCjMviT7dlq/INxvNa2CtxwQjfnYfAo5478aO1zkljOF9CPxVGgIQ\n doETGErTo7WX427MHF2dvCfaa1PSi1Yk2aNc+0riAnaEOXcJI9/GQqstdLQrNlyrOCIrXBnQQ/s\n P0VImP7iuNjQLhlvazCa7FIHc6lG13S6qv7+r0aOjVOXArYYR8KvCsh2CBWRlTGuceMBy782dg+\n UW8iBwbNzRblGzoP/g5cgLZsBRjSLfJDwVIb6KkqW6bgVO7YEvRTzKWSJ0FsmljzwoF5V9By6GY\n yOWtQRT8U/zdewk59/SZGKst7DbdpyhYmZAVoTj2YFT5WQsJPn6ZJpIJvSRxyVbc74+NYIHg4OF\n S33hp46qj+gKinij86Pg5ZCQtCLplQSlcN8n8lCk=","X-Received":["by 2002:a05:6000:2585:b0:439:a95b:3c43 with SMTP id\n ffacd0b85a97d-43d5a14af20mr5500818f8f.21.1775754804228;\n Thu, 09 Apr 2026 10:13:24 -0700 (PDT)","by 2002:a05:6000:2585:b0:439:a95b:3c43 with SMTP id\n ffacd0b85a97d-43d5a14af20mr5500775f8f.21.1775754803708;\n Thu, 09 Apr 2026 10:13:23 -0700 (PDT)"],"Date":"Thu, 9 Apr 2026 19:13:20 +0200","From":"Juraj Marcin <jmarcin@redhat.com>","To":"Peter Xu <peterx@redhat.com>","Cc":"qemu-devel@nongnu.org,\n  \"Maciej S . Szmigiero\" <mail@maciej.szmigiero.name>, Daniel P\n\t=?utf-8?b?LiBCZXJyYW5nw6k=?= <berrange@redhat.com>,\n  Zhiyi Guo <zhguo@redhat.com>, Prasad Pandit <ppandit@redhat.com>,\n  Avihai Horon <avihaih@nvidia.com>, Kirti Wankhede <kwankhede@nvidia.com>,\n\t=?utf-8?q?C=C3=A9dric?= Le Goater <clg@redhat.com>,\n Fabiano Rosas <farosas@suse.de>,  Joao Martins <joao.m.martins@oracle.com>,\n Markus Armbruster <armbru@redhat.com>, Alex Williamson <alex@shazbot.org>","Subject":"Re: [PATCH 06/14] migration: Introduce stopcopy_bytes in\n save_query_pending()","Message-ID":"<adfd21izXQ_6MJmy@fedora>","References":"<20260408165559.157108-1-peterx@redhat.com>\n <20260408165559.157108-7-peterx@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260408165559.157108-7-peterx@redhat.com>","Received-SPF":"pass client-ip=170.10.129.124; envelope-from=jmarcin@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"-25","X-Spam_score":"-2.6","X-Spam_bar":"--","X-Spam_report":"(-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\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_H4=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 development <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":3675422,"web_url":"http://patchwork.ozlabs.org/comment/3675422/","msgid":"<adfhtgEeWtsMxEmv@fedora>","list_archive_url":null,"date":"2026-04-09T17:36:51","subject":"Re: [PATCH 06/14] migration: Introduce stopcopy_bytes in\n save_query_pending()","submitter":{"id":89058,"url":"http://patchwork.ozlabs.org/api/people/89058/","name":"Juraj Marcin","email":"jmarcin@redhat.com"},"content":"Hi Peter,\n\nactually, I do have one question, see inline\n\nOn 2026-04-08 12:55, Peter Xu wrote:\n> Allow modules to report data that can only be migrated after VM is stopped.\n> \n> When this concept is introduced, we will need to account stopcopy size to\n> be part of pending_size as before.\n> \n> However, when there're data only can be migrated in stopcopy phase, it\n> means the old \"pending_size\" may not always be able to reach low enough to\n> kickoff an slow version of query sync.\n> \n> It used to be almost guaranteed to happen as all prior iterative modules\n> doesn't have stopcopy only data.  VFIO may change that fact by having some\n> data that must be copied during stop phase.\n> \n> So we need to make sure QEMU will kickoff a synchronized version of query\n> pending when all precopy data is migrated.  This might be important to VFIO\n> to keep making progress even if the downtime cannot yet be satisfied.\n> \n> So far, this patch should introduce no functional change, as no module yet\n> report stopcopy size.\n> \n> This paves way for VFIO to properly report its pending data sizes, which\n> will start to include stop-only data.\n> \n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>  include/migration/register.h |  7 +++++\n>  migration/migration.c        | 52 ++++++++++++++++++++++++++++++------\n>  migration/savevm.c           |  7 +++--\n>  migration/trace-events       |  2 +-\n>  4 files changed, 57 insertions(+), 11 deletions(-)\n> \n> diff --git a/include/migration/register.h b/include/migration/register.h\n> index aba3c9af2f..e822a2a59f 100644\n> --- a/include/migration/register.h\n> +++ b/include/migration/register.h\n> @@ -21,6 +21,13 @@ typedef struct MigPendingData {\n>      uint64_t precopy_bytes;\n>      /* Amount of pending bytes can be transferred in postcopy */\n>      uint64_t postcopy_bytes;\n> +    /* Amount of pending bytes can be transferred only in stopcopy */\n> +    uint64_t stopcopy_bytes;\n> +    /*\n> +     * Total pending data, modules do not need to update this field, it\n> +     * will be automatically calculated by migration core API.\n> +     */\n> +    uint64_t total_bytes;\n>  } MigPendingData;\n>  \n>  /**\n> diff --git a/migration/migration.c b/migration/migration.c\n> index 68cfe2d3bf..bb17bd0e68 100644\n> --- a/migration/migration.c\n> +++ b/migration/migration.c\n> @@ -3198,6 +3198,44 @@ typedef enum {\n>      MIG_ITERATE_BREAK,          /* Break the loop */\n>  } MigIterateState;\n>  \n> +/* Are we ready to move to the next iteration phase? */\n> +static bool migration_iteration_next_ready(MigrationState *s,\n> +                                           MigPendingData *pending)\n> +{\n> +    /*\n> +     * If the estimated values already suggest us to switchover, mark this\n> +     * iteration finished, time to do a slow sync.\n> +     */\n> +    if (pending->total_bytes <= s->threshold_size) {\n> +        return true;\n> +    }\n> +\n> +    /*\n> +     * Since we may have modules reporting stop-only data, we also want to\n> +     * re-query with slow mode if all precopy data is moved over.  This\n> +     * will also mark the current iteration done.\n> +     *\n> +     * This could happen when e.g. a module (like, VFIO) reports stopcopy\n> +     * size too large so it will never yet satisfy the downtime with the\n> +     * current setup (above check).  Here, slow version of re-query helps\n> +     * because we keep trying the best to move whatever we have.\n> +     */\n> +    if (pending->precopy_bytes == 0) {\n> +        return true;\n> +    }\n> +\n> +    return false;\n> +}\n> +\n> +static void migration_iteration_go_next(MigPendingData *pending)\n> +{\n> +    /*\n> +     * Do a slow sync will achieve this.  TODO: move RAM iteration code\n> +     * into the core layer.\n> +     */\n> +    qemu_savevm_query_pending(pending, true);\n> +}\n> +\n>  /*\n>   * Return true if continue to the next iteration directly, false\n>   * otherwise.\n> @@ -3209,12 +3247,10 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>                          s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);\n>      bool can_switchover = migration_can_switchover(s);\n>      MigPendingData pending = { };\n> -    uint64_t pending_size;\n>      bool complete_ready;\n>  \n>      /* Fast path - get the estimated amount of pending data */\n>      qemu_savevm_query_pending(&pending, false);\n> -    pending_size = pending.precopy_bytes + pending.postcopy_bytes;\n>  \n>      if (in_postcopy) {\n>          /*\n> @@ -3222,7 +3258,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>           * postcopy completion doesn't rely on can_switchover, because when\n>           * POSTCOPY_ACTIVE it means switchover already happened.\n>           */\n> -        complete_ready = !pending_size;\n> +        complete_ready = !pending.total_bytes;\n>          if (s->state == MIGRATION_STATUS_POSTCOPY_DEVICE &&\n>              (s->postcopy_package_loaded || complete_ready)) {\n>              /*\n> @@ -3242,9 +3278,8 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>           * postcopy started, so ESTIMATE should always match with EXACT\n>           * during postcopy phase.\n>           */\n> -        if (pending_size <= s->threshold_size) {\n> -            qemu_savevm_query_pending(&pending, true);\n> -            pending_size = pending.precopy_bytes + pending.postcopy_bytes;\n> +        if (migration_iteration_next_ready(s, &pending)) {\n> +            migration_iteration_go_next(&pending);\n>          }\n>  \n>          /* Should we switch to postcopy now? */\n> @@ -3264,11 +3299,12 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>           * (2) Pending size is no more than the threshold specified\n>           *     (which was calculated from expected downtime)\n>           */\n> -        complete_ready = can_switchover && (pending_size <= s->threshold_size);\n> +        complete_ready = can_switchover &&\n> +            (pending.total_bytes <= s->threshold_size);\n\nshouldn't also the condition that triggers postcopy migration be updated?\nAs total_bytes is calculated as sum of all three\n(precopy_bytes + stopcopy_bytes + postcopy_bytes), this implies to me\nthat stopcopy_bytes is not subset of precopy_bytes and would also need\nto be migrated during switchover before postcopy.\n\nOnce this is resolved, then my Reviewed-by tag is valid, the patch looks\ngood to me otherwise.\n\nThanks!\n\n>      }\n>  \n>      if (complete_ready) {\n> -        trace_migration_thread_low_pending(pending_size);\n> +        trace_migration_thread_low_pending(pending.total_bytes);\n>          migration_completion(s);\n>          return MIG_ITERATE_BREAK;\n>      }\n> diff --git a/migration/savevm.c b/migration/savevm.c\n> index 397f602257..b75c311a95 100644\n> --- a/migration/savevm.c\n> +++ b/migration/savevm.c\n> @@ -1766,8 +1766,7 @@ void qemu_savevm_query_pending(MigPendingData *pending, bool exact)\n>  {\n>      SaveStateEntry *se;\n>  \n> -    pending->precopy_bytes = 0;\n> -    pending->postcopy_bytes = 0;\n> +    memset(pending, 0, sizeof(*pending));\n>  \n>      QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {\n>          if (!se->ops || !se->ops->save_query_pending) {\n> @@ -1779,7 +1778,11 @@ void qemu_savevm_query_pending(MigPendingData *pending, bool exact)\n>          se->ops->save_query_pending(se->opaque, pending, exact);\n>      }\n>  \n> +    pending->total_bytes = pending->precopy_bytes +\n> +        pending->stopcopy_bytes + pending->postcopy_bytes;\n> +\n>      trace_qemu_savevm_query_pending(exact, pending->precopy_bytes,\n> +                                    pending->stopcopy_bytes,\n>                                      pending->postcopy_bytes);\n>  }\n>  \n> diff --git a/migration/trace-events b/migration/trace-events\n> index f8995b8d0d..2f86ad448e 100644\n> --- a/migration/trace-events\n> +++ b/migration/trace-events\n> @@ -7,7 +7,7 @@ qemu_loadvm_state_section_partend(uint32_t section_id) \"%u\"\n>  qemu_loadvm_state_post_main(int ret) \"%d\"\n>  qemu_loadvm_state_section_startfull(uint32_t section_id, const char *idstr, uint32_t instance_id, uint32_t version_id) \"%u(%s) %u %u\"\n>  qemu_savevm_send_packaged(void) \"\"\n> -qemu_savevm_query_pending(bool exact, uint64_t precopy, uint64_t postcopy) \"exact=%d, precopy=%\"PRIu64\", postcopy=%\"PRIu64\n> +qemu_savevm_query_pending(bool exact, uint64_t precopy, uint64_t stopcopy, uint64_t postcopy) \"exact=%d, precopy=%\"PRIu64\", stopcopy=%\"PRIu64\", postcopy=%\"PRIu64\n>  loadvm_state_switchover_ack_needed(unsigned int switchover_ack_pending_num) \"Switchover ack pending num=%u\"\n>  loadvm_state_setup(void) \"\"\n>  loadvm_state_cleanup(void) \"\"\n> -- \n> 2.53.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=DshCbCH1;\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=YeK2VmNm;\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 (lists1p.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 4fs6b06TYgz1yHG\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 03:37:47 +1000 (AEST)","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 1wAtJO-0004MQ-Va; Thu, 09 Apr 2026 13:37:03 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jmarcin@redhat.com>)\n id 1wAtJN-0004M8-Og\n for qemu-devel@nongnu.org; Thu, 09 Apr 2026 13:37:01 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jmarcin@redhat.com>)\n id 1wAtJL-0008F9-FG\n for qemu-devel@nongnu.org; Thu, 09 Apr 2026 13:37:01 -0400","from mail-wr1-f71.google.com (mail-wr1-f71.google.com\n [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-645-blyGG_uKOT24fx2hkcd2yA-1; Thu, 09 Apr 2026 13:36:56 -0400","by mail-wr1-f71.google.com with SMTP id\n ffacd0b85a97d-43d103e46c3so732066f8f.3\n for <qemu-devel@nongnu.org>; Thu, 09 Apr 2026 10:36:55 -0700 (PDT)","from fedora (nat-88-212-17-233.antik.sk. [88.212.17.233])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43d63e5d85fsm318774f8f.36.2026.04.09.10.36.52\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Apr 2026 10:36:53 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775756217;\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=grrTmrXgWLYKI9Gg8TUfoHkN8SlRAsghf2bMNWvvqFs=;\n b=DshCbCH1FkXKVT5h27NpQ7XcQpEwTo7l7amO6v41AoJ4K+GIqdugbby704emXBRIpguNnW\n 5kme3XRBafY+fnFOiH8EZ8kvLsZkpywRskTMUW35vMsdkPLv2fTzAR0mKHU4V5/8C0+NdN\n /oufAHSpMQQMq4iYA+rk/zcAmY3iS18=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1775756215; x=1776361015; 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=grrTmrXgWLYKI9Gg8TUfoHkN8SlRAsghf2bMNWvvqFs=;\n b=YeK2VmNmlWYnkk1zkuD/apewccN2hzX6ZwN8PAbV8cZDd+zcyXsmgxmqZJKuQ/XUg9\n vpq/V+TcW1fEB3EZaAy9dxJ27K8nNW74GQxEc3x7Vf5/oH64RUrtcWZPfNSbSVFoY8N0\n L2nfOhhVisSksAmrxfDioRwr6N+pGo/glbulAZG5UXls9VXIchp2vhOyIAhJZKKFnHMg\n 3cMmMFA16Leh//GX4hM69rHOVHM0uhYaWo95AikkbC+ad4+7ac2wWl3A6lJ8DvOtaT53\n HTjJxuN25S+4kFkcDdGxMt9ebKygZusqSNFsQ682qQK9tpTsDPto4mhfVE/6g//8Apwn\n CfOw=="],"X-MC-Unique":"blyGG_uKOT24fx2hkcd2yA-1","X-Mimecast-MFC-AGG-ID":"blyGG_uKOT24fx2hkcd2yA_1775756215","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775756215; x=1776361015;\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=grrTmrXgWLYKI9Gg8TUfoHkN8SlRAsghf2bMNWvvqFs=;\n b=ARXJ3O3qIy6GnED+A4h6LJOSs+3kjWs1KGq+UbxxRsI1CNmM0NwiMlbUGuE95qOyKU\n conMeOH1j0HsVPcLtxODWx4gUhYVOTt4Ky3elshGISuWOipSq7CCW80lhBxoxiZWdbDE\n TJiGu6fqLlxdKhCdVH2kN71HYZGqCLfpKFQPGMjk+5xnrpKcIdQ4v9lyaqOW1AACKjh7\n VNNFuVUXo2bmWAQa61zi/+oAg+8OV+izSru5+bve1JQYoMP/q5nG/t5udddJdf0j2hYM\n Ffp4VXEzrW3OcMyMDeU9AabBx1h2gGpZmtOdaRg8JbmDDlhpy1z8rrdnqhv3ReTV3ORA\n dv0g==","X-Gm-Message-State":"AOJu0YxV1caH4489vtfhXecHQpG1D+Olu7HdKMhPLJZrrmNd/Y3BhAYU\n gSi84oYG6t8A74JnN4uMw99N6i9t2/gbyZIBnpX+esyAP04TNnY90OMCoZySiNoYZJPBIb8kipA\n CD4cnNj/2uan76Dywdr7BnccXbcHCJ5DwfD7G3Yip6E2zL6XthMHECYDR","X-Gm-Gg":"AeBDiesvsy43Psc9xwQ0lYznT5721A0Nx2fJYfIxi0uAa4QENNpYm3/29T3HOkXrvWe\n WXP0qkMLQ1iFLReAWQaOdz9179ZFGueDs5Qf0T+jtK86dIkZgAQp4nrCwXd3DIYh9HTXYhn5jy7\n CXmJmsJl4hlrWANGlb0asKZNzKXm0x9c/Ybo81h5GnlQSmLpJEf/Uyvk9osw9XAR9tu6HKCi+Vz\n fQa+2JMKHVRaahH84cJJ5utWgldxWdjUcriM+1vd+ZIgryYL/wYzvY/GupSQTsfp11vOKXXt8e7\n tfwqmWMS96KDW/UUGhi7W4M774LtgE1JSrNVd36IcbCHXEsxDTWRba5xVM2ttcW4SFcNzD3Pn0g\n 4sm0oMvcAT9EopUDQGFOAihHTl84HKFcYcJkcT0g=","X-Received":["by 2002:a05:6000:2503:b0:43b:4136:1e76 with SMTP id\n ffacd0b85a97d-43d292e3e10mr39181499f8f.29.1775756214601;\n Thu, 09 Apr 2026 10:36:54 -0700 (PDT)","by 2002:a05:6000:2503:b0:43b:4136:1e76 with SMTP id\n ffacd0b85a97d-43d292e3e10mr39181455f8f.29.1775756214072;\n Thu, 09 Apr 2026 10:36:54 -0700 (PDT)"],"Date":"Thu, 9 Apr 2026 19:36:51 +0200","From":"Juraj Marcin <jmarcin@redhat.com>","To":"Peter Xu <peterx@redhat.com>","Cc":"qemu-devel@nongnu.org,\n  \"Maciej S . Szmigiero\" <mail@maciej.szmigiero.name>, Daniel P\n\t=?utf-8?b?LiBCZXJyYW5nw6k=?= <berrange@redhat.com>,\n  Zhiyi Guo <zhguo@redhat.com>, Prasad Pandit <ppandit@redhat.com>,\n  Avihai Horon <avihaih@nvidia.com>, Kirti Wankhede <kwankhede@nvidia.com>,\n\t=?utf-8?q?C=C3=A9dric?= Le Goater <clg@redhat.com>,\n Fabiano Rosas <farosas@suse.de>,  Joao Martins <joao.m.martins@oracle.com>,\n Markus Armbruster <armbru@redhat.com>, Alex Williamson <alex@shazbot.org>","Subject":"Re: [PATCH 06/14] migration: Introduce stopcopy_bytes in\n save_query_pending()","Message-ID":"<adfhtgEeWtsMxEmv@fedora>","References":"<20260408165559.157108-1-peterx@redhat.com>\n <20260408165559.157108-7-peterx@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260408165559.157108-7-peterx@redhat.com>","Received-SPF":"pass client-ip=170.10.129.124; envelope-from=jmarcin@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"-25","X-Spam_score":"-2.6","X-Spam_bar":"--","X-Spam_report":"(-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\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_H4=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 development <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":3676637,"web_url":"http://patchwork.ozlabs.org/comment/3676637/","msgid":"<9e52a221-96f3-4c4c-9693-3235617d2a98@nvidia.com>","list_archive_url":null,"date":"2026-04-13T10:34:17","subject":"Re: [PATCH 06/14] migration: Introduce stopcopy_bytes in\n save_query_pending()","submitter":{"id":84049,"url":"http://patchwork.ozlabs.org/api/people/84049/","name":"Avihai Horon","email":"avihaih@nvidia.com"},"content":"On 4/8/2026 7:55 PM, Peter Xu wrote:\n> External email: Use caution opening links or attachments\n>\n>\n> Allow modules to report data that can only be migrated after VM is stopped.\n>\n> When this concept is introduced, we will need to account stopcopy size to\n> be part of pending_size as before.\n>\n> However, when there're data only can be migrated in stopcopy phase, it\n> means the old \"pending_size\" may not always be able to reach low enough to\n> kickoff an slow version of query sync.\n>\n> It used to be almost guaranteed to happen as all prior iterative modules\n> doesn't have stopcopy only data.  VFIO may change that fact by having some\n> data that must be copied during stop phase.\n>\n> So we need to make sure QEMU will kickoff a synchronized version of query\n> pending when all precopy data is migrated.  This might be important to VFIO\n> to keep making progress even if the downtime cannot yet be satisfied.\n>\n> So far, this patch should introduce no functional change, as no module yet\n> report stopcopy size.\n>\n> This paves way for VFIO to properly report its pending data sizes, which\n> will start to include stop-only data.\n>\n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>   include/migration/register.h |  7 +++++\n>   migration/migration.c        | 52 ++++++++++++++++++++++++++++++------\n>   migration/savevm.c           |  7 +++--\n>   migration/trace-events       |  2 +-\n>   4 files changed, 57 insertions(+), 11 deletions(-)\n>\n> diff --git a/include/migration/register.h b/include/migration/register.h\n> index aba3c9af2f..e822a2a59f 100644\n> --- a/include/migration/register.h\n> +++ b/include/migration/register.h\n> @@ -21,6 +21,13 @@ typedef struct MigPendingData {\n>       uint64_t precopy_bytes;\n>       /* Amount of pending bytes can be transferred in postcopy */\n>       uint64_t postcopy_bytes;\n> +    /* Amount of pending bytes can be transferred only in stopcopy */\n> +    uint64_t stopcopy_bytes;\n> +    /*\n> +     * Total pending data, modules do not need to update this field, it\n> +     * will be automatically calculated by migration core API.\n> +     */\n> +    uint64_t total_bytes;\n>   } MigPendingData;\n>\n>   /**\n> diff --git a/migration/migration.c b/migration/migration.c\n> index 68cfe2d3bf..bb17bd0e68 100644\n> --- a/migration/migration.c\n> +++ b/migration/migration.c\n> @@ -3198,6 +3198,44 @@ typedef enum {\n>       MIG_ITERATE_BREAK,          /* Break the loop */\n>   } MigIterateState;\n>\n> +/* Are we ready to move to the next iteration phase? */\n> +static bool migration_iteration_next_ready(MigrationState *s,\n> +                                           MigPendingData *pending)\n> +{\n> +    /*\n> +     * If the estimated values already suggest us to switchover, mark this\n> +     * iteration finished, time to do a slow sync.\n> +     */\n> +    if (pending->total_bytes <= s->threshold_size) {\n> +        return true;\n> +    }\n> +\n> +    /*\n> +     * Since we may have modules reporting stop-only data, we also want to\n> +     * re-query with slow mode if all precopy data is moved over.  This\n> +     * will also mark the current iteration done.\n> +     *\n> +     * This could happen when e.g. a module (like, VFIO) reports stopcopy\n> +     * size too large so it will never yet satisfy the downtime with the\n> +     * current setup (above check).  Here, slow version of re-query helps\n> +     * because we keep trying the best to move whatever we have.\n> +     */\n> +    if (pending->precopy_bytes == 0) {\n> +        return true;\n> +    }\n> +\n> +    return false;\n> +}\n> +\n> +static void migration_iteration_go_next(MigPendingData *pending)\n> +{\n> +    /*\n> +     * Do a slow sync will achieve this.  TODO: move RAM iteration code\n> +     * into the core layer.\n> +     */\n> +    qemu_savevm_query_pending(pending, true);\n> +}\n> +\n>   /*\n>    * Return true if continue to the next iteration directly, false\n>    * otherwise.\n> @@ -3209,12 +3247,10 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>                           s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);\n>       bool can_switchover = migration_can_switchover(s);\n>       MigPendingData pending = { };\n> -    uint64_t pending_size;\n>       bool complete_ready;\n>\n>       /* Fast path - get the estimated amount of pending data */\n>       qemu_savevm_query_pending(&pending, false);\n> -    pending_size = pending.precopy_bytes + pending.postcopy_bytes;\n>\n>       if (in_postcopy) {\n>           /*\n> @@ -3222,7 +3258,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>            * postcopy completion doesn't rely on can_switchover, because when\n>            * POSTCOPY_ACTIVE it means switchover already happened.\n>            */\n> -        complete_ready = !pending_size;\n> +        complete_ready = !pending.total_bytes;\n>           if (s->state == MIGRATION_STATUS_POSTCOPY_DEVICE &&\n>               (s->postcopy_package_loaded || complete_ready)) {\n>               /*\n> @@ -3242,9 +3278,8 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>            * postcopy started, so ESTIMATE should always match with EXACT\n>            * during postcopy phase.\n>            */\n> -        if (pending_size <= s->threshold_size) {\n> -            qemu_savevm_query_pending(&pending, true);\n> -            pending_size = pending.precopy_bytes + pending.postcopy_bytes;\n> +        if (migration_iteration_next_ready(s, &pending)) {\n> +            migration_iteration_go_next(&pending);\n>           }\n>\n>           /* Should we switch to postcopy now? */\n\nI agree with Juraj, postcopy condition should also consider stopcopy_bytes.\n\n> @@ -3264,11 +3299,12 @@ static MigIterateState migration_iteration_run(MigrationState *s)\n>            * (2) Pending size is no more than the threshold specified\n>            *     (which was calculated from expected downtime)\n>            */\n> -        complete_ready = can_switchover && (pending_size <= s->threshold_size);\n> +        complete_ready = can_switchover &&\n> +            (pending.total_bytes <= s->threshold_size);\n>       }\n>\n>       if (complete_ready) {\n> -        trace_migration_thread_low_pending(pending_size);\n> +        trace_migration_thread_low_pending(pending.total_bytes);\n>           migration_completion(s);\n>           return MIG_ITERATE_BREAK;\n>       }\n> diff --git a/migration/savevm.c b/migration/savevm.c\n> index 397f602257..b75c311a95 100644\n> --- a/migration/savevm.c\n> +++ b/migration/savevm.c\n> @@ -1766,8 +1766,7 @@ void qemu_savevm_query_pending(MigPendingData *pending, bool exact)\n>   {\n>       SaveStateEntry *se;\n>\n> -    pending->precopy_bytes = 0;\n> -    pending->postcopy_bytes = 0;\n> +    memset(pending, 0, sizeof(*pending));\n>\n>       QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {\n>           if (!se->ops || !se->ops->save_query_pending) {\n> @@ -1779,7 +1778,11 @@ void qemu_savevm_query_pending(MigPendingData *pending, bool exact)\n>           se->ops->save_query_pending(se->opaque, pending, exact);\n>       }\n>\n> +    pending->total_bytes = pending->precopy_bytes +\n> +        pending->stopcopy_bytes + pending->postcopy_bytes;\n> +\n>       trace_qemu_savevm_query_pending(exact, pending->precopy_bytes,\n> +                                    pending->stopcopy_bytes,\n>                                       pending->postcopy_bytes);\n\nWould it be convenient to also log pending->total_bytes?\n\nOther than that:\nReviewed-by: Avihai Horon <avihaih@nvidia.com>\n\n>   }\n>\n> diff --git a/migration/trace-events b/migration/trace-events\n> index f8995b8d0d..2f86ad448e 100644\n> --- a/migration/trace-events\n> +++ b/migration/trace-events\n> @@ -7,7 +7,7 @@ qemu_loadvm_state_section_partend(uint32_t section_id) \"%u\"\n>   qemu_loadvm_state_post_main(int ret) \"%d\"\n>   qemu_loadvm_state_section_startfull(uint32_t section_id, const char *idstr, uint32_t instance_id, uint32_t version_id) \"%u(%s) %u %u\"\n>   qemu_savevm_send_packaged(void) \"\"\n> -qemu_savevm_query_pending(bool exact, uint64_t precopy, uint64_t postcopy) \"exact=%d, precopy=%\"PRIu64\", postcopy=%\"PRIu64\n> +qemu_savevm_query_pending(bool exact, uint64_t precopy, uint64_t stopcopy, uint64_t postcopy) \"exact=%d, precopy=%\"PRIu64\", stopcopy=%\"PRIu64\", postcopy=%\"PRIu64\n>   loadvm_state_switchover_ack_needed(unsigned int switchover_ack_pending_num) \"Switchover ack pending num=%u\"\n>   loadvm_state_setup(void) \"\"\n>   loadvm_state_cleanup(void) \"\"\n> --\n> 2.53.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 (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=DSG/2Nf4;\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=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nvidia.com;"],"Received":["from lists1p.gnu.org (lists1p.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 4fvP1j0Z05z1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 20:35:19 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wCEcs-0008Mi-CH; Mon, 13 Apr 2026 06:34:42 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <avihaih@nvidia.com>)\n id 1wCEcq-0008MT-9i\n for qemu-devel@nongnu.org; Mon, 13 Apr 2026 06:34:40 -0400","from\n mail-southcentralusazlp170110003.outbound.protection.outlook.com\n ([2a01:111:f403:c10d::3] helo=SN4PR0501CU005.outbound.protection.outlook.com)\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <avihaih@nvidia.com>)\n id 1wCEcm-00014d-Ns\n for qemu-devel@nongnu.org; Mon, 13 Apr 2026 06:34:38 -0400","from BL1PR12MB5063.namprd12.prod.outlook.com (2603:10b6:208:31a::11)\n by SJ5PPFB332093D3.namprd12.prod.outlook.com\n (2603:10b6:a0f:fc02::99f) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.18; Mon, 13 Apr\n 2026 10:34:22 +0000","from BL1PR12MB5063.namprd12.prod.outlook.com\n ([fe80::a0c2:5681:4aca:90da]) by BL1PR12MB5063.namprd12.prod.outlook.com\n ([fe80::a0c2:5681:4aca:90da%7]) with mapi id 15.20.9818.014; Mon, 13 Apr 2026\n 10:34:22 +0000"],"ARC-Seal":"i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=x0Zomjmjmqq/pwssmNRgw1Wl4jVHhYl5T3jnnnewBInl9NA79LYqeRt1wzN0cE3IDzc7BfMjoFJ92vq0btbv/bHU9cjCNmimZqdpuwU0opTY0SqvGQK97IlpcweQ5hHvzGpa10MW+tjkMJ79Y50IyUM1bzgK9sSmKKBj1qElYusH0FE3KHG4Q6lOaxqiaDGQ7jr2JUc78rKiQAykHKblPpQJTQHwyWUarfQjq5hGnWzMzFAg+elAFP9DmJi8aRiKKsE43jSaJrTCPT72WXataYrEuqdYTwlputkxpOQWFn5Gu9OWeq7+Q/v52gxIzDGDhImP699wI/mPxzOkzhRQzg==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=Ft9VZCGgfiYOFvppPwpyQB4ZAcDOQh9YTIFo3MMybRI=;\n b=dAaFlWREhOQOY8h3YjCNhwYzbw4ZQr8h7/TArQ+yKkoEWnlirJKgOIQFAfOiGSbmnpJKIGgfM1GaDfw2cc+x/3dnGIjYCns6sdIlm9pDashfCKdIxTAYNSwR+9RE/hoigyKpuVXvXtNdkR6f2CnrtKafaxZQjBcnn3ZDPtMNTzymBfvqOrBLv65rdnJ4L0B6jSLdhisJ8J+niclIdyWtbuybu7JGTZk1yljx7oHAfAK655O2DhQPlSjYDP0ATPOPM29iyr6OtG/djQVJnVBzozo+U7a2OG13qxjELbIXr3dkPL7VfomErU1NaDlMQKRFCrcyRst53zr+NflGFf1TZQ==","ARC-Authentication-Results":"i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=Ft9VZCGgfiYOFvppPwpyQB4ZAcDOQh9YTIFo3MMybRI=;\n b=DSG/2Nf4u0Oku9tW0uSWydKPorVE/bzTCBlwXeDQFYJn35cvc6kFB7Rh4zna7IVoHDDEByDZEsKZTNkk7/YPIhQdOQYfycULSUFnfufZbQmkZcFMiKStB5qZ24GGlUabdcdXjfTHzEAW1JEFHuT5wypmVf/SAI6zHmiQn7J1fTF+pvE3VqkrtDgQn4ADz65l+lnDZRmCd6vWmqW2/ey08Nk3F8ncauq7xig0gXP3t9PAKzooS40+acQQfh53jFXn0JDO1ITK7p0LWQGE+FyLt9VbpSJ7b9ooOXYHTpuBgmdQWAcVVbiHFdEaRvVPsRtToFDN/IQJOk7eBQp7KIHuvQ==","Message-ID":"<9e52a221-96f3-4c4c-9693-3235617d2a98@nvidia.com>","Date":"Mon, 13 Apr 2026 13:34:17 +0300","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 06/14] migration: Introduce stopcopy_bytes in\n save_query_pending()","To":"Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org","Cc":"\"Maciej S . Szmigiero\" <mail@maciej.szmigiero.name>, =?utf-8?q?Daniel_P_?=\n\t=?utf-8?q?=2E_Berrang=C3=A9?= <berrange@redhat.com>,\n Zhiyi Guo <zhguo@redhat.com>, Juraj Marcin <jmarcin@redhat.com>,\n Prasad Pandit <ppandit@redhat.com>, Kirti Wankhede <kwankhede@nvidia.com>,\n\t=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@redhat.com>,\n Fabiano Rosas <farosas@suse.de>, Joao Martins <joao.m.martins@oracle.com>,\n Markus Armbruster <armbru@redhat.com>, Alex Williamson <alex@shazbot.org>","References":"<20260408165559.157108-1-peterx@redhat.com>\n <20260408165559.157108-7-peterx@redhat.com>","Content-Language":"en-US","From":"Avihai Horon <avihaih@nvidia.com>","In-Reply-To":"<20260408165559.157108-7-peterx@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-ClientProxiedBy":"FR4P281CA0242.DEUP281.PROD.OUTLOOK.COM\n (2603:10a6:d10:f5::20) To BL1PR12MB5063.namprd12.prod.outlook.com\n (2603:10b6:208:31a::11)","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"BL1PR12MB5063:EE_|SJ5PPFB332093D3:EE_","X-MS-Office365-Filtering-Correlation-Id":"5b253356-1b12-4cb6-9d7a-08de994839c8","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"BCL:0;\n ARA:13230040|376014|7416014|1800799024|366016|56012099003|22082099003|18002099003;","X-Microsoft-Antispam-Message-Info":"\n iPlgzv93McWfvibmY/QQj/63pWvCK4kg18i6R64yU8+uYiH3I6q93aB7QMzmGymOvdivvvqj5qIRQRJlhK3HGWx+xZwpQr+NYbHHHN4wCA4GRdadYqKH4dQ4HoErpqTnAS0wiwR2w1fvvPhZExgFW7MLTSohcizhF/zf49vKaGEQW4dD4b0gN/rwk1bWSbPvDy6cUJYE2aOW8cetqmUUbT1a6ZfYW5AwcU505Hye5sC+H/6rHdzHky45VOkdKB6dAc+VVr/bMxETAcMZPhAOcitFNrhtchtvfta3Ps6EPgkJavtMCltRzxQA/nPDDkmdW0l/THCX+FzMjOB/57guBef7eo9QjNamhw4/M99IUDuEB1dqbV0FtRCuSbySKCjfTre84UUnv5Xp5bFaV6q+ejsx1FV1GqgvTO36Nmc/okTx+N2g6wCPwUU/eE6qRNG3pBtXwYdeNz0bkhowxIxB0RWPCZXRHchMpRA1QLlIH22lHIDh+hSi13mBT2pceGTLcAxm1imdJdi4347Bq6Arr6eLifa/ozc52iSpoe0lBBWuXE5ts8sUTZUIa6nv/bNd3JmDIUiB1RVb3Na30ZX2N+a4NW+HdvoXNM/Zzrevbdnl2mLL/tZeoZenBBjh4qTS1RuLw/QUhmselwn3neBgYxjdDOmxQNN22a+L99RvFbafq7nsBiXxQHfKc1pnjmzey77Ki4Jw8ScgculDBCPbGTEhrawBk0GD3aBdJe6JYyg=","X-Forefront-Antispam-Report":"CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:BL1PR12MB5063.namprd12.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230040)(376014)(7416014)(1800799024)(366016)(56012099003)(22082099003)(18002099003);\n DIR:OUT; SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?Zo/McJ5uIacWBClKfjoRC9mN7/Qm?=\n\t=?utf-8?q?iRUwZ7mJzmfvrtiSfLROTa0qi0SUfWFyaYHh21UMYGwyzPfeUnYAU/5HnHhpqWs6u?=\n\t=?utf-8?q?KtZvjYGhhC25RsnYIaZWxMzQATe45g4DSDr6yx+sMlx9+l0IsMW5usE8K72DUy4Nv?=\n\t=?utf-8?q?KU1OuUohtG1+vqpysV8tEZ5pMFnqzt/cEkN43TjYgyK850KhNjkAZs3pz/zzTuUl0?=\n\t=?utf-8?q?Da0+nJRJzWrxvvKLdvbqL+SFKdbFnpKl7FELvUvPMRyGWOTW6qlE/mmXg6elrveSF?=\n\t=?utf-8?q?NPHfscM5o/jGZj+8tTVJiblHkWYg+J8mr/hSLKrc+6U28iAYR2uqEcY6w+FXZ5tUH?=\n\t=?utf-8?q?E/9u6RpuXip3Fa3307Y+sdfxDyDVI/SKO2mVUm2huORjEaGazBhAKywT0Me53rRzc?=\n\t=?utf-8?q?JDvSq8lTzZJq75/IQ/OgK9BqCgGMRDsDLHzSMweC6XZ493NatmUN3Jn6+qL9tIonY?=\n\t=?utf-8?q?IhU/TtSet30BESyYyZ08SuiyFJ4NCYr+SH86UIKLdsL2mv2B8vefHn2QtYqzQoxD/?=\n\t=?utf-8?q?LaRLTtBuwwgZZYvYFL88rar74mQaYRPvpPqfBrcMITU2zveEJR5q+UNWvOWKhOnuY?=\n\t=?utf-8?q?YN5hqU5oRMmrbUiWXNBZONP6p3PoGnyUS/6Y6BLWx6NANypnlygNb/n8pobU4L+P0?=\n\t=?utf-8?q?beYbwF1FIq/AYQV9FprpTKS4nrAVPHJ400FhsIz364slij4mEOPlT4ChBdYwRAbY2?=\n\t=?utf-8?q?SJnr0TuQEwfK8JcdbXgRYeLxSp6iXPrswDVAiqQvJFoscW8L+4gjNDJN0rgjekFka?=\n\t=?utf-8?q?hssc0mbVKGkmzg2Kw5YMgdBXlJgusfUvjP9PPn1uQsD7GDT137b9YIGvEeboHY3hh?=\n\t=?utf-8?q?SauG9X/Uei9xFqrLANJ8DimAwWesjd7eB67+3+Brxh1wbfqHECVRp+3BtmmOftlQo?=\n\t=?utf-8?q?Xm4fksBVwYIfB/FoMkllZOytUHth27zMQaaE89r7yaMza6b9KWASnBCnUKMlzcbwT?=\n\t=?utf-8?q?hUEjaejWoXtaPZcEEcT4w+M25llAFsR1Px5vjrvdj2d+gZeLzuakgY+pOXulWFbPC?=\n\t=?utf-8?q?k/CnKzlIthy+YUGtXmz/yeV/4JkBMK06Ce88om/K2T5L+4Lh5juq7pdM9lcf1DbHX?=\n\t=?utf-8?q?1m5PMOhf/zRFPZYeU96c3P0jTa/PbrNCKCLCZGaAqMxnDd5RMVDTggVuDcZ11e2Gy?=\n\t=?utf-8?q?OZ31Mj08yiTMKGo7NunqvoBU1WKbthK60/UpEqJq0FFoWVCe00BeG4+WX8eQvib57?=\n\t=?utf-8?q?NaR58HjgBSeIKxzygF0sw1Ed1zKkVJaQNu1QrdQhABUIQ9P1nO2ex87xgQqQpUpbM?=\n\t=?utf-8?q?sxZhRZ4qOBjOKU1Envc2yd2GjUf+mk3erVd4W8n0wQt2DMOewY8sM50GUJDdj+Zsm?=\n\t=?utf-8?q?XyZ7bgLqCxzKvZWwSTuqct5cT+nFWhUHs4ibkKBVHe6hdKsJ7rsvjhxeKGq/P72Ov?=\n\t=?utf-8?q?+pCvLh5m4GyhTpZI821+5D5n2/y3t0pi/xtKVRkb05O2butbBYm/qbiYDRS8+EApk?=\n\t=?utf-8?q?e9onpmQHMAZpgri+wSzszxufev7udDyQnms4pZySVUKXeHhpLXNVI1FlxPE1b1GmD?=\n\t=?utf-8?q?hCk8bXP94q1rXWWfTddnoxJ70LlAx8dkspT+TtMuiWnRhWN52b5NXA8Vp8BXnSP2l?=\n\t=?utf-8?q?tiGW1BCSeCw2tFih8ksYZnnnftdm69XWc66qw0Gna6FDBz2DnAsnWkmCG1fZqEUKx?=\n\t=?utf-8?q?A/rIG2pNQ1UtjS20BsJ3o+idgIcJ175Q=3D=3D?=","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n 5b253356-1b12-4cb6-9d7a-08de994839c8","X-MS-Exchange-CrossTenant-AuthSource":"BL1PR12MB5063.namprd12.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"13 Apr 2026 10:34:22.1237 (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n i2qW5JGNWf0bBawtLdCO6zLd0Dv3WmYPEvfI6sAKsBndmAG8DvXLS6JE+fnA7frZQL6F6hMNCkvkxf2tydLneg==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"SJ5PPFB332093D3","Received-SPF":"permerror client-ip=2a01:111:f403:c10d::3;\n envelope-from=avihaih@nvidia.com;\n helo=SN4PR0501CU005.outbound.protection.outlook.com","X-Spam_score_int":"-25","X-Spam_score":"-2.6","X-Spam_bar":"--","X-Spam_report":"(-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n SPF_HELO_NONE=0.001, SPF_NONE=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 development <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"}}]