summary refs log tree commit diff stats
path: root/migration/file.h
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@suse.de>2024-02-29 12:30:15 -0300
committerPeter Xu <peterx@redhat.com>2024-03-01 15:42:04 +0800
commita49d15a38d3db0aca7e55850c036d1abbc09a0ea (patch)
tree92e7724f85aec77be2cd74eb6f5097583d4ab84d /migration/file.h
parentf427d90b9898dd7a718b645eeccd9d0ee75d4295 (diff)
downloadfocaccia-qemu-a49d15a38d3db0aca7e55850c036d1abbc09a0ea.tar.gz
focaccia-qemu-a49d15a38d3db0aca7e55850c036d1abbc09a0ea.zip
migration/multifd: Support incoming mapped-ram stream format
For the incoming mapped-ram migration we need to read the ramblock
headers, get the pages bitmap and send the host address of each
non-zero page to the multifd channel thread for writing.

Usage on HMP is:

(qemu) migrate_set_capability multifd on
(qemu) migrate_set_capability mapped-ram on
(qemu) migrate_incoming file:migfile

(the ram.h include needs to move because we've been previously relying
on it being included from migration.c. Now file.h will start including
multifd.h before migration.o is processed)

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240229153017.2221-22-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/file.h')
-rw-r--r--migration/file.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/file.h b/migration/file.h
index 01a338cac7..9f71e87f74 100644
--- a/migration/file.h
+++ b/migration/file.h
@@ -11,6 +11,7 @@
 #include "qapi/qapi-types-migration.h"
 #include "io/task.h"
 #include "channel.h"
+#include "multifd.h"
 
 void file_start_incoming_migration(FileMigrationArgs *file_args, Error **errp);
 
@@ -21,4 +22,5 @@ void file_cleanup_outgoing_migration(void);
 bool file_send_channel_create(gpointer opaque, Error **errp);
 int file_write_ramblock_iov(QIOChannel *ioc, const struct iovec *iov,
                             int niov, RAMBlock *block, Error **errp);
+int multifd_file_recv_data(MultiFDRecvParams *p, Error **errp);
 #endif