aboutsummaryrefslogtreecommitdiff
path: root/include/libvfio-user.h
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2021-01-25 17:15:21 +0000
committerGitHub <noreply@github.com>2021-01-25 17:15:21 +0000
commit405bd61b0e9cd06bf553ebcc7f21f8e581c84cfa (patch)
treeb9682efa239242c6690ddd5ff405474a756ede81 /include/libvfio-user.h
parent82ea5b11c5bdae59709477de00d50b7353dabf6d (diff)
downloadlibvfio-user-405bd61b0e9cd06bf553ebcc7f21f8e581c84cfa.zip
libvfio-user-405bd61b0e9cd06bf553ebcc7f21f8e581c84cfa.tar.gz
libvfio-user-405bd61b0e9cd06bf553ebcc7f21f8e581c84cfa.tar.bz2
explain migration workflow when saving state (#252)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'include/libvfio-user.h')
-rw-r--r--include/libvfio-user.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/libvfio-user.h b/include/libvfio-user.h
index 9cc0191..3ee22ec 100644
--- a/include/libvfio-user.h
+++ b/include/libvfio-user.h
@@ -347,6 +347,20 @@ typedef enum {
VFU_MIGR_STATE_RESUME
} vfu_migr_state_t;
+
+/*
+ * Callbacks during the pre-copy and stop-and-copy phases.
+ *
+ * The client executes the following steps to copy migration data:
+ *
+ * 1. get_pending_bytes: device must return amount of migration data
+ * 2. prepare_data: device must prepare migration data
+ * 3. read_data: device must provide migration data
+ *
+ * The client repeats the above steps until there is no more migration data to
+ * return (the device must return 0 from get_pending_bytes to indicate that
+ * there are no more migration data to be consumed in this iteration).
+ */
typedef struct {
/* migration state transition callback */