summary refs log tree commit diff stats
path: root/hw/vfio/migration-multifd.h
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>2025-03-04 23:03:53 +0100
committerCédric Le Goater <clg@redhat.com>2025-03-06 06:47:34 +0100
commit3228d311ab1882f75b04d080d33a71fc7a0bcac5 (patch)
tree3189ee2109c686efb16d38c73611571cbdbc377c /hw/vfio/migration-multifd.h
parent6bcffb1cad5b2b45152c0faa1133c96d3f129914 (diff)
downloadfocaccia-qemu-3228d311ab1882f75b04d080d33a71fc7a0bcac5.tar.gz
focaccia-qemu-3228d311ab1882f75b04d080d33a71fc7a0bcac5.zip
vfio/migration: Multifd device state transfer support - received buffers queuing
The multifd received data needs to be reassembled since device state
packets sent via different multifd channels can arrive out-of-order.

Therefore, each VFIO device state packet carries a header indicating its
position in the stream.
The raw device state data is saved into a VFIOStateBuffer for later
in-order loading into the device.

The last such VFIO device state packet should have
VFIO_DEVICE_STATE_CONFIG_STATE flag set and carry the device config state.

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/e3bff515a8d61c582b94b409eb12a45b1a143a69.1741124640.git.maciej.szmigiero@oracle.com
[ clg: - Reordered savevm_vfio_handlers
       - Added load_state_buffer documentation ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/migration-multifd.h')
-rw-r--r--hw/vfio/migration-multifd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/vfio/migration-multifd.h b/hw/vfio/migration-multifd.h
index 2a7a76164f..8c6320fcb4 100644
--- a/hw/vfio/migration-multifd.h
+++ b/hw/vfio/migration-multifd.h
@@ -20,4 +20,7 @@ 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);
+
 #endif