[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/9] vfio/migration: Implement VFIO migration protocol v2
From: |
Joao Martins |
Subject: |
Re: [PATCH 6/9] vfio/migration: Implement VFIO migration protocol v2 |
Date: |
Mon, 23 May 2022 19:14:39 +0100 |
On 5/12/22 16:43, Avihai Horon wrote:
> Replace the current VFIO migration protocol v1 implementation with a new
> implementation corresponding to VFIO migration protocol v2.
>
> The main changes are:
> - VFIO device state is now represented as a finite state machine instead
> of a bitmap.
>
> - Migration interface with kernel is now done using VFIO_DEVICE_FEATURE
> ioctl and normal read() and write() instead of the migration region.
>
> - As VFIO migration protocol v2 currently doesn't support the pre-copy
> phase of migration, .save_live_pending and .save_live_iterate handlers
> plus pre-copy relevant code are removed.
>
> Detailed information about VFIO migration protocol v2 and difference
> compared to v1 can be found here [1].
>
> [1]
> https://lore.kernel.org/all/20220224142024.147653-10-yishaih@nvidia.com/
>
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>
> ---
> hw/vfio/common.c | 21 +-
> hw/vfio/migration.c | 628 +++++++---------------------------
> hw/vfio/trace-events | 9 +-
> include/hw/vfio/vfio-common.h | 8 +-
> 4 files changed, 153 insertions(+), 513 deletions(-)
>
This looks like a fairly big patch, though more than 70% of it is removing
code. Perhaps you could split it into adding v2 and removing v1 afterwards,
rather
than a single replacement patch? It's just a suggestion anyhow, to hopefully
ease
analysis of the new additions. The removal looks to muddle a tiny bit.
I don't wanna throw you into potentially unnecessary work should maintainers
disagree,
so here's an attempt:
https://github.com/jpemartins/qemu/commits/for-avihai
If you apply your series on top of the same base commit (78ac2eebbab9) you
should be able
to compare both branches.
I haven't found yet any particular flaws in your new logic (but will reply back
if I find
any).
- Re: [PATCH 3/9] vfio/migration: Fix NULL pointer dereference bug, (continued)
[PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd(), Avihai Horon, 2022/05/12
- Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd(), Juan Quintela, 2022/05/16
- Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd(), Avihai Horon, 2022/05/17
- Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd(), Juan Quintela, 2022/05/18
- Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd(), Jason Gunthorpe, 2022/05/18
- Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd(), Daniel P . Berrangé, 2022/05/18
- Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd(), Jason Gunthorpe, 2022/05/18
[PATCH 6/9] vfio/migration: Implement VFIO migration protocol v2, Avihai Horon, 2022/05/12
- Re: [PATCH 6/9] vfio/migration: Implement VFIO migration protocol v2,
Joao Martins <=
[PATCH 7/9] vfio/migration: Reset device if setting recover state fails, Avihai Horon, 2022/05/12
[PATCH 8/9] vfio: Alphabetize migration section of VFIO trace-events file, Avihai Horon, 2022/05/12
[PATCH 9/9] docs/devel: Align vfio-migration docs to VFIO migration v2, Avihai Horon, 2022/05/12
Re: [PATCH 0/9] vfio/migration: Implement VFIO migration protocol v2, Alex Williamson, 2022/05/12