[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/9] migration: add version supporting macros for st
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 6/9] migration: add version supporting macros for struct pointer |
Date: |
Tue, 24 Sep 2013 14:03:20 +0200 |
From: Alexey Kardashevskiy <address@hidden>
This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_V
and VMSTATE_STRUCT_POINTER_V in addition to the already existing
VMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros.
Cc: Andreas Färber <address@hidden>
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
include/migration/vmstate.h | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 1c31b5d..9d09e60 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -310,8 +310,18 @@ extern const VMStateInfo vmstate_info_bitmap;
.offset = vmstate_offset_value(_state, _field, _type), \
}
-#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) { \
+#define VMSTATE_STRUCT_POINTER_V(_field, _state, _version, _vmsd, _type) { \
.name = (stringify(_field)), \
+ .version_id = (_version), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_POINTER, \
+ .offset = vmstate_offset_value(_state, _field, _type), \
+}
+
+#define VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, _version, _vmsd,
_type) { \
+ .name = (stringify(_field)), \
+ .version_id = (_version), \
.field_exists = (_test), \
.vmsd = &(_vmsd), \
.size = sizeof(_type), \
@@ -497,7 +507,10 @@ extern const VMStateInfo vmstate_info_bitmap;
VMSTATE_STRUCT_TEST(_field, _state, NULL, _version, _vmsd, _type)
#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) \
- VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type)
+ VMSTATE_STRUCT_POINTER_V(_field, _state, 0, _vmsd, _type)
+
+#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) \
+ VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, 0, _vmsd, _type)
#define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) \
VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, NULL, _version, \
--
1.8.3.1
- [Qemu-devel] [PULL 0/9] migration queue, Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 1/9] savevm: add comments for qemu_file_get_error(), Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 2/9] savevm: fix wrong initialization by ram_control_load_hook, Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 4/9] rdma: clean up of qemu_rdma_cleanup(), Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 5/9] rdma: constify ram_chunk_{index, start, end}, Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 6/9] migration: add version supporting macros for struct pointer,
Juan Quintela <=
- [Qemu-devel] [PATCH 7/9] migration: Fix debug print type, Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 9/9] migration: ram_handle_compressed, Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 8/9] arch_init: make is_zero_page accept size, Juan Quintela, 2013/09/24
- [Qemu-devel] [PATCH 3/9] arch_init: right return for ram_save_iterate, Juan Quintela, 2013/09/24