[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v11 04/11] vfio/common: Change vfio_devices_all_running_and_s
From: |
Juan Quintela |
Subject: |
Re: [PATCH v11 04/11] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one |
Date: |
Thu, 16 Feb 2023 15:53:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Avihai Horon <avihaih@nvidia.com> wrote:
> vfio_devices_all_running_and_saving() is used to check if migration is
> in pre-copy phase. This is done by checking if migration is in setup or
> active states and if all VFIO devices are in pre-copy state, i.e.
> _SAVING | _RUNNING.
>
> In VFIO migration protocol v2 pre-copy support is made optional. Hence,
> a matching v2 protocol pre-copy state can't be used here.
>
> As preparation for adding v2 protocol, change
> vfio_devices_all_running_and_saving() logic such that it doesn't use the
> VFIO pre-copy state.
>
> The new equivalent logic checks if migration is in active state and if
> all VFIO devices are in running state [1]. No functional changes
> intended.
>
> [1] Note that checking if migration is in setup or active states and if
> all VFIO devices are in running state doesn't guarantee that we are in
> pre-copy phase, thus we check if migration is only in active state.
>
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>
> Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
- [PATCH v11 00/11] vfio/migration: Implement VFIO migration protocol v2, Avihai Horon, 2023/02/16
- [PATCH v11 02/11] vfio/migration: Fix NULL pointer dereference bug, Avihai Horon, 2023/02/16
- [PATCH v11 03/11] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support, Avihai Horon, 2023/02/16
- [PATCH v11 01/11] linux-headers: Update to v6.2-rc8, Avihai Horon, 2023/02/16
- [PATCH v11 04/11] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one, Avihai Horon, 2023/02/16
- Re: [PATCH v11 04/11] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one,
Juan Quintela <=
- [PATCH v11 05/11] vfio/migration: Block multiple devices migration, Avihai Horon, 2023/02/16
- [PATCH v11 06/11] vfio/migration: Move migration v1 logic to vfio_migration_init(), Avihai Horon, 2023/02/16
- [PATCH v11 07/11] vfio/migration: Rename functions/structs related to v1 protocol, Avihai Horon, 2023/02/16
- [PATCH v11 08/11] vfio/migration: Implement VFIO migration protocol v2, Avihai Horon, 2023/02/16