[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/35] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT3
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 11/35] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST |
Date: |
Fri, 4 May 2012 12:54:38 +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>
---
vmstate.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/vmstate.h b/vmstate.h
index 5c56f25..b8ac2d0 100644
--- a/vmstate.h
+++ b/vmstate.h
@@ -309,6 +309,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.7.6
- [Qemu-devel] [PATCH v5 00/35] VMState port of all cpus, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 04/35] vmstate: use new cpu style for x86, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 11/35] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST,
Juan Quintela <=
- [Qemu-devel] [PATCH 06/35] vmstate: make microblaze cpus not migrateable, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 05/35] vmstate: use new style for lm32 cpus, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 08/35] vmstate: introduce float32 arrays, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 10/35] vmstate: introduce CPU_DoubleU arrays, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 13/35] vmstate: introduce VMSTATE_VARRAY_MULTIPLY, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 07/35] vmstate: port cris cpu to vmstate, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 14/35] vmstate: define vmstate_info_uinttls, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 12/35] vmstate: port ppc cpu, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc, Juan Quintela, 2012/05/04