[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 077/124] vmstate: Introduce VMSTATE_VARRAY_UINT32_TE
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 077/124] vmstate: Introduce VMSTATE_VARRAY_UINT32_TEST |
Date: |
Mon, 21 Apr 2014 16:40:57 +0200 |
Use it on the only case were a version was used.
Signed-off-by: Juan Quintela <address@hidden>
---
hw/misc/arm_sysctl.c | 5 +++--
include/migration/vmstate.h | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c
index 0f61241..668681f 100644
--- a/hw/misc/arm_sysctl.c
+++ b/hw/misc/arm_sysctl.c
@@ -67,8 +67,9 @@ static const VMStateDescription vmstate_arm_sysctl = {
VMSTATE_UINT32_TEST(sys_clcd, arm_sysctl_state, vmstate_3_plus),
VMSTATE_UINT32_ARRAY_TEST(mb_clock, arm_sysctl_state, 6,
vmstate_4_plus),
- VMSTATE_VARRAY_UINT32(db_clock, arm_sysctl_state, db_num_clocks,
- 4, vmstate_info_uint32, uint32_t),
+ VMSTATE_VARRAY_UINT32_TEST(db_clock, arm_sysctl_state, db_num_clocks,
+ vmstate_4_plus, vmstate_info_uint32,
+ uint32_t),
VMSTATE_END_OF_LIST()
}
};
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index be80717..e1c9680 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -257,9 +257,9 @@ extern const VMStateInfo vmstate_info_bitmap;
.offset = vmstate_offset_pointer(_state, _field, _type), \
}
-#define VMSTATE_VARRAY_UINT32(_field, _state, _field_num, _version, _info,
_type) {\
+#define VMSTATE_VARRAY_UINT32_TEST(_field, _state, _field_num, _test, _info,
_type) {\
.name = (stringify(_field)), \
- .version_id = (_version), \
+ .field_exists = (_test), \
.num_offset = vmstate_offset_value(_state, _field_num, uint32_t),\
.info = &(_info), \
.size = sizeof(_type), \
@@ -611,6 +611,9 @@ extern const VMStateInfo vmstate_info_bitmap;
#define VMSTATE_UNUSED(_size) \
VMSTATE_UNUSED_TEST(NULL, _size)
+#define VMSTATE_VARRAY_UINT32(_field, _state, _field_num, _version, _info,
_type) \
+ VMSTATE_VARRAY_UINT32_TEST(_field, _state, _field_num, NULL, _info, _type)
+
#define VMSTATE_END_OF_LIST() \
{}
--
1.9.0
- [Qemu-devel] [PATCH 067/124] vmstate: Remove version, test and start parameter from VMSTATE_VBUFFER_UINT32, (continued)
- [Qemu-devel] [PATCH 067/124] vmstate: Remove version, test and start parameter from VMSTATE_VBUFFER_UINT32, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 066/124] vmstate: remove version parameter from VMSTATE_BUFFER_POINTER_UNSAFE, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 069/124] vmstate: Remove VMSTATE_BUFFER_MULTIPLY, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 068/124] vmstate: Remove version paramenter from VMSTATE_ARRAY_OF_POINTER_TO_STRUCT, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 072/124] vmstate: Move all users of versioning of VMSTATE_STRUCT_ARRAY to _TEST, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 073/124] vmstate: Remove version parameter from VMSTATE_STRUCT_ARRAY, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 074/124] vmstate: Remove version parameter from VMSTATE_STRUCT_ARRAY_TEST, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 070/124] vmstate: Remove version parameter from VMSTATE_STATIC_BUFFER, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 076/124] vmstate: Remove unused version parameter from VMSTATE_STRUCT_VARRAY_UINT8, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 075/124] vmstate: Remove unused version parameter from VMSTATE_STRUCT_VARRAY_INT32, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 077/124] vmstate: Introduce VMSTATE_VARRAY_UINT32_TEST,
Juan Quintela <=
- [Qemu-devel] [PATCH 078/124] vmstate: Remove version parameter from VMSTATE_VARRAY_UINT32, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 079/124] vmstate: Remove version parameter from VMSTATE_STRUCT_TEST, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 080/124] vmstate: Move all users of versioning to VMSTATE_STRUCT_TEST, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 081/124] vmstate: Remove version from all VMSTATE_STRUCT calls, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 082/124] vmstate: Create VMSTATE_VARRAY macro, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 083/124] vmstate: Create VMSTATE_POINTER_UNSAFE, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 084/124] vmstate: Create VMSTATE_OPENCODED_UNSAFE, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 085/124] vmstate: Create VMSTATE_SYNTHETIC, Juan Quintela, 2014/04/21
- [Qemu-devel] [PATCH 086/124] vmstate: version_id is gone from fields, Juan Quintela, 2014/04/21