Signed-off-by: Juan Quintela <quint...@redhat.com> --- 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