[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/25] vmstate: Add version arg to VMSTATE_SINGLE_TE
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 14/25] vmstate: Add version arg to VMSTATE_SINGLE_TEST() |
Date: |
Mon, 19 Oct 2009 20:42:59 +0200 |
This allows to define VMSTATE_SINGLE with VMSTATE_SINGLE_TEST
Signed-off-by: Juan Quintela <address@hidden>
---
hw/hw.h | 17 ++++++-----------
target-i386/machine.c | 2 +-
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index eb199fb..3feb9df 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -355,17 +355,9 @@ extern const VMStateInfo vmstate_info_buffer;
vmstate_offset_array(_state, _field, uint8_t, \
sizeof(typeof_field(_state, _field)))
-#define VMSTATE_SINGLE(_field, _state, _version, _info, _type) { \
- .name = (stringify(_field)), \
- .version_id = (_version), \
- .size = sizeof(_type), \
- .info = &(_info), \
- .flags = VMS_SINGLE, \
- .offset = vmstate_offset_value(_state, _field, _type), \
-}
-
-#define VMSTATE_SINGLE_TEST(_field, _state, _test, _info, _type) { \
+#define VMSTATE_SINGLE_TEST(_field, _state, _test, _version, _info, _type) { \
.name = (stringify(_field)), \
+ .version_id = (_version), \
.field_exists = (_test), \
.size = sizeof(_type), \
.info = &(_info), \
@@ -505,6 +497,9 @@ extern const VMStateDescription vmstate_i2c_slave;
_v : version
*/
+#define VMSTATE_SINGLE(_field, _state, _version, _info, _type) \
+ VMSTATE_SINGLE_TEST(_field, _state, NULL, _version, _info, _type)
+
#define VMSTATE_INT8_V(_f, _s, _v) \
VMSTATE_SINGLE(_f, _s, _v, vmstate_info_int8, int8_t)
#define VMSTATE_INT16_V(_f, _s, _v) \
@@ -557,7 +552,7 @@ extern const VMStateDescription vmstate_i2c_slave;
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t)
#define VMSTATE_UINT32_TEST(_f, _s, _t) \
- VMSTATE_SINGLE_TEST(_f, _s, _t, vmstate_info_uint32, uint32_t)
+ VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint32, uint32_t)
#define VMSTATE_TIMER_V(_f, _s, _v) \
VMSTATE_POINTER(_f, _s, _v, vmstate_info_timer, QEMUTimer *)
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 26d012d..869c681 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -314,7 +314,7 @@ static const VMStateInfo vmstate_hack_uint64_as_uint32 = {
};
#define VMSTATE_HACK_UINT32(_f, _s, _t) \
- VMSTATE_SINGLE_TEST(_f, _s, _t, vmstate_hack_uint64_as_uint32, uint64_t)
+ VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_hack_uint64_as_uint32, uint64_t)
#endif
static void cpu_pre_save(void *opaque)
--
1.6.2.5
- [Qemu-devel] [PATCH 06/25] vmstate: fix indentation, (continued)
- [Qemu-devel] [PATCH 06/25] vmstate: fix indentation, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 07/25] vmstate: factor vmstate_offset_value, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 08/25] vmstate: factor vmstate_offset_pointer, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 09/25] vmstate: factor vmstate_offset_array, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 10/25] vmstate: factor vmstate_offset_buffer, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 11/25] vmstate: factor VMSTATE_*BUFFER* definitions, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 12/25] vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove it, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 13/25] vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes), Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 15/25] vmstate: Add VMSTATE_BUFFER_UNUSED, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 17/25] rtl8139: port TallyCounters to vmstate, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 14/25] vmstate: Add version arg to VMSTATE_SINGLE_TEST(),
Juan Quintela <=
- [Qemu-devel] [PATCH 16/25] vmstate: Introduce the concept of sub-arrays, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 19/25] eeprom93xx: port to vmstate, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 21/25] pcnet: port to vmstate, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 18/25] rtl8139: port to vmstate, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 22/25] ne2000: port to vmstate, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 20/25] eepro100: port to vmstate, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 24/25] e1000: unfold mac_regarraystosave array, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 23/25] e1000: unfold mac_reg_tosave array, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 25/25] e1000: port to vmstate, Juan Quintela, 2009/10/19
- Re: [Qemu-devel] [PATCH 00/25] VMState cleanups and conversion of network drivers, Jamie Lokier, 2009/10/19