Signed-off-by: Juan Quintela <quint...@redhat.com> --- docs/migration.txt | 2 +- hw/block/fdc.c | 2 +- hw/display/qxl.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/ide/core.c | 2 +- hw/pci/pci.c | 3 +-- include/migration/vmstate.h | 3 +-- target-arm/machine.c | 4 ++-- 8 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/docs/migration.txt b/docs/migration.txt index 0492a45..794fa70 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -259,7 +259,7 @@ const VMStateDescription vmstate_ide_drive_pio_state = { .post_load = ide_drive_pio_post_load, .fields = (VMStateField[]) { VMSTATE_INT32(req_nb_sectors, IDEState), - VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1, + VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, vmstate_info_uint8, uint8_t), VMSTATE_INT32(cur_io_buffer_offset, IDEState), VMSTATE_INT32(cur_io_buffer_len, IDEState), diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 490d127..ca973f4 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -752,7 +752,7 @@ static const VMStateDescription vmstate_fdc = { VMSTATE_UINT8(status1, FDCtrl), VMSTATE_UINT8(status2, FDCtrl), /* Command FIFO */ - VMSTATE_VARRAY_INT32(fifo, FDCtrl, fifo_size, 0, vmstate_info_uint8, + VMSTATE_VARRAY_INT32(fifo, FDCtrl, fifo_size, vmstate_info_uint8, uint8_t), VMSTATE_UINT32(data_pos, FDCtrl), VMSTATE_UINT32(data_len, FDCtrl), diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 47bbf1f..9dd4e22 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2271,7 +2271,7 @@ static VMStateDescription qxl_vmstate = { qxl_surface, QXLSurfaceCreate), VMSTATE_INT32_EQUAL(ssd.num_surfaces, PCIQXLDevice), VMSTATE_VARRAY_INT32(guest_surfaces.cmds, PCIQXLDevice, - ssd.num_surfaces, 0, + ssd.num_surfaces, vmstate_info_uint64, uint64_t), VMSTATE_UINT64(guest_cursor, PCIQXLDevice), VMSTATE_END_OF_LIST() diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 00bb385..90dfbf3 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1163,7 +1163,7 @@ static const VMStateDescription vmstate_vmware_vga_internal = { VMSTATE_INT32(cursor.on, struct vmsvga_state_s), VMSTATE_INT32(index, struct vmsvga_state_s), VMSTATE_VARRAY_INT32(scratch, struct vmsvga_state_s, - scratch_size, 0, vmstate_info_uint32, uint32_t), + scratch_size, vmstate_info_uint32, uint32_t), VMSTATE_INT32(new_width, struct vmsvga_state_s), VMSTATE_INT32(new_height, struct vmsvga_state_s), VMSTATE_UINT32(guest, struct vmsvga_state_s), diff --git a/hw/ide/core.c b/hw/ide/core.c index b79cc9e..d33f3f3 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2368,7 +2368,7 @@ static const VMStateDescription vmstate_ide_drive_pio_state = { .post_load = ide_drive_pio_post_load, .fields = (VMStateField[]) { VMSTATE_INT32(req_nb_sectors, IDEState), - VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1, + VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, vmstate_info_uint8, uint8_t), VMSTATE_INT32(cur_io_buffer_offset, IDEState), VMSTATE_INT32(cur_io_buffer_len, IDEState), diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 828df53..a8d671c 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -66,8 +66,7 @@ static const VMStateDescription vmstate_pcibus = { .minimum_version_id = 1, .fields = (VMStateField[]) { VMSTATE_INT32_EQUAL(nirq, PCIBus), - VMSTATE_VARRAY_INT32(irq_count, PCIBus, - nirq, 0, vmstate_info_int32, + VMSTATE_VARRAY_INT32(irq_count, PCIBus, nirq, vmstate_info_int32, int32_t), VMSTATE_END_OF_LIST() } diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 59afc3e..905c19a 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -249,9 +249,8 @@ extern const VMStateInfo vmstate_info_bitmap; .offset = offsetof(_state, _field), \ } -#define VMSTATE_VARRAY_INT32(_field, _state, _field_num, _version, _info, _type) {\ +#define VMSTATE_VARRAY_INT32(_field, _state, _field_num, _info, _type) {\ .name = (stringify(_field)), \ - .version_id = (_version), \ .num_offset = vmstate_offset_value(_state, _field_num, int32_t), \ .info = &(_info), \ .size = sizeof(_type), \ diff --git a/target-arm/machine.c b/target-arm/machine.c index 3f4fd42..3f2c485 100644 --- a/target-arm/machine.c +++ b/target-arm/machine.c @@ -244,10 +244,10 @@ const VMStateDescription vmstate_arm_cpu = { VMSTATE_INT32_POSITIVE_LE(cpreg_vmstate_array_len, ARMCPU), VMSTATE_VARRAY_INT32(cpreg_vmstate_indexes, ARMCPU, cpreg_vmstate_array_len, - 0, vmstate_info_uint64, uint64_t), + vmstate_info_uint64, uint64_t), VMSTATE_VARRAY_INT32(cpreg_vmstate_values, ARMCPU, cpreg_vmstate_array_len, - 0, vmstate_info_uint64, uint64_t), + vmstate_info_uint64, uint64_t), VMSTATE_UINT64(env.exclusive_addr, ARMCPU), VMSTATE_UINT64(env.exclusive_val, ARMCPU), VMSTATE_UINT64(env.exclusive_high, ARMCPU), -- 1.9.0