[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/20] migration: Correctly handle subsections with n
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 02/20] migration: Correctly handle subsections with no 'needed' function |
Date: |
Wed, 22 Aug 2018 14:00:32 +0200 |
From: Peter Maydell <address@hidden>
Currently the vmstate subsection handling code treats a subsection
with no 'needed' function pointer as if it were the subsection
list terminator, so the subsection is never transferred and nor
is any subsection following it in the list.
Handle NULL 'needed' function pointers in subsections in the same
way that we do for top level VMStateDescription structures:
treat the subsection as always being needed.
This doesn't change behaviour for the current set of devices
in the tree, because all subsections declare a 'needed' function.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/vmstate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/vmstate.c b/migration/vmstate.c
index 6b9079bb51..0bc240a317 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -418,7 +418,7 @@ int vmstate_save_state_v(QEMUFile *f, const
VMStateDescription *vmsd,
static const VMStateDescription *
vmstate_get_subsection(const VMStateDescription **sub, char *idstr)
{
- while (sub && *sub && (*sub)->needed) {
+ while (sub && *sub) {
if (strcmp(idstr, (*sub)->name) == 0) {
return *sub;
}
@@ -486,8 +486,8 @@ static int vmstate_subsection_save(QEMUFile *f, const
VMStateDescription *vmsd,
int ret = 0;
trace_vmstate_subsection_save_top(vmsd->name);
- while (sub && *sub && (*sub)->needed) {
- if ((*sub)->needed(opaque)) {
+ while (sub && *sub) {
+ if (vmstate_save_needed(*sub, opaque)) {
const VMStateDescription *vmsdsub = *sub;
uint8_t len;
--
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 <=
- [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, 2018/08/22
- [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