aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAaron Lindsay <aaron@os.amperecomputing.com>2019-01-21 10:23:13 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-01-21 10:38:55 +0000
commit8c07559fc7ee132e2145ad09299a08c10ebe7804 (patch)
tree78da6eb7ab56ca982e0f95a5ed341c510f284b26 /docs
parent8733d762d5e089a017ac7c5bc71077a8d75d1b46 (diff)
downloadqemu-8c07559fc7ee132e2145ad09299a08c10ebe7804.zip
qemu-8c07559fc7ee132e2145ad09299a08c10ebe7804.tar.gz
qemu-8c07559fc7ee132e2145ad09299a08c10ebe7804.tar.bz2
migration: Add post_save function to VMStateDescription
In some cases it may be helpful to modify state before saving it for migration, and then modify the state back after it has been saved. The existing pre_save function provides half of this functionality. This patch adds a post_save function to provide the second half. Signed-off-by: Aaron Lindsay <aclindsa@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-id: 20181211151945.29137-2-aaron@os.amperecomputing.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/migration.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst
index e7658ab..2200596 100644
--- a/docs/devel/migration.rst
+++ b/docs/devel/migration.rst
@@ -419,8 +419,13 @@ The functions to do that are inside a vmstate definition, and are called:
This function is called before we save the state of one device.
-Example: You can look at hpet.c, that uses the three function to
-massage the state that is transferred.
+- ``int (*post_save)(void *opaque);``
+
+ This function is called after we save the state of one device
+ (even upon failure, unless the call to pre_save returned an error).
+
+Example: You can look at hpet.c, that uses the first three functions
+to massage the state that is transferred.
The ``VMSTATE_WITH_TMP`` macro may be useful when the migration
data doesn't match the stored device data well; it allows an