[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 67/97] vmstate: Move all users of versioning of VMST
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 67/97] vmstate: Move all users of versioning of VMSTATE_STRUCT_ARRAY to _TEST |
Date: |
Mon, 7 Apr 2014 05:21:25 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
hw/char/escc.c | 4 ++--
hw/ide/internal.h | 3 ++-
hw/timer/i8254_common.c | 5 +++--
target-i386/machine.c | 15 +++++++++------
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/hw/char/escc.c b/hw/char/escc.c
index 4875a2b..dc5768f 100644
--- a/hw/char/escc.c
+++ b/hw/char/escc.c
@@ -678,8 +678,8 @@ static const VMStateDescription vmstate_escc = {
.version_id = 2,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
- VMSTATE_STRUCT_ARRAY(chn, ESCCState, 2, 2, vmstate_escc_chn,
- ChannelState),
+ VMSTATE_STRUCT_ARRAY_TEST(chn, ESCCState, 2, vmstate_2_plus, 0,
+ vmstate_escc_chn, ChannelState),
VMSTATE_END_OF_LIST()
}
};
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 0567a52..d771308 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -526,7 +526,8 @@ extern const VMStateDescription vmstate_ide_bus;
extern const VMStateDescription vmstate_ide_drive;
#define VMSTATE_IDE_DRIVES(_field, _state) \
- VMSTATE_STRUCT_ARRAY(_field, _state, 2, 3, vmstate_ide_drive, IDEState)
+ VMSTATE_STRUCT_ARRAY_TEST(_field, _state, 2, vmstate_3_plus, 0,\
+ vmstate_ide_drive, IDEState)
void ide_bus_reset(IDEBus *bus);
int64_t ide_get_sector(IDEState *s);
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index f519864..b7bd908 100644
--- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c
@@ -268,8 +268,9 @@ static const VMStateDescription vmstate_pit_common = {
.fields = (VMStateField[]) {
VMSTATE_UINT32_TEST(channels[0].irq_disabled, PITCommonState,
vmstate_3_plus),
- VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
- vmstate_pit_channel, PITChannelState),
+ VMSTATE_STRUCT_ARRAY_TEST(channels, PITCommonState, 3,
+ vmstate_2_plus, 0, vmstate_pit_channel,
+ PITChannelState),
VMSTATE_INT64(channels[0].next_transition_time,
PITCommonState), /* formerly irq_timer */
VMSTATE_END_OF_LIST()
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 09c1f50..ac9dde1 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -57,8 +57,9 @@ static const VMStateDescription vmstate_ymmh_reg = {
}
};
-#define VMSTATE_YMMH_REGS_VARS(_field, _state, _n, _v)
\
- VMSTATE_STRUCT_ARRAY(_field, _state, _n, _v, vmstate_ymmh_reg, XMMReg)
+#define VMSTATE_YMMH_REGS_VARS(_field, _state, _n, _t)
\
+ VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _n, _t, 0,\
+ vmstate_ymmh_reg, XMMReg)
static const VMStateDescription vmstate_bnd_regs = {
.name = "bnd_regs",
@@ -85,8 +86,9 @@ static const VMStateDescription vmstate_mtrr_var = {
}
};
-#define VMSTATE_MTRR_VARS(_field, _state, _n, _v) \
- VMSTATE_STRUCT_ARRAY(_field, _state, _n, _v, vmstate_mtrr_var, MTRRVar)
+#define VMSTATE_MTRR_VARS(_field, _state, _n, _t) \
+ VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _n, _t, 0,\
+ vmstate_mtrr_var, MTRRVar)
static void put_fpreg_error(QEMUFile *f, void *opaque, size_t size)
{
@@ -669,7 +671,7 @@ const VMStateDescription vmstate_x86_cpu = {
/* MTRRs */
VMSTATE_UINT64_ARRAY_TEST(env.mtrr_fixed, X86CPU, 11, vmstate_8_plus),
VMSTATE_UINT64_TEST(env.mtrr_deftype, X86CPU, vmstate_8_plus),
- VMSTATE_MTRR_VARS(env.mtrr_var, X86CPU, 8, 8),
+ VMSTATE_MTRR_VARS(env.mtrr_var, X86CPU, 8, vmstate_8_plus),
/* KVM-related states */
VMSTATE_INT32_TEST(env.interrupt_injected, X86CPU, vmstate_9_plus),
VMSTATE_UINT32_TEST(env.mp_state, X86CPU, vmstate_9_plus),
@@ -694,7 +696,8 @@ const VMStateDescription vmstate_x86_cpu = {
/* XSAVE related fields */
VMSTATE_UINT64_TEST(env.xcr0, X86CPU, vmstate_12_plus),
VMSTATE_UINT64_TEST(env.xstate_bv, X86CPU, vmstate_12_plus),
- VMSTATE_YMMH_REGS_VARS(env.ymmh_regs, X86CPU, CPU_NB_REGS, 12),
+ VMSTATE_YMMH_REGS_VARS(env.ymmh_regs, X86CPU, CPU_NB_REGS,
+ vmstate_12_plus),
VMSTATE_END_OF_LIST()
/* The above list is not sorted /wrt version numbers, watch out! */
},
--
1.9.0
- [Qemu-devel] [PATCH 57/97] vmstate: Remove version_id from VMSTATE_SUB_ARRAY, (continued)
- [Qemu-devel] [PATCH 57/97] vmstate: Remove version_id from VMSTATE_SUB_ARRAY, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 59/97] vmstate: Remove version_id from VMSTATE_VARRAY_UINT16_UNSAFE, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 58/97] vmstate: Remove version parameter from VMSTATE_VARRAY_INT32, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 60/97] vmstate: VMSTATE_ARRAY_OF_POINTER didn't used the version_id field, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 61/97] vmstate: remove version parameter from VMSTATE_BUFFER_POINTER_UNSAFE, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 62/97] vmstate: Remove version, test and start parameter from VMSTATE_VBUFFER_UINT32, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 63/97] vmstate: Remove version paramenter from VMSTATE_ARRAY_OF_POINTER_TO_STRUCT, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 65/97] vmstate: Remove version parameter from VMSTATE_STATIC_BUFFER, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 64/97] vmstate: Remove VMSTATE_BUFFER_MULTIPLY, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 66/97] vmstate: Remove version field from VMSTATE_STRUCT_VARRAY_UINT32, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 67/97] vmstate: Move all users of versioning of VMSTATE_STRUCT_ARRAY to _TEST,
Juan Quintela <=
- [Qemu-devel] [PATCH 68/97] vmstate: Remove version paramenter from VMSTATE_STRUCT_ARRAY, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 69/97] vmstate: Remove version parameter from VMSTATE_STRUCT_ARRAY_TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 70/97] vmstate: Remove unused version parameter from VMSTATE_STRUCT_VARRAY_INT32, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 71/97] vmstate: Remove unused version parameter from VMSTATE_STRUCT_VARRAY_UINT8, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 72/97] vmstate: Introduce VMSTATE_VARRAY_UINT32_TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 73/97] vmstate: Remove version parameter from VMSTATE_VARRAY_UINT32, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 74/97] vmstate: Remove version parameter from VMSTATE_STRUCT_TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 75/97] vmstate: Move all users of versioning to VMSTATE_STRUCT_TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 76/97] vmstate: Remove version from all VMSTATE_STRUCT calls, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 77/97] vmstate: Create VMSTATE_VARRAY macro, Juan Quintela, 2014/04/06