vfio/migration: Multifd device state transfer - add support checking function

Add vfio_multifd_transfer_supported() function that tells whether the
multifd device state transfer is supported.

Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Link: https://lore.kernel.org/qemu-devel/8ce50256f341b3d47342bb217cb5fbb2deb14639.1741124640.git.maciej.szmigiero@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
Maciej S. Szmigiero 2025-03-04 23:03:50 +01:00 committed by Cédric Le Goater
parent 961165122b
commit 2efa35d34e
2 changed files with 8 additions and 0 deletions

View file

@ -31,3 +31,9 @@ typedef struct VFIODeviceStatePacket {
uint32_t flags;
uint8_t data[0];
} QEMU_PACKED VFIODeviceStatePacket;
bool vfio_multifd_transfer_supported(void)
{
return multifd_device_state_supported() &&
migrate_send_switchover_start();
}

View file

@ -14,4 +14,6 @@
#include "hw/vfio/vfio-common.h"
bool vfio_multifd_transfer_supported(void);
#endif