From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3bIy-0002bb-St for qemu-devel@nongnu.org; Sun, 28 Jul 2013 20:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3bIr-0003DT-KH for qemu-devel@nongnu.org; Sun, 28 Jul 2013 20:27:16 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 29 Jul 2013 02:26:56 +0200 Message-Id: <1375057621-19961-2-git-send-email-afaerber@suse.de> In-Reply-To: <1375057621-19961-1-git-send-email-afaerber@suse.de> References: <1375057621-19961-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-next for-next v2 1/6] pci: Simplify VMSTATE_PCI_DEVICE() macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , "open list:PReP" , "Michael S. Tsirkin" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , "Vassili Karpov (malc)" , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paul Brook Drop the arguments to avoid QOM refactorings causing more churn. Signed-off-by: Andreas F=C3=A4rber --- hw/acpi/piix4.c | 2 +- hw/audio/ac97.c | 2 +- hw/audio/es1370.c | 2 +- hw/audio/intel-hda.c | 2 +- hw/char/serial-pci.c | 4 ++-- hw/char/tpci200.c | 2 +- hw/display/cirrus_vga.c | 2 +- hw/display/qxl.c | 2 +- hw/display/vga-pci.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/i2c/smbus_ich9.c | 2 +- hw/ide/ich.c | 2 +- hw/ide/pci.c | 2 +- hw/isa/i82378.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/piix4.c | 2 +- hw/isa/vt82c686.c | 4 ++-- hw/net/e1000.c | 2 +- hw/net/eepro100.c | 2 +- hw/net/ne2000.c | 2 +- hw/net/pcnet-pci.c | 2 +- hw/net/rtl8139.c | 2 +- hw/net/vmxnet3.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-host/bonito.c | 2 +- hw/pci-host/piix.c | 4 ++-- hw/pci-host/prep.c | 2 +- hw/pci-host/q35.c | 2 +- hw/scsi/esp-pci.c | 2 +- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/megasas.c | 2 +- hw/scsi/vmw_pvscsi.c | 2 +- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-uhci.c | 2 +- hw/watchdog/wdt_i6300esb.c | 2 +- hw/xen/xen_platform.c | 2 +- include/hw/pci/pci.h | 6 +++--- 37 files changed, 42 insertions(+), 42 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index c885690..c95d0b4 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -294,7 +294,7 @@ static const VMStateDescription vmstate_acpi =3D { .load_state_old =3D acpi_load_old, .post_load =3D vmstate_acpi_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState), + VMSTATE_PCI_DEVICE(), VMSTATE_UINT16(ar.pm1.evt.sts, PIIX4PMState), VMSTATE_UINT16(ar.pm1.evt.en, PIIX4PMState), VMSTATE_UINT16(ar.pm1.cnt.cnt, PIIX4PMState), diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 365b2f1..d23882b 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1214,7 +1214,7 @@ static const VMStateDescription vmstate_ac97 =3D { .minimum_version_id_old =3D 2, .post_load =3D ac97_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE (dev, AC97LinkState), + VMSTATE_PCI_DEVICE (), VMSTATE_UINT32 (glob_cnt, AC97LinkState), VMSTATE_UINT32 (glob_sta, AC97LinkState), VMSTATE_UINT32 (cas, AC97LinkState), diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index f2c40da..d681a44 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -1000,7 +1000,7 @@ static const VMStateDescription vmstate_es1370 =3D = { .minimum_version_id_old =3D 2, .post_load =3D es1370_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE (dev, ES1370State), + VMSTATE_PCI_DEVICE (), VMSTATE_STRUCT_ARRAY (chan, ES1370State, NB_CHANNELS, 2, vmstate_es1370_channel, struct chan), VMSTATE_UINT32 (ctl, ES1370State), diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 58984dc..fb7f8ef 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -1191,7 +1191,7 @@ static const VMStateDescription vmstate_intel_hda =3D= { .version_id =3D 1, .post_load =3D intel_hda_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(pci, IntelHDAState), + VMSTATE_PCI_DEVICE(), =20 /* registers */ VMSTATE_UINT32(g_ctl, IntelHDAState), diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index a17c702..f6a21af 100644 --- a/hw/char/serial-pci.c +++ b/hw/char/serial-pci.c @@ -155,7 +155,7 @@ static const VMStateDescription vmstate_pci_serial =3D= { .version_id =3D 1, .minimum_version_id =3D 1, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, PCISerialState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(state, PCISerialState, 0, vmstate_serial, SerialS= tate), VMSTATE_END_OF_LIST() } @@ -166,7 +166,7 @@ static const VMStateDescription vmstate_pci_multi_ser= ial =3D { .version_id =3D 1, .minimum_version_id =3D 1, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, PCIMultiSerialState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT_ARRAY(state, PCIMultiSerialState, PCI_SERIAL_MAX_= PORTS, 0, vmstate_serial, SerialState), VMSTATE_UINT32_ARRAY(level, PCIMultiSerialState, PCI_SERIAL_MAX_= PORTS), diff --git a/hw/char/tpci200.c b/hw/char/tpci200.c index a199e57..2ba5ad2 100644 --- a/hw/char/tpci200.c +++ b/hw/char/tpci200.c @@ -631,7 +631,7 @@ static const VMStateDescription vmstate_tpci200 =3D { .minimum_version_id =3D 1, .minimum_version_id_old =3D 1, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, TPCI200State), + VMSTATE_PCI_DEVICE(), VMSTATE_BOOL_ARRAY(big_endian, TPCI200State, 3), VMSTATE_UINT8_ARRAY(ctrl, TPCI200State, N_MODULES), VMSTATE_UINT16(status, TPCI200State), diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index a440575..c116bc4 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -2746,7 +2746,7 @@ static const VMStateDescription vmstate_pci_cirrus_= vga =3D { .minimum_version_id =3D 2, .minimum_version_id_old =3D 2, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, PCICirrusVGAState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(cirrus_vga, PCICirrusVGAState, 0, vmstate_cirrus_vga, CirrusVGAState), VMSTATE_END_OF_LIST() diff --git a/hw/display/qxl.c b/hw/display/qxl.c index ddefa06..813c31a 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2265,7 +2265,7 @@ static VMStateDescription qxl_vmstate =3D { .pre_load =3D qxl_pre_load, .post_load =3D qxl_post_load, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(pci, PCIQXLDevice), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(vga, PCIQXLDevice, 0, vmstate_vga_common, VGAComm= onState), VMSTATE_UINT32(shadow_rom.mode, PCIQXLDevice), VMSTATE_UINT32(num_free_res, PCIQXLDevice), diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 3e150ab..ce76e9c 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -56,7 +56,7 @@ static const VMStateDescription vmstate_vga_pci =3D { .minimum_version_id =3D 2, .minimum_version_id_old =3D 2, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, PCIVGAState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(vga, PCIVGAState, 0, vmstate_vga_common, VGACommo= nState), VMSTATE_END_OF_LIST() } diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 3536cde..97c7ba1 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1179,7 +1179,7 @@ static const VMStateDescription vmstate_vmware_vga = =3D { .minimum_version_id =3D 0, .minimum_version_id_old =3D 0, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(parent_obj, struct pci_vmsvga_state_s), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(chip, struct pci_vmsvga_state_s, 0, vmstate_vmware_vga_internal, struct vmsvga_state_= s), VMSTATE_END_OF_LIST() diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c index ca22978..c2ac696 100644 --- a/hw/i2c/smbus_ich9.c +++ b/hw/i2c/smbus_ich9.c @@ -50,7 +50,7 @@ static const VMStateDescription vmstate_ich9_smbus =3D = { .minimum_version_id =3D 1, .minimum_version_id_old =3D 1, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, struct ICH9SMBState), + VMSTATE_PCI_DEVICE(), VMSTATE_END_OF_LIST() } }; diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 4eb5488..bf16847 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -84,7 +84,7 @@ static const VMStateDescription vmstate_ich9_ahci =3D { .unmigratable =3D 1, /* Still buggy under I/O load */ .version_id =3D 1, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, AHCIPCIState), + VMSTATE_PCI_DEVICE(), VMSTATE_AHCI(ahci, AHCIPCIState), VMSTATE_END_OF_LIST() }, diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 91151fc..a3ede4f 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -482,7 +482,7 @@ const VMStateDescription vmstate_ide_pci =3D { .minimum_version_id_old =3D 0, .post_load =3D ide_pci_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, PCIIDEState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT_ARRAY(bmdma, PCIIDEState, 2, 0, vmstate_bmdma, BMDMAState), VMSTATE_IDE_BUS_ARRAY(bus, PCIIDEState, 2), diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index b25ed04..b147b82 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -54,7 +54,7 @@ static const VMStateDescription vmstate_pci_i82378 =3D = { .version_id =3D 0, .minimum_version_id =3D 0, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(pci_dev, PCIi82378State), + VMSTATE_PCI_DEVICE(), VMSTATE_END_OF_LIST() }, }; diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index d1921aa..5a9fd03 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -579,7 +579,7 @@ static const VMStateDescription vmstate_ich9_lpc =3D = { .minimum_version_id_old =3D 1, .post_load =3D ich9_lpc_post_load, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(d, ICH9LPCState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(apm, ICH9LPCState, 0, vmstate_apm, APMState), VMSTATE_STRUCT(pm, ICH9LPCState, 0, vmstate_ich9_pm, ICH9LPCPMRe= gs), VMSTATE_UINT8_ARRAY(chip_config, ICH9LPCState, ICH9_CC_SIZE), diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 1a1d451..fe13429 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -78,7 +78,7 @@ static const VMStateDescription vmstate_piix4 =3D { .minimum_version_id =3D 2, .minimum_version_id_old =3D 2, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, PIIX4State), + VMSTATE_PCI_DEVICE(), VMSTATE_END_OF_LIST() } }; diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 2174eaa..72e2dfd 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -233,7 +233,7 @@ static const VMStateDescription vmstate_acpi =3D { .minimum_version_id_old =3D 1, .post_load =3D vmstate_acpi_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, VT686PMState), + VMSTATE_PCI_DEVICE(), VMSTATE_UINT16(ar.pm1.evt.sts, VT686PMState), VMSTATE_UINT16(ar.pm1.evt.en, VT686PMState), VMSTATE_UINT16(ar.pm1.cnt.cnt, VT686PMState), @@ -417,7 +417,7 @@ static const VMStateDescription vmstate_via =3D { .minimum_version_id =3D 1, .minimum_version_id_old =3D 1, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, VT82C686BState), + VMSTATE_PCI_DEVICE(), VMSTATE_END_OF_LIST() } }; diff --git a/hw/net/e1000.c b/hw/net/e1000.c index b952d8d..a2f3c70 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1198,7 +1198,7 @@ static const VMStateDescription vmstate_e1000 =3D { .pre_save =3D e1000_pre_save, .post_load =3D e1000_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, E1000State), + VMSTATE_PCI_DEVICE(), VMSTATE_UNUSED_TEST(is_version_1, 4), /* was instance id */ VMSTATE_UNUSED(4), /* Was mmio_base. */ VMSTATE_UINT32(rxbuf_size, E1000State), diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index e0befb2..f3def09 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -1786,7 +1786,7 @@ static const VMStateDescription vmstate_eepro100 =3D= { .minimum_version_id =3D 2, .minimum_version_id_old =3D 2, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, EEPRO100State), + VMSTATE_PCI_DEVICE(), VMSTATE_UNUSED(32), VMSTATE_BUFFER(mult, EEPRO100State), VMSTATE_BUFFER(mem, EEPRO100State), diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 8d43fd9..d7ca182 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -647,7 +647,7 @@ static const VMStateDescription vmstate_pci_ne2000 =3D= { .minimum_version_id =3D 3, .minimum_version_id_old =3D 3, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, PCINE2000State), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(ne2000, PCINE2000State, 0, vmstate_ne2000, NE2000= State), VMSTATE_END_OF_LIST() } diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index 6ef28f7..cb9f361 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -243,7 +243,7 @@ static const VMStateDescription vmstate_pci_pcnet =3D= { .minimum_version_id =3D 2, .minimum_version_id_old =3D 2, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, PCIPCNetState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(state, PCIPCNetState, 0, vmstate_pcnet, PCNetStat= e), VMSTATE_END_OF_LIST() } diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 6552034..283d02d 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -3292,7 +3292,7 @@ static const VMStateDescription vmstate_rtl8139 =3D= { .post_load =3D rtl8139_post_load, .pre_save =3D rtl8139_pre_save, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, RTL8139State), + VMSTATE_PCI_DEVICE(), VMSTATE_PARTIAL_BUFFER(phys, RTL8139State, 6), VMSTATE_BUFFER(mult, RTL8139State), VMSTATE_UINT32_ARRAY(TxStatus, RTL8139State, 4), diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index b39ff08..3bad83c 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2378,7 +2378,7 @@ static const VMStateDescription vmstate_vmxnet3 =3D= { .pre_save =3D vmxnet3_pre_save, .post_load =3D vmxnet3_post_load, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(parent_obj, VMXNET3State), + VMSTATE_PCI_DEVICE(), VMSTATE_BOOL(rx_packets_compound, VMXNET3State), VMSTATE_BOOL(rx_vlan_stripping, VMXNET3State), VMSTATE_BOOL(lro_supported, VMXNET3State), diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_de= v.c index cf3c53c..a909dbf 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -126,7 +126,7 @@ static Property pci_bridge_dev_properties[] =3D { static const VMStateDescription pci_bridge_dev_vmstate =3D { .name =3D "pci_bridge", .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(parent_obj, PCIBridge), + VMSTATE_PCI_DEVICE(), SHPC_VMSTATE(shpc, PCIDevice), VMSTATE_END_OF_LIST() } diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 5086d42..1b82df4 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -689,7 +689,7 @@ static const VMStateDescription vmstate_bonito =3D { .minimum_version_id =3D 1, .minimum_version_id_old =3D 1, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, PCIBonitoState), + VMSTATE_PCI_DEVICE(), VMSTATE_END_OF_LIST() } }; diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 3908860..982f29c 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -197,7 +197,7 @@ static const VMStateDescription vmstate_i440fx =3D { .load_state_old =3D i440fx_load_old, .post_load =3D i440fx_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, PCII440FXState), + VMSTATE_PCI_DEVICE(), VMSTATE_UINT8(smm_enabled, PCII440FXState), VMSTATE_END_OF_LIST() } @@ -516,7 +516,7 @@ static const VMStateDescription vmstate_piix3 =3D { .post_load =3D piix3_post_load, .pre_save =3D piix3_pre_save, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, PIIX3State), + VMSTATE_PCI_DEVICE(), VMSTATE_INT32_ARRAY_V(pci_irq_levels_vmstate, PIIX3State, PIIX_NUM_PIRQS, 3), VMSTATE_END_OF_LIST() diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c index b41d564..f6582ea 100644 --- a/hw/pci-host/prep.c +++ b/hw/pci-host/prep.c @@ -179,7 +179,7 @@ static const VMStateDescription vmstate_raven =3D { .version_id =3D 0, .minimum_version_id =3D 0, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, RavenPCIState), + VMSTATE_PCI_DEVICE(), VMSTATE_END_OF_LIST() }, }; diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 6b1b3b7..1f0b5db 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -230,7 +230,7 @@ static const VMStateDescription vmstate_mch =3D { .minimum_version_id_old =3D 1, .post_load =3D mch_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, MCHPCIState), + VMSTATE_PCI_DEVICE(), VMSTATE_UINT8(smm_enabled, MCHPCIState), VMSTATE_END_OF_LIST() } diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c index 2ac21d4..76b8cfa 100644 --- a/hw/scsi/esp-pci.c +++ b/hw/scsi/esp-pci.c @@ -312,7 +312,7 @@ static const VMStateDescription vmstate_esp_pci_scsi = =3D { .minimum_version_id =3D 0, .minimum_version_id_old =3D 0, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(parent_obj, PCIESPState), + VMSTATE_PCI_DEVICE(), VMSTATE_BUFFER_UNSAFE(dma_regs, PCIESPState, 0, 8 * sizeof(uint3= 2_t)), VMSTATE_STRUCT(esp, PCIESPState, 0, vmstate_esp, ESPState), VMSTATE_END_OF_LIST() diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 776e31a..f723f26 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -1996,7 +1996,7 @@ static const VMStateDescription vmstate_lsi_scsi =3D= { .minimum_version_id_old =3D 0, .pre_save =3D lsi_pre_save, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, LSIState), + VMSTATE_PCI_DEVICE(), =20 VMSTATE_INT32(carry, LSIState), VMSTATE_INT32(status, LSIState), diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index eb52164..8cb6714 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2061,7 +2061,7 @@ static const VMStateDescription vmstate_megasas =3D= { .minimum_version_id =3D 0, .minimum_version_id_old =3D 0, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(parent_obj, MegasasState), + VMSTATE_PCI_DEVICE(), =20 VMSTATE_INT32(fw_state, MegasasState), VMSTATE_INT32(intr_mask, MegasasState), diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index e1074e1..7e9ea39 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -1143,7 +1143,7 @@ static const VMStateDescription vmstate_pvscsi =3D = { .pre_save =3D pvscsi_pre_save, .post_load =3D pvscsi_post_load, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(parent_obj, PVSCSIState), + VMSTATE_PCI_DEVICE(), VMSTATE_UINT8(msi_used, PVSCSIState), VMSTATE_UINT32(resetting, PVSCSIState), VMSTATE_UINT64(reg_interrupt_status, PVSCSIState), diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index 5d229bc..385745e 100644 --- a/hw/usb/hcd-ehci-pci.c +++ b/hw/usb/hcd-ehci-pci.c @@ -109,7 +109,7 @@ static const VMStateDescription vmstate_ehci_pci =3D = { .version_id =3D 2, .minimum_version_id =3D 1, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(pcidev, EHCIPCIState), + VMSTATE_PCI_DEVICE(), VMSTATE_STRUCT(ehci, EHCIPCIState, 2, vmstate_ehci, EHCIState), VMSTATE_END_OF_LIST() } diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 066072e..d9170f7 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -444,7 +444,7 @@ static const VMStateDescription vmstate_uhci =3D { .minimum_version_id_old =3D 1, .post_load =3D uhci_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, UHCIState), + VMSTATE_PCI_DEVICE(), VMSTATE_UINT8_EQUAL(num_ports_vmstate, UHCIState), VMSTATE_STRUCT_ARRAY(ports, UHCIState, NB_PORTS, 1, vmstate_uhci_port, UHCIPort), diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c index 85aebc2..bfe19dd 100644 --- a/hw/watchdog/wdt_i6300esb.c +++ b/hw/watchdog/wdt_i6300esb.c @@ -391,7 +391,7 @@ static const VMStateDescription vmstate_i6300esb =3D = { .minimum_version_id =3D 1, .minimum_version_id_old =3D 1, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, I6300State), + VMSTATE_PCI_DEVICE(), VMSTATE_INT32(reboot_enabled, I6300State), VMSTATE_INT32(clock_scale, I6300State), VMSTATE_INT32(int_type, I6300State), diff --git a/hw/xen/xen_platform.c b/hw/xen/xen_platform.c index 6a8ba7e..5f2d2b6 100644 --- a/hw/xen/xen_platform.c +++ b/hw/xen/xen_platform.c @@ -377,7 +377,7 @@ static const VMStateDescription vmstate_xen_platform = =3D { .minimum_version_id_old =3D 4, .post_load =3D xen_platform_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(parent_obj, PCIXenPlatformState), + VMSTATE_PCI_DEVICE(), VMSTATE_UINT8(flags, PCIXenPlatformState), VMSTATE_END_OF_LIST() } diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index ccec2ba..5997d91 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -710,12 +710,12 @@ static inline void pci_dma_sglist_init(QEMUSGList *= qsg, PCIDevice *dev, =20 extern const VMStateDescription vmstate_pci_device; =20 -#define VMSTATE_PCI_DEVICE(_field, _state) { \ - .name =3D (stringify(_field)), \ +#define VMSTATE_PCI_DEVICE() { \ + .name =3D "parent_obj", \ .size =3D sizeof(PCIDevice), \ .vmsd =3D &vmstate_pci_device, \ .flags =3D VMS_STRUCT, \ - .offset =3D vmstate_offset_value(_state, _field, PCIDevice), \ + .offset =3D 0, \ } =20 #define VMSTATE_PCI_DEVICE_POINTER(_field, _state) { \ --=20 1.8.1.4