summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2025-06-10 08:39:14 -0700
committerCédric Le Goater <clg@redhat.com>2025-06-11 14:01:58 +0200
commitf95fd60ac164a75c586ce29ebcc94bb6df85b52a (patch)
tree2fc70da9363720c39f76099f098b1a4bc1b9b99a /include
parenta574b0614449760a83310226b548e21b08a805fa (diff)
downloadfocaccia-qemu-f95fd60ac164a75c586ce29ebcc94bb6df85b52a.tar.gz
focaccia-qemu-f95fd60ac164a75c586ce29ebcc94bb6df85b52a.zip
migration: cpr helpers
Add the cpr_incoming_needed, cpr_open_fd, and cpr_resave_fd helpers,
for use when adding cpr support for vfio and iommufd.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/1749569991-25171-2-git-send-email-steven.sistare@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/migration/cpr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/migration/cpr.h b/include/migration/cpr.h
index 7561fc75ad..07858e93fa 100644
--- a/include/migration/cpr.h
+++ b/include/migration/cpr.h
@@ -18,6 +18,9 @@
 void cpr_save_fd(const char *name, int id, int fd);
 void cpr_delete_fd(const char *name, int id);
 int cpr_find_fd(const char *name, int id);
+void cpr_resave_fd(const char *name, int id, int fd);
+int cpr_open_fd(const char *path, int flags, const char *name, int id,
+                Error **errp);
 
 MigMode cpr_get_incoming_mode(void);
 void cpr_set_incoming_mode(MigMode mode);
@@ -28,6 +31,8 @@ int cpr_state_load(MigrationChannel *channel, Error **errp);
 void cpr_state_close(void);
 struct QIOChannel *cpr_state_ioc(void);
 
+bool cpr_incoming_needed(void *opaque);
+
 QEMUFile *cpr_transfer_output(MigrationChannel *channel, Error **errp);
 QEMUFile *cpr_transfer_input(MigrationChannel *channel, Error **errp);