hw/pci: Rename PCIDeviceClass::exit() -> PCIDeviceClass::unrealize()
Subsystems (2)
cover hw/pci: Rename PCIDeviceClass::exit() -> PCIDeviceClass::unrealize()
Complete PCIDeviceClass::realize() conversion started 10 years ago :)
Philippe Mathieu-Daudé (2):
hw/pci: Rename pci_bridge_exitfn() -> pci_bridge_unrealize() hw/pci: Rename PCIDeviceClass::exit() -> PCIDeviceClass::unrealize()
include/hw/pci/pci.h | 1 - include/hw/pci/pci_bridge.h | 2 +- include/hw/pci/pci_device.h | 3 ++- hw/audio/ac97.c | 8 ++++---- hw/audio/es1370.c | 8 ++++---- hw/audio/intel-hda.c | 8 ++++---- hw/audio/via-ac97.c | 4 ++-- hw/char/diva-gsp.c | 6 +++--- hw/char/serial-pci-multi.c | 8 ++++---- hw/char/serial-pci.c | 4 ++-- hw/cxl/switch-mailbox-cci.c | 4 ++-- hw/display/ati.c | 8 ++++---- hw/display/bochs-display.c | 4 ++-- hw/display/vga-pci.c | 4 ++-- hw/ide/cmd646.c | 4 ++-- hw/ide/ich.c | 4 ++-- hw/ide/piix.c | 6 +++--- hw/ide/via.c | 4 ++-- hw/mem/cxl_type3.c | 4 ++-- hw/misc/edu.c | 4 ++-- hw/misc/ivshmem-pci.c | 4 ++-- hw/misc/pci-testdev.c | 5 ++--- hw/net/can/can_kvaser_pci.c | 4 ++-- hw/net/can/can_mioe3680_pci.c | 4 ++-- hw/net/can/can_pcm3680_pci.c | 4 ++-- hw/net/can/ctucan_pci.c | 4 ++-- hw/net/e1000.c | 5 ++--- hw/net/e1000e.c | 4 ++-- hw/net/eepro100.c | 8 ++++---- hw/net/igb.c | 4 ++-- hw/net/igbvf.c | 4 ++-- hw/net/ne2000-pci.c | 4 ++-- hw/net/pcnet-pci.c | 4 ++-- hw/net/rocker/rocker.c | 4 ++-- hw/net/rtl8139.c | 4 ++-- hw/net/sungem.c | 4 ++-- hw/net/tulip.c | 4 ++-- hw/net/vmxnet3.c | 4 ++-- hw/nvme/ctrl.c | 4 ++-- hw/pci-bridge/cxl_downstream.c | 8 ++++---- hw/pci-bridge/cxl_root_port.c | 2 +- hw/pci-bridge/cxl_upstream.c | 8 ++++---- hw/pci-bridge/gen_pcie_root_port.c | 2 +- hw/pci-bridge/i82801b11.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 8 ++++---- hw/pci-bridge/pci_expander_bridge.c | 8 ++++---- hw/pci-bridge/pcie_pci_bridge.c | 8 ++++---- hw/pci-bridge/pcie_root_port.c | 8 ++++---- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 8 ++++---- hw/pci-bridge/xio3130_upstream.c | 8 ++++---- hw/pci-host/designware.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/pci/pci.c | 4 ++-- hw/pci/pci_bridge.c | 2 +- hw/remote/proxy.c | 4 ++-- hw/riscv/riscv-iommu-pci.c | 4 ++-- hw/scsi/esp-pci.c | 4 ++-- hw/scsi/lsi53c895a.c | 4 ++-- hw/scsi/megasas.c | 4 ++-- hw/scsi/mptsas.c | 4 ++-- hw/scsi/vmw_pvscsi.c | 10 ++++------ hw/sd/sdhci-pci.c | 4 ++-- hw/ufs/ufs.c | 4 ++-- hw/usb/hcd-ehci-pci.c | 4 ++-- hw/usb/hcd-ohci-pci.c | 8 ++++---- hw/usb/hcd-uhci.c | 4 ++-- hw/usb/hcd-xhci-pci.c | 4 ++-- hw/vfio/pci.c | 4 ++-- hw/virtio/virtio-pci.c | 4 ++-- hw/watchdog/wdt_i6300esb.c | 4 ++-- hw/xen/xen_pt.c | 4 ++-- 72 files changed, 168 insertions(+), 172 deletions(-)
Signature · 1 line
2.51.0
PATCH 1/2 hw/pci: Rename pci_bridge_exitfn() -> pci_bridge_unrealize()
pci_bridge_exitfn() is called by PCI bridges DeviceUnrealize path. Rename using _unrealize() suffix to clarify that.
Mechanical change doing:
$ sed -i -e s/pci_bridge_exitfn/pci_bridge_unrealize/ \
$(git grep -wl pci_bridge_exitfn)--- include/hw/pci/pci_bridge.h | 2 +- hw/pci-bridge/cxl_downstream.c | 4 ++-- hw/pci-bridge/cxl_upstream.c | 4 ++-- hw/pci-bridge/i82801b11.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 4 ++-- hw/pci-bridge/pcie_pci_bridge.c | 4 ++-- hw/pci-bridge/pcie_root_port.c | 4 ++-- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 4 ++-- hw/pci-bridge/xio3130_upstream.c | 4 ++-- hw/pci-host/designware.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/pci/pci_bridge.c | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-)
include/hw/pci/pci_bridge.h +1 -1
@@ -138,7 +138,7 @@ void pci_bridge_disable_base_limit(PCIDevice *dev);void pci_bridge_reset (DeviceState *qdev);void pci_bridge_initfn (PCIDevice *pci_dev,const char *typename); -void pci_bridge_exitfn (PCIDevice *pci_dev); +void pci_bridge_unrealize (PCIDevice *pci_dev);void pci_bridge_dev_plug_cb (HotplugHandler *hotplug_dev,DeviceState *dev,Error **errp);
hw/pci-bridge/cxl_downstream.c +2 -2
@@ -198,7 +198,7 @@ static void cxl_dsp_realize(PCIDevice *d, Error **errp) err_msi:msi_uninit (d); err_bridge: -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static void cxl_dsp_exitfn (PCIDevice *d)
@@ -209,7 +209,7 @@ static void cxl_dsp_exitfn(PCIDevice *d)pcie_chassis_del_slot (s);pcie_cap_exit (d);msi_uninit (d); -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static const Property cxl_dsp_props[] = {
hw/pci-bridge/cxl_upstream.c +2 -2
@@ -351,7 +351,7 @@ err_cap: err_msi:msi_uninit (d); err_bridge: -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static void cxl_usp_exitfn (PCIDevice *d)
@@ -359,7 +359,7 @@ static void cxl_usp_exitfn(PCIDevice *d)pcie_aer_exit (d);pcie_cap_exit (d);msi_uninit (d); -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static const Property cxl_upstream_props[] = {
hw/pci-bridge/i82801b11.c +1 -1
@@ -75,7 +75,7 @@ static void i82801b11_bridge_realize(PCIDevice *d, Error **errp)return ; err_bridge: -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static const VMStateDescription i82801b11_bridge_dev_vmstate = {
hw/pci-bridge/pci_bridge_dev.c +2 -2
@@ -122,7 +122,7 @@ slotid_error:shpc_cleanup (dev, &bridge_dev->bar); } shpc_error: -pci_bridge_exitfn (dev); +pci_bridge_unrealize (dev); }static void pci_bridge_dev_exitfn (PCIDevice *dev)
@@ -137,7 +137,7 @@ static void pci_bridge_dev_exitfn(PCIDevice *dev)if (shpc_present (dev)) {shpc_cleanup (dev, &bridge_dev->bar); } -pci_bridge_exitfn (dev); +pci_bridge_unrealize (dev); }static void pci_bridge_dev_instance_finalize (Object *obj)
hw/pci-bridge/pcie_pci_bridge.c +2 -2
@@ -92,7 +92,7 @@ pm_error: cap_error:shpc_cleanup (d, &pcie_br->shpc_bar); error: -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static void pcie_pci_bridge_exit (PCIDevice *d)
@@ -100,7 +100,7 @@ static void pcie_pci_bridge_exit(PCIDevice *d)PCIEPCIBridge *bridge_dev =PCIE_PCI_BRIDGE_DEV (d);pcie_cap_exit (d);shpc_cleanup (d, &bridge_dev->shpc_bar); -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static void pcie_pci_bridge_reset (DeviceState *qdev)
hw/pci-bridge/pcie_root_port.c +2 -2
@@ -131,7 +131,7 @@ err_int: rpc->interrupts_uninit (d); } err_bridge: -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static void rp_exit (PCIDevice *d)
@@ -145,7 +145,7 @@ static void rp_exit(PCIDevice *d)if (rpc->interrupts_uninit) { rpc->interrupts_uninit (d); } -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static const Property rp_props[] = {
hw/pci-bridge/simba.c +1 -1
@@ -72,7 +72,7 @@ static void simba_pci_bridge_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = simba_pci_bridge_realize; - k->exit = pci_bridge_exitfn; + k->exit = pci_bridge_unrealize; k->vendor_id =PCI_VENDOR_ID_SUN ; k->device_id =PCI_DEVICE_ID_SUN_SIMBA ; k->revision =0x11 ;
hw/pci-bridge/xio3130_downstream.c +2 -2
@@ -120,7 +120,7 @@ err_pcie_cap: err_msi:msi_uninit (d); err_bridge: -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static void xio3130_downstream_exitfn (PCIDevice *d)
@@ -131,7 +131,7 @@ static void xio3130_downstream_exitfn(PCIDevice *d)pcie_chassis_del_slot (s);pcie_cap_exit (d);msi_uninit (d); -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static const Property xio3130_downstream_props[] = {
hw/pci-bridge/xio3130_upstream.c +2 -2
@@ -99,7 +99,7 @@ err: err_msi:msi_uninit (d); err_bridge: -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static void xio3130_upstream_exitfn (PCIDevice *d)
@@ -107,7 +107,7 @@ static void xio3130_upstream_exitfn(PCIDevice *d)pcie_aer_exit (d);pcie_cap_exit (d);msi_uninit (d); -pci_bridge_exitfn (d); +pci_bridge_unrealize (d); }static const VMStateDescription vmstate_xio3130_upstream = {
hw/pci-host/designware.c +1 -1
@@ -599,7 +599,7 @@ static void designware_pcie_root_class_init(ObjectClass *klass, k->device_id =0xABCD ; k->revision =0 ; k->class_id =PCI_CLASS_BRIDGE_PCI ; - k->exit = pci_bridge_exitfn; + k->exit = pci_bridge_unrealize; k->realize = designware_pcie_root_realize; k->config_read = designware_pcie_root_config_read; k->config_write = designware_pcie_root_config_write;
hw/pci-host/xilinx-pcie.c +1 -1
@@ -298,7 +298,7 @@ static void xilinx_pcie_root_class_init(ObjectClass *klass, const void *data) k->revision =0 ; k->class_id =PCI_CLASS_BRIDGE_HOST ; k->realize = xilinx_pcie_root_realize; - k->exit = pci_bridge_exitfn; + k->exit = pci_bridge_unrealize;device_class_set_legacy_reset (dc, pci_bridge_reset); k->config_read = xilinx_pcie_root_config_read; k->config_write = xilinx_pcie_root_config_write;
hw/pci/pci_bridge.c +1 -1
@@ -397,7 +397,7 @@ void pci_bridge_initfn(PCIDevice *dev, const char *typename) }/* default qdev clean up function for PCI-to-PCI bridge */ -void pci_bridge_exitfn (PCIDevice *pci_dev) +void pci_bridge_unrealize (PCIDevice *pci_dev) {PCIBridge *s =PCI_BRIDGE (pci_dev);assert (QLIST_EMPTY (&s->sec_bus.child));
Signature · 1 line
2.51.0
PATCH 2/2 hw/pci: Rename PCIDeviceClass::exit() -> PCIDeviceClass::unrealize()
In reply to Philippe Mathieu-DaudéCommit 7ee6c1e182c ("pci: Permit incremental conversion of device models to realize") renamed:
PCIDeviceClass::init() -> PCIDeviceClass::realize()
Finish the conversion by renaming the counter part
PCIDeviceClass::exit() PCIDeviceClass::unrealize()
This clarifies the handler is called during the DeviceUnrealize path, not during Object destruction in instance_finalize().
Manual change adapting style when needed.
--- include/hw/pci/pci.h | 1 - include/hw/pci/pci_device.h | 3 ++- hw/audio/ac97.c | 8 ++++---- hw/audio/es1370.c | 8 ++++---- hw/audio/intel-hda.c | 8 ++++---- hw/audio/via-ac97.c | 4 ++-- hw/char/diva-gsp.c | 6 +++--- hw/char/serial-pci-multi.c | 8 ++++---- hw/char/serial-pci.c | 4 ++-- hw/cxl/switch-mailbox-cci.c | 4 ++-- hw/display/ati.c | 8 ++++---- hw/display/bochs-display.c | 4 ++-- hw/display/vga-pci.c | 4 ++-- hw/ide/cmd646.c | 4 ++-- hw/ide/ich.c | 4 ++-- hw/ide/piix.c | 6 +++--- hw/ide/via.c | 4 ++-- hw/mem/cxl_type3.c | 4 ++-- hw/misc/edu.c | 4 ++-- hw/misc/ivshmem-pci.c | 4 ++-- hw/misc/pci-testdev.c | 5 ++--- hw/net/can/can_kvaser_pci.c | 4 ++-- hw/net/can/can_mioe3680_pci.c | 4 ++-- hw/net/can/can_pcm3680_pci.c | 4 ++-- hw/net/can/ctucan_pci.c | 4 ++-- hw/net/e1000.c | 5 ++--- hw/net/e1000e.c | 4 ++-- hw/net/eepro100.c | 8 ++++---- hw/net/igb.c | 4 ++-- hw/net/igbvf.c | 4 ++-- hw/net/ne2000-pci.c | 4 ++-- hw/net/pcnet-pci.c | 4 ++-- hw/net/rocker/rocker.c | 4 ++-- hw/net/rtl8139.c | 4 ++-- hw/net/sungem.c | 4 ++-- hw/net/tulip.c | 4 ++-- hw/net/vmxnet3.c | 4 ++-- hw/nvme/ctrl.c | 4 ++-- hw/pci-bridge/cxl_downstream.c | 4 ++-- hw/pci-bridge/cxl_root_port.c | 2 +- hw/pci-bridge/cxl_upstream.c | 4 ++-- hw/pci-bridge/gen_pcie_root_port.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 4 ++-- hw/pci-bridge/pci_expander_bridge.c | 8 ++++---- hw/pci-bridge/pcie_pci_bridge.c | 4 ++-- hw/pci-bridge/pcie_root_port.c | 4 ++-- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 4 ++-- hw/pci-bridge/xio3130_upstream.c | 4 ++-- hw/pci-host/designware.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/pci/pci.c | 4 ++-- hw/remote/proxy.c | 4 ++-- hw/riscv/riscv-iommu-pci.c | 4 ++-- hw/scsi/esp-pci.c | 4 ++-- hw/scsi/lsi53c895a.c | 4 ++-- hw/scsi/megasas.c | 4 ++-- hw/scsi/mptsas.c | 4 ++-- hw/scsi/vmw_pvscsi.c | 10 ++++------ hw/sd/sdhci-pci.c | 4 ++-- hw/ufs/ufs.c | 4 ++-- hw/usb/hcd-ehci-pci.c | 4 ++-- hw/usb/hcd-ohci-pci.c | 8 ++++---- hw/usb/hcd-uhci.c | 4 ++-- hw/usb/hcd-xhci-pci.c | 4 ++-- hw/vfio/pci.c | 4 ++-- hw/virtio/virtio-pci.c | 4 ++-- hw/watchdog/wdt_i6300esb.c | 4 ++-- hw/xen/xen_pt.c | 4 ++-- 69 files changed, 151 insertions(+), 155 deletions(-)
include/hw/pci/pci.h +0 -1
@@ -149,7 +149,6 @@ typedef uint32_t PCIConfigReadFunc(PCIDevice *pci_dev, uint32_t address, int len);typedef void PCIMapIORegionFunc (PCIDevice *pci_dev,int region_num,pcibus_t addr,pcibus_t size,int type); -typedef void PCIUnregisterFunc (PCIDevice *pci_dev);typedef void MSITriggerFunc (PCIDevice *dev,MSIMessage msg);typedef MSIMessage MSIPrepareMessageFunc (PCIDevice *dev,unsigned vector);
include/hw/pci/pci_device.h +2 -1
@@ -27,7 +27,8 @@ struct PCIDeviceClass {DeviceClass parent_class;void (*realize)(PCIDevice *dev,Error **errp); -PCIUnregisterFunc *exit; +void (*unrealize)(PCIDevice *dev); +PCIConfigReadFunc *config_read;PCIConfigWriteFunc *config_write;
hw/audio/ac97.c +4 -4
@@ -1270,7 +1270,7 @@ static void ac97_on_reset(DeviceState *dev)mixer_reset (s); } -static void ac97_realize (PCIDevice *dev,Error **errp) +static void ac97_pci_realize (PCIDevice *dev,Error **errp) {AC97LinkState *s =AC97 (dev);uint8_t *c = s->dev.config;
@@ -1297,7 +1297,7 @@ static void ac97_realize(PCIDevice *dev, Error **errp)ac97_on_reset (DEVICE (s)); } -static void ac97_exit (PCIDevice *dev) +static void ac97_pci_unrealize (PCIDevice *dev) {AC97LinkState *s =AC97 (dev);
@@ -1315,8 +1315,8 @@ static void ac97_class_init(ObjectClass *klass, const void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - k->realize = ac97_realize; - k->exit = ac97_exit; + k->realize = ac97_pci_realize; + k->unrealize = ac97_pci_unrealize; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->device_id =PCI_DEVICE_ID_INTEL_82801AA_5 ; k->revision =0x01 ;
hw/audio/es1370.c +4 -4
@@ -828,7 +828,7 @@ static void es1370_on_reset(DeviceState *dev)es1370_reset (s); } -static void es1370_realize (PCIDevice *dev,Error **errp) +static void es1370_pci_realize (PCIDevice *dev,Error **errp) {ES1370State *s =ES1370 (dev);uint8_t *c = s->dev.config;
@@ -855,7 +855,7 @@ static void es1370_realize(PCIDevice *dev, Error **errp)es1370_reset (s); } -static void es1370_exit (PCIDevice *dev) +static void es1370_pci_unrealize (PCIDevice *dev) {ES1370State *s =ES1370 (dev);int i;
@@ -876,8 +876,8 @@ static void es1370_class_init(ObjectClass *klass, const void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - k->realize = es1370_realize; - k->exit = es1370_exit; + k->realize = es1370_pci_realize; + k->unrealize = es1370_pci_unrealize; k->vendor_id =PCI_VENDOR_ID_ENSONIQ ; k->device_id =PCI_DEVICE_ID_ENSONIQ_ES1370 ; k->class_id =PCI_CLASS_MULTIMEDIA_AUDIO ;
hw/audio/intel-hda.c +4 -4
@@ -1086,7 +1086,7 @@ static void intel_hda_reset(DeviceState *dev)intel_hda_update_irq (d); } -static void intel_hda_realize (PCIDevice *pci,Error **errp) +static void intel_hda_pci_realize (PCIDevice *pci,Error **errp) {IntelHDAState *d =INTEL_HDA (pci);uint8_t *conf = d->pci.config;
@@ -1132,7 +1132,7 @@ static void intel_hda_realize(PCIDevice *pci, Error **errp) intel_hda_response, intel_hda_xfer); } -static void intel_hda_exit (PCIDevice *pci) +static void intel_hda_pci_unrealize (PCIDevice *pci) {IntelHDAState *d =INTEL_HDA (pci);
@@ -1225,8 +1225,8 @@ static void intel_hda_class_init(ObjectClass *klass, const void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - k->realize = intel_hda_realize; - k->exit = intel_hda_exit; + k->realize = intel_hda_pci_realize; + k->unrealize = intel_hda_pci_unrealize; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->class_id =PCI_CLASS_MULTIMEDIA_HD_AUDIO ;device_class_set_legacy_reset (dc, intel_hda_reset);
hw/audio/via-ac97.c +2 -2
@@ -451,7 +451,7 @@ static void via_ac97_realize(PCIDevice *pci_dev, Error **errp)pci_register_bar (pci_dev,2 ,PCI_BASE_ADDRESS_SPACE_IO , &s->midi); } -static void via_ac97_exit (PCIDevice *dev) +static void via_ac97_unrealize (PCIDevice *dev) {ViaAC97State *s =VIA_AC97 (dev);
@@ -468,7 +468,7 @@ static void via_ac97_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = via_ac97_realize; - k->exit = via_ac97_exit; + k->unrealize = via_ac97_unrealize; k->vendor_id =PCI_VENDOR_ID_VIA ; k->device_id =PCI_DEVICE_ID_VIA_AC97 ; k->revision =0x50 ;
hw/char/diva-gsp.c +3 -3
@@ -186,7 +186,7 @@ static void diva_serial_class_initfn(ObjectClass *klass, const void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *pc =PCI_DEVICE_CLASS (klass); pc->realize = diva_pci_realize; - pc->exit = diva_pci_exit; + pc->unrealize = diva_pci_exit; pc->vendor_id =PCI_VENDOR_ID_HP ; pc->device_id =PCI_DEVICE_ID_HP_DIVA ; pc->subsystem_vendor_id =PCI_VENDOR_ID_HP ;
@@ -234,7 +234,7 @@ static void diva_aux_realize(PCIDevice *dev, Error **errp)pci_register_bar (&pci->dev,0 ,PCI_BASE_ADDRESS_SPACE_MEMORY , &pci->mem); } -static void diva_aux_exit (PCIDevice *dev) +static void diva_aux_unrealize (PCIDevice *dev) {DivaAuxState *pci =DO_UPCAST (DivaAuxState, dev, dev);qemu_free_irq (pci->irq);
@@ -245,7 +245,7 @@ static void diva_aux_class_initfn(ObjectClass *klass, const void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *pc =PCI_DEVICE_CLASS (klass); pc->realize = diva_aux_realize; - pc->exit = diva_aux_exit; + pc->unrealize = diva_aux_unrealize; pc->vendor_id =PCI_VENDOR_ID_HP ; pc->device_id =PCI_DEVICE_ID_HP_DIVA_AUX ; pc->subsystem_vendor_id =PCI_VENDOR_ID_HP ;
hw/char/serial-pci-multi.c +4 -4
@@ -48,7 +48,7 @@ typedef struct PCIMultiSerialState {IRQState irqs[PCI_SERIAL_MAX_PORTS ]; } PCIMultiSerialState; -static void multi_serial_pci_exit (PCIDevice *dev) +static void multi_serial_pci_unrealize (PCIDevice *dev) {PCIMultiSerialState *pci =DO_UPCAST (PCIMultiSerialState, dev, dev);SerialState *s;
@@ -104,7 +104,7 @@ static void multi_serial_pci_realize(PCIDevice *dev, Error **errp)for (i =0 ; i < nports; i++) { s = pci->state + i;if (!qdev_realize (DEVICE (s),NULL , errp)) { -multi_serial_pci_exit (dev); +multi_serial_pci_unrealize (dev);return ; } s->irq = &pci->irqs[i];
@@ -147,7 +147,7 @@ static void multi_2x_serial_pci_class_initfn(ObjectClass *klass,DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *pc =PCI_DEVICE_CLASS (klass); pc->realize = multi_serial_pci_realize; - pc->exit = multi_serial_pci_exit; + pc->unrealize = multi_serial_pci_unrealize; pc->vendor_id =PCI_VENDOR_ID_REDHAT ; pc->device_id =PCI_DEVICE_ID_REDHAT_SERIAL2 ; pc->revision =1 ;
@@ -163,7 +163,7 @@ static void multi_4x_serial_pci_class_initfn(ObjectClass *klass,DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *pc =PCI_DEVICE_CLASS (klass); pc->realize = multi_serial_pci_realize; - pc->exit = multi_serial_pci_exit; + pc->unrealize = multi_serial_pci_unrealize; pc->vendor_id =PCI_VENDOR_ID_REDHAT ; pc->device_id =PCI_DEVICE_ID_REDHAT_SERIAL4 ; pc->revision =1 ;
hw/char/serial-pci.c +2 -2
@@ -60,7 +60,7 @@ static void serial_pci_realize(PCIDevice *dev, Error **errp)pci_register_bar (&pci->dev,0 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io); } -static void serial_pci_exit (PCIDevice *dev) +static void serial_pci_unrealize (PCIDevice *dev) {PCISerialState *pci =DO_UPCAST (PCISerialState, dev, dev);SerialState *s = &pci->state;
@@ -85,7 +85,7 @@ static void serial_pci_class_initfn(ObjectClass *klass, const void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *pc =PCI_DEVICE_CLASS (klass); pc->realize = serial_pci_realize; - pc->exit = serial_pci_exit; + pc->unrealize = serial_pci_unrealize; pc->vendor_id =PCI_VENDOR_ID_REDHAT ; pc->device_id =PCI_DEVICE_ID_REDHAT_SERIAL ; pc->revision =1 ;
hw/cxl/switch-mailbox-cci.c +2 -2
@@ -62,7 +62,7 @@ static void cswbcci_realize(PCIDevice *pci_dev, Error **errp) CXL_MAILBOX_MAX_PAYLOAD_SIZE); } -static void cswmbcci_exit (PCIDevice *pci_dev) +static void cswbcci_unrealize (PCIDevice *pci_dev) {/* Nothing to do here yet */ }
@@ -78,7 +78,7 @@ static void cswmbcci_class_init(ObjectClass *oc, const void *data)PCIDeviceClass *pc =PCI_DEVICE_CLASS (oc); pc->realize = cswbcci_realize; - pc->exit = cswmbcci_exit; + pc->unrealize = cswbcci_unrealize;/* Serial bus, CXL Switch CCI */ pc->class_id =0x0c0b ;/*
hw/display/ati.c +4 -4
@@ -948,7 +948,7 @@ static const MemoryRegionOps ati_mm_ops = { .endianness = DEVICE_LITTLE_ENDIAN, }; -static void ati_vga_realize (PCIDevice *dev,Error **errp) +static void ati_vga_pci_realize (PCIDevice *dev,Error **errp) {ATIVGAState *s =ATI_VGA (dev);VGACommonState *vga = &s->vga;
@@ -1032,7 +1032,7 @@ static void ati_vga_reset(DeviceState *dev) s->mode =VGA_MODE ; } -static void ati_vga_exit (PCIDevice *dev) +static void ati_vga_pci_unrealize (PCIDevice *dev) {ATIVGAState *s =ATI_VGA (dev);
@@ -1064,8 +1064,8 @@ static void ati_vga_class_init(ObjectClass *klass, const void *data) k->vendor_id =PCI_VENDOR_ID_ATI ; k->device_id =PCI_DEVICE_ID_ATI_RAGE128_PF ; k->romfile ="vgabios-ati.bin" ; - k->realize = ati_vga_realize; - k->exit = ati_vga_exit; + k->realize = ati_vga_pci_realize; + k->unrealize = ati_vga_pci_unrealize; }static void ati_vga_init (Object *o)
hw/display/bochs-display.c +2 -2
@@ -338,7 +338,7 @@ static void bochs_display_init(Object *obj) dev->cap_present |=QEMU_PCI_CAP_EXPRESS ; } -static void bochs_display_exit (PCIDevice *dev) +static void bochs_display_unrealize (PCIDevice *dev) {BochsDisplayState *s =BOCHS_DISPLAY (dev);
@@ -361,8 +361,8 @@ static void bochs_display_class_init(ObjectClass *klass, const void *data) k->device_id =PCI_DEVICE_ID_QEMU_VGA ; k->realize = bochs_display_realize; + k->unrealize = bochs_display_unrealize; k->romfile ="vgabios-bochs-display.bin" ; - k->exit = bochs_display_exit; dc->vmsd = &vmstate_bochs_display;device_class_set_props (dc, bochs_display_properties);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);
hw/display/vga-pci.c +2 -2
@@ -301,7 +301,7 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp)pci_register_bar (&d->dev,2 ,PCI_BASE_ADDRESS_SPACE_MEMORY , &d->mmio); } -static void pci_secondary_vga_exit (PCIDevice *dev) +static void pci_secondary_vga_unrealize (PCIDevice *dev) {PCIVGAState *d =PCI_VGA (dev);VGACommonState *s = &d->vga;
@@ -398,7 +398,7 @@ static void secondary_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_secondary_vga_realize; - k->exit = pci_secondary_vga_exit; + k->unrealize = pci_secondary_vga_unrealize; k->class_id =PCI_CLASS_DISPLAY_OTHER ;device_class_set_props (dc, secondary_pci_properties);device_class_set_legacy_reset (dc, pci_secondary_vga_reset);
hw/ide/cmd646.c +2 -2
@@ -302,7 +302,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp) } } -static void pci_cmd646_ide_exitfn (PCIDevice *dev) +static void pci_cmd646_ide_unrealize (PCIDevice *dev) {PCIIDEState *d =PCI_IDE (dev);unsigned i;
@@ -325,7 +325,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, const void *data)device_class_set_legacy_reset (dc, cmd646_reset); dc->vmsd = &vmstate_ide_pci; k->realize = pci_cmd646_ide_realize; - k->exit = pci_cmd646_ide_exitfn; + k->unrealize = pci_cmd646_ide_unrealize; k->vendor_id =PCI_VENDOR_ID_CMD ; k->device_id =PCI_DEVICE_ID_CMD_646 ; k->revision =0x07 ;
hw/ide/ich.c +2 -2
@@ -167,7 +167,7 @@ static void pci_ich9_ahci_realize(PCIDevice *dev, Error **errp)assert (!ret || ret == -ENOTSUP ); } -static void pci_ich9_uninit (PCIDevice *dev) +static void pci_ich9_ahci_unrealize (PCIDevice *dev) {AHCIPCIState *d; d =ICH9_AHCI (dev);
@@ -182,7 +182,7 @@ static void ich_ahci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_ich9_ahci_realize; - k->exit = pci_ich9_uninit; + k->unrealize = pci_ich9_ahci_unrealize; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->device_id =PCI_DEVICE_ID_INTEL_82801IR ; k->revision =0x02 ;
hw/ide/piix.c +3 -3
@@ -166,7 +166,7 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) } } -static void pci_piix_ide_exitfn (PCIDevice *dev) +static void pci_piix_ide_unrealize (PCIDevice *dev) {PCIIDEState *d =PCI_IDE (dev);unsigned i;
@@ -186,7 +186,7 @@ static void piix3_ide_class_init(ObjectClass *klass, const void *data)device_class_set_legacy_reset (dc, piix_ide_reset); dc->vmsd = &vmstate_ide_pci; k->realize = pci_piix_ide_realize; - k->exit = pci_piix_ide_exitfn; + k->unrealize = pci_piix_ide_unrealize; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->device_id =PCI_DEVICE_ID_INTEL_82371SB_1 ; k->class_id =PCI_CLASS_STORAGE_IDE ;
@@ -209,7 +209,7 @@ static void piix4_ide_class_init(ObjectClass *klass, const void *data)device_class_set_legacy_reset (dc, piix_ide_reset); dc->vmsd = &vmstate_ide_pci; k->realize = pci_piix_ide_realize; - k->exit = pci_piix_ide_exitfn; + k->unrealize = pci_piix_ide_unrealize; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->device_id =PCI_DEVICE_ID_INTEL_82371AB ; k->class_id =PCI_CLASS_STORAGE_IDE ;
hw/ide/via.c +2 -2
@@ -234,7 +234,7 @@ static void via_ide_realize(PCIDevice *dev, Error **errp) } } -static void via_ide_exitfn (PCIDevice *dev) +static void via_ide_unrealize (PCIDevice *dev) {PCIIDEState *d =PCI_IDE (dev);unsigned i;
@@ -258,7 +258,7 @@ static void via_ide_class_init(ObjectClass *klass, const void *data) k->config_read = via_ide_cfg_read; k->config_write = via_ide_cfg_write; k->realize = via_ide_realize; - k->exit = via_ide_exitfn; + k->unrealize = via_ide_unrealize; k->vendor_id =PCI_VENDOR_ID_VIA ; k->device_id =PCI_DEVICE_ID_VIA_IDE ; k->revision =0x06 ;
hw/mem/cxl_type3.c +2 -2
@@ -984,7 +984,7 @@ err_free_special_ops: } } -static void ct3_exit (PCIDevice *pci_dev) +static void ct3_unrealize (PCIDevice *pci_dev) {CXLType3Dev *ct3d =CXL_TYPE3 (pci_dev);CXLComponentState *cxl_cstate = &ct3d->cxl_cstate;
@@ -2133,7 +2133,7 @@ static void ct3_class_init(ObjectClass *oc, const void *data)CXLType3Class *cvc =CXL_TYPE3_CLASS (oc); pc->realize = ct3_realize; - pc->exit = ct3_exit; + pc->unrealize = ct3_unrealize; pc->class_id =PCI_CLASS_MEMORY_CXL ; pc->vendor_id =PCI_VENDOR_ID_INTEL ; pc->device_id =0xd93 ;/* LVF for now */
hw/misc/edu.c +2 -2
@@ -389,7 +389,7 @@ static void pci_edu_realize(PCIDevice *pdev, Error **errp)pci_register_bar (pdev,0 ,PCI_BASE_ADDRESS_SPACE_MEMORY , &edu->mmio); } -static void pci_edu_uninit (PCIDevice *pdev) +static void pci_edu_unrealize (PCIDevice *pdev) {EduState *edu =EDU (pdev);
@@ -421,7 +421,7 @@ static void edu_class_init(ObjectClass *class, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (class); k->realize = pci_edu_realize; - k->exit = pci_edu_uninit; + k->unrealize = pci_edu_unrealize; k->vendor_id =PCI_VENDOR_ID_QEMU ; k->device_id =0x11e8 ; k->revision =0x10 ;
hw/misc/ivshmem-pci.c +2 -2
@@ -927,7 +927,7 @@ static void ivshmem_common_realize(PCIDevice *dev, Error **errp) s->ivshmem_bar2); } -static void ivshmem_exit (PCIDevice *dev) +static void ivshmem_common_unrealize (PCIDevice *dev) {IVShmemState *s =IVSHMEM_COMMON (dev);int i;
@@ -997,7 +997,7 @@ static void ivshmem_common_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = ivshmem_common_realize; - k->exit = ivshmem_exit; + k->unrealize = ivshmem_common_unrealize; k->config_write = ivshmem_write_config; k->vendor_id =PCI_VENDOR_ID_IVSHMEM ; k->device_id =PCI_DEVICE_ID_IVSHMEM ;
hw/misc/pci-testdev.c +2 -3
@@ -304,8 +304,7 @@ static void pci_testdev_realize(PCIDevice *pci_dev, Error **errp) } } -static void -pci_testdev_uninit (PCIDevice *dev) +static void pci_testdev_unrealize (PCIDevice *dev) {PCITestDevState *d =PCI_TEST_DEV (dev);int i;
@@ -337,7 +336,7 @@ static void pci_testdev_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_testdev_realize; - k->exit = pci_testdev_uninit; + k->unrealize = pci_testdev_unrealize; k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_TEST ; k->revision =0x00 ;
hw/net/can/can_kvaser_pci.c +2 -2
@@ -248,7 +248,7 @@ static void kvaser_pci_realize(PCIDevice *pci_dev, Error **errp) &d->xilinx_io); } -static void kvaser_pci_exit (PCIDevice *pci_dev) +static void kvaser_pci_unrealize (PCIDevice *pci_dev) {KvaserPCIState *d =KVASER_PCI_DEV (pci_dev);CanSJA1000State *s = &d->sja_state;
@@ -288,7 +288,7 @@ static void kvaser_pci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = kvaser_pci_realize; - k->exit = kvaser_pci_exit; + k->unrealize = kvaser_pci_unrealize; k->vendor_id =KVASER_PCI_VENDOR_ID1 ; k->device_id =KVASER_PCI_DEVICE_ID1 ; k->revision =0x00 ;
hw/net/can/can_mioe3680_pci.c +2 -2
@@ -183,7 +183,7 @@ static void mioe3680_pci_realize(PCIDevice *pci_dev, Error **errp) } } -static void mioe3680_pci_exit (PCIDevice *pci_dev) +static void mioe3680_pci_unrealize (PCIDevice *pci_dev) {Mioe3680PCIState *d =MIOe3680_PCI_DEV (pci_dev);int i;
@@ -229,7 +229,7 @@ static void mioe3680_pci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = mioe3680_pci_realize; - k->exit = mioe3680_pci_exit; + k->unrealize = mioe3680_pci_unrealize; k->vendor_id = MIOe3680_PCI_VENDOR_ID1; k->device_id = MIOe3680_PCI_DEVICE_ID1; k->revision =0x00 ;
hw/net/can/can_pcm3680_pci.c +2 -2
@@ -184,7 +184,7 @@ static void pcm3680i_pci_realize(PCIDevice *pci_dev, Error **errp) } } -static void pcm3680i_pci_exit (PCIDevice *pci_dev) +static void pcm3680i_pci_unrealize (PCIDevice *pci_dev) {Pcm3680iPCIState *d =PCM3680i_PCI_DEV (pci_dev);int i;
@@ -230,7 +230,7 @@ static void pcm3680i_pci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pcm3680i_pci_realize; - k->exit = pcm3680i_pci_exit; + k->unrealize = pcm3680i_pci_unrealize; k->vendor_id = PCM3680i_PCI_VENDOR_ID1; k->device_id = PCM3680i_PCI_DEVICE_ID1; k->revision =0x00 ;
hw/net/can/ctucan_pci.c +2 -2
@@ -195,7 +195,7 @@ static void ctucan_pci_realize(PCIDevice *pci_dev, Error **errp) } } -static void ctucan_pci_exit (PCIDevice *pci_dev) +static void ctucan_pci_unrealize (PCIDevice *pci_dev) {CtuCanPCIState *d =CTUCAN_PCI_DEV (pci_dev);int i;
@@ -243,7 +243,7 @@ static void ctucan_pci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = ctucan_pci_realize; - k->exit = ctucan_pci_exit; + k->unrealize = ctucan_pci_unrealize; k->vendor_id =PCI_VENDOR_ID_TEDIA ; k->device_id =PCI_DEVICE_ID_TEDIA_CTUCAN_VER21 ; k->revision =0x00 ;
hw/net/e1000.c +2 -3
@@ -1590,8 +1590,7 @@ e1000_mmio_setup(E1000State *d)memory_region_init_io (&d->io,OBJECT (d), &e1000_io_ops, d,"e1000-io" ,IOPORT_SIZE ); } -static void -pci_e1000_uninit (PCIDevice *dev) +static void pci_e1000_unrealize (PCIDevice *dev) {E1000State *d =E1000 (dev);
@@ -1690,7 +1689,7 @@ static void e1000_class_init(ObjectClass *klass, const void *data)const E1000Info *info = data; k->realize = pci_e1000_realize; - k->exit = pci_e1000_uninit; + k->unrealize = pci_e1000_unrealize; k->romfile ="efi-e1000.rom" ; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->device_id = info->device_id;
hw/net/e1000e.c +2 -2
@@ -494,7 +494,7 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error **errp) macaddr); } -static void e1000e_pci_uninit (PCIDevice *pci_dev) +static void e1000e_pci_unrealize (PCIDevice *pci_dev) {E1000EState *s =E1000E (pci_dev);
@@ -680,7 +680,7 @@ static void e1000e_class_init(ObjectClass *class, const void *data)PCIDeviceClass *c =PCI_DEVICE_CLASS (class); c->realize = e1000e_pci_realize; - c->exit = e1000e_pci_uninit; + c->unrealize = e1000e_pci_unrealize; c->vendor_id =PCI_VENDOR_ID_INTEL ; c->device_id =E1000_DEV_ID_82574L ; c->revision =0 ;
hw/net/eepro100.c +4 -4
@@ -1820,7 +1820,7 @@ static const VMStateDescription vmstate_eepro100 = { } }; -static void pci_nic_uninit (PCIDevice *pci_dev) +static void e100_pci_unrealize (PCIDevice *pci_dev) {EEPRO100State *s =DO_UPCAST (EEPRO100State, dev, pci_dev);
@@ -1836,7 +1836,7 @@ static NetClientInfo net_eepro100_info = { .receive = nic_receive, }; -static void e100_nic_realize (PCIDevice *pci_dev,Error **errp) +static void e100_pci_realize (PCIDevice *pci_dev,Error **errp) {EEPRO100State *s =DO_UPCAST (EEPRO100State, dev, pci_dev);E100PCIDeviceInfo *info =eepro100_get_class (s);
@@ -2074,8 +2074,8 @@ static void eepro100_class_init(ObjectClass *klass, const void *data) k->vendor_id =PCI_VENDOR_ID_INTEL ; k->class_id =PCI_CLASS_NETWORK_ETHERNET ; k->romfile ="pxe-eepro100.rom" ; - k->realize = e100_nic_realize; - k->exit = pci_nic_uninit; + k->realize = e100_pci_realize; + k->unrealize = e100_pci_unrealize; k->device_id = info->device_id; k->revision = info->revision; k->subsystem_vendor_id = info->subsystem_vendor_id;
hw/net/igb.c +2 -2
@@ -471,7 +471,7 @@ static void igb_pci_realize(PCIDevice *pci_dev, Error **errp) macaddr); } -static void igb_pci_uninit (PCIDevice *pci_dev) +static void igb_pci_unrealize (PCIDevice *pci_dev) {IGBState *s =IGB (pci_dev);
@@ -606,7 +606,7 @@ static void igb_class_init(ObjectClass *class, const void *data)PCIDeviceClass *c =PCI_DEVICE_CLASS (class); c->realize = igb_pci_realize; - c->exit = igb_pci_uninit; + c->unrealize = igb_pci_unrealize; c->vendor_id =PCI_VENDOR_ID_INTEL ; c->device_id =E1000_DEV_ID_82576 ; c->revision =1 ;
hw/net/igbvf.c +2 -2
@@ -291,7 +291,7 @@ static void igbvf_qdev_reset_hold(Object *obj, ResetType type)igb_vf_reset (pcie_sriov_get_pf (vf),pcie_sriov_vf_number (vf)); } -static void igbvf_pci_uninit (PCIDevice *dev) +static void igbvf_pci_unrealize (PCIDevice *dev) {IgbVfState *s =IGBVF (dev);
@@ -308,7 +308,7 @@ static void igbvf_class_init(ObjectClass *class, const void *data)ResettableClass *rc =RESETTABLE_CLASS (class); c->realize = igbvf_pci_realize; - c->exit = igbvf_pci_uninit; + c->unrealize = igbvf_pci_unrealize; c->vendor_id =PCI_VENDOR_ID_INTEL ; c->device_id =E1000_DEV_ID_82576_VF ; c->revision =1 ;
hw/net/ne2000-pci.c +2 -2
@@ -76,7 +76,7 @@ static void pci_ne2000_realize(PCIDevice *pci_dev, Error **errp)qemu_format_nic_info_str (qemu_get_queue (s->nic), s->c.macaddr.a); } -static void pci_ne2000_exit (PCIDevice *pci_dev) +static void pci_ne2000_unrealize (PCIDevice *pci_dev) {PCINE2000State *d =DO_UPCAST (PCINE2000State, dev, pci_dev);NE2000State *s = &d->ne2000;
@@ -106,7 +106,7 @@ static void ne2000_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_ne2000_realize; - k->exit = pci_ne2000_exit; + k->unrealize = pci_ne2000_unrealize; k->romfile ="efi-ne2k_pci.rom" , k->vendor_id =PCI_VENDOR_ID_REALTEK ; k->device_id =PCI_DEVICE_ID_REALTEK_8029 ;
hw/net/pcnet-pci.c +2 -2
@@ -178,7 +178,7 @@ static void pci_physical_memory_read(void *dma_opaque, hwaddr addr,pci_dma_read (dma_opaque, addr, buf, len); } -static void pci_pcnet_uninit (PCIDevice *dev) +static void pci_pcnet_unrealize (PCIDevice *dev) {PCIPCNetState *d =PCI_PCNET (dev);
@@ -262,7 +262,7 @@ static void pcnet_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_pcnet_realize; - k->exit = pci_pcnet_uninit; + k->unrealize = pci_pcnet_unrealize; k->romfile ="efi-pcnet.rom" , k->vendor_id =PCI_VENDOR_ID_AMD ; k->device_id =PCI_DEVICE_ID_AMD_LANCE ;
hw/net/rocker/rocker.c +2 -2
@@ -1399,7 +1399,7 @@ err_world_type_by_name: } } -static void pci_rocker_uninit (PCIDevice *dev) +static void pci_rocker_unrealize (PCIDevice *dev) {Rocker *r =ROCKER (dev);int i;
@@ -1481,7 +1481,7 @@ static void rocker_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_rocker_realize; - k->exit = pci_rocker_uninit; + k->unrealize = pci_rocker_unrealize; k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_ROCKER ; k->revision =ROCKER_PCI_REVISION ;
hw/net/rtl8139.c +2 -2
@@ -3325,7 +3325,7 @@ static void rtl8139_timer(void *opaque)rtl8139_set_next_tctr_time (s); } -static void pci_rtl8139_uninit (PCIDevice *dev) +static void pci_rtl8139_unrealize (PCIDevice *dev) {RTL8139State *s =RTL8139 (dev);
@@ -3421,7 +3421,7 @@ static void rtl8139_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_rtl8139_realize; - k->exit = pci_rtl8139_uninit; + k->unrealize = pci_rtl8139_unrealize; k->romfile ="efi-rtl8139.rom" ; k->vendor_id =PCI_VENDOR_ID_REALTEK ; k->device_id =PCI_DEVICE_ID_REALTEK_8139 ;
hw/net/sungem.c +2 -2
@@ -1328,7 +1328,7 @@ static const MemoryRegionOps sungem_mmio_pcs_ops = { }, }; -static void sungem_uninit (PCIDevice *dev) +static void sungem_unrealize (PCIDevice *dev) {SunGEMState *s =SUNGEM (dev);
@@ -1460,7 +1460,7 @@ static void sungem_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = sungem_realize; - k->exit = sungem_uninit; + k->unrealize = sungem_unrealize; k->vendor_id =PCI_VENDOR_ID_APPLE ; k->device_id =PCI_DEVICE_ID_APPLE_UNI_N_GMAC ; k->revision =0x01 ;
hw/net/tulip.c +2 -2
@@ -988,7 +988,7 @@ static void pci_tulip_realize(PCIDevice *pci_dev, Error **errp)qemu_format_nic_info_str (qemu_get_queue (s->nic), s->c.macaddr.a); } -static void pci_tulip_exit (PCIDevice *pci_dev) +static void pci_tulip_unrealize (PCIDevice *pci_dev) {TULIPState *s =DO_UPCAST (TULIPState, dev, pci_dev);
@@ -1017,7 +1017,7 @@ static void tulip_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_tulip_realize; - k->exit = pci_tulip_exit; + k->unrealize = pci_tulip_unrealize; k->vendor_id =PCI_VENDOR_ID_DEC ; k->device_id =PCI_DEVICE_ID_DEC_21143 ; k->subsystem_vendor_id =PCI_VENDOR_ID_HP ;
hw/net/vmxnet3.c +2 -2
@@ -2237,7 +2237,7 @@ static void vmxnet3_instance_init(Object *obj)PCI_DEVICE (obj)->cap_present |=QEMU_PCI_CAP_EXPRESS ; } -static void vmxnet3_pci_uninit (PCIDevice *pci_dev) +static void vmxnet3_pci_unrealize (PCIDevice *pci_dev) {VMXNET3State *s =VMXNET3 (pci_dev);
@@ -2466,7 +2466,7 @@ static void vmxnet3_class_init(ObjectClass *class, const void *data)PCIDeviceClass *c =PCI_DEVICE_CLASS (class); c->realize = vmxnet3_pci_realize; - c->exit = vmxnet3_pci_uninit; + c->unrealize = vmxnet3_pci_unrealize; c->vendor_id =PCI_VENDOR_ID_VMWARE ; c->device_id =PCI_DEVICE_ID_VMWARE_VMXNET3 ; c->revision =PCI_DEVICE_ID_VMWARE_VMXNET3_REVISION ;
hw/nvme/ctrl.c +2 -2
@@ -9311,7 +9311,7 @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp) } } -static void nvme_exit (PCIDevice *pci_dev) +static void nvme_unrealize (PCIDevice *pci_dev) {NvmeCtrl *n =NVME (pci_dev);NvmeNamespace *ns;
@@ -9509,9 +9509,9 @@ static void nvme_class_init(ObjectClass *oc, const void *data)PCIDeviceClass *pc =PCI_DEVICE_CLASS (oc); pc->realize = nvme_realize; + pc->unrealize = nvme_unrealize; pc->config_write = nvme_pci_write_config; pc->config_read = nvme_pci_read_config; - pc->exit = nvme_exit; pc->class_id =PCI_CLASS_STORAGE_EXPRESS ; pc->revision =2 ;
hw/pci-bridge/cxl_downstream.c +2 -2
@@ -201,7 +201,7 @@ static void cxl_dsp_realize(PCIDevice *d, Error **errp)pci_bridge_unrealize (d); } -static void cxl_dsp_exitfn (PCIDevice *d) +static void cxl_dsp_unrealize (PCIDevice *d) {PCIESlot *s =PCIE_SLOT (d);
@@ -227,7 +227,7 @@ static void cxl_dsp_class_init(ObjectClass *oc, const void *data)device_class_set_props (dc, cxl_dsp_props); k->config_write = cxl_dsp_config_write; k->realize = cxl_dsp_realize; - k->exit = cxl_dsp_exitfn; + k->unrealize = cxl_dsp_unrealize; k->vendor_id =0x19e5 ;/* Huawei */ k->device_id =0xa129 ;/* Emulated CXL Switch Downstream Port */ k->revision =0 ;
hw/pci-bridge/cxl_root_port.c +1 -1
@@ -163,7 +163,7 @@ static void cxl_rp_realize(DeviceState *dev, Error **errp)int rc =pci_bridge_qemu_reserve_cap_init (pci_dev,0 , crp->res_reserve, errp);if (rc <0 ) { - rpc->parent_class.exit (pci_dev); + rpc->parent_class.unrealize (pci_dev);return ; }
hw/pci-bridge/cxl_upstream.c +2 -2
@@ -354,7 +354,7 @@ err_bridge:pci_bridge_unrealize (d); } -static void cxl_usp_exitfn (PCIDevice *d) +static void cxl_usp_unrealize (PCIDevice *d) {pcie_aer_exit (d);pcie_cap_exit (d);
@@ -379,7 +379,7 @@ static void cxl_upstream_class_init(ObjectClass *oc, const void *data) k->config_write = cxl_usp_write_config; k->config_read = cxl_usp_read_config; k->realize = cxl_usp_realize; - k->exit = cxl_usp_exitfn; + k->unrealize = cxl_usp_unrealize; k->vendor_id =0x19e5 ;/* Huawei */ k->device_id =0xa128 ;/* Emulated CXL Switch Upstream Port */ k->revision =0 ;
hw/pci-bridge/gen_pcie_root_port.c +1 -1
@@ -99,7 +99,7 @@ static void gen_rp_realize(DeviceState *dev, Error **errp) grp->res_reserve, errp);if (rc <0 ) { - rpc->parent_class.exit (d); + rpc->parent_class.unrealize (d);return ; }
hw/pci-bridge/pci_bridge_dev.c +2 -2
@@ -125,7 +125,7 @@ shpc_error:pci_bridge_unrealize (dev); } -static void pci_bridge_dev_exitfn (PCIDevice *dev) +static void pci_bridge_dev_unrealize (PCIDevice *dev) {PCIBridgeDev *bridge_dev =PCI_BRIDGE_DEV (dev);
@@ -247,7 +247,7 @@ static void pci_bridge_dev_class_init(ObjectClass *klass, const void *data)HotplugHandlerClass *hc =HOTPLUG_HANDLER_CLASS (klass); k->realize = pci_bridge_dev_realize; - k->exit = pci_bridge_dev_exitfn; + k->unrealize = pci_bridge_dev_unrealize; k->config_write = pci_bridge_dev_write_config; k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_BRIDGE ;
hw/pci-bridge/pci_expander_bridge.c +4 -4
@@ -412,7 +412,7 @@ static void pxb_dev_realize(PCIDevice *dev, Error **errp)pxb_dev_realize_common (dev,PCI , errp); } -static void pxb_dev_exitfn (PCIDevice *pci_dev) +static void pxb_dev_unrealize_common (PCIDevice *pci_dev) {PXBDev *pxb =PXB_DEV (pci_dev);
@@ -432,7 +432,7 @@ static void pxb_dev_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pxb_dev_realize; - k->exit = pxb_dev_exitfn; + k->unrealize = pxb_dev_unrealize_common; k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_PXB ; k->class_id =PCI_CLASS_BRIDGE_HOST ;
@@ -470,7 +470,7 @@ static void pxb_pcie_dev_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pxb_pcie_dev_realize; - k->exit = pxb_dev_exitfn; + k->unrealize = pxb_dev_unrealize_common; k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_PXB_PCIE ; k->class_id =PCI_CLASS_BRIDGE_HOST ;
@@ -515,7 +515,7 @@ static void pxb_cxl_dev_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pxb_cxl_dev_realize; - k->exit = pxb_dev_exitfn; + k->unrealize = pxb_dev_unrealize_common;/* * XXX: These types of bridges don't actually show up in the hierarchy so * vendor, device, class, etc. ids are intentionally left out.
hw/pci-bridge/pcie_pci_bridge.c +2 -2
@@ -95,7 +95,7 @@ error:pci_bridge_unrealize (d); } -static void pcie_pci_bridge_exit (PCIDevice *d) +static void pcie_pci_bridge_unrealize (PCIDevice *d) {PCIEPCIBridge *bridge_dev =PCIE_PCI_BRIDGE_DEV (d);pcie_cap_exit (d);
@@ -146,7 +146,7 @@ static void pcie_pci_bridge_class_init(ObjectClass *klass, const void *data) k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE ; k->realize = pcie_pci_bridge_realize; - k->exit = pcie_pci_bridge_exit; + k->unrealize = pcie_pci_bridge_unrealize; k->config_write = pcie_pci_bridge_write_config; dc->vmsd = &pcie_pci_bridge_dev_vmstate;device_class_set_props (dc, pcie_pci_bridge_dev_properties);
hw/pci-bridge/pcie_root_port.c +2 -2
@@ -134,7 +134,7 @@ err_bridge:pci_bridge_unrealize (d); } -static void rp_exit (PCIDevice *d) +static void rp_unrealize (PCIDevice *d) {PCIERootPortClass *rpc =PCIE_ROOT_PORT_GET_CLASS (d);PCIESlot *s =PCIE_SLOT (d);
@@ -175,7 +175,7 @@ static void rp_class_init(ObjectClass *klass, const void *data) k->config_write = rp_write_config; k->realize = rp_realize; - k->exit = rp_exit; + k->unrealize = rp_unrealize;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); rc->phases.hold = rp_reset_hold;device_class_set_props (dc, rp_props);
hw/pci-bridge/simba.c +1 -1
@@ -72,7 +72,7 @@ static void simba_pci_bridge_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = simba_pci_bridge_realize; - k->exit = pci_bridge_unrealize; + k->unrealize = pci_bridge_unrealize; k->vendor_id =PCI_VENDOR_ID_SUN ; k->device_id =PCI_DEVICE_ID_SUN_SIMBA ; k->revision =0x11 ;
hw/pci-bridge/xio3130_downstream.c +2 -2
@@ -123,7 +123,7 @@ err_bridge:pci_bridge_unrealize (d); } -static void xio3130_downstream_exitfn (PCIDevice *d) +static void xio3130_downstream_unrealize (PCIDevice *d) {PCIESlot *s =PCIE_SLOT (d);
@@ -160,7 +160,7 @@ static void xio3130_downstream_class_init(ObjectClass *klass, const void *data) k->config_write = xio3130_downstream_write_config; k->realize = xio3130_downstream_realize; - k->exit = xio3130_downstream_exitfn; + k->unrealize = xio3130_downstream_unrealize; k->vendor_id =PCI_VENDOR_ID_TI ; k->device_id =PCI_DEVICE_ID_TI_XIO3130D ; k->revision =XIO3130_REVISION ;
hw/pci-bridge/xio3130_upstream.c +2 -2
@@ -102,7 +102,7 @@ err_bridge:pci_bridge_unrealize (d); } -static void xio3130_upstream_exitfn (PCIDevice *d) +static void xio3130_upstream_unrealize (PCIDevice *d) {pcie_aer_exit (d);pcie_cap_exit (d);
@@ -130,7 +130,7 @@ static void xio3130_upstream_class_init(ObjectClass *klass, const void *data) k->config_write = xio3130_upstream_write_config; k->realize = xio3130_upstream_realize; - k->exit = xio3130_upstream_exitfn; + k->unrealize = xio3130_upstream_unrealize; k->vendor_id =PCI_VENDOR_ID_TI ; k->device_id =PCI_DEVICE_ID_TI_XIO3130U ; k->revision =XIO3130_REVISION ;
hw/pci-host/designware.c +1 -1
@@ -599,8 +599,8 @@ static void designware_pcie_root_class_init(ObjectClass *klass, k->device_id =0xABCD ; k->revision =0 ; k->class_id =PCI_CLASS_BRIDGE_PCI ; - k->exit = pci_bridge_unrealize; k->realize = designware_pcie_root_realize; + k->unrealize = pci_bridge_unrealize; k->config_read = designware_pcie_root_config_read; k->config_write = designware_pcie_root_config_write;
hw/pci-host/xilinx-pcie.c +1 -1
@@ -298,7 +298,7 @@ static void xilinx_pcie_root_class_init(ObjectClass *klass, const void *data) k->revision =0 ; k->class_id =PCI_CLASS_BRIDGE_HOST ; k->realize = xilinx_pcie_root_realize; - k->exit = pci_bridge_unrealize; + k->unrealize = pci_bridge_unrealize;device_class_set_legacy_reset (dc, pci_bridge_reset); k->config_read = xilinx_pcie_root_config_read; k->config_write = xilinx_pcie_root_config_write;
hw/pci/pci.c +2 -2
@@ -1454,8 +1454,8 @@ static void pci_qdev_unrealize(DeviceState *dev)pci_del_option_rom (pci_dev);pcie_sriov_unregister_device (pci_dev); -if (pc->exit) { - pc->exit (pci_dev); +if (pc->unrealize) { + pc->unrealize (pci_dev); }pci_device_deassert_intx (pci_dev);
hw/remote/proxy.c +2 -2
@@ -129,7 +129,7 @@ static void pci_proxy_dev_realize(PCIDevice *device, Error **errp)probe_pci_info (PCI_DEVICE (dev), errp); } -static void pci_proxy_dev_exit (PCIDevice *pdev) +static void pci_proxy_dev_unrealize (PCIDevice *pdev) {PCIProxyDev *dev =PCI_PROXY_DEV (pdev);
@@ -205,7 +205,7 @@ static void pci_proxy_dev_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = pci_proxy_dev_realize; - k->exit = pci_proxy_dev_exit; + k->unrealize = pci_proxy_dev_unrealize; k->config_read = pci_proxy_read_config; k->config_write = pci_proxy_write_config;
hw/riscv/riscv-iommu-pci.c +2 -2
@@ -138,7 +138,7 @@ static void riscv_iommu_pci_realize(PCIDevice *dev, Error **errp)riscv_iommu_pci_setup_iommu (iommu, bus, errp); } -static void riscv_iommu_pci_exit (PCIDevice *pci_dev) +static void riscv_iommu_pci_unrealize (PCIDevice *pci_dev) {pci_setup_iommu (pci_device_root_bus (pci_dev),NULL ,NULL ); }
@@ -187,7 +187,7 @@ static void riscv_iommu_pci_class_init(ObjectClass *klass, const void *data) rc->phases.hold = riscv_iommu_pci_reset_hold; k->realize = riscv_iommu_pci_realize; - k->exit = riscv_iommu_pci_exit; + k->unrealize = riscv_iommu_pci_unrealize; k->class_id =RISCV_PCI_CLASS_SYSTEM_IOMMU ; dc->desc ="RISCV-IOMMU DMA Remapping device" ; dc->vmsd = &riscv_iommu_vmstate;
hw/scsi/esp-pci.c +2 -2
@@ -412,7 +412,7 @@ static void esp_pci_scsi_realize(PCIDevice *dev, Error **errp)scsi_bus_init (&s->bus,sizeof (s->bus), d, &esp_pci_scsi_info); } -static void esp_pci_scsi_exit (PCIDevice *d) +static void esp_pci_scsi_unrealize (PCIDevice *d) {PCIESPState *pci =PCI_ESP (d);ESPState *s = &pci->esp;
@@ -433,7 +433,7 @@ static void esp_pci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = esp_pci_scsi_realize; - k->exit = esp_pci_scsi_exit; + k->unrealize = esp_pci_scsi_unrealize; k->vendor_id =PCI_VENDOR_ID_AMD ; k->device_id =PCI_DEVICE_ID_AMD_SCSI ; k->revision =0x10 ;
hw/scsi/lsi53c895a.c +2 -2
@@ -2367,7 +2367,7 @@ static void lsi_scsi_realize(PCIDevice *dev, Error **errp)scsi_bus_init (&s->bus,sizeof (s->bus), d, &lsi_scsi_info); } -static void lsi_scsi_exit (PCIDevice *dev) +static void lsi_scsi_unrealize (PCIDevice *dev) {LSIState *s =LSI53C895A (dev);
@@ -2381,7 +2381,7 @@ static void lsi_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = lsi_scsi_realize; - k->exit = lsi_scsi_exit; + k->unrealize = lsi_scsi_unrealize; k->vendor_id =PCI_VENDOR_ID_LSI_LOGIC ; k->device_id =PCI_DEVICE_ID_LSI_53C895A ; k->class_id =PCI_CLASS_STORAGE_SCSI ;
hw/scsi/megasas.c +2 -2
@@ -2317,7 +2317,7 @@ static const VMStateDescription vmstate_megasas_gen2 = { } }; -static void megasas_scsi_uninit (PCIDevice *d) +static void megasas_scsi_unrealize (PCIDevice *d) {MegasasState *s =MEGASAS (d);
@@ -2532,7 +2532,7 @@ static void megasas_class_init(ObjectClass *oc, const void *data)const MegasasInfo *info = data; pc->realize = megasas_scsi_realize; - pc->exit = megasas_scsi_uninit; + pc->unrealize = megasas_scsi_unrealize; pc->vendor_id =PCI_VENDOR_ID_LSI_LOGIC ; pc->device_id = info->device_id; pc->subsystem_vendor_id =PCI_VENDOR_ID_LSI_LOGIC ;
hw/scsi/mptsas.c +2 -2
@@ -1328,7 +1328,7 @@ static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)scsi_bus_init (&s->bus,sizeof (s->bus), &dev->qdev, &mptsas_scsi_info); } -static void mptsas_scsi_uninit (PCIDevice *dev) +static void mptsas_scsi_unrealize (PCIDevice *dev) {MPTSASState *s =MPT_SAS (dev);
@@ -1422,7 +1422,7 @@ static void mptsas1068_class_init(ObjectClass *oc, const void *data)PCIDeviceClass *pc =PCI_DEVICE_CLASS (oc); pc->realize = mptsas_scsi_realize; - pc->exit = mptsas_scsi_uninit; + pc->unrealize = mptsas_scsi_unrealize; pc->romfile =0 ; pc->vendor_id =PCI_VENDOR_ID_LSI_LOGIC ; pc->device_id =PCI_DEVICE_ID_LSI_SAS1068 ;
hw/scsi/vmw_pvscsi.c +4 -6
@@ -1137,8 +1137,7 @@ static const struct SCSIBusInfo pvscsi_scsi_info = { .fail = pvscsi_command_failed, }; -static void -pvscsi_realizefn (PCIDevice *pci_dev,Error **errp) +static void pvscsi_realize (PCIDevice *pci_dev,Error **errp) {PVSCSIState *s =PVSCSI (pci_dev);
@@ -1176,8 +1175,7 @@ pvscsi_realizefn(PCIDevice *pci_dev, Error **errp)pvscsi_reset_state (s); } -static void -pvscsi_uninit (PCIDevice *pci_dev) +static void pvscsi_unrealize (PCIDevice *pci_dev) {PVSCSIState *s =PVSCSI (pci_dev);
@@ -1278,8 +1276,8 @@ static void pvscsi_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass);HotplugHandlerClass *hc =HOTPLUG_HANDLER_CLASS (klass); - k->realize = pvscsi_realizefn; - k->exit = pvscsi_uninit; + k->realize = pvscsi_realize; + k->unrealize = pvscsi_unrealize; k->vendor_id =PCI_VENDOR_ID_VMWARE ; k->device_id =PCI_DEVICE_ID_VMWARE_PVSCSI ; k->class_id =PCI_CLASS_STORAGE_SCSI ;
hw/sd/sdhci-pci.c +2 -2
@@ -45,7 +45,7 @@ static void sdhci_pci_realize(PCIDevice *dev, Error **errp)pci_register_bar (dev,0 ,PCI_BASE_ADDRESS_SPACE_MEMORY , &s->iomem); } -static void sdhci_pci_exit (PCIDevice *dev) +static void sdhci_pci_unrealize (PCIDevice *dev) {SDHCIState *s =PCI_SDHCI (dev);
@@ -60,7 +60,7 @@ static void sdhci_pci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = sdhci_pci_realize; - k->exit = sdhci_pci_exit; + k->unrealize = sdhci_pci_unrealize; k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_SDHCI ; k->class_id =PCI_CLASS_SYSTEM_SDHCI ;
hw/ufs/ufs.c +2 -2
@@ -1805,7 +1805,7 @@ static void ufs_realize(PCIDevice *pci_dev, Error **errp)ufs_init_wlu (&u->rpmb_wlu,UFS_UPIU_RPMB_WLUN ); } -static void ufs_exit (PCIDevice *pci_dev) +static void ufs_unrealize (PCIDevice *pci_dev) {UfsHc *u =UFS (pci_dev);
@@ -1850,7 +1850,7 @@ static void ufs_class_init(ObjectClass *oc, const void *data)PCIDeviceClass *pc =PCI_DEVICE_CLASS (oc); pc->realize = ufs_realize; - pc->exit = ufs_exit; + pc->unrealize = ufs_unrealize; pc->vendor_id =PCI_VENDOR_ID_REDHAT ; pc->device_id =PCI_DEVICE_ID_REDHAT_UFS ; pc->class_id =PCI_CLASS_STORAGE_UFS ;
hw/usb/hcd-ehci-pci.c +2 -2
@@ -100,7 +100,7 @@ static void usb_ehci_pci_finalize(Object *obj)usb_ehci_finalize (s); } -static void usb_ehci_pci_exit (PCIDevice *dev) +static void usb_ehci_pci_unrealize (PCIDevice *dev) {EHCIPCIState *i =PCI_EHCI (dev);EHCIState *s = &i->ehci;
@@ -156,7 +156,7 @@ static void ehci_class_init(ObjectClass *klass, const void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = usb_ehci_pci_realize; - k->exit = usb_ehci_pci_exit; + k->unrealize = usb_ehci_pci_unrealize; k->class_id =PCI_CLASS_SERIAL_USB ; k->config_write = usb_ehci_pci_write_config; dc->vmsd = &vmstate_ehci_pci;
hw/usb/hcd-ohci-pci.c +4 -4
@@ -59,7 +59,7 @@ static void ohci_pci_die(struct OHCIState *ohci) PCI_STATUS_DETECTED_PARITY); } -static void usb_ohci_realize_pci (PCIDevice *dev,Error **errp) +static void usb_ohci_pci_realize (PCIDevice *dev,Error **errp) {Error *err =NULL ;OHCIPCIState *ohci =PCI_OHCI (dev);
@@ -79,7 +79,7 @@ static void usb_ohci_realize_pci(PCIDevice *dev, Error **errp)pci_register_bar (dev,0 ,0 , &ohci->state.mem); } -static void usb_ohci_exit (PCIDevice *dev) +static void usb_ohci_pci_unrealize (PCIDevice *dev) {OHCIPCIState *ohci =PCI_OHCI (dev);OHCIState *s = &ohci->state;
@@ -131,8 +131,8 @@ static void ohci_pci_class_init(ObjectClass *klass, const void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - k->realize = usb_ohci_realize_pci; - k->exit = usb_ohci_exit; + k->realize = usb_ohci_pci_realize; + k->unrealize = usb_ohci_pci_unrealize; k->vendor_id =PCI_VENDOR_ID_APPLE ; k->device_id =PCI_DEVICE_ID_APPLE_IPID_USB ; k->class_id =PCI_CLASS_SERIAL_USB ;
hw/usb/hcd-uhci.c +2 -2
@@ -1233,7 +1233,7 @@ void usb_uhci_common_realize(PCIDevice *dev, Error **errp)pci_register_bar (&s->dev,4 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io_bar); } -static void usb_uhci_exit (PCIDevice *dev) +static void usb_uhci_common_unrealize (PCIDevice *dev) {UHCIState *s =UHCI (dev);
@@ -1298,7 +1298,7 @@ void uhci_data_class_init(ObjectClass *klass, const void *data)const UHCIInfo *info = data; k->realize = info->realize ? info->realize : usb_uhci_common_realize; - k->exit = info->unplug ? usb_uhci_exit :NULL ; + k->unrealize = info->unplug ? usb_uhci_common_unrealize :NULL ; k->vendor_id = info->vendor_id; k->device_id = info->device_id; k->revision = info->revision;
hw/usb/hcd-xhci-pci.c +2 -2
@@ -182,7 +182,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) s->xhci.as =pci_get_address_space (dev); } -static void usb_xhci_pci_exit (PCIDevice *dev) +static void usb_xhci_pci_unrealize (PCIDevice *dev) {XHCIPciState *s =XHCI_PCI (dev);/* destroy msix memory region */
@@ -232,7 +232,7 @@ static void xhci_class_init(ObjectClass *klass, const void *data) dc->vmsd = &vmstate_xhci_pci;set_bit (DEVICE_CATEGORY_USB , dc->categories); k->realize = usb_xhci_pci_realize; - k->exit = usb_xhci_pci_exit; + k->unrealize = usb_xhci_pci_unrealize; k->class_id =PCI_CLASS_SERIAL_USB ;device_class_set_props (dc, xhci_pci_properties); object_class_property_set_description(klass, "conditional-intr-mapping",
hw/vfio/pci.c +2 -2
@@ -3560,7 +3560,7 @@ static void vfio_pci_finalize(Object *obj)vfio_pci_put_device (vdev); } -static void vfio_exitfn (PCIDevice *pdev) +static void vfio_pci_unrealize (PCIDevice *pdev) {VFIOPCIDevice *vdev =VFIO_PCI_DEVICE (pdev);VFIODevice *vbasedev = &vdev->vbasedev;
@@ -3666,7 +3666,7 @@ static void vfio_pci_device_class_init(ObjectClass *klass, const void *data) dc->desc ="VFIO PCI base device" ;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - pdc->exit = vfio_exitfn; + pdc->unrealize = vfio_pci_unrealize; pdc->config_read = vfio_pci_read_config; pdc->config_write = vfio_pci_write_config; }
hw/virtio/virtio-pci.c +2 -2
@@ -2351,7 +2351,7 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp) } } -static void virtio_pci_exit (PCIDevice *pci_dev) +static void virtio_pci_unrealize (PCIDevice *pci_dev) {VirtIOPCIProxy *proxy =VIRTIO_PCI (pci_dev); bool pcie_port = pci_bus_is_express(pci_get_bus(pci_dev)) &&
@@ -2491,7 +2491,7 @@ static void virtio_pci_class_init(ObjectClass *klass, const void *data)device_class_set_props (dc, virtio_pci_properties); k->realize = virtio_pci_realize; - k->exit = virtio_pci_exit; + k->unrealize = virtio_pci_unrealize; k->vendor_id =PCI_VENDOR_ID_REDHAT_QUMRANET ; k->revision =VIRTIO_PCI_ABI_VERSION ; k->class_id =PCI_CLASS_OTHERS ;
hw/watchdog/wdt_i6300esb.c +2 -2
@@ -450,7 +450,7 @@ static void i6300esb_realize(PCIDevice *dev, Error **errp)pci_register_bar (&d->dev,0 ,0 , &d->io_mem); } -static void i6300esb_exit (PCIDevice *dev) +static void i6300esb_unrealize (PCIDevice *dev) {I6300State *d =WATCHDOG_I6300ESB_DEVICE (dev);
@@ -465,7 +465,7 @@ static void i6300esb_class_init(ObjectClass *klass, const void *data) k->config_read = i6300esb_config_read; k->config_write = i6300esb_config_write; k->realize = i6300esb_realize; - k->exit = i6300esb_exit; + k->unrealize = i6300esb_unrealize; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->device_id =PCI_DEVICE_ID_INTEL_ESB_9 ; k->class_id =PCI_CLASS_SYSTEM_OTHER ;
hw/xen/xen_pt.c +2 -2
@@ -987,7 +987,7 @@ err_out:assert (rc); } -static void xen_pt_unregister_device (PCIDevice *d) +static void xen_pt_unrealize (PCIDevice *d) {xen_pt_destroy (d); }
@@ -1057,7 +1057,7 @@ static void xen_pci_passthrough_class_init(ObjectClass *klass, const void *data) xpdc->pci_qdev_realize = dc->realize; dc->realize = xen_igd_clear_slot; k->realize = xen_pt_realize; - k->exit = xen_pt_unregister_device; + k->unrealize = xen_pt_unrealize; k->config_read = xen_pt_pci_read_config; k->config_write = xen_pt_pci_write_config;set_bit (DEVICE_CATEGORY_MISC , dc->categories);
Signature · 1 line
2.51.0
Quoted 87 lines · Philippe Mathieu-Daudé
Commit
7ee6c1e182c("pci: Permit incremental conversion of device models to realize") renamed:
PCIDeviceClass::init()->PCIDeviceClass::realize()Finish the conversion by renaming the counter part
PCIDeviceClass::exit()PCIDeviceClass::unrealize()This clarifies the handler is called during the DeviceUnrealize path, not during Object destruction in
instance_finalize().Manual change adapting style when needed.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
include/hw/pci/pci.h | 1 - include/hw/pci/pci_device.h | 3 ++- hw/audio/ac97.c | 8 ++++---- hw/audio/es1370.c | 8 ++++---- hw/audio/intel-hda.c | 8 ++++---- hw/audio/via-ac97.c | 4 ++-- hw/char/diva-gsp.c | 6 +++--- hw/char/serial-pci-multi.c | 8 ++++---- hw/char/serial-pci.c | 4 ++-- hw/cxl/switch-mailbox-cci.c | 4 ++-- hw/display/ati.c | 8 ++++---- hw/display/bochs-display.c | 4 ++-- hw/display/vga-pci.c | 4 ++-- hw/ide/cmd646.c | 4 ++-- hw/ide/ich.c | 4 ++-- hw/ide/piix.c | 6 +++--- hw/ide/via.c | 4 ++-- hw/mem/cxl_type3.c | 4 ++-- hw/misc/edu.c | 4 ++-- hw/misc/ivshmem-pci.c | 4 ++-- hw/misc/pci-testdev.c | 5 ++--- hw/net/can/can_kvaser_pci.c | 4 ++-- hw/net/can/can_mioe3680_pci.c | 4 ++-- hw/net/can/can_pcm3680_pci.c | 4 ++-- hw/net/can/ctucan_pci.c | 4 ++-- hw/net/e1000.c | 5 ++--- hw/net/e1000e.c | 4 ++-- hw/net/eepro100.c | 8 ++++---- hw/net/igb.c | 4 ++-- hw/net/igbvf.c | 4 ++-- hw/net/ne2000-pci.c | 4 ++-- hw/net/pcnet-pci.c | 4 ++-- hw/net/rocker/rocker.c | 4 ++-- hw/net/rtl8139.c | 4 ++-- hw/net/sungem.c | 4 ++-- hw/net/tulip.c | 4 ++-- hw/net/vmxnet3.c | 4 ++-- hw/nvme/ctrl.c | 4 ++-- hw/pci-bridge/cxl_downstream.c | 4 ++-- hw/pci-bridge/cxl_root_port.c | 2 +- hw/pci-bridge/cxl_upstream.c | 4 ++-- hw/pci-bridge/gen_pcie_root_port.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 4 ++-- hw/pci-bridge/pci_expander_bridge.c | 8 ++++---- hw/pci-bridge/pcie_pci_bridge.c | 4 ++-- hw/pci-bridge/pcie_root_port.c | 4 ++-- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 4 ++-- hw/pci-bridge/xio3130_upstream.c | 4 ++-- hw/pci-host/designware.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/pci/pci.c | 4 ++-- hw/remote/proxy.c | 4 ++-- hw/riscv/riscv-iommu-pci.c | 4 ++-- hw/scsi/esp-pci.c | 4 ++-- hw/scsi/lsi53c895a.c | 4 ++-- hw/scsi/megasas.c | 4 ++-- hw/scsi/mptsas.c | 4 ++-- hw/scsi/vmw_pvscsi.c | 10 ++++------ hw/sd/sdhci-pci.c | 4 ++-- hw/ufs/ufs.c | 4 ++-- hw/usb/hcd-ehci-pci.c | 4 ++-- hw/usb/hcd-ohci-pci.c | 8 ++++---- hw/usb/hcd-uhci.c | 4 ++-- hw/usb/hcd-xhci-pci.c | 4 ++-- hw/vfio/pci.c | 4 ++-- hw/virtio/virtio-pci.c | 4 ++-- hw/watchdog/wdt_i6300esb.c | 4 ++-- hw/xen/xen_pt.c | 4 ++-- 69 files changed, 151 insertions(+), 155 deletions(-)
[...]
hw/display/ati.c static const MemoryRegionOps ati_mm_ops = { · line 951
Quoted 10 lines
hw/display/ati.c +1
-1@@ -948,7 +948,7 @@ static const MemoryRegionOps ati_mm_ops = { .endianness = DEVICE_LITTLE_ENDIAN, }; -static void ati_vga_realize (PCIDevice *dev,Error **errp) +static void ati_vga_pci_realize (PCIDevice *dev,Error **errp)
Why rename this?
hw/display/ati.c static void ati_vga_reset(DeviceState *dev) · line 1035
Quoted 9 lines
hw/display/ati.c +1
-1{ATIVGAState *s =ATI_VGA (dev);VGACommonState *vga = &s->vga;@@ -1032,7 +1032,7 @@ static void ati_vga_reset(DeviceState *dev) s->mode =VGA_MODE ; } -static void ati_vga_exit (PCIDevice *dev) +static void ati_vga_pci_unrealize (PCIDevice *dev)
Can you just call it ati_vga_unrealize like in other devices?
Regards,
BALATON Zoltan
Quoted 14 lines
hw/display/ati.c +2
-2{ATIVGAState *s =ATI_VGA (dev);@@ -1064,8 +1064,8 @@ static void ati_vga_class_init(ObjectClass *klass, const void *data) k->vendor_id =PCI_VENDOR_ID_ATI ; k->device_id =PCI_DEVICE_ID_ATI_RAGE128_PF ; k->romfile ="vgabios-ati.bin" ; - k->realize = ati_vga_realize; - k->exit = ati_vga_exit; + k->realize = ati_vga_pci_realize; + k->unrealize = ati_vga_pci_unrealize; }static void ati_vga_init (Object *o)
Quoted 109 lines · BALATON Zoltan
Quoted 87 lines · Philippe Mathieu-Daudé
Commit
7ee6c1e182c("pci: Permit incremental conversion of device models to realize") renamed:PCIDeviceClass::init() ->
PCIDeviceClass::realize()Finish the conversion by renaming the counter part
PCIDeviceClass::exit()
PCIDeviceClass::unrealize()This clarifies the handler is called during the DeviceUnrealize path, not during Object destruction in
instance_finalize().Manual change adapting style when needed.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
include/hw/pci/pci.h | 1 - include/hw/pci/pci_device.h | 3 ++- hw/audio/ac97.c | 8 ++++---- hw/audio/es1370.c | 8 ++++---- hw/audio/intel-hda.c | 8 ++++---- hw/audio/via-ac97.c | 4 ++-- hw/char/diva-gsp.c | 6 +++--- hw/char/serial-pci-multi.c | 8 ++++---- hw/char/serial-pci.c | 4 ++-- hw/cxl/switch-mailbox-cci.c | 4 ++-- hw/display/ati.c | 8 ++++---- hw/display/bochs-display.c | 4 ++-- hw/display/vga-pci.c | 4 ++-- hw/ide/cmd646.c | 4 ++-- hw/ide/ich.c | 4 ++-- hw/ide/piix.c | 6 +++--- hw/ide/via.c | 4 ++-- hw/mem/cxl_type3.c | 4 ++-- hw/misc/edu.c | 4 ++-- hw/misc/ivshmem-pci.c | 4 ++-- hw/misc/pci-testdev.c | 5 ++--- hw/net/can/can_kvaser_pci.c | 4 ++-- hw/net/can/can_mioe3680_pci.c | 4 ++-- hw/net/can/can_pcm3680_pci.c | 4 ++-- hw/net/can/ctucan_pci.c | 4 ++-- hw/net/e1000.c | 5 ++--- hw/net/e1000e.c | 4 ++-- hw/net/eepro100.c | 8 ++++---- hw/net/igb.c | 4 ++-- hw/net/igbvf.c | 4 ++-- hw/net/ne2000-pci.c | 4 ++-- hw/net/pcnet-pci.c | 4 ++-- hw/net/rocker/rocker.c | 4 ++-- hw/net/rtl8139.c | 4 ++-- hw/net/sungem.c | 4 ++-- hw/net/tulip.c | 4 ++-- hw/net/vmxnet3.c | 4 ++-- hw/nvme/ctrl.c | 4 ++-- hw/pci-bridge/cxl_downstream.c | 4 ++-- hw/pci-bridge/cxl_root_port.c | 2 +- hw/pci-bridge/cxl_upstream.c | 4 ++-- hw/pci-bridge/gen_pcie_root_port.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 4 ++--hw/pci-bridge/pci_expander_bridge.c| 8 ++++---- hw/pci-bridge/pcie_pci_bridge.c | 4 ++-- hw/pci-bridge/pcie_root_port.c | 4 ++-- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 4 ++-- hw/pci-bridge/xio3130_upstream.c | 4 ++-- hw/pci-host/designware.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/pci/pci.c | 4 ++-- hw/remote/proxy.c | 4 ++-- hw/riscv/riscv-iommu-pci.c | 4 ++-- hw/scsi/esp-pci.c | 4 ++-- hw/scsi/lsi53c895a.c | 4 ++-- hw/scsi/megasas.c | 4 ++-- hw/scsi/mptsas.c | 4 ++-- hw/scsi/vmw_pvscsi.c | 10 ++++------ hw/sd/sdhci-pci.c | 4 ++-- hw/ufs/ufs.c | 4 ++-- hw/usb/hcd-ehci-pci.c | 4 ++-- hw/usb/hcd-ohci-pci.c | 8 ++++---- hw/usb/hcd-uhci.c | 4 ++-- hw/usb/hcd-xhci-pci.c | 4 ++-- hw/vfio/pci.c | 4 ++-- hw/virtio/virtio-pci.c | 4 ++-- hw/watchdog/wdt_i6300esb.c | 4 ++-- hw/xen/xen_pt.c | 4 ++--69 files changed, 151 insertions(+), 155 deletions(-)[...]
hw/display/ati.c static const MemoryRegionOps ati_mm_ops = { · line 951
Quoted 10 lines
hw/display/ati.c +1
-1@@ -948,7 +948,7 @@ static const MemoryRegionOps ati_mm_ops = { .endianness = DEVICE_LITTLE_ENDIAN, }; -static void ati_vga_realize (PCIDevice *dev,Error **errp) +static void ati_vga_pci_realize (PCIDevice *dev,Error **errp)Why rename this?
Quoted 7 lines
hw/display/ati.c +0
-0{ ATIVGAState *s = ATI_VGA(dev); VGACommonState *vga = &s->vga;@@ -1032,7 +1032,7 @@ static void ati_vga_reset(DeviceState *dev) s->mode = VGA_MODE; }
Quoted 4 lines
hw/display/ati.c static void ati_vga_reset(DeviceState *dev) · line 1035
Quoted 2 lines
hw/display/ati.c +1
-1-static void ati_vga_exit (PCIDevice *dev) +static void ati_vga_pci_unrealize (PCIDevice *dev)Can you just call it
ati_vga_unrealizelike in other devices?
Sure, will do in v2.