[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/20] docs/migration: Clarify pre_load in subsection
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 03/20] docs/migration: Clarify pre_load in subsections |
Date: |
Wed, 22 Aug 2018 14:00:33 +0200 |
From: "Dr. David Alan Gilbert" <address@hidden>
Clarify that the pre_load function in a subsection is only called if
the subsection is found; to handle a missing subsection you may
set values in the pre_load of the parent vmsd.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
docs/devel/migration.rst | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst
index 6ed3fce061..687570754d 100644
--- a/docs/devel/migration.rst
+++ b/docs/devel/migration.rst
@@ -240,10 +240,13 @@ should succeed even with the data missing. To support
this the
subsection can be connected to a device property and from there
to a versioned machine type.
-One important note is that the post_load() function is called "after"
-loading all subsections, because a newer subsection could change same
-value that it uses. A flag, and the combination of pre_load and post_load
-can be used to detect whether a subsection was loaded, and to
+The 'pre_load' and 'post_load' functions on subsections are only
+called if the subsection is loaded.
+
+One important note is that the outer post_load() function is called "after"
+loading all subsections, because a newer subsection could change the same
+value that it uses. A flag, and the combination of outer pre_load and
+post_load can be used to detect whether a subsection was loaded, and to
fall back on default behaviour when the subsection isn't present.
Example:
@@ -315,8 +318,8 @@ For example:
the property to false.
c) Add a static bool support_foo function that tests the property.
d) Add a subsection with a .needed set to the support_foo function
- e) (potentially) Add a pre_load that sets up a default value for 'foo'
- to be used if the subsection isn't loaded.
+ e) (potentially) Add an outer pre_load that sets up a default value
+ for 'foo' to be used if the subsection isn't loaded.
Now that subsection will not be generated when using an older
machine type and the migration stream will be accepted by older
--
2.17.1
- [Qemu-devel] [PULL 00/20] Migration pull requset, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 02/20] migration: Correctly handle subsections with no 'needed' function, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 06/20] migration: create a dedicated connection for rdma return path, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 01/20] qapi/migration.json: fix the description for "query-migrate" output, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 03/20] docs/migration: Clarify pre_load in subsections,
Juan Quintela <=
- [Qemu-devel] [PULL 08/20] migration: Stop rdma yielding during incoming postcopy, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 04/20] migrate/cpu-throttle: Add max-cpu-throttle migration parameter, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 11/20] migration: poll the cm event while wait RDMA work request completion, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 12/20] migration: implement the shutdown for RDMA QIOChannel, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 10/20] migration: invoke qio_channel_yield only when qemu_in_coroutine(), Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 14/20] migration: poll the cm event for destination qemu, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 05/20] migration: disable RDMA WRITE after postcopy started, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 09/20] migration: implement io_set_aio_fd_handler function for RDMA QIOChannel, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 07/20] migration: implement bi-directional RDMA QIOChannel, Juan Quintela, 2018/08/22
- [Qemu-devel] [PULL 16/20] migration: fix counting normal page for compression, Juan Quintela, 2018/08/22