mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00

Implement the multifd device state transfer via additional per-device thread inside save_live_complete_precopy_thread handler. Switch between doing the data transfer in the new handler and doing it in the old save_state handler depending if VFIO multifd transfer is enabled or not. Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/4d727e2e0435e0022d50004e474077632830e08d.1741124640.git.maciej.szmigiero@oracle.com [ clg: - Reordered savevm_vfio_handlers - Updated save_live_complete_precopy* documentation ] Signed-off-by: Cédric Le Goater <clg@redhat.com>
34 lines
1 KiB
C
34 lines
1 KiB
C
/*
|
|
* Multifd VFIO migration
|
|
*
|
|
* Copyright (C) 2024,2025 Oracle and/or its affiliates.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef HW_VFIO_MIGRATION_MULTIFD_H
|
|
#define HW_VFIO_MIGRATION_MULTIFD_H
|
|
|
|
#include "hw/vfio/vfio-common.h"
|
|
|
|
bool vfio_multifd_setup(VFIODevice *vbasedev, bool alloc_multifd, Error **errp);
|
|
void vfio_multifd_cleanup(VFIODevice *vbasedev);
|
|
|
|
bool vfio_multifd_transfer_supported(void);
|
|
bool vfio_multifd_transfer_enabled(VFIODevice *vbasedev);
|
|
|
|
bool vfio_multifd_load_state_buffer(void *opaque, char *data, size_t data_size,
|
|
Error **errp);
|
|
|
|
void vfio_multifd_emit_dummy_eos(VFIODevice *vbasedev, QEMUFile *f);
|
|
|
|
bool
|
|
vfio_multifd_save_complete_precopy_thread(SaveLiveCompletePrecopyThreadData *d,
|
|
Error **errp);
|
|
|
|
int vfio_multifd_switchover_start(VFIODevice *vbasedev);
|
|
|
|
#endif
|