[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/25] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT3
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 12/25] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST |
Date: |
Tue, 25 Oct 2011 16:00:46 +0200 |
We have an array of structs whose size is an int32 in the same struct that
depends on a test value to know if it is there or not.
Signed-off-by: Juan Quintela <address@hidden>
---
hw/hw.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 3044cec..798732f 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -533,6 +533,16 @@ extern const VMStateDescription vmstate_cpu;
.offset = offsetof(_state, _field), \
}
+#define VMSTATE_STRUCT_VARRAY_INT32_TEST(_field, _state, _field_num, _test,
_vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .num_offset = vmstate_offset_value(_state, _field_num, int32_t), \
+ .vmsd = &(_vmsd), \
+ .field_exists = (_test), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_VARRAY_INT32, \
+ .offset = offsetof(_state, _field), \
+}
+
#define VMSTATE_STRUCT_VARRAY_POINTER_INT32(_field, _state, _field_num, _vmsd,
_type) { \
.name = (stringify(_field)), \
.version_id = 0, \
--
1.7.6.4
- [Qemu-devel] [PATCH 25/25] vmstate: all cpus converted, (continued)
- [Qemu-devel] [PATCH 25/25] vmstate: all cpus converted, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 23/25] arm: save always 32 fpu registers, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 16/25] vmstate: port sparc cpu, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 22/25] vmstate: port mips cpu, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 21/25] mips: bump migration version to 4, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 14/25] vmstate: introduce VMSTATE_VARRAY_MULTIPLY, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 15/25] vmstate: define vmstate_info_uinttls, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 13/25] vmstate: port ppc cpu, Juan Quintela, 2011/10/25
- [Qemu-devel] [PATCH 12/25] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST,
Juan Quintela <=