hw/net: Constify VMState
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231221031652.119827-42-richard.henderson@linaro.org>
This commit is contained in:
parent
e4ea952fb0
commit
1de81b426c
@ -851,7 +851,7 @@ static const VMStateDescription vmstate_aw_emac = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = allwinner_sun8i_emac_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(mii_phy_addr, AwSun8iEmacState),
|
||||
VMSTATE_UINT32(mii_cmd, AwSun8iEmacState),
|
||||
VMSTATE_UINT32(mii_data, AwSun8iEmacState),
|
||||
|
@ -472,7 +472,7 @@ static const VMStateDescription vmstate_mii = {
|
||||
.name = "rtl8201cp",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT16(bmcr, RTL8201CPState),
|
||||
VMSTATE_UINT16(bmsr, RTL8201CPState),
|
||||
VMSTATE_UINT16(anar, RTL8201CPState),
|
||||
@ -495,7 +495,7 @@ static const VMStateDescription vmstate_aw_emac = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = aw_emac_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(mii, AwEmacState, 1, vmstate_mii, RTL8201CPState),
|
||||
VMSTATE_UINT32(ctl, AwEmacState),
|
||||
VMSTATE_UINT32(tx_mode, AwEmacState),
|
||||
|
@ -1771,7 +1771,7 @@ static const VMStateDescription vmstate_cadence_gem = {
|
||||
.name = "cadence_gem",
|
||||
.version_id = 4,
|
||||
.minimum_version_id = 4,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32_ARRAY(regs, CadenceGEMState, CADENCE_GEM_MAXREG),
|
||||
VMSTATE_UINT16_ARRAY(phy_regs, CadenceGEMState, 32),
|
||||
VMSTATE_UINT8(phy_loop, CadenceGEMState),
|
||||
|
@ -266,7 +266,7 @@ static const VMStateDescription vmstate_kvaser_pci = {
|
||||
.name = "kvaser_pci",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(dev, KvaserPCIState),
|
||||
/* Load this before sja_state. */
|
||||
VMSTATE_UINT32(s5920_intcsr, KvaserPCIState),
|
||||
|
@ -203,7 +203,7 @@ static const VMStateDescription vmstate_mioe3680_pci = {
|
||||
.name = "mioe3680_pci",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(dev, Mioe3680PCIState),
|
||||
VMSTATE_STRUCT(sja_state[0], Mioe3680PCIState, 0, vmstate_can_sja,
|
||||
CanSJA1000State),
|
||||
|
@ -204,7 +204,7 @@ static const VMStateDescription vmstate_pcm3680i_pci = {
|
||||
.name = "pcm3680i_pci",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(dev, Pcm3680iPCIState),
|
||||
VMSTATE_STRUCT(sja_state[0], Pcm3680iPCIState, 0,
|
||||
vmstate_can_sja, CanSJA1000State),
|
||||
|
@ -929,7 +929,7 @@ const VMStateDescription vmstate_qemu_can_filter = {
|
||||
.name = "qemu_can_filter",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(can_id, qemu_can_filter),
|
||||
VMSTATE_UINT32(can_mask, qemu_can_filter),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@ -953,7 +953,7 @@ const VMStateDescription vmstate_can_sja = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = can_sja_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(mode, CanSJA1000State),
|
||||
|
||||
VMSTATE_UINT8(status_pel, CanSJA1000State),
|
||||
|
@ -617,7 +617,7 @@ const VMStateDescription vmstate_qemu_ctucan_tx_buffer = {
|
||||
.name = "qemu_ctucan_tx_buffer",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8_ARRAY(data, CtuCanCoreMsgBuffer, CTUCAN_CORE_MSG_MAX_LEN),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
@ -636,7 +636,7 @@ const VMStateDescription vmstate_ctucan = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = ctucan_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(mode_settings.u32, CtuCanCoreState),
|
||||
VMSTATE_UINT32(status.u32, CtuCanCoreState),
|
||||
VMSTATE_UINT32(int_stat.u32, CtuCanCoreState),
|
||||
|
@ -215,7 +215,7 @@ static const VMStateDescription vmstate_ctucan_pci = {
|
||||
.name = "ctucan_pci",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(dev, CtuCanPCIState),
|
||||
VMSTATE_STRUCT(ctucan_state[0], CtuCanPCIState, 0, vmstate_ctucan,
|
||||
CtuCanCoreState),
|
||||
|
@ -2060,7 +2060,7 @@ static const VMStateDescription vmstate_canfd = {
|
||||
.name = TYPE_XILINX_CANFD,
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32_ARRAY(regs, XlnxVersalCANFDState,
|
||||
XLNX_VERSAL_CANFD_R_MAX),
|
||||
VMSTATE_PTIMER(canfd_timer, XlnxVersalCANFDState),
|
||||
|
@ -1159,7 +1159,7 @@ static const VMStateDescription vmstate_can = {
|
||||
.name = TYPE_XLNX_ZYNQMP_CAN,
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_FIFO32(rx_fifo, XlnxZynqMPCANState),
|
||||
VMSTATE_FIFO32(tx_fifo, XlnxZynqMPCANState),
|
||||
VMSTATE_FIFO32(txhpb_fifo, XlnxZynqMPCANState),
|
||||
|
@ -924,7 +924,7 @@ static const VMStateDescription vmstate_dp8393x = {
|
||||
.name = "dp8393x",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField []) {
|
||||
.fields = (const VMStateField []) {
|
||||
VMSTATE_UINT16_2DARRAY(cam, dp8393xState, 16, 3),
|
||||
VMSTATE_UINT16_ARRAY(regs, dp8393xState, SONIC_REG_COUNT),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -1437,7 +1437,7 @@ static const VMStateDescription vmstate_e1000_mit_state = {
|
||||
.name = "e1000/mit_state",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(mac_reg[RDTR], E1000State),
|
||||
VMSTATE_UINT32(mac_reg[RADV], E1000State),
|
||||
VMSTATE_UINT32(mac_reg[TADV], E1000State),
|
||||
@ -1452,7 +1452,7 @@ static const VMStateDescription vmstate_e1000_full_mac_state = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = e1000_full_mac_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32_ARRAY(mac_reg, E1000State, 0x8000),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
@ -1464,7 +1464,7 @@ static const VMStateDescription vmstate_e1000_tx_tso_state = {
|
||||
.minimum_version_id = 1,
|
||||
.needed = e1000_tso_state_needed,
|
||||
.post_load = e1000_tx_tso_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(tx.tso_props.ipcss, E1000State),
|
||||
VMSTATE_UINT8(tx.tso_props.ipcso, E1000State),
|
||||
VMSTATE_UINT16(tx.tso_props.ipcse, E1000State),
|
||||
@ -1486,7 +1486,7 @@ static const VMStateDescription vmstate_e1000 = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_save = e1000_pre_save,
|
||||
.post_load = e1000_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, E1000State),
|
||||
VMSTATE_UNUSED_TEST(is_version_1, 4), /* was instance id */
|
||||
VMSTATE_UNUSED(4), /* Was mmio_base. */
|
||||
@ -1558,7 +1558,7 @@ static const VMStateDescription vmstate_e1000 = {
|
||||
E1000_VLAN_FILTER_TBL_SIZE),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
&vmstate_e1000_mit_state,
|
||||
&vmstate_e1000_full_mac_state,
|
||||
&vmstate_e1000_tx_tso_state,
|
||||
|
@ -564,7 +564,7 @@ static const VMStateDescription e1000e_vmstate_tx = {
|
||||
.name = "e1000e-tx",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(sum_needed, struct e1000e_tx),
|
||||
VMSTATE_UINT8(props.ipcss, struct e1000e_tx),
|
||||
VMSTATE_UINT8(props.ipcso, struct e1000e_tx),
|
||||
@ -588,7 +588,7 @@ static const VMStateDescription e1000e_vmstate_intr_timer = {
|
||||
.name = "e1000e-intr-timer",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_TIMER_PTR(timer, E1000IntrDelayTimer),
|
||||
VMSTATE_BOOL(running, E1000IntrDelayTimer),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@ -609,7 +609,7 @@ static const VMStateDescription e1000e_vmstate = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_save = e1000e_pre_save,
|
||||
.post_load = e1000e_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, E1000EState),
|
||||
VMSTATE_MSIX(parent_obj, E1000EState),
|
||||
|
||||
|
@ -1772,7 +1772,7 @@ static ssize_t nic_receive(NetClientState *nc, const uint8_t * buf, size_t size)
|
||||
static const VMStateDescription vmstate_eepro100 = {
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(dev, EEPRO100State),
|
||||
VMSTATE_UNUSED(32),
|
||||
VMSTATE_BUFFER(mult, EEPRO100State),
|
||||
|
@ -1119,7 +1119,7 @@ static const VMStateDescription vmstate_ftgmac100 = {
|
||||
.name = TYPE_FTGMAC100,
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(irq_state, FTGMAC100State),
|
||||
VMSTATE_UINT32(isr, FTGMAC100State),
|
||||
VMSTATE_UINT32(ier, FTGMAC100State),
|
||||
@ -1304,7 +1304,7 @@ static const VMStateDescription vmstate_aspeed_mii = {
|
||||
.name = TYPE_ASPEED_MII,
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(phycr, FTGMAC100State),
|
||||
VMSTATE_UINT32(phydata, FTGMAC100State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -713,7 +713,7 @@ const VMStateDescription vmstate_i82596 = {
|
||||
.name = "i82596",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT16(lnkst, I82596State),
|
||||
VMSTATE_TIMER_PTR(flush_queue_timer, I82596State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -520,7 +520,7 @@ static const VMStateDescription igb_vmstate_tx_ctx = {
|
||||
.name = "igb-tx-ctx",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(vlan_macip_lens, struct e1000_adv_tx_context_desc),
|
||||
VMSTATE_UINT32(seqnum_seed, struct e1000_adv_tx_context_desc),
|
||||
VMSTATE_UINT32(type_tucmd_mlhl, struct e1000_adv_tx_context_desc),
|
||||
@ -533,7 +533,7 @@ static const VMStateDescription igb_vmstate_tx = {
|
||||
.name = "igb-tx",
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT_ARRAY(ctx, struct igb_tx, 2, 0, igb_vmstate_tx_ctx,
|
||||
struct e1000_adv_tx_context_desc),
|
||||
VMSTATE_UINT32(first_cmd_type_len, struct igb_tx),
|
||||
@ -548,7 +548,7 @@ static const VMStateDescription igb_vmstate_intr_timer = {
|
||||
.name = "igb-intr-timer",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_TIMER_PTR(timer, IGBIntrDelayTimer),
|
||||
VMSTATE_BOOL(running, IGBIntrDelayTimer),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@ -569,7 +569,7 @@ static const VMStateDescription igb_vmstate = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_save = igb_pre_save,
|
||||
.post_load = igb_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, IGBState),
|
||||
VMSTATE_MSIX(parent_obj, IGBState),
|
||||
|
||||
|
@ -195,7 +195,7 @@ static const VMStateDescription vmstate_imx_eth_txdescs = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = imx_eth_is_multi_tx_ring,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(tx_descriptor[1], IMXFECState),
|
||||
VMSTATE_UINT32(tx_descriptor[2], IMXFECState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@ -206,7 +206,7 @@ static const VMStateDescription vmstate_imx_eth = {
|
||||
.name = TYPE_IMX_FEC,
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32_ARRAY(regs, IMXFECState, ENET_MAX),
|
||||
VMSTATE_UINT32(rx_descriptor, IMXFECState),
|
||||
VMSTATE_UINT32(tx_descriptor[0], IMXFECState),
|
||||
@ -217,7 +217,7 @@ static const VMStateDescription vmstate_imx_eth = {
|
||||
VMSTATE_UINT32(phy_int_mask, IMXFECState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription * []) {
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
&vmstate_imx_eth_txdescs,
|
||||
NULL
|
||||
},
|
||||
|
@ -173,7 +173,7 @@ static const VMStateDescription vmstate_lan9118_packet = {
|
||||
.name = "lan9118_packet",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(state, LAN9118Packet),
|
||||
VMSTATE_UINT32(cmd_a, LAN9118Packet),
|
||||
VMSTATE_UINT32(cmd_b, LAN9118Packet),
|
||||
@ -271,7 +271,7 @@ static const VMStateDescription vmstate_lan9118 = {
|
||||
.name = "lan9118",
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PTIMER(timer, lan9118_state),
|
||||
VMSTATE_UINT32(irq_cfg, lan9118_state),
|
||||
VMSTATE_UINT32(int_sts, lan9118_state),
|
||||
|
@ -94,7 +94,7 @@ static const VMStateDescription vmstate_lance = {
|
||||
.name = "pcnet",
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(state, SysBusPCNetState, 0, vmstate_pcnet, PCNetState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ static const VMStateDescription vmstate_lasi_82596 = {
|
||||
.name = "i82596",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(state, SysBusI82596State, 0, vmstate_i82596,
|
||||
I82596State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -218,7 +218,7 @@ static const VMStateDescription vmstate_mipsnet = {
|
||||
.name = "mipsnet",
|
||||
.version_id = 0,
|
||||
.minimum_version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(busy, MIPSnetState),
|
||||
VMSTATE_UINT32(rx_count, MIPSnetState),
|
||||
VMSTATE_UINT32(rx_read, MIPSnetState),
|
||||
|
@ -557,7 +557,7 @@ static const VMStateDescription vmstate_msf2_emac = {
|
||||
.name = TYPE_MSS_EMAC,
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8_ARRAY(mac_addr, MSF2EmacState, ETH_ALEN),
|
||||
VMSTATE_UINT32(rx_desc, MSF2EmacState),
|
||||
VMSTATE_UINT16_ARRAY(phy_regs, MSF2EmacState, PHY_MAX_REGS),
|
||||
|
@ -358,7 +358,7 @@ static const VMStateDescription mv88w8618_eth_vmsd = {
|
||||
.name = "mv88w8618_eth",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(smir, mv88w8618_eth_state),
|
||||
VMSTATE_UINT32(icr, mv88w8618_eth_state),
|
||||
VMSTATE_UINT32(imr, mv88w8618_eth_state),
|
||||
|
@ -53,7 +53,7 @@ static const VMStateDescription vmstate_isa_ne2000 = {
|
||||
.name = "ne2000",
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(ne2000, ISANE2000State, 0, vmstate_ne2000, NE2000State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ static const VMStateDescription vmstate_pci_ne2000 = {
|
||||
.name = "ne2000",
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 3,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(dev, PCINE2000State),
|
||||
VMSTATE_STRUCT(ne2000, PCINE2000State, 0, vmstate_ne2000, NE2000State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -606,7 +606,7 @@ const VMStateDescription vmstate_ne2000 = {
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 0,
|
||||
.post_load = ne2000_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8_V(rxcr, NE2000State, 2),
|
||||
VMSTATE_UINT8(cmd, NE2000State),
|
||||
VMSTATE_UINT32(start, NE2000State),
|
||||
|
@ -837,7 +837,7 @@ static const VMStateDescription vmstate_npcm7xx_emc = {
|
||||
.name = TYPE_NPCM7XX_EMC,
|
||||
.version_id = 0,
|
||||
.minimum_version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(emc_num, NPCM7xxEMCState),
|
||||
VMSTATE_UINT32_ARRAY(regs, NPCM7xxEMCState, NPCM7XX_NUM_EMC_REGS),
|
||||
VMSTATE_BOOL(tx_active, NPCM7xxEMCState),
|
||||
|
@ -147,7 +147,7 @@ static const VMStateDescription vmstate_pci_pcnet = {
|
||||
.name = "pcnet",
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, PCIPCNetState),
|
||||
VMSTATE_STRUCT(state, PCIPCNetState, 0, vmstate_pcnet, PCNetState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -1682,7 +1682,7 @@ const VMStateDescription vmstate_pcnet = {
|
||||
.name = "pcnet",
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_INT32(rap, PCNetState),
|
||||
VMSTATE_INT32(isr, PCNetState),
|
||||
VMSTATE_INT32(lnkst, PCNetState),
|
||||
|
@ -3150,7 +3150,7 @@ static const VMStateDescription vmstate_rtl8139_hotplug_ready ={
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = rtl8139_hotplug_ready_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
@ -3173,7 +3173,7 @@ static const VMStateDescription vmstate_rtl8139 = {
|
||||
.minimum_version_id = 3,
|
||||
.post_load = rtl8139_post_load,
|
||||
.pre_save = rtl8139_pre_save,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, RTL8139State),
|
||||
VMSTATE_PARTIAL_BUFFER(phys, RTL8139State, 6),
|
||||
VMSTATE_BUFFER(mult, RTL8139State),
|
||||
@ -3257,7 +3257,7 @@ static const VMStateDescription vmstate_rtl8139 = {
|
||||
VMSTATE_UINT32_V(cplus_enabled, RTL8139State, 4),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
&vmstate_rtl8139_hotplug_ready,
|
||||
NULL
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ static const VMStateDescription vmstate_smc91c111 = {
|
||||
.name = "smc91c111",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT16(tcr, smc91c111_state),
|
||||
VMSTATE_UINT16(rcr, smc91c111_state),
|
||||
VMSTATE_UINT16(cr, smc91c111_state),
|
||||
|
@ -800,7 +800,7 @@ static const VMStateDescription vmstate_rx_buffer_pool = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = spapr_vlan_rx_buffer_pools_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_INT32(bufsize, RxBufPool),
|
||||
VMSTATE_INT32(count, RxBufPool),
|
||||
VMSTATE_UINT64_ARRAY(bds, RxBufPool, RX_POOL_MAX_BDS),
|
||||
@ -813,7 +813,7 @@ static const VMStateDescription vmstate_rx_pools = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = spapr_vlan_rx_buffer_pools_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(rx_pool, SpaprVioVlan,
|
||||
RX_MAX_POOLS, 1,
|
||||
vmstate_rx_buffer_pool, RxBufPool),
|
||||
@ -825,7 +825,7 @@ static const VMStateDescription vmstate_spapr_llan = {
|
||||
.name = "spapr_llan",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_SPAPR_VIO(sdev, SpaprVioVlan),
|
||||
/* LLAN state */
|
||||
VMSTATE_BOOL(isopen, SpaprVioVlan),
|
||||
@ -837,7 +837,7 @@ static const VMStateDescription vmstate_spapr_llan = {
|
||||
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription * []) {
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
&vmstate_rx_pools,
|
||||
NULL
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ static const VMStateDescription vmstate_rx_frame = {
|
||||
.name = "stellaris_enet/rx_frame",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8_ARRAY(data, StellarisEnetRxFrame, 2048),
|
||||
VMSTATE_UINT32(len, StellarisEnetRxFrame),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@ -133,7 +133,7 @@ static const VMStateDescription vmstate_stellaris_enet = {
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 2,
|
||||
.post_load = stellaris_enet_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(ris, stellaris_enet_state),
|
||||
VMSTATE_UINT32(im, stellaris_enet_state),
|
||||
VMSTATE_UINT32(rctl, stellaris_enet_state),
|
||||
|
@ -1434,7 +1434,7 @@ static const VMStateDescription vmstate_sungem = {
|
||||
.name = "sungem",
|
||||
.version_id = 0,
|
||||
.minimum_version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(pdev, SunGEMState),
|
||||
VMSTATE_MACADDR(conf.macaddr, SunGEMState),
|
||||
VMSTATE_UINT32(phy_addr, SunGEMState),
|
||||
|
@ -925,7 +925,7 @@ static const VMStateDescription vmstate_hme = {
|
||||
.name = "sunhme",
|
||||
.version_id = 0,
|
||||
.minimum_version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, SunHMEState),
|
||||
VMSTATE_MACADDR(conf.macaddr, SunHMEState),
|
||||
VMSTATE_UINT32_ARRAY(sebregs, SunHMEState, (HME_SEB_REG_SIZE >> 2)),
|
||||
|
@ -48,7 +48,7 @@ struct TULIPState {
|
||||
|
||||
static const VMStateDescription vmstate_pci_tulip = {
|
||||
.name = "tulip",
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(dev, TULIPState),
|
||||
VMSTATE_UINT32_ARRAY(csr, TULIPState, 16),
|
||||
VMSTATE_UINT32(old_csr9, TULIPState),
|
||||
|
@ -3113,7 +3113,7 @@ static int virtio_net_post_load_virtio(VirtIODevice *vdev)
|
||||
/* tx_waiting field of a VirtIONetQueue */
|
||||
static const VMStateDescription vmstate_virtio_net_queue_tx_waiting = {
|
||||
.name = "virtio-net-queue-tx_waiting",
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(tx_waiting, VirtIONetQueue),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
@ -3191,7 +3191,7 @@ static const VMStateDescription vmstate_virtio_net_tx_waiting = {
|
||||
.name = "virtio-net-tx_waiting",
|
||||
.pre_load = virtio_net_tx_waiting_pre_load,
|
||||
.pre_save = virtio_net_tx_waiting_pre_save,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT_VARRAY_POINTER_UINT16(vqs_1, struct VirtIONetMigTmp,
|
||||
curr_queue_pairs_1,
|
||||
vmstate_virtio_net_queue_tx_waiting,
|
||||
@ -3228,7 +3228,7 @@ static const VMStateDescription vmstate_virtio_net_has_ufo = {
|
||||
.name = "virtio-net-ufo",
|
||||
.post_load = virtio_net_ufo_post_load,
|
||||
.pre_save = virtio_net_ufo_pre_save,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(has_ufo, struct VirtIONetMigTmp),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
@ -3262,7 +3262,7 @@ static const VMStateDescription vmstate_virtio_net_has_vnet = {
|
||||
.name = "virtio-net-vnet",
|
||||
.post_load = virtio_net_vnet_post_load,
|
||||
.pre_save = virtio_net_vnet_pre_save,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(has_vnet_hdr, struct VirtIONetMigTmp),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
@ -3278,7 +3278,7 @@ static const VMStateDescription vmstate_virtio_net_rss = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = virtio_net_rss_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_BOOL(rss_data.enabled, VirtIONet),
|
||||
VMSTATE_BOOL(rss_data.redirect, VirtIONet),
|
||||
VMSTATE_BOOL(rss_data.populate_hash, VirtIONet),
|
||||
@ -3299,7 +3299,7 @@ static const VMStateDescription vmstate_virtio_net_device = {
|
||||
.version_id = VIRTIO_NET_VM_VERSION,
|
||||
.minimum_version_id = VIRTIO_NET_VM_VERSION,
|
||||
.post_load = virtio_net_post_load_device,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8_ARRAY(mac, VirtIONet, ETH_ALEN),
|
||||
VMSTATE_STRUCT_POINTER(vqs, VirtIONet,
|
||||
vmstate_virtio_net_queue_tx_waiting,
|
||||
@ -3344,7 +3344,7 @@ static const VMStateDescription vmstate_virtio_net_device = {
|
||||
has_ctrl_guest_offloads),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription * []) {
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
&vmstate_virtio_net_rss,
|
||||
NULL
|
||||
}
|
||||
@ -3871,7 +3871,7 @@ static const VMStateDescription vmstate_virtio_net = {
|
||||
.name = "virtio-net",
|
||||
.minimum_version_id = VIRTIO_NET_VM_VERSION,
|
||||
.version_id = VIRTIO_NET_VM_VERSION,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_VIRTIO_DEVICE,
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
|
@ -2307,7 +2307,7 @@ static const VMStateDescription vmxstate_vmxnet3_mcast_list = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_load = vmxnet3_mcast_list_pre_load,
|
||||
.needed = vmxnet3_mc_list_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_VBUFFER_UINT32(mcast_list, VMXNET3State, 0, NULL,
|
||||
mcast_list_buff_size),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@ -2317,7 +2317,7 @@ static const VMStateDescription vmxstate_vmxnet3_mcast_list = {
|
||||
static const VMStateDescription vmstate_vmxnet3_ring = {
|
||||
.name = "vmxnet3-ring",
|
||||
.version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(pa, Vmxnet3Ring),
|
||||
VMSTATE_UINT32(size, Vmxnet3Ring),
|
||||
VMSTATE_UINT32(cell_size, Vmxnet3Ring),
|
||||
@ -2330,7 +2330,7 @@ static const VMStateDescription vmstate_vmxnet3_ring = {
|
||||
static const VMStateDescription vmstate_vmxnet3_tx_stats = {
|
||||
.name = "vmxnet3-tx-stats",
|
||||
.version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(TSOPktsTxOK, struct UPT1_TxStats),
|
||||
VMSTATE_UINT64(TSOBytesTxOK, struct UPT1_TxStats),
|
||||
VMSTATE_UINT64(ucastPktsTxOK, struct UPT1_TxStats),
|
||||
@ -2348,7 +2348,7 @@ static const VMStateDescription vmstate_vmxnet3_tx_stats = {
|
||||
static const VMStateDescription vmstate_vmxnet3_txq_descr = {
|
||||
.name = "vmxnet3-txq-descr",
|
||||
.version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(tx_ring, Vmxnet3TxqDescr, 0, vmstate_vmxnet3_ring,
|
||||
Vmxnet3Ring),
|
||||
VMSTATE_STRUCT(comp_ring, Vmxnet3TxqDescr, 0, vmstate_vmxnet3_ring,
|
||||
@ -2364,7 +2364,7 @@ static const VMStateDescription vmstate_vmxnet3_txq_descr = {
|
||||
static const VMStateDescription vmstate_vmxnet3_rx_stats = {
|
||||
.name = "vmxnet3-rx-stats",
|
||||
.version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(LROPktsRxOK, struct UPT1_RxStats),
|
||||
VMSTATE_UINT64(LROBytesRxOK, struct UPT1_RxStats),
|
||||
VMSTATE_UINT64(ucastPktsRxOK, struct UPT1_RxStats),
|
||||
@ -2382,7 +2382,7 @@ static const VMStateDescription vmstate_vmxnet3_rx_stats = {
|
||||
static const VMStateDescription vmstate_vmxnet3_rxq_descr = {
|
||||
.name = "vmxnet3-rxq-descr",
|
||||
.version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT_ARRAY(rx_ring, Vmxnet3RxqDescr,
|
||||
VMXNET3_RX_RINGS_PER_QUEUE, 0,
|
||||
vmstate_vmxnet3_ring, Vmxnet3Ring),
|
||||
@ -2418,7 +2418,7 @@ static int vmxnet3_post_load(void *opaque, int version_id)
|
||||
static const VMStateDescription vmstate_vmxnet3_int_state = {
|
||||
.name = "vmxnet3-int-state",
|
||||
.version_id = 0,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_BOOL(is_masked, Vmxnet3IntState),
|
||||
VMSTATE_BOOL(is_pending, Vmxnet3IntState),
|
||||
VMSTATE_BOOL(is_asserted, Vmxnet3IntState),
|
||||
@ -2432,7 +2432,7 @@ static const VMStateDescription vmstate_vmxnet3 = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_save = vmxnet3_pre_save,
|
||||
.post_load = vmxnet3_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, VMXNET3State),
|
||||
VMSTATE_MSIX(parent_obj, VMXNET3State),
|
||||
VMSTATE_BOOL(rx_packets_compound, VMXNET3State),
|
||||
@ -2468,7 +2468,7 @@ static const VMStateDescription vmstate_vmxnet3 = {
|
||||
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
&vmxstate_vmxnet3_mcast_list,
|
||||
NULL
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ static const VMStateDescription vmstate_rxtx_stats = {
|
||||
.name = "xgmac_stats",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(rx_bytes, RxTxStats),
|
||||
VMSTATE_UINT64(tx_bytes, RxTxStats),
|
||||
VMSTATE_UINT64(rx, RxTxStats),
|
||||
@ -173,7 +173,7 @@ static const VMStateDescription vmstate_xgmac = {
|
||||
.name = "xgmac",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(stats, XgmacState, 0, vmstate_rxtx_stats, RxTxStats),
|
||||
VMSTATE_UINT32_ARRAY(regs, XgmacState, R_MAX),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
Loading…
Reference in New Issue
Block a user