It has no users at this point. Signed-off-by: Juan Quintela <quint...@redhat.com> --- hw/acpi/piix4.c | 4 ++-- hw/arm/spitz.c | 2 +- hw/audio/pl041.c | 16 ++++++---------- hw/block/fdc.c | 4 ++-- hw/char/exynos4210_uart.c | 2 +- hw/char/serial-isa.c | 2 +- hw/char/serial-pci.c | 2 +- hw/display/cirrus_vga.c | 2 +- hw/display/qxl.c | 4 ++-- hw/display/vga-pci.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/dma/i82374.c | 2 +- hw/dma/pl330.c | 8 ++++---- hw/i386/kvmvapic.c | 6 +++--- hw/ide/internal.h | 2 +- hw/input/pckbd.c | 2 +- hw/input/ps2.c | 4 ++-- hw/isa/lpc_ich9.c | 4 ++-- hw/isa/vt82c686.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/lan9118.c | 2 +- hw/net/lance.c | 2 +- hw/net/milkymist-minimac2.c | 2 +- hw/net/ne2000-isa.c | 2 +- hw/net/ne2000.c | 2 +- hw/net/pcnet-pci.c | 2 +- hw/net/rtl8139.c | 2 +- hw/net/xgmac.c | 2 +- hw/pci-bridge/ioh3420.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-bridge/xio3130_upstream.c | 2 +- hw/scsi/esp-pci.c | 2 +- hw/scsi/esp.c | 2 +- hw/timer/exynos4210_mct.c | 11 ++++------- hw/timer/pxa2xx_timer.c | 4 ++-- hw/timer/twl92230.c | 6 ++---- hw/usb/dev-smartcard-reader.c | 2 +- hw/usb/hcd-xhci.c | 2 +- hw/usb/redirect.c | 8 ++++---- include/hw/ipack/ipack.h | 2 +- include/hw/ppc/spapr_vio.h | 2 +- include/migration/vmstate.h | 10 +++------- target-alpha/machine.c | 2 +- target-lm32/machine.c | 2 +- target-openrisc/machine.c | 2 +- 45 files changed, 70 insertions(+), 83 deletions(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 091dca3..527a5c8 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -262,10 +262,10 @@ static const VMStateDescription vmstate_acpi = { VMSTATE_UINT16(ar.pm1.evt.sts, PIIX4PMState), VMSTATE_UINT16(ar.pm1.evt.en, PIIX4PMState), VMSTATE_UINT16(ar.pm1.cnt.cnt, PIIX4PMState), - VMSTATE_STRUCT(apm, PIIX4PMState, 0, vmstate_apm, APMState), + VMSTATE_STRUCT(apm, PIIX4PMState, vmstate_apm, APMState), VMSTATE_TIMER(ar.tmr.timer, PIIX4PMState), VMSTATE_INT64(ar.tmr.overflow_time, PIIX4PMState), - VMSTATE_STRUCT(ar.gpe, PIIX4PMState, 2, vmstate_gpe, ACPIGPE), + VMSTATE_STRUCT(ar.gpe, PIIX4PMState, vmstate_gpe, ACPIGPE), VMSTATE_STRUCT_TEST( acpi_pci_hotplug.acpi_pcihp_pci_status[ACPI_PCIHP_BSEL_DEFAULT], PIIX4PMState, diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index a179c1d..cff3a9e 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -1008,7 +1008,7 @@ static VMStateDescription vmstate_sl_nand_info = { .minimum_version_id = 0, .fields = (VMStateField[]) { VMSTATE_UINT8(ctl, SLNANDState), - VMSTATE_STRUCT(ecc, SLNANDState, 0, vmstate_ecc_state, ECCState), + VMSTATE_STRUCT(ecc, SLNANDState, vmstate_ecc_state, ECCState), VMSTATE_END_OF_LIST(), }, }; diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c index 19982f2..9b850c5 100644 --- a/hw/audio/pl041.c +++ b/hw/audio/pl041.c @@ -585,13 +585,11 @@ static const VMStateDescription vmstate_pl041_channel = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_STRUCT(tx_fifo, pl041_channel, 0, - vmstate_pl041_fifo, pl041_fifo), + VMSTATE_STRUCT(tx_fifo, pl041_channel, vmstate_pl041_fifo, pl041_fifo), VMSTATE_UINT8(tx_enabled, pl041_channel), VMSTATE_UINT8(tx_compact_mode, pl041_channel), VMSTATE_UINT8(tx_sample_size, pl041_channel), - VMSTATE_STRUCT(rx_fifo, pl041_channel, 0, - vmstate_pl041_fifo, pl041_fifo), + VMSTATE_STRUCT(rx_fifo, pl041_channel, vmstate_pl041_fifo, pl041_fifo), VMSTATE_UINT8(rx_enabled, pl041_channel), VMSTATE_UINT8(rx_compact_mode, pl041_channel), VMSTATE_UINT8(rx_sample_size, pl041_channel), @@ -605,12 +603,10 @@ static const VMStateDescription vmstate_pl041 = { .minimum_version_id = 1, .fields = (VMStateField[]) { VMSTATE_UINT32(fifo_depth, PL041State), - VMSTATE_STRUCT(regs, PL041State, 0, - vmstate_pl041_regfile, pl041_regfile), - VMSTATE_STRUCT(fifo1, PL041State, 0, - vmstate_pl041_channel, pl041_channel), - VMSTATE_STRUCT(codec, PL041State, 0, - vmstate_lm4549_state, lm4549_state), + VMSTATE_STRUCT(regs, PL041State, vmstate_pl041_regfile, pl041_regfile), + VMSTATE_STRUCT(fifo1, PL041State, vmstate_pl041_channel, + pl041_channel), + VMSTATE_STRUCT(codec, PL041State, vmstate_lm4549_state, lm4549_state), VMSTATE_END_OF_LIST() } }; diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 9d8d5d5..9d09369 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2206,7 +2206,7 @@ static const VMStateDescription vmstate_isa_fdc ={ .version_id = 2, .minimum_version_id = 2, .fields = (VMStateField[]) { - VMSTATE_STRUCT(state, FDCtrlISABus, 0, vmstate_fdc, FDCtrl), + VMSTATE_STRUCT(state, FDCtrlISABus, vmstate_fdc, FDCtrl), VMSTATE_END_OF_LIST() } }; @@ -2248,7 +2248,7 @@ static const VMStateDescription vmstate_sysbus_fdc ={ .version_id = 2, .minimum_version_id = 2, .fields = (VMStateField[]) { - VMSTATE_STRUCT(state, FDCtrlSysBus, 0, vmstate_fdc, FDCtrl), + VMSTATE_STRUCT(state, FDCtrlSysBus, vmstate_fdc, FDCtrl), VMSTATE_END_OF_LIST() } }; diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index 872bc99..5722980 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -573,7 +573,7 @@ static const VMStateDescription vmstate_exynos4210_uart = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_STRUCT(rx, Exynos4210UartState, 1, + VMSTATE_STRUCT(rx, Exynos4210UartState, vmstate_exynos4210_uart_fifo, Exynos4210UartFIFO), VMSTATE_UINT32_ARRAY(reg, Exynos4210UartState, EXYNOS4210_UART_REGS_MEM_SIZE / sizeof(uint32_t)), diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c index c9fcb27..a36af51 100644 --- a/hw/char/serial-isa.c +++ b/hw/char/serial-isa.c @@ -81,7 +81,7 @@ static const VMStateDescription vmstate_isa_serial = { .version_id = 3, .minimum_version_id = 2, .fields = (VMStateField[]) { - VMSTATE_STRUCT(state, ISASerialState, 0, vmstate_serial, SerialState), + VMSTATE_STRUCT(state, ISASerialState, vmstate_serial, SerialState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index 25c930b..eea37eb 100644 --- a/hw/char/serial-pci.c +++ b/hw/char/serial-pci.c @@ -157,7 +157,7 @@ static const VMStateDescription vmstate_pci_serial = { .minimum_version_id = 1, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, PCISerialState), - VMSTATE_STRUCT(state, PCISerialState, 0, vmstate_serial, SerialState), + VMSTATE_STRUCT(state, PCISerialState, vmstate_serial, SerialState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 55449a6..f3938f8 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -2743,7 +2743,7 @@ static const VMStateDescription vmstate_pci_cirrus_vga = { .minimum_version_id = 2, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, PCICirrusVGAState), - VMSTATE_STRUCT(cirrus_vga, PCICirrusVGAState, 0, + VMSTATE_STRUCT(cirrus_vga, PCICirrusVGAState, vmstate_cirrus_vga, CirrusVGAState), VMSTATE_END_OF_LIST() } diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 4114427..84399ec 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2258,7 +2258,7 @@ static VMStateDescription qxl_vmstate = { .post_load = qxl_post_load, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(pci, PCIQXLDevice), - VMSTATE_STRUCT(vga, PCIQXLDevice, 0, vmstate_vga_common, VGACommonState), + VMSTATE_STRUCT(vga, PCIQXLDevice, vmstate_vga_common, VGACommonState), VMSTATE_UINT32(shadow_rom.mode, PCIQXLDevice), VMSTATE_UINT32(num_free_res, PCIQXLDevice), VMSTATE_UINT32(last_release_offset, PCIQXLDevice), @@ -2267,7 +2267,7 @@ static VMStateDescription qxl_vmstate = { VMSTATE_INT32_EQUAL(num_memslots, PCIQXLDevice), VMSTATE_STRUCT_ARRAY(guest_slots, PCIQXLDevice, NUM_MEMSLOTS, qxl_memslot, struct guest_slots), - VMSTATE_STRUCT(guest_primary.surface, PCIQXLDevice, 0, + VMSTATE_STRUCT(guest_primary.surface, PCIQXLDevice, qxl_surface, QXLSurfaceCreate), VMSTATE_INT32_EQUAL(ssd.num_surfaces, PCIQXLDevice), VMSTATE_VARRAY_INT32(guest_surfaces.cmds, PCIQXLDevice, diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index a2a9ca1..b3bc7e2 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -56,7 +56,7 @@ static const VMStateDescription vmstate_vga_pci = { .minimum_version_id = 2, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, PCIVGAState), - VMSTATE_STRUCT(vga, PCIVGAState, 0, vmstate_vga_common, VGACommonState), + VMSTATE_STRUCT(vga, PCIVGAState, vmstate_vga_common, VGACommonState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 90dfbf3..3d1c965 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1180,7 +1180,7 @@ static const VMStateDescription vmstate_vmware_vga = { .minimum_version_id = 0, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, struct pci_vmsvga_state_s), - VMSTATE_STRUCT(chip, struct pci_vmsvga_state_s, 0, + VMSTATE_STRUCT(chip, struct pci_vmsvga_state_s, vmstate_vmware_vga_internal, struct vmsvga_state_s), VMSTATE_END_OF_LIST() } diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index dc7a767..b0377fa 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -119,7 +119,7 @@ static const VMStateDescription vmstate_isa_i82374 = { .version_id = 0, .minimum_version_id = 0, .fields = (VMStateField[]) { - VMSTATE_STRUCT(state, ISAi82374State, 0, vmstate_i82374, I82374State), + VMSTATE_STRUCT(state, ISAi82374State, vmstate_i82374, I82374State), VMSTATE_END_OF_LIST() }, }; diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 9ba3108..94d5cfd 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -276,15 +276,15 @@ static const VMStateDescription vmstate_pl330 = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_STRUCT(manager, PL330State, 0, vmstate_pl330_chan, PL330Chan), + VMSTATE_STRUCT(manager, PL330State, vmstate_pl330_chan, PL330Chan), VMSTATE_STRUCT_VARRAY_UINT32(chan, PL330State, num_chnls, vmstate_pl330_chan, PL330Chan), VMSTATE_VBUFFER_UINT32(lo_seqn, PL330State, num_chnls), VMSTATE_VBUFFER_UINT32(hi_seqn, PL330State, num_chnls), - VMSTATE_STRUCT(fifo, PL330State, 0, vmstate_pl330_fifo, PL330Fifo), - VMSTATE_STRUCT(read_queue, PL330State, 0, vmstate_pl330_queue, + VMSTATE_STRUCT(fifo, PL330State, vmstate_pl330_fifo, PL330Fifo), + VMSTATE_STRUCT(read_queue, PL330State, vmstate_pl330_queue, PL330Queue), - VMSTATE_STRUCT(write_queue, PL330State, 0, vmstate_pl330_queue, + VMSTATE_STRUCT(write_queue, PL330State, vmstate_pl330_queue, PL330Queue), VMSTATE_TIMER(timer, PL330State), VMSTATE_UINT32(inten, PL330State), diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index a730f4b..56001b4 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -795,8 +795,8 @@ static const VMStateDescription vmstate_guest_rom = { VMSTATE_UINT32(vapic_size, GuestROMState), VMSTATE_UINT32(vcpu_shift, GuestROMState), VMSTATE_UINT32(real_tpr_addr, GuestROMState), - VMSTATE_STRUCT(up, GuestROMState, 0, vmstate_handlers, VAPICHandlers), - VMSTATE_STRUCT(mp, GuestROMState, 0, vmstate_handlers, VAPICHandlers), + VMSTATE_STRUCT(up, GuestROMState, vmstate_handlers, VAPICHandlers), + VMSTATE_STRUCT(mp, GuestROMState, vmstate_handlers, VAPICHandlers), VMSTATE_END_OF_LIST() } }; @@ -807,7 +807,7 @@ static const VMStateDescription vmstate_vapic = { .minimum_version_id = 1, .post_load = vapic_post_load, .fields = (VMStateField[]) { - VMSTATE_STRUCT(rom_state, VAPICROMState, 0, vmstate_guest_rom, + VMSTATE_STRUCT(rom_state, VAPICROMState, vmstate_guest_rom, GuestROMState), VMSTATE_UINT32(state, VAPICROMState), VMSTATE_UINT32(real_tpr_addr, VAPICROMState), diff --git a/hw/ide/internal.h b/hw/ide/internal.h index a75e524..459fabc 100644 --- a/hw/ide/internal.h +++ b/hw/ide/internal.h @@ -518,7 +518,7 @@ static inline void ide_set_irq(IDEBus *bus) extern const VMStateDescription vmstate_ide_bus; #define VMSTATE_IDE_BUS(_field, _state) \ - VMSTATE_STRUCT(_field, _state, 1, vmstate_ide_bus, IDEBus) + VMSTATE_STRUCT(_field, _state, vmstate_ide_bus, IDEBus) #define VMSTATE_IDE_BUS_ARRAY(_field, _state, _num) \ VMSTATE_STRUCT_ARRAY(_field, _state, _num, vmstate_ide_bus, IDEBus) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index ca1cffc..0df9b11 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -462,7 +462,7 @@ static const VMStateDescription vmstate_kbd_isa = { .version_id = 3, .minimum_version_id = 3, .fields = (VMStateField[]) { - VMSTATE_STRUCT(kbd, ISAKBDState, 0, vmstate_kbd, KBDState), + VMSTATE_STRUCT(kbd, ISAKBDState, vmstate_kbd, KBDState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/input/ps2.c b/hw/input/ps2.c index e05ff0d..7bb98ee 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -610,7 +610,7 @@ static const VMStateDescription vmstate_ps2_keyboard = { .minimum_version_id = 2, .post_load = ps2_kbd_post_load, .fields = (VMStateField[]) { - VMSTATE_STRUCT(common, PS2KbdState, 0, vmstate_ps2_common, PS2State), + VMSTATE_STRUCT(common, PS2KbdState, vmstate_ps2_common, PS2State), VMSTATE_INT32(scan_enabled, PS2KbdState), VMSTATE_INT32(translate, PS2KbdState), VMSTATE_INT32_TEST(scancode_set, PS2KbdState, vmstate_3_plus), @@ -631,7 +631,7 @@ static const VMStateDescription vmstate_ps2_mouse = { .version_id = 2, .minimum_version_id = 2, .fields = (VMStateField[]) { - VMSTATE_STRUCT(common, PS2MouseState, 0, vmstate_ps2_common, PS2State), + VMSTATE_STRUCT(common, PS2MouseState, vmstate_ps2_common, PS2State), VMSTATE_UINT8(mouse_status, PS2MouseState), VMSTATE_UINT8(mouse_resolution, PS2MouseState), VMSTATE_UINT8(mouse_sample_rate, PS2MouseState), diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 97f69d6..b2dc66a 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -619,8 +619,8 @@ static const VMStateDescription vmstate_ich9_lpc = { .post_load = ich9_lpc_post_load, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(d, ICH9LPCState), - VMSTATE_STRUCT(apm, ICH9LPCState, 0, vmstate_apm, APMState), - VMSTATE_STRUCT(pm, ICH9LPCState, 0, vmstate_ich9_pm, ICH9LPCPMRegs), + VMSTATE_STRUCT(apm, ICH9LPCState, vmstate_apm, APMState), + VMSTATE_STRUCT(pm, ICH9LPCState, vmstate_ich9_pm, ICH9LPCPMRegs), VMSTATE_UINT8_ARRAY(chip_config, ICH9LPCState, ICH9_CC_SIZE), VMSTATE_UINT32(sci_level, ICH9LPCState), VMSTATE_END_OF_LIST() diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index e0c235c..948eb31 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -236,7 +236,7 @@ static const VMStateDescription vmstate_acpi = { VMSTATE_UINT16(ar.pm1.evt.sts, VT686PMState), VMSTATE_UINT16(ar.pm1.evt.en, VT686PMState), VMSTATE_UINT16(ar.pm1.cnt.cnt, VT686PMState), - VMSTATE_STRUCT(apm, VT686PMState, 0, vmstate_apm, APMState), + VMSTATE_STRUCT(apm, VT686PMState, vmstate_apm, APMState), VMSTATE_TIMER(ar.tmr.timer, VT686PMState), VMSTATE_INT64(ar.tmr.overflow_time, VT686PMState), VMSTATE_END_OF_LIST() diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c index 0b3cf9a..375fb98 100644 --- a/hw/net/allwinner_emac.c +++ b/hw/net/allwinner_emac.c @@ -494,7 +494,7 @@ static const VMStateDescription vmstate_aw_emac = { .minimum_version_id = 1, .post_load = aw_emac_post_load, .fields = (VMStateField[]) { - VMSTATE_STRUCT(mii, AwEmacState, 1, vmstate_mii, RTL8201CPState), + VMSTATE_STRUCT(mii, AwEmacState, vmstate_mii, RTL8201CPState), VMSTATE_UINT32(ctl, AwEmacState), VMSTATE_UINT32(tx_mode, AwEmacState), VMSTATE_UINT32(rx_ctl, AwEmacState), diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index fbba410..b5cac54 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -289,7 +289,7 @@ static const VMStateDescription vmstate_lan9118 = { VMSTATE_UINT8_ARRAY(eeprom, lan9118_state, 128), VMSTATE_INT32(tx_fifo_size, lan9118_state), /* txp always points at tx_packet so need not be saved */ - VMSTATE_STRUCT(tx_packet, lan9118_state, 0, + VMSTATE_STRUCT(tx_packet, lan9118_state, vmstate_lan9118_packet, LAN9118Packet), VMSTATE_INT32(tx_status_fifo_used, lan9118_state), VMSTATE_INT32(tx_status_fifo_head, lan9118_state), diff --git a/hw/net/lance.c b/hw/net/lance.c index 7811a9e..a8aa31f 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -111,7 +111,7 @@ static const VMStateDescription vmstate_lance = { .version_id = 3, .minimum_version_id = 2, .fields = (VMStateField[]) { - VMSTATE_STRUCT(state, SysBusPCNetState, 0, vmstate_pcnet, PCNetState), + VMSTATE_STRUCT(state, SysBusPCNetState, vmstate_pcnet, PCNetState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c index c023351..88f2fff 100644 --- a/hw/net/milkymist-minimac2.c +++ b/hw/net/milkymist-minimac2.c @@ -511,7 +511,7 @@ static const VMStateDescription vmstate_milkymist_minimac2 = { .fields = (VMStateField[]) { VMSTATE_UINT32_ARRAY(regs, MilkymistMinimac2State, R_MAX), VMSTATE_UINT16_ARRAY(phy_regs, MilkymistMinimac2State, R_PHY_MAX), - VMSTATE_STRUCT(mdio, MilkymistMinimac2State, 0, + VMSTATE_STRUCT(mdio, MilkymistMinimac2State, vmstate_milkymist_minimac2_mdio, MilkymistMinimac2MdioState), VMSTATE_END_OF_LIST() } diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index 8740844..0ed0721 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -60,7 +60,7 @@ static const VMStateDescription vmstate_isa_ne2000 = { .version_id = 2, .minimum_version_id = 0, .fields = (VMStateField[]) { - VMSTATE_STRUCT(ne2000, ISANE2000State, 0, vmstate_ne2000, NE2000State), + VMSTATE_STRUCT(ne2000, ISANE2000State, vmstate_ne2000, NE2000State), VMSTATE_END_OF_LIST() } }; diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 84745d64..cda1934 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -646,7 +646,7 @@ static const VMStateDescription vmstate_pci_ne2000 = { .minimum_version_id = 3, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, PCINE2000State), - VMSTATE_STRUCT(ne2000, PCINE2000State, 0, vmstate_ne2000, NE2000State), + VMSTATE_STRUCT(ne2000, PCINE2000State, vmstate_ne2000, NE2000State), VMSTATE_END_OF_LIST() } }; diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index b25d789..49973a0 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -243,7 +243,7 @@ static const VMStateDescription vmstate_pci_pcnet = { .minimum_version_id = 2, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCIPCNetState), - VMSTATE_STRUCT(state, PCIPCNetState, 0, vmstate_pcnet, PCNetState), + VMSTATE_STRUCT(state, PCIPCNetState, vmstate_pcnet, PCNetState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 936adb0..1da39fa 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -3360,7 +3360,7 @@ static const VMStateDescription vmstate_rtl8139 = { VMSTATE_UINT32(TimerInt, RTL8139State), VMSTATE_INT64(TCTR_base, RTL8139State), - VMSTATE_STRUCT(tally_counters, RTL8139State, 0, + VMSTATE_STRUCT(tally_counters, RTL8139State, vmstate_tally_counters, RTL8139TallyCounters), VMSTATE_UINT32_TEST(cplus_enabled, RTL8139State, vmstate_4_plus), diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index 8619491..f860e0d 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -171,7 +171,7 @@ static const VMStateDescription vmstate_xgmac = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_STRUCT(stats, XgmacState, 0, vmstate_rxtx_stats, RxTxStats), + VMSTATE_STRUCT(stats, XgmacState, vmstate_rxtx_stats, RxTxStats), VMSTATE_UINT32_ARRAY(regs, XgmacState, R_MAX), VMSTATE_END_OF_LIST() } diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c index f4e17ac..2805bc7 100644 --- a/hw/pci-bridge/ioh3420.c +++ b/hw/pci-bridge/ioh3420.c @@ -188,7 +188,7 @@ static const VMStateDescription vmstate_ioh3420 = { .fields = (VMStateField[]) { VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot), VMSTATE_STRUCT(parent_obj.parent_obj.parent_obj.exp.aer_log, - PCIESlot, 0, vmstate_pcie_aer_log, PCIEAERLog), + PCIESlot, vmstate_pcie_aer_log, PCIEAERLog), VMSTATE_END_OF_LIST() } }; diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c index 8f22f93..3fbdacd 100644 --- a/hw/pci-bridge/xio3130_downstream.c +++ b/hw/pci-bridge/xio3130_downstream.c @@ -155,7 +155,7 @@ static const VMStateDescription vmstate_xio3130_downstream = { .fields = (VMStateField[]) { VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot), VMSTATE_STRUCT(parent_obj.parent_obj.parent_obj.exp.aer_log, - PCIESlot, 0, vmstate_pcie_aer_log, PCIEAERLog), + PCIESlot, vmstate_pcie_aer_log, PCIEAERLog), VMSTATE_END_OF_LIST() } }; diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstream.c index eada582..9e1ef9d 100644 --- a/hw/pci-bridge/xio3130_upstream.c +++ b/hw/pci-bridge/xio3130_upstream.c @@ -133,7 +133,7 @@ static const VMStateDescription vmstate_xio3130_upstream = { .minimum_version_id = 1, .fields = (VMStateField[]) { VMSTATE_PCIE_DEVICE(parent_obj.parent_obj, PCIEPort), - VMSTATE_STRUCT(parent_obj.parent_obj.exp.aer_log, PCIEPort, 0, + VMSTATE_STRUCT(parent_obj.parent_obj.exp.aer_log, PCIEPort, vmstate_pcie_aer_log, PCIEAERLog), VMSTATE_END_OF_LIST() } diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c index e592d81..98e2926 100644 --- a/hw/scsi/esp-pci.c +++ b/hw/scsi/esp-pci.c @@ -313,7 +313,7 @@ static const VMStateDescription vmstate_esp_pci_scsi = { .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCIESPState), VMSTATE_BUFFER_UNSAFE(dma_regs, PCIESPState, 8 * sizeof(uint32_t)), - VMSTATE_STRUCT(esp, PCIESPState, 0, vmstate_esp, ESPState), + VMSTATE_STRUCT(esp, PCIESPState, vmstate_esp, ESPState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 5ab44d8..ab0b7fe 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -706,7 +706,7 @@ static const VMStateDescription vmstate_sysbus_esp_scsi = { .version_id = 0, .minimum_version_id = 0, .fields = (VMStateField[]) { - VMSTATE_STRUCT(esp, SysBusESPState, 0, vmstate_esp, ESPState), + VMSTATE_STRUCT(esp, SysBusESPState, vmstate_esp, ESPState), VMSTATE_END_OF_LIST() } }; diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 0fd8d24..2705467 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer/exynos4210_mct.c @@ -299,12 +299,10 @@ static const VMStateDescription vmstate_exynos4210_mct_lt = { .minimum_version_id = 1, .fields = (VMStateField[]) { VMSTATE_INT32(id, Exynos4210MCTLT), - VMSTATE_STRUCT(tick_timer, Exynos4210MCTLT, 0, - vmstate_tick_timer, + VMSTATE_STRUCT(tick_timer, Exynos4210MCTLT, vmstate_tick_timer, struct tick_timer), VMSTATE_PTIMER(ptimer_frc, Exynos4210MCTLT), - VMSTATE_STRUCT(reg, Exynos4210MCTLT, 0, - vmstate_lregs, + VMSTATE_STRUCT(reg, Exynos4210MCTLT, vmstate_lregs, struct lregs), VMSTATE_END_OF_LIST() } @@ -333,8 +331,7 @@ static const VMStateDescription vmstate_exynos4210_mct_gt = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_STRUCT(reg, Exynos4210MCTGT, 0, vmstate_gregs, - struct gregs), + VMSTATE_STRUCT(reg, Exynos4210MCTGT, vmstate_gregs, struct gregs), VMSTATE_UINT64(count, Exynos4210MCTGT), VMSTATE_INT32(curr_comp, Exynos4210MCTGT), VMSTATE_PTIMER(ptimer_frc, Exynos4210MCTGT), @@ -350,7 +347,7 @@ static const VMStateDescription vmstate_exynos4210_mct_state = { VMSTATE_UINT32(reg_mct_cfg, Exynos4210MCTState), VMSTATE_STRUCT_ARRAY(l_timer, Exynos4210MCTState, 2, vmstate_exynos4210_mct_lt, Exynos4210MCTLT), - VMSTATE_STRUCT(g_timer, Exynos4210MCTState, 0, + VMSTATE_STRUCT(g_timer, Exynos4210MCTState, vmstate_exynos4210_mct_gt, Exynos4210MCTGT), VMSTATE_UINT32(freq, Exynos4210MCTState), VMSTATE_END_OF_LIST() diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c index a8af5a0..54c9ce3 100644 --- a/hw/timer/pxa2xx_timer.c +++ b/hw/timer/pxa2xx_timer.c @@ -487,8 +487,8 @@ static const VMStateDescription vmstate_pxa2xx_timer4_regs = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_STRUCT(tm, PXA2xxTimer4, 1, - vmstate_pxa2xx_timer0_regs, PXA2xxTimer0), + VMSTATE_STRUCT(tm, PXA2xxTimer4, vmstate_pxa2xx_timer0_regs, + PXA2xxTimer0), VMSTATE_INT32(oldclock, PXA2xxTimer4), VMSTATE_INT32(clock, PXA2xxTimer4), VMSTATE_UINT64(lastload, PXA2xxTimer4), diff --git a/hw/timer/twl92230.c b/hw/timer/twl92230.c index 26c6001..842cd6a 100644 --- a/hw/timer/twl92230.c +++ b/hw/timer/twl92230.c @@ -833,10 +833,8 @@ static const VMStateDescription vmstate_menelaus = { VMSTATE_UINT8(rtc.ctrl, MenelausState), VMSTATE_UINT16(rtc.comp, MenelausState), VMSTATE_UINT16(rtc_next_vmstate, MenelausState), - VMSTATE_STRUCT(rtc.new, MenelausState, 0, vmstate_menelaus_tm, - struct tm), - VMSTATE_STRUCT(rtc.alm, MenelausState, 0, vmstate_menelaus_tm, - struct tm), + VMSTATE_STRUCT(rtc.new, MenelausState, vmstate_menelaus_tm, struct tm), + VMSTATE_STRUCT(rtc.alm, MenelausState, vmstate_menelaus_tm, struct tm), VMSTATE_UINT8(pwrbtn_state, MenelausState), VMSTATE_I2C_SLAVE(parent_obj, MenelausState), VMSTATE_END_OF_LIST() diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index b72a578..4814209 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -1405,7 +1405,7 @@ static VMStateDescription ccid_vmstate = { .post_load = ccid_post_load, .pre_save = ccid_pre_save, .fields = (VMStateField[]) { - VMSTATE_STRUCT(dev, USBCCIDState, 1, usb_device_vmstate, USBDevice), + VMSTATE_STRUCT(dev, USBCCIDState, usb_device_vmstate, USBDevice), VMSTATE_UINT8(debug, USBCCIDState), VMSTATE_BUFFER(bulk_out_data, USBCCIDState), VMSTATE_UINT32(bulk_out_pos, USBCCIDState), diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index d1e4bd0..7318d8f 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3772,7 +3772,7 @@ static const VMStateDescription vmstate_xhci = { /* Runtime Registers & state */ VMSTATE_INT64(mfindex_start, XHCIState), VMSTATE_TIMER(mfwrap_timer, XHCIState), - VMSTATE_STRUCT(cmd_ring, XHCIState, 1, vmstate_xhci_ring, XHCIRing), + VMSTATE_STRUCT(cmd_ring, XHCIState, vmstate_xhci_ring, XHCIRing), VMSTATE_END_OF_LIST() } diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 9eff1ac..24e7e99 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2323,16 +2323,16 @@ static const VMStateDescription usbredir_vmstate = { }, VMSTATE_STRUCT_ARRAY(endpoint, USBRedirDevice, MAX_ENDPOINTS, usbredir_ep_vmstate, struct endp_data), - VMSTATE_STRUCT(cancelled, USBRedirDevice, 1, + VMSTATE_STRUCT(cancelled, USBRedirDevice, usbredir_ep_packet_id_queue_vmstate, struct PacketIdQueue), - VMSTATE_STRUCT(already_in_flight, USBRedirDevice, 1, + VMSTATE_STRUCT(already_in_flight, USBRedirDevice, usbredir_ep_packet_id_queue_vmstate, struct PacketIdQueue), - VMSTATE_STRUCT(device_info, USBRedirDevice, 1, + VMSTATE_STRUCT(device_info, USBRedirDevice, usbredir_device_info_vmstate, struct usb_redir_device_connect_header), - VMSTATE_STRUCT(interface_info, USBRedirDevice, 1, + VMSTATE_STRUCT(interface_info, USBRedirDevice, usbredir_interface_info_vmstate, struct usb_redir_interface_info_header), VMSTATE_END_OF_LIST() diff --git a/include/hw/ipack/ipack.h b/include/hw/ipack/ipack.h index e95ffe8..89332c6 100644 --- a/include/hw/ipack/ipack.h +++ b/include/hw/ipack/ipack.h @@ -76,7 +76,7 @@ struct IPackDevice { extern const VMStateDescription vmstate_ipack_device; #define VMSTATE_IPACK_DEVICE(_field, _state) \ - VMSTATE_STRUCT(_field, _state, 1, vmstate_ipack_device, IPackDevice) + VMSTATE_STRUCT(_field, _state, vmstate_ipack_device, IPackDevice) IPackDevice *ipack_device_find(IPackBus *bus, int32_t slot); void ipack_bus_new_inplace(IPackBus *bus, size_t bus_size, diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h index 46edc2a..8080b7f 100644 --- a/include/hw/ppc/spapr_vio.h +++ b/include/hw/ppc/spapr_vio.h @@ -137,6 +137,6 @@ void spapr_vio_quiesce(void); extern const VMStateDescription vmstate_spapr_vio; #define VMSTATE_SPAPR_VIO(_f, _s) \ - VMSTATE_STRUCT(_f, _s, 0, vmstate_spapr_vio, VIOsPAPRDevice) + VMSTATE_STRUCT(_f, _s, vmstate_spapr_vio, VIOsPAPRDevice) #endif /* _HW_SPAPR_VIO_H */ diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index c6590cb..8602536 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -276,9 +276,8 @@ extern const VMStateInfo vmstate_info_bitmap; .offset = offsetof(_state, _field), \ } -#define VMSTATE_STRUCT_INFO(_field, _state, _test, _version, _vmsd, _type) { \ +#define VMSTATE_STRUCT_TEST(_field, _state, _test, _vmsd, _type) { \ .name = (stringify(_field)), \ - .version_id = (_version), \ .field_exists = (_test), \ .vmsd = &(_vmsd), \ .size = sizeof(_type), \ @@ -447,11 +446,8 @@ extern const VMStateInfo vmstate_info_bitmap; _v : version */ -#define VMSTATE_STRUCT_TEST(_field, _state, _test, _vmsd, _type) \ - VMSTATE_STRUCT_INFO(_field, _state, _test, 0, _vmsd, _type) - -#define VMSTATE_STRUCT(_field, _state, _version, _vmsd, _type) \ - VMSTATE_STRUCT_INFO(_field, _state, NULL, _version, _vmsd, _type) +#define VMSTATE_STRUCT(_field, _state, _vmsd, _type) \ + VMSTATE_STRUCT_TEST(_field, _state, NULL, _vmsd, _type) #define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) \ VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type) diff --git a/target-alpha/machine.c b/target-alpha/machine.c index e796bbe..5e69b1e 100644 --- a/target-alpha/machine.c +++ b/target-alpha/machine.c @@ -77,7 +77,7 @@ static const VMStateDescription vmstate_env = { static VMStateField vmstate_cpu_fields[] = { VMSTATE_CPU(), - VMSTATE_STRUCT(env, AlphaCPU, 1, vmstate_env, CPUAlphaState), + VMSTATE_STRUCT(env, AlphaCPU, vmstate_env, CPUAlphaState), VMSTATE_END_OF_LIST() }; diff --git a/target-lm32/machine.c b/target-lm32/machine.c index 8327c6d..eac0659 100644 --- a/target-lm32/machine.c +++ b/target-lm32/machine.c @@ -26,7 +26,7 @@ const VMStateDescription vmstate_lm32_cpu = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_STRUCT(env, LM32CPU, 1, vmstate_env, CPULM32State), + VMSTATE_STRUCT(env, LM32CPU, vmstate_env, CPULM32State), VMSTATE_END_OF_LIST() } }; diff --git a/target-openrisc/machine.c b/target-openrisc/machine.c index 9f66a9c..d435e7d 100644 --- a/target-openrisc/machine.c +++ b/target-openrisc/machine.c @@ -44,7 +44,7 @@ const VMStateDescription vmstate_openrisc_cpu = { .minimum_version_id = 1, .fields = (VMStateField[]) { VMSTATE_CPU(), - VMSTATE_STRUCT(env, OpenRISCCPU, 1, vmstate_env, CPUOpenRISCState), + VMSTATE_STRUCT(env, OpenRISCCPU, vmstate_env, CPUOpenRISCState), VMSTATE_END_OF_LIST() } }; -- 1.9.0