All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Avihai Horon <avihaih@nvidia.com>, qemu-devel@nongnu.org
Cc: "Alex Williamson" <alex@shazbot.org>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Maor Gottlieb" <maorg@nvidia.com>,
	"Avihai Horon" <avihaih@nvidia.com>
Subject: Re: [PATCH 07/14] migration: Make switchover-ack re-usable
Date: Thu, 07 May 2026 11:10:53 -0300	[thread overview]
Message-ID: <87h5ojxqc2.fsf@suse.de> (raw)
In-Reply-To: <20260505081423.28326-8-avihaih@nvidia.com>

Avihai Horon <avihaih@nvidia.com> writes:

> Switchover-ack is a mechanism to synchronize between source and
> destination QEMU during migration to prevent the source from switching
> over prematurely.
>
> VFIO uses switchover-ack to ensure switchover happens only after
> destination side has loaded the precopy initial bytes. This is important
> for VFIO, as otherwise downtime could be impacted and be higher.
>
> In its current state, switchover-ack is a one-time mechanism, meaning
> that switchover is acked only once and past that another ACK cannot be
> requested again. This was sufficient until now, as VFIO precopy initial
> bytes was defined to be monotonically decreasing. Thus, when precopy
> initial bytes reached zero for all VFIO devices, a single ACK would be
> sent and its validity would hold.
>
> However, now the new VFIO_PRECOPY_INFO_REINIT feature allows precopy
> initial bytes to be re-initialized during precopy. Specifically, it
> means that initial bytes can grow after reaching zero, which would
> invalidate a previously sent switchover ACK.
>
> To solve this, make switchover-ack reusable and allow devices to request
> another switchover ACK when needed.
>
> To avoid scattering them all over, switchover ACKs are requested through
> a new request_switchover_ack handler which is called in specific places.
>
> Since now switchover ACK can be requested for a specific device and in
> different times, make switchover ACK per-device (instead of a single ACK
> for all devices) and let source side do the pending ACKs accounting.
>
> Keep the legacy switchover-ack mechanism for backward compatibility and
> turn it on by a compatibility property for older machines. Enable the
> property until VFIO implements the new switchover-ack.
>
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>

Reviewed-by: Fabiano Rosas <farosas@suse.de>


  reply	other threads:[~2026-05-07 14:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  8:14 [PATCH 00/14] Make switchover-ack re-usable and add VFIO precopy REINIT feature Avihai Horon
2026-05-05  8:14 ` [PATCH 01/14] scripts/update-linux-headers: Add typelimits.h Avihai Horon
2026-05-07  7:54   ` Cédric Le Goater
2026-05-07  9:07     ` gaosong
2026-05-05  8:14 ` [PATCH 02/14] linux-headers: Update to Linux v7.1-rc1 Avihai Horon
2026-05-07  9:16   ` Cédric Le Goater
2026-05-05  8:14 ` [PATCH 03/14] migration: Propagate errors in migration_completion_precopy() Avihai Horon
2026-05-07  8:03   ` Cédric Le Goater
2026-05-08 13:01     ` Avihai Horon
2026-05-15 15:20       ` Peter Xu
2026-05-05  8:14 ` [PATCH 04/14] migration: Log the approver in qemu_loadvm_approve_switchover() Avihai Horon
2026-05-07  8:09   ` Cédric Le Goater
2026-05-08 13:07     ` Avihai Horon
2026-05-15 15:24   ` Peter Xu
2026-05-05  8:14 ` [PATCH 05/14] migration: Replace switchover_ack_needed SaveVMHandler Avihai Horon
2026-05-15 15:27   ` Peter Xu
2026-05-05  8:14 ` [PATCH 06/14] migration: Rename switchover-ack code to legacy Avihai Horon
2026-05-05  8:14 ` [PATCH 07/14] migration: Make switchover-ack re-usable Avihai Horon
2026-05-07 14:10   ` Fabiano Rosas [this message]
2026-05-05  8:14 ` [PATCH 08/14] migration: Check switchover-ack during switchover phase Avihai Horon
2026-05-05  8:14 ` [PATCH 09/14] vfio/migration: Re-query precopy size before sending VFIO_MIG_FLAG_DEV_INIT_DATA_SENT Avihai Horon
2026-05-07  8:24   ` Cédric Le Goater
2026-05-08 13:10     ` Avihai Horon
2026-05-05  8:14 ` [PATCH 10/14] vfio/migration: Add Error ** parameter to vfio_migration_init() Avihai Horon
2026-05-07  7:59   ` Cédric Le Goater
2026-05-08 13:18     ` Avihai Horon
2026-05-08 13:21       ` Avihai Horon
2026-05-05  8:14 ` [PATCH 11/14] vfio/migration: Add new switchover-ack mechanism Avihai Horon
2026-05-05  8:14 ` [PATCH 12/14] vfio/migration: Implement VFIO_PRECOPY_INFO_REINIT feature Avihai Horon
2026-05-05  8:14 ` [PATCH 13/14] vfio/migration: Check VFIO_PRECOPY_INFO_REINIT during switchover Avihai Horon
2026-05-05  8:14 ` [PATCH 14/14] migration: Enable new switchover-ack Avihai Horon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h5ojxqc2.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=alex@shazbot.org \
    --cc=avihaih@nvidia.com \
    --cc=clg@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=maorg@nvidia.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.