s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup
Subsystems (11)
cover s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup
The main aim of this patchseries is to remove the two remaining uses of device_class_set_parent_reset() in the tree, which are virtio-ccw and the s390 CPU class. Doing that lets us do some followup cleanup. (The diffstat looks alarming but is almost all coccinelle automated changes.)
virtio-ccw is a simple conversion, because it's a leaf class and no other code interacts with the reset function. So we convert to three-phase and resettable_class_set_parent_phases().
The s390 CPU is trickier, because s390 has its own set of different kinds of reset (the S390_CPU_RESET_* enum values). At the moment we have a single function implementing the reset, which always chains to the parent DeviceClass::reset, and which can be called both from the CPU object's own DeviceClass::reset method and also from other s390 code.
I opted to handle this by adding two new S390-CPU-specific reset types to the Resettable ResetType enum. Now instead of having an underlying implementation of reset that is s390-specific and which might be called either directly or via the DeviceClass::reset method, we can implement only the Resettable hold phase method, and have the places that need to trigger an s390-specific reset type do so by calling resettable_reset().
The other option would have been to smuggle in the s390 reset type via, for instance, a field in the CPU state that we set in s390_do_cpu_initial_reset() etc and then examined in the reset method, but doing it this way seems cleaner.
The rest of the series is largely cleanup. Some small stuff:
* remove the now-unused device_class_set_parent_reset() function
* remove some CPU state struct fields in alpha and hppa that were simply unused
* fix an accidental comma in xilinx_axidma that confused a Coccinelle script
* hw/remote/message.c should not be directly invoking the DeviceClass::reset method
There are also patches here which convert devices from directly setting:
dc->reset = my_reset_function;
to using a function call:
device_class_set_legacy_reset(dc, my_reset_function);
The conversion is entirely scripted using a coccinelle patch, and it is responsible for the large diffstat here.
If people feel this is unnecessary churn I'm open to that argument, but my motivation here is:
* it means that people writing device code see the "legacy" word and get a hint that a new QEMU device probably should be using something else (i.e. Resettable)
* it makes it easier to find the places in the code that are still using legacy-reset with a simple grep
In particular, having done that makes it easier to rename the DeviceState::reset field to DeviceState::legacy_reset, and that in turn is how I found that hw/remote/ was still directly invoking it.
The last patch removes device_phases_reset(), which was the part of the reset transition glue that supported "device is reset via the legacy reset method but it is a three-phase device". Now we know there is no way to directly invoke legacy-reset any more, we can drop that bit of glue. (The opposite direction, "device is reset via a three-phase-aware method but only implements the legacy reset method", is still supported.)
I am pondering the idea of a further Coccinelle-driven conversion of device_class_set_legacy_reset() calls into three-phase setting of the Resettable hold phase method. This would be a zero behaviour change, but the difficult part will be where we have devices which make direct function calls to their reset function as well as registering it as the reset method; I'm not sure if Coccinelle can do "match functions which are not referenced elsewhere in the file" checks.
Note that my testing here has only been "make check" and "make check-avocado", which I know doesn't really exercise reset very heavily.
thanks
-- PMM
Peter Maydell (10):
hw/s390/virtio-ccw: Convert to three-phase reset target/s390: Convert CPU to Resettable interface
hw: Remove device_class_set_parent_reset() target/alpha, hppa: Remove unused parent_reset fields hw/dma/xilinx_axidma: Use semicolon at end of statement, not comma hw/remote/message.c: Don't directly invoke DeviceClass:reset
hw: Define new device_class_set_legacy_reset()
hw: Use device_class_set_legacy_reset() instead of opencoding
hw: Rename DeviceClass::reset field to legacy_reset
hw: Remove device_phases_reset()
docs/devel/reset.rst | 10 +++++ scripts/coccinelle/device-reset.cocci | 30 ++++++++++++++ hw/s390x/virtio-ccw.h | 2 +- include/hw/qdev-core.h | 33 +++++++-------- include/hw/resettable.h | 2 + target/alpha/cpu.h | 2 - target/hppa/cpu.h | 2 - target/s390x/cpu.h | 21 ++-------- hw/acpi/erst.c | 2 +- hw/acpi/piix4.c | 2 +- hw/adc/aspeed_adc.c | 2 +- hw/adc/max111x.c | 2 +- hw/adc/stm32f2xx_adc.c | 2 +- hw/adc/zynq-xadc.c | 2 +- hw/arm/armsse.c | 2 +- hw/arm/highbank.c | 2 +- hw/arm/musicpal.c | 6 +-- hw/arm/pxa2xx.c | 4 +- hw/arm/strongarm.c | 4 +- hw/audio/ac97.c | 2 +- hw/audio/cs4231.c | 2 +- hw/audio/cs4231a.c | 2 +- hw/audio/es1370.c | 2 +- hw/audio/hda-codec.c | 2 +- hw/audio/intel-hda.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- hw/audio/pl041.c | 2 +- hw/audio/via-ac97.c | 2 +- hw/block/fdc-isa.c | 2 +- hw/block/fdc-sysbus.c | 2 +- hw/block/m25p80.c | 2 +- hw/block/nand.c | 2 +- hw/block/onenand.c | 2 +- hw/block/pflash_cfi01.c | 2 +- hw/block/pflash_cfi02.c | 2 +- hw/block/swim.c | 2 +- hw/char/avr_usart.c | 2 +- hw/char/cmsdk-apb-uart.c | 2 +- hw/char/digic-uart.c | 2 +- hw/char/escc.c | 2 +- hw/char/etraxfs_ser.c | 2 +- hw/char/exynos4210_uart.c | 2 +- hw/char/goldfish_tty.c | 2 +- hw/char/grlib_apbuart.c | 2 +- hw/char/ibex_uart.c | 2 +- hw/char/imx_serial.c | 2 +- hw/char/mcf_uart.c | 2 +- hw/char/mchp_pfsoc_mmuart.c | 2 +- hw/char/nrf51_uart.c | 2 +- hw/char/pl011.c | 2 +- hw/char/renesas_sci.c | 2 +- hw/char/sclpconsole-lm.c | 2 +- hw/char/sclpconsole.c | 2 +- hw/char/sh_serial.c | 2 +- hw/char/shakti_uart.c | 2 +- hw/char/stm32f2xx_usart.c | 2 +- hw/char/xilinx_uartlite.c | 2 +- hw/core/or-irq.c | 2 +- hw/core/qdev.c | 58 +++++++-------------------- hw/cxl/switch-mailbox-cci.c | 2 +- hw/display/artist.c | 2 +- hw/display/ati.c | 2 +- hw/display/bcm2835_fb.c | 2 +- hw/display/cg3.c | 2 +- hw/display/dpcd.c | 2 +- hw/display/exynos4210_fimd.c | 2 +- hw/display/g364fb.c | 2 +- hw/display/i2c-ddc.c | 2 +- hw/display/jazz_led.c | 2 +- hw/display/macfb.c | 4 +- hw/display/qxl.c | 2 +- hw/display/sii9022.c | 2 +- hw/display/sm501.c | 4 +- hw/display/tcx.c | 2 +- hw/display/vga-isa.c | 2 +- hw/display/vga-mmio.c | 2 +- hw/display/vga-pci.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/display/xlnx_dp.c | 2 +- hw/dma/bcm2835_dma.c | 2 +- hw/dma/i8257.c | 2 +- hw/dma/pl080.c | 2 +- hw/dma/pl330.c | 2 +- hw/dma/rc4030.c | 2 +- hw/dma/sparc32_dma.c | 2 +- hw/dma/xilinx_axidma.c | 4 +- hw/dma/xlnx-zdma.c | 2 +- hw/dma/xlnx-zynq-devcfg.c | 2 +- hw/dma/xlnx_csu_dma.c | 2 +- hw/dma/xlnx_dpdma.c | 2 +- hw/fsi/aspeed_apb2opb.c | 2 +- hw/fsi/fsi-master.c | 2 +- hw/fsi/fsi.c | 2 +- hw/fsi/lbus.c | 2 +- hw/gpio/aspeed_gpio.c | 2 +- hw/gpio/bcm2835_gpio.c | 2 +- hw/gpio/bcm2838_gpio.c | 2 +- hw/gpio/gpio_key.c | 2 +- hw/gpio/imx_gpio.c | 2 +- hw/gpio/max7310.c | 2 +- hw/gpio/mpc8xxx.c | 2 +- hw/gpio/nrf51_gpio.c | 2 +- hw/gpio/omap_gpio.c | 4 +- hw/gpio/pca9552.c | 2 +- hw/gpio/pca9554.c | 2 +- hw/gpio/pcf8574.c | 2 +- hw/gpio/sifive_gpio.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/hyperv/vmbus.c | 2 +- hw/i2c/aspeed_i2c.c | 4 +- hw/i2c/bcm2835_i2c.c | 2 +- hw/i2c/exynos4210_i2c.c | 2 +- hw/i2c/imx_i2c.c | 2 +- hw/i2c/microbit_i2c.c | 2 +- hw/i2c/mpc_i2c.c | 2 +- hw/i2c/omap_i2c.c | 2 +- hw/i2c/ppc4xx_i2c.c | 2 +- hw/i2c/smbus_eeprom.c | 2 +- hw/i386/amd_iommu.c | 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/i8254.c | 2 +- hw/i386/kvm/i8259.c | 2 +- hw/i386/kvm/ioapic.c | 2 +- hw/i386/kvm/xen_overlay.c | 2 +- hw/i386/port92.c | 2 +- hw/i386/vapic.c | 2 +- hw/i386/vmmouse.c | 2 +- hw/i386/xen/xen_platform.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/ich.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/piix.c | 4 +- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- hw/input/adb-kbd.c | 2 +- hw/input/adb-mouse.c | 2 +- hw/input/lm832x.c | 2 +- hw/input/pckbd.c | 4 +- hw/intc/allwinner-a10-pic.c | 2 +- hw/intc/apic_common.c | 2 +- hw/intc/armv7m_nvic.c | 2 +- hw/intc/aspeed_intc.c | 2 +- hw/intc/aspeed_vic.c | 2 +- hw/intc/bcm2835_ic.c | 2 +- hw/intc/bcm2836_control.c | 2 +- hw/intc/exynos4210_combiner.c | 2 +- hw/intc/goldfish_pic.c | 2 +- hw/intc/grlib_irqmp.c | 2 +- hw/intc/heathrow_pic.c | 2 +- hw/intc/i8259.c | 2 +- hw/intc/imx_avic.c | 2 +- hw/intc/imx_gpcv2.c | 2 +- hw/intc/ioapic.c | 2 +- hw/intc/loongarch_extioi.c | 2 +- hw/intc/loongarch_pch_pic.c | 2 +- hw/intc/m68k_irqc.c | 2 +- hw/intc/omap_intc.c | 4 +- hw/intc/openpic.c | 2 +- hw/intc/openpic_kvm.c | 2 +- hw/intc/pl190.c | 2 +- hw/intc/ppc-uic.c | 2 +- hw/intc/s390_flic.c | 2 +- hw/intc/s390_flic_kvm.c | 2 +- hw/intc/sifive_plic.c | 2 +- hw/intc/slavio_intctl.c | 2 +- hw/intc/xlnx-pmu-iomod-intc.c | 2 +- hw/intc/xlnx-zynqmp-ipi.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/pc87312.c | 2 +- hw/isa/piix.c | 2 +- hw/isa/vt82c686.c | 10 ++--- hw/m68k/mcf5206.c | 2 +- hw/m68k/mcf_intc.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/m68k/next-kbd.c | 2 +- hw/mem/cxl_type3.c | 2 +- hw/misc/a9scu.c | 2 +- hw/misc/allwinner-cpucfg.c | 2 +- hw/misc/allwinner-h3-ccu.c | 2 +- hw/misc/allwinner-h3-dramc.c | 2 +- hw/misc/allwinner-h3-sysctrl.c | 2 +- hw/misc/allwinner-r40-ccu.c | 2 +- hw/misc/allwinner-r40-dramc.c | 2 +- hw/misc/allwinner-sid.c | 2 +- hw/misc/allwinner-sramc.c | 2 +- hw/misc/applesmc.c | 2 +- hw/misc/arm_l2x0.c | 2 +- hw/misc/arm_sysctl.c | 2 +- hw/misc/armsse-cpu-pwrctrl.c | 2 +- hw/misc/armsse-mhu.c | 2 +- hw/misc/aspeed_hace.c | 2 +- hw/misc/aspeed_i3c.c | 4 +- hw/misc/aspeed_lpc.c | 2 +- hw/misc/aspeed_peci.c | 2 +- hw/misc/aspeed_sbc.c | 2 +- hw/misc/aspeed_scu.c | 10 ++--- hw/misc/aspeed_sdmc.c | 4 +- hw/misc/aspeed_xdma.c | 2 +- hw/misc/avr_power.c | 2 +- hw/misc/bcm2835_cprman.c | 8 ++-- hw/misc/bcm2835_mbox.c | 2 +- hw/misc/bcm2835_mphi.c | 2 +- hw/misc/bcm2835_powermgt.c | 2 +- hw/misc/bcm2835_rng.c | 2 +- hw/misc/bcm2835_thermal.c | 2 +- hw/misc/eccmemctl.c | 2 +- hw/misc/exynos4210_clk.c | 2 +- hw/misc/exynos4210_pmu.c | 2 +- hw/misc/exynos4210_rng.c | 2 +- hw/misc/imx25_ccm.c | 2 +- hw/misc/imx31_ccm.c | 2 +- hw/misc/imx6_ccm.c | 2 +- hw/misc/imx6_src.c | 2 +- hw/misc/imx6ul_ccm.c | 2 +- hw/misc/imx7_ccm.c | 4 +- hw/misc/imx7_snvs.c | 2 +- hw/misc/imx7_src.c | 2 +- hw/misc/imx_rngc.c | 2 +- hw/misc/iotkit-secctl.c | 2 +- hw/misc/iotkit-sysctl.c | 2 +- hw/misc/ivshmem.c | 2 +- hw/misc/lasi.c | 2 +- hw/misc/led.c | 2 +- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/gpio.c | 2 +- hw/misc/macio/mac_dbdma.c | 2 +- hw/misc/macio/pmu.c | 2 +- hw/misc/mips_cmgcr.c | 2 +- hw/misc/mips_cpc.c | 2 +- hw/misc/mips_itu.c | 2 +- hw/misc/mps2-fpgaio.c | 2 +- hw/misc/mps2-scc.c | 2 +- hw/misc/msf2-sysreg.c | 2 +- hw/misc/nrf51_rng.c | 2 +- hw/misc/pci-testdev.c | 2 +- hw/misc/sifive_e_aon.c | 2 +- hw/misc/sifive_u_prci.c | 2 +- hw/misc/slavio_misc.c | 2 +- hw/misc/stm32f2xx_syscfg.c | 2 +- hw/misc/stm32f4xx_exti.c | 2 +- hw/misc/stm32f4xx_syscfg.c | 2 +- hw/misc/tz-mpc.c | 2 +- hw/misc/tz-msc.c | 2 +- hw/misc/tz-ppc.c | 2 +- hw/misc/virt_ctrl.c | 2 +- hw/misc/xlnx-versal-cfu.c | 2 +- hw/net/allwinner-sun8i-emac.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/cadence_gem.c | 2 +- hw/net/can/can_kvaser_pci.c | 2 +- hw/net/can/can_mioe3680_pci.c | 2 +- hw/net/can/can_pcm3680_pci.c | 2 +- hw/net/can/ctucan_pci.c | 2 +- hw/net/can/xlnx-versal-canfd.c | 2 +- hw/net/dp8393x.c | 2 +- hw/net/etraxfs_eth.c | 2 +- hw/net/fsl_etsec/etsec.c | 2 +- hw/net/ftgmac100.c | 4 +- hw/net/imx_fec.c | 2 +- hw/net/lan9118.c | 2 +- hw/net/lance.c | 2 +- hw/net/lasi_i82596.c | 2 +- hw/net/mcf_fec.c | 2 +- hw/net/mipsnet.c | 2 +- hw/net/msf2-emac.c | 2 +- hw/net/npcm7xx_emc.c | 2 +- hw/net/npcm_gmac.c | 2 +- hw/net/opencores_eth.c | 2 +- hw/net/pcnet-pci.c | 2 +- hw/net/rocker/rocker.c | 2 +- hw/net/rtl8139.c | 2 +- hw/net/smc91c111.c | 2 +- hw/net/stellaris_enet.c | 2 +- hw/net/sungem.c | 2 +- hw/net/sunhme.c | 2 +- hw/net/tulip.c | 2 +- hw/net/vmxnet3.c | 2 +- hw/net/xilinx_axienet.c | 2 +- hw/net/xilinx_ethlite.c | 2 +- hw/nvme/ctrl.c | 2 +- hw/nvram/eeprom_at24c.c | 2 +- hw/nvram/fw_cfg.c | 2 +- hw/nvram/mac_nvram.c | 2 +- hw/nvram/nrf51_nvm.c | 2 +- hw/pci-bridge/cxl_downstream.c | 2 +- hw/pci-bridge/cxl_upstream.c | 2 +- hw/pci-bridge/i82801b11.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 2 +- hw/pci-bridge/pcie_pci_bridge.c | 2 +- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-bridge/xio3130_upstream.c | 2 +- hw/pci-host/astro.c | 4 +- hw/pci-host/designware.c | 2 +- hw/pci-host/dino.c | 2 +- hw/pci-host/gt64120.c | 2 +- hw/pci-host/mv64361.c | 2 +- hw/pci-host/ppc440_pcix.c | 2 +- hw/pci-host/q35.c | 2 +- hw/pci-host/sabre.c | 2 +- hw/pci-host/versatile.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/ppc/pnv_psi.c | 4 +- hw/ppc/ppc405_boards.c | 2 +- hw/ppc/ppc405_uc.c | 12 +++--- hw/ppc/ppc4xx_devs.c | 6 +-- hw/ppc/ppc4xx_sdram.c | 4 +- hw/ppc/ppce500_spin.c | 2 +- hw/ppc/spapr_cpu_core.c | 2 +- hw/ppc/spapr_iommu.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_vio.c | 2 +- hw/remote/message.c | 5 +-- hw/remote/proxy.c | 2 +- hw/rtc/allwinner-rtc.c | 2 +- hw/rtc/aspeed_rtc.c | 2 +- hw/rtc/ds1338.c | 2 +- hw/rtc/exynos4210_rtc.c | 2 +- hw/rtc/goldfish_rtc.c | 2 +- hw/rtc/ls7a_rtc.c | 2 +- hw/rtc/m48t59-isa.c | 2 +- hw/rtc/m48t59.c | 2 +- hw/rtc/xlnx-zynqmp-rtc.c | 2 +- hw/s390x/ccw-device.c | 2 +- hw/s390x/event-facility.c | 2 +- hw/s390x/ipl.c | 2 +- hw/s390x/s390-pci-bus.c | 4 +- hw/s390x/sclpquiesce.c | 2 +- hw/s390x/virtio-ccw.c | 13 +++--- hw/scsi/esp-pci.c | 2 +- hw/scsi/esp.c | 2 +- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/megasas.c | 2 +- hw/scsi/mptsas.c | 2 +- hw/scsi/scsi-disk.c | 2 +- hw/scsi/scsi-generic.c | 2 +- hw/scsi/vmw_pvscsi.c | 2 +- hw/sd/allwinner-sdhost.c | 2 +- hw/sd/aspeed_sdhci.c | 2 +- hw/sd/bcm2835_sdhost.c | 2 +- hw/sd/cadence_sdhci.c | 2 +- hw/sd/npcm7xx_sdhci.c | 2 +- hw/sd/pl181.c | 2 +- hw/sd/pxa2xx_mmci.c | 2 +- hw/sd/sd.c | 2 +- hw/sd/sdhci.c | 2 +- hw/sd/ssi-sd.c | 2 +- hw/sensor/dps310.c | 2 +- hw/sensor/emc141x.c | 2 +- hw/sensor/lsm303dlhc_mag.c | 2 +- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u_iommu.c | 2 +- hw/ssi/aspeed_smc.c | 2 +- hw/ssi/bcm2835_spi.c | 2 +- hw/ssi/ibex_spi_host.c | 2 +- hw/ssi/imx_spi.c | 2 +- hw/ssi/mss-spi.c | 2 +- hw/ssi/pl022.c | 2 +- hw/ssi/pnv_spi.c | 2 +- hw/ssi/sifive_spi.c | 2 +- hw/ssi/stm32f2xx_spi.c | 2 +- hw/ssi/xilinx_spi.c | 2 +- hw/ssi/xilinx_spips.c | 4 +- hw/ssi/xlnx-versal-ospi.c | 2 +- hw/timer/a9gtimer.c | 2 +- hw/timer/allwinner-a10-pit.c | 2 +- hw/timer/arm_mptimer.c | 2 +- hw/timer/armv7m_systick.c | 2 +- hw/timer/aspeed_timer.c | 2 +- hw/timer/avr_timer16.c | 2 +- hw/timer/bcm2835_systmr.c | 2 +- hw/timer/cmsdk-apb-dualtimer.c | 2 +- hw/timer/cmsdk-apb-timer.c | 2 +- hw/timer/digic-timer.c | 2 +- hw/timer/exynos4210_mct.c | 2 +- hw/timer/exynos4210_pwm.c | 2 +- hw/timer/grlib_gptimer.c | 2 +- hw/timer/hpet.c | 2 +- hw/timer/i8254.c | 2 +- hw/timer/ibex_timer.c | 2 +- hw/timer/imx_epit.c | 2 +- hw/timer/imx_gpt.c | 2 +- hw/timer/nrf51_timer.c | 2 +- hw/timer/renesas_cmt.c | 2 +- hw/timer/renesas_tmr.c | 2 +- hw/timer/sifive_pwm.c | 2 +- hw/timer/slavio_timer.c | 2 +- hw/timer/sse-counter.c | 2 +- hw/timer/sse-timer.c | 2 +- hw/timer/stm32f2xx_timer.c | 2 +- hw/tpm/tpm_tis_i2c.c | 2 +- hw/tpm/tpm_tis_isa.c | 2 +- hw/tpm/tpm_tis_sysbus.c | 2 +- hw/tricore/tricore_testdevice.c | 2 +- hw/usb/hcd-dwc3.c | 2 +- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-ehci-sysbus.c | 2 +- hw/usb/hcd-ohci-pci.c | 2 +- hw/usb/hcd-ohci-sysbus.c | 2 +- hw/usb/hcd-uhci.c | 2 +- hw/usb/hcd-xhci-pci.c | 2 +- hw/usb/hcd-xhci-sysbus.c | 2 +- hw/usb/hcd-xhci.c | 2 +- hw/usb/imx-usb-phy.c | 2 +- hw/usb/tusb6010.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/pci.c | 2 +- hw/virtio/virtio-mmio.c | 2 +- hw/watchdog/cmsdk-apb-watchdog.c | 2 +- hw/watchdog/sbsa_gwdt.c | 2 +- hw/watchdog/wdt_aspeed.c | 2 +- hw/watchdog/wdt_diag288.c | 2 +- hw/watchdog/wdt_i6300esb.c | 2 +- hw/watchdog/wdt_ib700.c | 2 +- hw/watchdog/wdt_imx2.c | 2 +- target/s390x/cpu.c | 38 ++++++++---------- target/s390x/sigp.c | 8 +--- 423 files changed, 553 insertions(+), 569 deletions(-) create mode 100644 scripts/coccinelle/device-reset.cocci
Signature · 1 line
2.34.1
PATCH 1/10 hw/s390/virtio-ccw: Convert to three-phase reset
Convert the virtio-ccw code to three-phase reset. This allows us to remove a call to device_class_set_parent_reset(), replacing it with the three-phase equivalent resettable_class_set_parent_phases(). Removing all the device_class_set_parent_reset() uses will allow us to remove some of the glue code that interworks between three-phase and legacy reset.
This is a simple conversion, with no behavioural changes.
---
It looks a little odd that we do the this-class reset first and then chain up to the parent's reset, but that's what the existing code does, so I left it alone.
--- hw/s390x/virtio-ccw.h | 2 +- hw/s390x/virtio-ccw.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
hw/s390x/virtio-ccw.h +1 -1
@@ -57,7 +57,7 @@ struct VirtIOCCWDeviceClass {CCWDeviceClass parent_class;void (*realize)(VirtioCcwDevice *dev,Error **errp);void (*unrealize)(VirtioCcwDevice *dev); -void (*parent_reset)(DeviceState *dev); +ResettablePhases parent_phases; };/* Performance improves when virtqueue kick processing is decoupled from the
hw/s390x/virtio-ccw.c +8 -5
@@ -913,14 +913,15 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector) } } -static void virtio_ccw_reset (DeviceState *d) +static void virtio_ccw_reset_hold (Object *obj,ResetType type) { -VirtioCcwDevice *dev =VIRTIO_CCW_DEVICE (d); +VirtioCcwDevice *dev =VIRTIO_CCW_DEVICE (obj);VirtIOCCWDeviceClass *vdc =VIRTIO_CCW_DEVICE_GET_CLASS (dev);virtio_ccw_reset_virtio (dev); -if (vdc->parent_reset) { - vdc->parent_reset (d); + +if (vdc->parent_phases.hold) { + vdc->parent_phases.hold (obj, type); } }
@@ -1233,11 +1234,13 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);CCWDeviceClass *k =CCW_DEVICE_CLASS (dc);VirtIOCCWDeviceClass *vdc =VIRTIO_CCW_DEVICE_CLASS (klass); +ResettableClass *rc =RESETTABLE_CLASS (klass); k->unplug = virtio_ccw_busdev_unplug; dc->realize = virtio_ccw_busdev_realize; dc->unrealize = virtio_ccw_busdev_unrealize; -device_class_set_parent_reset (dc, virtio_ccw_reset, &vdc->parent_reset); +resettable_class_set_parent_phases (rc,NULL , virtio_ccw_reset_hold,NULL , + &vdc->parent_phases); }static const TypeInfo virtio_ccw_device_info = {
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 01/10] hw/s390/virtio-ccw: Convert to three-phase reset
Quoted 10 lines · Peter Maydell
Convert the virtio-ccw code to three-phase reset. This allows us to remove a call to
device_class_set_parent_reset(), replacing it with the three-phase equivalentresettable_class_set_parent_phases(). Removing all thedevice_class_set_parent_reset()uses will allow us to remove some of the glue code that interworks between three-phase and legacy reset.This is a simple conversion, with no behavioural changes.
Signed-off-by Peter Maydell<[email protected]>
Quoted 8 lines
---
It looks a little odd that we do the this-class reset first and then chain up to the parent's reset, but that's what the existing code does, so I left it alone.--- hw/s390x/virtio-ccw.h | 2 +- hw/s390x/virtio-ccw.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
r~
Re: [PATCH for-9.2 01/10] hw/s390/virtio-ccw: Convert to three-phase reset
In reply to Peter MaydellQuoted 10 lines · Peter Maydell
Convert the virtio-ccw code to three-phase reset. This allows us to remove a call to
device_class_set_parent_reset(), replacing it with the three-phase equivalentresettable_class_set_parent_phases(). Removing all thedevice_class_set_parent_reset()uses will allow us to remove some of the glue code that interworks between three-phase and legacy reset.This is a simple conversion, with no behavioural changes.
Signed-off-by Peter Maydell <[email protected]>
Quoted 8 lines
---
It looks a little odd that we do the this-class reset first and then chain up to the parent's reset, but that's what the existing code does, so I left it alone.--- hw/s390x/virtio-ccw.h | 2 +- hw/s390x/virtio-ccw.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
Quoted 52 lines
hw/s390x/virtio-ccw.h +1
-1@@ -57,7 +57,7 @@ struct VirtIOCCWDeviceClass {CCWDeviceClass parent_class;void (*realize)(VirtioCcwDevice *dev,Error **errp);void (*unrealize)(VirtioCcwDevice *dev); -void (*parent_reset)(DeviceState *dev); +ResettablePhases parent_phases; };/* Performance improves when virtqueue kick processing is decoupled from the hw/s390x/virtio-ccw.c +8
-5@@ -913,14 +913,15 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector) } } -static void virtio_ccw_reset (DeviceState *d) +static void virtio_ccw_reset_hold (Object *obj,ResetType type) { -VirtioCcwDevice *dev =VIRTIO_CCW_DEVICE (d); +VirtioCcwDevice *dev =VIRTIO_CCW_DEVICE (obj);VirtIOCCWDeviceClass *vdc =VIRTIO_CCW_DEVICE_GET_CLASS (dev);virtio_ccw_reset_virtio (dev); -if (vdc->parent_reset) { - vdc->parent_reset (d); + +if (vdc->parent_phases.hold) { + vdc->parent_phases.hold (obj, type); } }@@ -1233,11 +1234,13 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);CCWDeviceClass *k =CCW_DEVICE_CLASS (dc);VirtIOCCWDeviceClass *vdc =VIRTIO_CCW_DEVICE_CLASS (klass); +ResettableClass *rc =RESETTABLE_CLASS (klass); k->unplug = virtio_ccw_busdev_unplug; dc->realize = virtio_ccw_busdev_realize; dc->unrealize = virtio_ccw_busdev_unrealize; -device_class_set_parent_reset (dc, virtio_ccw_reset, &vdc->parent_reset); +resettable_class_set_parent_phases (rc,NULL , virtio_ccw_reset_hold,NULL , + &vdc->parent_phases); }static const TypeInfo virtio_ccw_device_info = {
Re: [PATCH for-9.2 01/10] hw/s390/virtio-ccw: Convert to three-phase reset
In reply to Peter MaydellQuoted 7 lines · Peter Maydell
Convert the virtio-ccw code to three-phase reset. This allows us to remove a call to
device_class_set_parent_reset(), replacing it with the three-phase equivalentresettable_class_set_parent_phases(). Removing all thedevice_class_set_parent_reset()uses will allow us to remove some of the glue code that interworks between three-phase and legacy reset.
Quoted 8 lines
This is a simple conversion, with no behavioural changes.
Signed-off-by Peter Maydell <[email protected]>---
It looks a little odd that we do the this-class reset first and then chain up to the parent's reset, but that's what the existing code does, so I left it alone.
---
Re: [PATCH for-9.2 01/10] hw/s390/virtio-ccw: Convert to three-phase reset
In reply to Peter MaydellHi Peter,
Quoted 7 lines · Peter Maydell
Convert the virtio-ccw code to three-phase reset. This allows us to remove a call to
device_class_set_parent_reset(), replacing it with the three-phase equivalentresettable_class_set_parent_phases(). Removing all thedevice_class_set_parent_reset()uses will allow us to remove some of the glue code that interworks between three-phase and legacy reset.
Quoted 7 lines
This is a simple conversion, with no behavioural changes.
Signed-off-by Peter Maydell <[email protected]>---
It looks a little odd that we do the this-class reset first and then chain up to the parent's reset, but that's what the existing code does, so I left it alone.
Do you plan to post a follow up patch inverting the call order? Otherwise, could you add a comment in the code so we don't forget about this odd case?
Quoted 21 lines
--- hw/s390x/virtio-ccw.h | 2 +- hw/s390x/virtio-ccw.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)hw/s390x/virtio-ccw.c +5
-4-static void virtio_ccw_reset (DeviceState *d) +static void virtio_ccw_reset_hold (Object *obj,ResetType type) { -VirtioCcwDevice *dev =VIRTIO_CCW_DEVICE (d); +VirtioCcwDevice *dev =VIRTIO_CCW_DEVICE (obj);VirtIOCCWDeviceClass *vdc =VIRTIO_CCW_DEVICE_GET_CLASS (dev);virtio_ccw_reset_virtio (dev); -if (vdc->parent_reset) { - vdc->parent_reset (d); + +if (vdc->parent_phases.hold) { + vdc->parent_phases.hold (obj, type); } }
Re: [PATCH for-9.2 01/10] hw/s390/virtio-ccw: Convert to three-phase reset
Quoted 19 lines · Philippe Mathieu-Daudé
Hi Peter,
Quoted 7 lines · Peter Maydell
Convert the virtio-ccw code to three-phase reset. This allows us to remove a call to
device_class_set_parent_reset(), replacing it with the three-phase equivalentresettable_class_set_parent_phases(). Removing all thedevice_class_set_parent_reset()uses will allow us to remove some of the glue code that interworks between three-phase and legacy reset.Quoted 7 lines
This is a simple conversion, with no behavioural changes.
Signed-off-by Peter Maydell <[email protected]>---
It looks a little odd that we do the this-class reset first and then chain up to the parent's reset, but that's what the existing code does, so I left it alone.
Quoted 3 lines
Do you plan to post a follow up patch inverting the call order? Otherwise, could you add a comment in the code so we don't forget about this odd case?
I didn't plan to do either because I don't know whether the s390 code relies on this or not and I don't want to investigate either... If somebody on the s390 side is interested in tracking that down they're welcome to :-)
-- PMM
PATCH 2/10 target/s390: Convert CPU to Resettable interface
In reply to Peter MaydellConvert the s390 CPU to the Resettable interface. This is slightly more involved than the other CPU types were (see commits 9130cade5fc22..d66e64dd006df) because S390 has its own set of different kinds of reset with different behaviours that it needs to trigger.
We handle this by adding these reset types to the Resettable ResetType enum. Now instead of having an underlying implementation of reset that is s390-specific and which might be called either directly or via the DeviceClass::reset method, we can implement only the Resettable hold phase method, and have the places that need to trigger an s390-specific reset type do so by calling resettable_reset().
The other option would have been to smuggle in the s390 reset type via, for instance, a field in the CPU state that we set in s390_do_cpu_initial_reset() etc and then examined in the reset method, but doing it this way seems cleaner.
The motivation for this change is that this is the last caller of the legacy device_class_set_parent_reset() function, and removing that will let us clean up some glue code that we added for the transition to three-phase reset.
---
Tested with 'make check' and 'make check-avocado' only. The descriptions of the reset types are borrowed from the commit message of f5ae2a4fd8d573cfeba; please check them as I haven't got a clue what s390 does ;-)
--- docs/devel/reset.rst | 10 ++++++++++ include/hw/resettable.h | 2 ++ target/s390x/cpu.h | 21 ++++----------------- target/s390x/cpu.c | 38 +++++++++++++++++--------------------- target/s390x/sigp.c | 8 ++------ 5 files changed, 35 insertions(+), 44 deletions(-)
docs/devel/reset.rst +10 -0
@@ -44,6 +44,16 @@ The Resettable interface handles reset types with an enum ``ResetType``: value on each cold reset, such as RNG seed information, and which they must not reinitialize on a snapshot-load reset. +``RESET_TYPE_S390_CPU_NORMAL`` + This is only used for S390 CPU objects; it clears interrupts, stops + processing, and clears the TLB, but does not touch register contents. + +``RESET_TYPE_S390_CPU_INITIAL`` + This is only used for S390 CPU objects; it does everything + ``RESET_TYPE_S390_CPU_NORMAL`` does and also clears the PSW, prefix, + FPC, timer and control registers. It does not touch gprs, fprs or acrs. + + Devices which implement reset methods must treat any unknown ``ResetType`` as equivalent to ``RESET_TYPE_COLD``; this will reduce the amount of existing code we need to change if we add more types in future.
include/hw/resettable.h +2 -0
@@ -36,6 +36,8 @@ typedef struct ResettableState ResettableState;typedef enum ResetType {RESET_TYPE_COLD ,RESET_TYPE_SNAPSHOT_LOAD , +RESET_TYPE_S390_CPU_INITIAL , +RESET_TYPE_S390_CPU_NORMAL , }ResetType ;/*
target/s390x/cpu.h +4 -17
@@ -177,19 +177,11 @@ struct ArchCPU {uint32_t irqstate_saved_size; }; -typedef enum cpu_reset_type { -S390_CPU_RESET_NORMAL , -S390_CPU_RESET_INITIAL , -S390_CPU_RESET_CLEAR , -}cpu_reset_type ; -/** * S390CPUClass: * @parent_realize: The parent class' realize handler. -* @parent_reset: The parent class' reset handler. +* @parent_phases: The parent class' reset phase handlers. * @load_normal: Performs a load normal. -* @cpu_reset: Performs a CPU reset. -* @initial_cpu_reset: Performs an initial CPU reset. * * An S/390 CPU model. */
@@ -203,9 +195,8 @@ struct S390CPUClass {const char *desc;DeviceRealize parent_realize; -DeviceReset parent_reset; +ResettablePhases parent_phases;void (*load_normal)(CPUState *cpu); -void (*reset)(CPUState *cpu,cpu_reset_type type); };#ifndef CONFIG_USER_ONLY
@@ -872,16 +863,12 @@ static inline void s390_do_cpu_full_reset(CPUState *cs, run_on_cpu_data arg)static inline void s390_do_cpu_reset (CPUState *cs,run_on_cpu_data arg) { -S390CPUClass *scc =S390_CPU_GET_CLASS (cs); - - scc->reset (cs,S390_CPU_RESET_NORMAL ); +resettable_reset (OBJECT (cs),RESET_TYPE_S390_CPU_NORMAL ); }static inline void s390_do_cpu_initial_reset (CPUState *cs,run_on_cpu_data arg) { -S390CPUClass *scc =S390_CPU_GET_CLASS (cs); - - scc->reset (cs,S390_CPU_RESET_INITIAL ); +resettable_reset (OBJECT (cs),RESET_TYPE_S390_CPU_INITIAL ); }static inline void s390_do_cpu_load_normal (CPUState *cs,run_on_cpu_data arg)
target/s390x/cpu.c +17 -21
@@ -32,6 +32,7 @@#include "sysemu/hw_accel.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" +#include "hw/resettable.h" #include "fpu/softfloat-helpers.h" #include "disas/capstone.h" #include "sysemu/tcg.h"
@@ -162,23 +163,25 @@ static void s390_query_cpu_fast(CPUState *cpu, CpuInfoFast *value)#endif } -/* S390CPUClass::reset() */ -static void s390_cpu_reset (CPUState *s,cpu_reset_type type) +/* S390CPUClass Resettable reset_hold phase method */ +static void s390_cpu_reset_hold (Object *obj,ResetType type) { -S390CPU *cpu =S390_CPU (s); +S390CPU *cpu =S390_CPU (obj);S390CPUClass *scc =S390_CPU_GET_CLASS (cpu);CPUS390XState *env = &cpu->env; -DeviceState *dev =DEVICE (s); - scc->parent_reset (dev); +if (scc->parent_phases.hold) { + scc->parent_phases.hold (obj, type); + } cpu->env.sigp_order =0 ;s390_cpu_set_state (S390_CPU_STATE_STOPPED , cpu);switch (type) { -case S390_CPU_RESET_CLEAR : +default : +/* RESET_TYPE_COLD: power on or "clear" reset */ memset (env,0 , offsetof(CPUS390XState , start_initial_reset_fields));/* fall through */ -case S390_CPU_RESET_INITIAL : +case RESET_TYPE_S390_CPU_INITIAL :/* initial reset does not clear everything! */ memset(&env->start_initial_reset_fields, 0, offsetof(CPUS390XState, start_normal_reset_fields) -
@@ -203,7 +206,7 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type)set_float_detect_tininess (float_tininess_before_rounding, &env->fpu_status);/* fall through */ -case S390_CPU_RESET_NORMAL : +case RESET_TYPE_S390_CPU_NORMAL : env->psw.mask &= ~PSW_MASK_RI ; memset(&env->start_normal_reset_fields, 0, offsetof(CPUS390XState, end_reset_fields) -
@@ -212,20 +215,18 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) env->pfault_token =-1UL ; env->bpbc = false;break ; -default : -g_assert_not_reached (); }/* Reset state inside the kernel that we cannot access yet from QEMU. */ if (kvm_enabled ()) {switch (type) { -case S390_CPU_RESET_CLEAR : +default :kvm_s390_reset_vcpu_clear (cpu);break ; -case S390_CPU_RESET_INITIAL : +case RESET_TYPE_S390_CPU_INITIAL :kvm_s390_reset_vcpu_initial (cpu);break ; -case S390_CPU_RESET_NORMAL : +case RESET_TYPE_S390_CPU_NORMAL :kvm_s390_reset_vcpu_normal (cpu);break ; }
@@ -315,12 +316,6 @@ static Property s390x_cpu_properties[] = { DEFINE_PROP_END_OF_LIST() }; -static void s390_cpu_reset_full (DeviceState *dev) -{ -CPUState *s =CPU (dev); -return s390_cpu_reset (s,S390_CPU_RESET_CLEAR ); -} -#ifdef CONFIG_TCG #include "hw/core/tcg-cpu-ops.h"
@@ -383,15 +378,16 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)S390CPUClass *scc =S390_CPU_CLASS (oc);CPUClass *cc =CPU_CLASS (scc);DeviceClass *dc =DEVICE_CLASS (oc); +ResettableClass *rc =RESETTABLE_CLASS (oc);device_class_set_parent_realize (dc, s390_cpu_realizefn, &scc->parent_realize);device_class_set_props (dc, s390x_cpu_properties); dc->user_creatable = true; -device_class_set_parent_reset (dc, s390_cpu_reset_full, &scc->parent_reset); +resettable_class_set_parent_phases (rc,NULL , s390_cpu_reset_hold,NULL , + &scc->parent_phases); - scc->reset = s390_cpu_reset; cc->class_by_name = s390_cpu_class_by_name, cc->has_work = s390_cpu_has_work; cc->mmu_index = s390x_cpu_mmu_index;
target/s390x/sigp.c +2 -6
@@ -251,24 +251,20 @@ static void sigp_restart(CPUState *cs, run_on_cpu_data arg)static void sigp_initial_cpu_reset (CPUState *cs,run_on_cpu_data arg) { -S390CPU *cpu =S390_CPU (cs); -S390CPUClass *scc =S390_CPU_GET_CLASS (cpu);SigpInfo *si = arg.host_ptr;cpu_synchronize_state (cs); - scc->reset (cs,S390_CPU_RESET_INITIAL ); +resettable_reset (OBJECT (cs),RESET_TYPE_S390_CPU_INITIAL );cpu_synchronize_post_reset (cs); si->cc =SIGP_CC_ORDER_CODE_ACCEPTED ; }static void sigp_cpu_reset (CPUState *cs,run_on_cpu_data arg) { -S390CPU *cpu =S390_CPU (cs); -S390CPUClass *scc =S390_CPU_GET_CLASS (cpu);SigpInfo *si = arg.host_ptr;cpu_synchronize_state (cs); - scc->reset (cs,S390_CPU_RESET_NORMAL ); +resettable_reset (OBJECT (cs),RESET_TYPE_COLD );cpu_synchronize_post_reset (cs); si->cc =SIGP_CC_ORDER_CODE_ACCEPTED ; }
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 02/10] target/s390: Convert CPU to Resettable interface
target/s390x/sigp.c static void sigp_restart(CPUState *cs, run_on_cpu_data arg) · line 267
Quoted 9 lines · Peter Maydell
static void sigp_cpu_reset(CPUState *cs, run_on_cpu_data arg) {target/s390x/sigp.c +1
-3-S390CPU *cpu =S390_CPU (cs); -S390CPUClass *scc =S390_CPU_GET_CLASS (cpu);SigpInfo *si = arg.host_ptr;cpu_synchronize_state (cs); - scc->reset (cs,S390_CPU_RESET_NORMAL ); +resettable_reset (OBJECT (cs),RESET_TYPE_COLD );
NORMAL, not COLD here?
Otherwise,
r~
Thomas Huth
Acked-byRe: [PATCH for-9.2 02/10] target/s390: Convert CPU to Resettable interface
Quoted 10 lines · Richard Henderson
Quoted 8 lines · Peter Maydell
static void
sigp_cpu_reset(CPUState *cs, run_on_cpu_data arg){
- S390CPU *cpu =S390_CPU(cs);
- S390CPUClass *scc =S390_CPU_GET_CLASS(cpu); SigpInfo *si = arg.host_ptr;cpu_synchronize_state(cs);
-scc->reset(cs, S390_CPU_RESET_NORMAL);
+resettable_reset(OBJECT(cs), RESET_TYPE_COLD);
Quoted 4 lines
NORMAL, not COLD here?
Otherwise,
Reviewed-by Richard Henderson <[email protected]>
With that fixed:
Re: [PATCH for-9.2 02/10] target/s390: Convert CPU to Resettable interface
In reply to Peter MaydellQuoted 24 lines · Peter Maydell
Convert the s390 CPU to the Resettable interface. This is slightly more involved than the other CPU types were (see commits
9130cade5fc22..d66e64dd006df) because S390 has its own set of different kinds of reset with different behaviours that it needs to trigger.We handle this by adding these reset types to the Resettable ResetType enum. Now instead of having an underlying implementation of reset that is s390-specific and which might be called either directly or via the
DeviceClass::resetmethod, we can implement only the Resettable hold phase method, and have the places that need to trigger an s390-specific reset type do so by callingresettable_reset().The other option would have been to smuggle in the s390 reset type via, for instance, a field in the CPU state that we set in
s390_do_cpu_initial_reset()etc and then examined in the reset method, but doing it this way seems cleaner.The motivation for this change is that this is the last caller of the legacy
device_class_set_parent_reset()function, and removing that will let us clean up some glue code that we added for the transition to three-phase reset.
Quoted 7 lines
Signed-off-by Peter Maydell <[email protected]>---
Tested with 'make check' and 'make check-avocado' only. The descriptions of the reset types are borrowed from the commit message off5ae2a4fd8d573cfeba; please check them as I haven't got a clue what s390 does ;-)
---
With the already mentioned fix:
Quoted 5 lines
target/s390x/cpu.c +0
-0
[...]
Quoted 5 lines
target/s390x/cpu.c +2
-2-/* S390CPUClass::reset() */ -static void s390_cpu_reset (CPUState *s,cpu_reset_type type) +/* S390CPUClass Resettable reset_hold phase method */ +static void s390_cpu_reset_hold (Object *obj,ResetType type) {
[...]
target/s390x/cpu.c static void s390_query_cpu_fast(CPUState *cpu, CpuInfoFast *value) · line 181
Quoted 5 lines
switch (type) {target/s390x/cpu.c +2
-1-case S390_CPU_RESET_CLEAR : +default : +/* RESET_TYPE_COLD: power on or "clear" reset */
I'd prefer
case RESET_TYPE_COLD:
case RESET_TYPE_SNAPSHOT_LOAD:
and keeping the default unreachable assert.
Quoted 19 lines
memset(env, 0, offsetof(CPUS390XState, start_initial_reset_fields)); /* fall through */target/s390x/cpu.c +2
-2-case S390_CPU_RESET_INITIAL : +case RESET_TYPE_S390_CPU_INITIAL :/* initial reset does not clear everything! */ memset(&env->start_initial_reset_fields, 0, offsetof(CPUS390XState, start_normal_reset_fields) -@@ -203,7 +206,7 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type)set_float_detect_tininess (float_tininess_before_rounding, &env->fpu_status);/* fall through */ -case S390_CPU_RESET_NORMAL : +case RESET_TYPE_S390_CPU_NORMAL : env->psw.mask &= ~PSW_MASK_RI ; memset(&env->start_normal_reset_fields, 0, offsetof(CPUS390XState, end_reset_fields) -@@ -212,20 +215,18 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) env->pfault_token =-1UL ; env->bpbc = false;
target/s390x/cpu.c static void s390_cpu_reset(CPUState *s, cpu_reset_type type) · line 223
Quoted 10 lines
target/s390x/cpu.c +1
-3break ; -default : -g_assert_not_reached (); }/* Reset state inside the kernel that we cannot access yet from QEMU. */ if (kvm_enabled ()) {switch (type) { -case S390_CPU_RESET_CLEAR : +default :
And the same here.
Quoted 14 lines
target/s390x/cpu.c +2
-2kvm_s390_reset_vcpu_clear (cpu);break ; -case S390_CPU_RESET_INITIAL : +case RESET_TYPE_S390_CPU_INITIAL :kvm_s390_reset_vcpu_initial (cpu);break ; -case S390_CPU_RESET_NORMAL : +case RESET_TYPE_S390_CPU_NORMAL :kvm_s390_reset_vcpu_normal (cpu);break ; }@@ -315,12 +316,6 @@ static Property s390x_cpu_properties[] = { DEFINE_PROP_END_OF_LIST() };
[...]
Re: [PATCH for-9.2 02/10] target/s390: Convert CPU to Resettable interface
Quoted 34 lines · Nina Schoetterl-Glausch
Quoted 24 lines · Peter Maydell
Convert the s390 CPU to the Resettable interface. This is slightly more involved than the other CPU types were (see commits
9130cade5fc22..d66e64dd006df) because S390 has its own set of different kinds of reset with different behaviours that it needs to trigger.We handle this by adding these reset types to the Resettable ResetType enum. Now instead of having an underlying implementation of reset that is s390-specific and which might be called either directly or via the
DeviceClass::resetmethod, we can implement only the Resettable hold phase method, and have the places that need to trigger an s390-specific reset type do so by callingresettable_reset().The other option would have been to smuggle in the s390 reset type via, for instance, a field in the CPU state that we set in
s390_do_cpu_initial_reset()etc and then examined in the reset method, but doing it this way seems cleaner.The motivation for this change is that this is the last caller of the legacy
device_class_set_parent_reset()function, and removing that will let us clean up some glue code that we added for the transition to three-phase reset.Quoted 7 lines
Signed-off-by Peter Maydell <[email protected]>---
Tested with 'make check' and 'make check-avocado' only. The descriptions of the reset types are borrowed from the commit message off5ae2a4fd8d573cfeba; please check them as I haven't got a clue what s390 does ;-)
---
Quoted 2 lines
With the already mentioned fix:
Reviewed-by Nina Schoetterl-Glausch <[email protected]>
Thanks for the review.
Quoted 10 lines
target/s390x/cpu.c static void s390_query_cpu_fast(CPUState *cpu, CpuInfoFast *value) · line 181
Quoted 4 lines
switch (type) {target/s390x/cpu.c +2
-1-case S390_CPU_RESET_CLEAR : +default : +/* RESET_TYPE_COLD: power on or "clear" reset */ I'd prefer
caseRESET_TYPE_COLD:
caseRESET_TYPE_SNAPSHOT_LOAD:and keeping the default unreachable assert.
The reset API (docs/devel/reset.rst) says:
# Devices which implement reset methods must treat any unknown ``ResetType``
# as equivalent to ``RESET_TYPE_COLD``; this will reduce the amount of # existing code we need to change if we add more types in future.
So making an unknown reset type behave like "cold" reset is deliberate. Otherwise every time we added a new reset type to the system we'd need to go through every device that had a switch on the reset type to add a new case for it.
thanks
-- PMM
PATCH 3/10 hw: Remove device_class_set_parent_reset()
In reply to Peter MaydellThere are no callers of device_class_set_parent_reset() left in the tree, as they've all been converted to use three-phase reset and the corresponding resettable_class_set_parent_phases() function. Remove device_class_set_parent_reset().
--- include/hw/qdev-core.h | 16 ---------------- hw/core/qdev.c | 8 -------- 2 files changed, 24 deletions(-)
include/hw/qdev-core.h +0 -16
@@ -937,22 +937,6 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);*/ void device_class_set_props (DeviceClass *dc,Property *props); -/** -* device_class_set_parent_reset() - legacy set device reset handlers -* @dc: device class -* @dev_reset: function pointer to reset handler -* @parent_reset: function pointer to parents reset handler -* -* Modern code should use the ResettableClass interface to -* implement a multi-phase reset instead. -* -* TODO: remove the function when DeviceClass's reset method -* is not used anymore. -*/ -void device_class_set_parent_reset (DeviceClass *dc, -DeviceReset dev_reset, -DeviceReset *parent_reset); -/** * device_class_set_parent_realize() - set up for chaining realize fns * @dc: The device class
hw/core/qdev.c +0 -8
@@ -844,14 +844,6 @@ static void device_class_init(ObjectClass *class, void *data) offsetof(DeviceState, parent_bus), NULL, 0); } -void device_class_set_parent_reset (DeviceClass *dc, -DeviceReset dev_reset, -DeviceReset *parent_reset) -{ - *parent_reset = dc->reset; - dc->reset = dev_reset; -} -void device_class_set_parent_realize (DeviceClass *dc,DeviceRealize dev_realize,DeviceRealize *parent_realize)
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 03/10] hw: Remove device_class_set_parent_reset()
Quoted 10 lines · Peter Maydell
There are no callers of
device_class_set_parent_reset()left in the tree, as they've all been converted to use three-phase reset and the correspondingresettable_class_set_parent_phases()function. Removedevice_class_set_parent_reset().Signed-off-by Peter Maydell<[email protected]>--- include/hw/qdev-core.h | 16 ---------------- hw/core/qdev.c | 8 -------- 2 files changed, 24 deletions(-)
\o/
r~
Re: [PATCH for-9.2 03/10] hw: Remove device_class_set_parent_reset()
In reply to Peter MaydellQuoted 10 lines · Peter Maydell
There are no callers of
device_class_set_parent_reset()left in the tree, as they've all been converted to use three-phase reset and the correspondingresettable_class_set_parent_phases()function. Removedevice_class_set_parent_reset().Signed-off-by Peter Maydell <[email protected]>--- include/hw/qdev-core.h | 16 ---------------- hw/core/qdev.c | 8 -------- 2 files changed, 24 deletions(-)
PATCH 4/10 target/alpha, hppa: Remove unused parent_reset fields
In reply to Peter MaydellThe Alpha and HPPA CPU class structs include a 'parent_reset' field which is never used; delete them.
(These targets don't seem to implement reset at all; if they did they should do it using the three-phase reset mechanism, which uses a 'ResettablePhases parent_phases' field instead of the old 'DeviceReset parent_reset' field.)
--- target/alpha/cpu.h | 2 -- target/hppa/cpu.h | 2 -- 2 files changed, 4 deletions(-)
target/alpha/cpu.h +0 -2
@@ -267,7 +267,6 @@ struct ArchCPU {/** * AlphaCPUClass: * @parent_realize: The parent class' realize handler. -* @parent_reset: The parent class' reset handler. * * An Alpha CPU model. */
@@ -275,7 +274,6 @@ struct AlphaCPUClass {CPUClass parent_class;DeviceRealize parent_realize; -DeviceReset parent_reset; };#ifndef CONFIG_USER_ONLY
target/hppa/cpu.h +0 -2
@@ -281,7 +281,6 @@ struct ArchCPU {/** * HPPACPUClass: * @parent_realize: The parent class' realize handler. -* @parent_reset: The parent class' reset handler. * * An HPPA CPU model. */
@@ -289,7 +288,6 @@ struct HPPACPUClass {CPUClass parent_class;DeviceRealize parent_realize; -DeviceReset parent_reset; };#include "exec/cpu-all.h"
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 04/10] target/alpha, hppa: Remove unused parent_reset fields
Quoted 8 lines · Peter Maydell
The Alpha and HPPA CPU class structs include a '
parent_reset' field which is never used; delete them.(These targets don't seem to implement reset at all; if they did they should do it using the three-phase reset mechanism, which uses a 'ResettablePhases
parent_phases' field instead of the old 'DeviceResetparent_reset' field.)
Quoted 5 lines
Signed-off-by Peter Maydell <[email protected]>--- target/alpha/cpu.h | 2 -- target/hppa/cpu.h | 2 -- 2 files changed, 4 deletions(-)
Yea, it was sorta, kinda on the to-do list, but I never got around to it.
r~
PATCH 5/10 hw/dma/xilinx_axidma: Use semicolon at end of statement, not comma
In reply to Peter MaydellIn axidma_class_init() we accidentally used a comma at the end of a statement rather than a semicolon. This has no ill effects, but it's obviously not intended and it means that Coccinelle scripts for instance will fail to match on the two statements. Use a semicolon instead.
--- hw/dma/xilinx_axidma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/dma/xilinx_axidma.c +1 -1
@@ -626,7 +626,7 @@ static void axidma_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->realize = xilinx_axidma_realize, + dc->realize = xilinx_axidma_realize; dc->reset = xilinx_axidma_reset;device_class_set_props (dc, axidma_properties); }
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 05/10] hw/dma/xilinx_axidma: Use semicolon at end of statement, not comma
Quoted 10 lines · Peter Maydell
In
axidma_class_init()we accidentally used a comma at the end of a statement rather than a semicolon. This has no ill effects, but it's obviously not intended and it means that Coccinelle scripts for instance will fail to match on the two statements. Use a semicolon instead.Signed-off-by Peter Maydell<[email protected]>--- hw/dma/xilinx_axidma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
r~
Re: [PATCH for-9.2 05/10] hw/dma/xilinx_axidma: Use semicolon at end of statement, not comma
In reply to Peter MaydellQuoted 16 lines · Peter Maydell
In
axidma_class_init()we accidentally used a comma at the end of a statement rather than a semicolon. This has no ill effects, but it's obviously not intended and it means that Coccinelle scripts for instance will fail to match on the two statements. Use a semicolon instead.Signed-off-by Peter Maydell <[email protected]>--- hw/dma/xilinx_axidma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/dma/xilinx_axidma.c +0
-0
hw/dma/xilinx_axidma.c static void axidma_class_init(ObjectClass *klass, void *data) · line 632
Quoted 8 lines
hw/dma/xilinx_axidma.c +1
-1@@ -626,7 +626,7 @@ static void axidma_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->realize = xilinx_axidma_realize, + dc->realize = xilinx_axidma_realize; dc->reset = xilinx_axidma_reset;device_class_set_props (dc, axidma_properties); }
PATCH 6/10 hw/remote/message.c: Don't directly invoke DeviceClass:reset
In reply to Peter MaydellDirectly invoking the DeviceClass::reset method is a bad idea, because if the device is using three-phase reset then it relies on transitional reset machinery which is likely to disappear at some point.
Reset the device in the standard way, by calling device_cold_reset().
--- hw/remote/message.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
hw/remote/message.c +1 -4
@@ -215,13 +215,10 @@ fail:static void process_device_reset_msg (QIOChannel *ioc,PCIDevice *dev,Error **errp) { -DeviceClass *dc =DEVICE_GET_CLASS (dev);DeviceState *s =DEVICE (dev);MPQemuMsg ret = {0 }; -if (dc->reset) { - dc->reset (s); - } +device_cold_reset (s); ret.cmd =MPQEMU_CMD_RET ;
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 06/10] hw/remote/message.c: Don't directly invoke DeviceClass:reset
Quoted 11 lines · Peter Maydell
Directly invoking
theDeviceClass::resetmethod is a bad idea, because if the device is using three-phase reset then it relies on transitional reset machinery which is likely to disappear at some point.Reset the device in the standard way, by calling
device_cold_reset().Signed-off-by Peter Maydell<[email protected]>--- hw/remote/message.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
r~
Re: [PATCH for-9.2 06/10] hw/remote/message.c: Don't directly invoke DeviceClass:reset
In reply to Peter MaydellQuoted 4 lines · Peter Maydell
Directly invoking the
DeviceClass::resetmethod is a bad idea, because if the device is using three-phase reset then it relies on transitional reset machinery which is likely to disappear at some point.
This seems like fix-for-9.1 material.
Quoted 6 lines
Reset the device in the standard way, by calling
device_cold_reset().Signed-off-by Peter Maydell <[email protected]>--- hw/remote/message.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
PATCH 7/10 hw: Define new device_class_set_legacy_reset()
In reply to Peter MaydellDefine a device_class_set_legacy_reset() function which sets the DeviceClass::reset field. This serves two purposes:
* it makes it clearer to the person writing code that DeviceClass::reset is now legacy and they should look for the new alternative (which is Resettable)
* it makes it easier to rename the reset field (which in turn makes it easier to find places that call it)
The Coccinelle script can be used to automatically convert code that was doing an open-coded assignment to DeviceClass::reset to call device_class_set_legacy_reset() instead.
--- scripts/coccinelle/device-reset.cocci | 30 +++++++++++++++++++++++++++ include/hw/qdev-core.h | 13 ++++++++++++ hw/core/qdev.c | 5 +++++ 3 files changed, 48 insertions(+) create mode 100644 scripts/coccinelle/device-reset.cocci
scripts/coccinelle/device-reset.cocci new file +30 -0
@@ -0,0 +1,30 @@ +// Convert opencoded DeviceClass::reset assignments to calls to +// device_class_set_legacy_reset() +// +// Copyright Linaro Ltd 2024 +// This work is licensed under the terms of the GNU GPLv2 or later. +// +// spatch --macro-file scripts/cocci-macro-file.h \ +// --sp-file scripts/coccinelle/device-reset.cocci \ +// --keep-comments --smpl-spacing --in-place --include-headers --dir hw +// +// For simplicity we assume some things about the code we're modifying +// that happen to be true for all our targets: +// * all cpu_class_set_parent_reset() callsites have a 'DeviceClass *dc' local +// * the parent reset field in the target CPU class is 'parent_reset' +// * no reset function already has a 'dev' local + +@@ +identifier dc, resetfn; +@@ + DeviceClass *dc; + ... +- dc->reset = resetfn; ++ device_class_set_legacy_reset(dc, resetfn); +@@ +identifier dc, resetfn; +@@ + DeviceClass *dc; + ... +- dc->reset = &resetfn; ++ device_class_set_legacy_reset(dc, resetfn);
include/hw/qdev-core.h +13 -0
@@ -953,6 +953,19 @@ void device_class_set_parent_realize(DeviceClass *dc,DeviceRealize dev_realize, DeviceRealize *parent_realize); +/** +* device_class_set_legacy_reset(): set the DeviceClass::reset method +* @dc: The device class +* @dev_reset: the reset function +* +* This function sets the DeviceClass::reset method. This is widely +* used in existing code, but new code should prefer to use the +* Resettable API as documented in docs/devel/reset.rst. +* In addition, devices which need to chain to their parent class's +* reset methods or which need to be subclassed must use Resettable. +*/ +void device_class_set_legacy_reset (DeviceClass *dc, +DeviceReset dev_reset);/** * device_class_set_parent_unrealize() - set up for chaining unrealize fns
hw/core/qdev.c +5 -0
@@ -844,6 +844,11 @@ static void device_class_init(ObjectClass *class, void *data) offsetof(DeviceState, parent_bus), NULL, 0); } +void device_class_set_legacy_reset (DeviceClass *dc,DeviceReset dev_reset) +{ + dc->reset = dev_reset; +} +void device_class_set_parent_realize (DeviceClass *dc,DeviceRealize dev_realize,DeviceRealize *parent_realize)
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 07/10] hw: Define new device_class_set_legacy_reset()
Quoted 12 lines · Peter Maydell
Define a
device_class_set_legacy_reset()function which setstheDeviceClass::resetfield. This serves two purposes:
* it makes it clearer to the person writing code thatDeviceClass::resetis now legacy and they should look for the new alternative (which is Resettable)
* it makes it easier to rename the reset field (which in turn makes it easier to find places that call it)The Coccinelle script can be used to automatically convert code that was doing an open-coded assignment
toDeviceClass::resetto calldevice_class_set_legacy_reset()instead.
Quoted 7 lines
Signed-off-by Peter Maydell<[email protected]>--- scripts/coccinelle/device-reset.cocci | 30 +++++++++++++++++++++++++++ include/hw/qdev-core.h | 13 ++++++++++++ hw/core/qdev.c | 5 +++++ 3 files changed, 48 insertions(+)create mode 100644
scripts/coccinelle/device-reset.cocci
r~
Re: [PATCH for-9.2 07/10] hw: Define new device_class_set_legacy_reset()
In reply to Peter MaydellQuoted 12 lines · Peter Maydell
Define a
device_class_set_legacy_reset()function which sets theDeviceClass::resetfield. This serves two purposes:
* it makes it clearer to the person writing code thatDeviceClass::resetis now legacy and they should look for the new alternative (which is Resettable)
* it makes it easier to rename the reset field (which in turn makes it easier to find places that call it)The Coccinelle script can be used to automatically convert code that was doing an open-coded assignment to
DeviceClass::resetto calldevice_class_set_legacy_reset()instead.
Quoted 7 lines
Signed-off-by Peter Maydell <[email protected]>--- scripts/coccinelle/device-reset.cocci | 30 +++++++++++++++++++++++++++ include/hw/qdev-core.h | 13 ++++++++++++ hw/core/qdev.c | 5 +++++ 3 files changed, 48 insertions(+)create mode 100644
scripts/coccinelle/device-reset.cocci
PATCH 8/10 hw: Use device_class_set_legacy_reset() instead of opencoding
In reply to Peter MaydellUse device_class_set_legacy_reset() instead of opencoding an assignment to DeviceClass::reset. This change was produced with:
spatch --macro-file scripts/cocci-macro-file.h \
--sp-file scripts/coccinelle/device-reset.cocci \
--keep-comments --smpl-spacing --in-place --dir hw--- hw/acpi/erst.c | 2 +- hw/acpi/piix4.c | 2 +- hw/adc/aspeed_adc.c | 2 +- hw/adc/max111x.c | 2 +- hw/adc/stm32f2xx_adc.c | 2 +- hw/adc/zynq-xadc.c | 2 +- hw/arm/armsse.c | 2 +- hw/arm/highbank.c | 2 +- hw/arm/musicpal.c | 6 +++--- hw/arm/pxa2xx.c | 4 ++-- hw/arm/strongarm.c | 4 ++-- hw/audio/ac97.c | 2 +- hw/audio/cs4231.c | 2 +- hw/audio/cs4231a.c | 2 +- hw/audio/es1370.c | 2 +- hw/audio/hda-codec.c | 2 +- hw/audio/intel-hda.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- hw/audio/pl041.c | 2 +- hw/audio/via-ac97.c | 2 +- hw/block/fdc-isa.c | 2 +- hw/block/fdc-sysbus.c | 2 +- hw/block/m25p80.c | 2 +- hw/block/nand.c | 2 +- hw/block/onenand.c | 2 +- hw/block/pflash_cfi01.c | 2 +- hw/block/pflash_cfi02.c | 2 +- hw/block/swim.c | 2 +- hw/char/avr_usart.c | 2 +- hw/char/cmsdk-apb-uart.c | 2 +- hw/char/digic-uart.c | 2 +- hw/char/escc.c | 2 +- hw/char/etraxfs_ser.c | 2 +- hw/char/exynos4210_uart.c | 2 +- hw/char/goldfish_tty.c | 2 +- hw/char/grlib_apbuart.c | 2 +- hw/char/ibex_uart.c | 2 +- hw/char/imx_serial.c | 2 +- hw/char/mcf_uart.c | 2 +- hw/char/mchp_pfsoc_mmuart.c | 2 +- hw/char/nrf51_uart.c | 2 +- hw/char/pl011.c | 2 +- hw/char/renesas_sci.c | 2 +- hw/char/sclpconsole-lm.c | 2 +- hw/char/sclpconsole.c | 2 +- hw/char/sh_serial.c | 2 +- hw/char/shakti_uart.c | 2 +- hw/char/stm32f2xx_usart.c | 2 +- hw/char/xilinx_uartlite.c | 2 +- hw/core/or-irq.c | 2 +- hw/core/qdev.c | 2 +- hw/cxl/switch-mailbox-cci.c | 2 +- hw/display/artist.c | 2 +- hw/display/ati.c | 2 +- hw/display/bcm2835_fb.c | 2 +- hw/display/cg3.c | 2 +- hw/display/dpcd.c | 2 +- hw/display/exynos4210_fimd.c | 2 +- hw/display/g364fb.c | 2 +- hw/display/i2c-ddc.c | 2 +- hw/display/jazz_led.c | 2 +- hw/display/macfb.c | 4 ++-- hw/display/qxl.c | 2 +- hw/display/sii9022.c | 2 +- hw/display/sm501.c | 4 ++-- hw/display/tcx.c | 2 +- hw/display/vga-isa.c | 2 +- hw/display/vga-mmio.c | 2 +- hw/display/vga-pci.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/display/xlnx_dp.c | 2 +- hw/dma/bcm2835_dma.c | 2 +- hw/dma/i8257.c | 2 +- hw/dma/pl080.c | 2 +- hw/dma/pl330.c | 2 +- hw/dma/rc4030.c | 2 +- hw/dma/sparc32_dma.c | 2 +- hw/dma/xilinx_axidma.c | 2 +- hw/dma/xlnx-zdma.c | 2 +- hw/dma/xlnx-zynq-devcfg.c | 2 +- hw/dma/xlnx_csu_dma.c | 2 +- hw/dma/xlnx_dpdma.c | 2 +- hw/fsi/aspeed_apb2opb.c | 2 +- hw/fsi/fsi-master.c | 2 +- hw/fsi/fsi.c | 2 +- hw/fsi/lbus.c | 2 +- hw/gpio/aspeed_gpio.c | 2 +- hw/gpio/bcm2835_gpio.c | 2 +- hw/gpio/bcm2838_gpio.c | 2 +- hw/gpio/gpio_key.c | 2 +- hw/gpio/imx_gpio.c | 2 +- hw/gpio/max7310.c | 2 +- hw/gpio/mpc8xxx.c | 2 +- hw/gpio/nrf51_gpio.c | 2 +- hw/gpio/omap_gpio.c | 4 ++-- hw/gpio/pca9552.c | 2 +- hw/gpio/pca9554.c | 2 +- hw/gpio/pcf8574.c | 2 +- hw/gpio/sifive_gpio.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/hyperv/vmbus.c | 2 +- hw/i2c/aspeed_i2c.c | 4 ++-- hw/i2c/bcm2835_i2c.c | 2 +- hw/i2c/exynos4210_i2c.c | 2 +- hw/i2c/imx_i2c.c | 2 +- hw/i2c/microbit_i2c.c | 2 +- hw/i2c/mpc_i2c.c | 2 +- hw/i2c/omap_i2c.c | 2 +- hw/i2c/ppc4xx_i2c.c | 2 +- hw/i2c/smbus_eeprom.c | 2 +- hw/i386/amd_iommu.c | 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/i8254.c | 2 +- hw/i386/kvm/i8259.c | 2 +- hw/i386/kvm/ioapic.c | 2 +- hw/i386/kvm/xen_overlay.c | 2 +- hw/i386/port92.c | 2 +- hw/i386/vapic.c | 2 +- hw/i386/vmmouse.c | 2 +- hw/i386/xen/xen_platform.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/ich.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/piix.c | 4 ++-- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- hw/input/adb-kbd.c | 2 +- hw/input/adb-mouse.c | 2 +- hw/input/lm832x.c | 2 +- hw/input/pckbd.c | 4 ++-- hw/intc/allwinner-a10-pic.c | 2 +- hw/intc/apic_common.c | 2 +- hw/intc/armv7m_nvic.c | 2 +- hw/intc/aspeed_intc.c | 2 +- hw/intc/aspeed_vic.c | 2 +- hw/intc/bcm2835_ic.c | 2 +- hw/intc/bcm2836_control.c | 2 +- hw/intc/exynos4210_combiner.c | 2 +- hw/intc/goldfish_pic.c | 2 +- hw/intc/grlib_irqmp.c | 2 +- hw/intc/heathrow_pic.c | 2 +- hw/intc/i8259.c | 2 +- hw/intc/imx_avic.c | 2 +- hw/intc/imx_gpcv2.c | 2 +- hw/intc/ioapic.c | 2 +- hw/intc/loongarch_extioi.c | 2 +- hw/intc/loongarch_pch_pic.c | 2 +- hw/intc/m68k_irqc.c | 2 +- hw/intc/omap_intc.c | 4 ++-- hw/intc/openpic.c | 2 +- hw/intc/openpic_kvm.c | 2 +- hw/intc/pl190.c | 2 +- hw/intc/ppc-uic.c | 2 +- hw/intc/s390_flic.c | 2 +- hw/intc/s390_flic_kvm.c | 2 +- hw/intc/sifive_plic.c | 2 +- hw/intc/slavio_intctl.c | 2 +- hw/intc/xlnx-pmu-iomod-intc.c | 2 +- hw/intc/xlnx-zynqmp-ipi.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/pc87312.c | 2 +- hw/isa/piix.c | 2 +- hw/isa/vt82c686.c | 10 +++++----- hw/m68k/mcf5206.c | 2 +- hw/m68k/mcf_intc.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/m68k/next-kbd.c | 2 +- hw/mem/cxl_type3.c | 2 +- hw/misc/a9scu.c | 2 +- hw/misc/allwinner-cpucfg.c | 2 +- hw/misc/allwinner-h3-ccu.c | 2 +- hw/misc/allwinner-h3-dramc.c | 2 +- hw/misc/allwinner-h3-sysctrl.c | 2 +- hw/misc/allwinner-r40-ccu.c | 2 +- hw/misc/allwinner-r40-dramc.c | 2 +- hw/misc/allwinner-sid.c | 2 +- hw/misc/allwinner-sramc.c | 2 +- hw/misc/applesmc.c | 2 +- hw/misc/arm_l2x0.c | 2 +- hw/misc/arm_sysctl.c | 2 +- hw/misc/armsse-cpu-pwrctrl.c | 2 +- hw/misc/armsse-mhu.c | 2 +- hw/misc/aspeed_hace.c | 2 +- hw/misc/aspeed_i3c.c | 4 ++-- hw/misc/aspeed_lpc.c | 2 +- hw/misc/aspeed_peci.c | 2 +- hw/misc/aspeed_sbc.c | 2 +- hw/misc/aspeed_scu.c | 10 +++++----- hw/misc/aspeed_sdmc.c | 4 ++-- hw/misc/aspeed_xdma.c | 2 +- hw/misc/avr_power.c | 2 +- hw/misc/bcm2835_cprman.c | 8 ++++---- hw/misc/bcm2835_mbox.c | 2 +- hw/misc/bcm2835_mphi.c | 2 +- hw/misc/bcm2835_powermgt.c | 2 +- hw/misc/bcm2835_rng.c | 2 +- hw/misc/bcm2835_thermal.c | 2 +- hw/misc/eccmemctl.c | 2 +- hw/misc/exynos4210_clk.c | 2 +- hw/misc/exynos4210_pmu.c | 2 +- hw/misc/exynos4210_rng.c | 2 +- hw/misc/imx25_ccm.c | 2 +- hw/misc/imx31_ccm.c | 2 +- hw/misc/imx6_ccm.c | 2 +- hw/misc/imx6_src.c | 2 +- hw/misc/imx6ul_ccm.c | 2 +- hw/misc/imx7_ccm.c | 4 ++-- hw/misc/imx7_snvs.c | 2 +- hw/misc/imx7_src.c | 2 +- hw/misc/imx_rngc.c | 2 +- hw/misc/iotkit-secctl.c | 2 +- hw/misc/iotkit-sysctl.c | 2 +- hw/misc/ivshmem.c | 2 +- hw/misc/lasi.c | 2 +- hw/misc/led.c | 2 +- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/gpio.c | 2 +- hw/misc/macio/mac_dbdma.c | 2 +- hw/misc/macio/pmu.c | 2 +- hw/misc/mips_cmgcr.c | 2 +- hw/misc/mips_cpc.c | 2 +- hw/misc/mips_itu.c | 2 +- hw/misc/mps2-fpgaio.c | 2 +- hw/misc/mps2-scc.c | 2 +- hw/misc/msf2-sysreg.c | 2 +- hw/misc/nrf51_rng.c | 2 +- hw/misc/pci-testdev.c | 2 +- hw/misc/sifive_e_aon.c | 2 +- hw/misc/sifive_u_prci.c | 2 +- hw/misc/slavio_misc.c | 2 +- hw/misc/stm32f2xx_syscfg.c | 2 +- hw/misc/stm32f4xx_exti.c | 2 +- hw/misc/stm32f4xx_syscfg.c | 2 +- hw/misc/tz-mpc.c | 2 +- hw/misc/tz-msc.c | 2 +- hw/misc/tz-ppc.c | 2 +- hw/misc/virt_ctrl.c | 2 +- hw/misc/xlnx-versal-cfu.c | 2 +- hw/net/allwinner-sun8i-emac.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/cadence_gem.c | 2 +- hw/net/can/can_kvaser_pci.c | 2 +- hw/net/can/can_mioe3680_pci.c | 2 +- hw/net/can/can_pcm3680_pci.c | 2 +- hw/net/can/ctucan_pci.c | 2 +- hw/net/can/xlnx-versal-canfd.c | 2 +- hw/net/dp8393x.c | 2 +- hw/net/etraxfs_eth.c | 2 +- hw/net/fsl_etsec/etsec.c | 2 +- hw/net/ftgmac100.c | 4 ++-- hw/net/imx_fec.c | 2 +- hw/net/lan9118.c | 2 +- hw/net/lance.c | 2 +- hw/net/lasi_i82596.c | 2 +- hw/net/mcf_fec.c | 2 +- hw/net/mipsnet.c | 2 +- hw/net/msf2-emac.c | 2 +- hw/net/npcm7xx_emc.c | 2 +- hw/net/npcm_gmac.c | 2 +- hw/net/opencores_eth.c | 2 +- hw/net/pcnet-pci.c | 2 +- hw/net/rocker/rocker.c | 2 +- hw/net/rtl8139.c | 2 +- hw/net/smc91c111.c | 2 +- hw/net/stellaris_enet.c | 2 +- hw/net/sungem.c | 2 +- hw/net/sunhme.c | 2 +- hw/net/tulip.c | 2 +- hw/net/vmxnet3.c | 2 +- hw/net/xilinx_axienet.c | 2 +- hw/net/xilinx_ethlite.c | 2 +- hw/nvme/ctrl.c | 2 +- hw/nvram/eeprom_at24c.c | 2 +- hw/nvram/fw_cfg.c | 2 +- hw/nvram/mac_nvram.c | 2 +- hw/nvram/nrf51_nvm.c | 2 +- hw/pci-bridge/cxl_downstream.c | 2 +- hw/pci-bridge/cxl_upstream.c | 2 +- hw/pci-bridge/i82801b11.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 2 +- hw/pci-bridge/pcie_pci_bridge.c | 2 +- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-bridge/xio3130_upstream.c | 2 +- hw/pci-host/astro.c | 4 ++-- hw/pci-host/designware.c | 2 +- hw/pci-host/dino.c | 2 +- hw/pci-host/gt64120.c | 2 +- hw/pci-host/mv64361.c | 2 +- hw/pci-host/ppc440_pcix.c | 2 +- hw/pci-host/q35.c | 2 +- hw/pci-host/sabre.c | 2 +- hw/pci-host/versatile.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/ppc/pnv_psi.c | 4 ++-- hw/ppc/ppc405_boards.c | 2 +- hw/ppc/ppc405_uc.c | 12 ++++++------ hw/ppc/ppc4xx_devs.c | 6 +++--- hw/ppc/ppc4xx_sdram.c | 4 ++-- hw/ppc/ppce500_spin.c | 2 +- hw/ppc/spapr_cpu_core.c | 2 +- hw/ppc/spapr_iommu.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_vio.c | 2 +- hw/remote/proxy.c | 2 +- hw/rtc/allwinner-rtc.c | 2 +- hw/rtc/aspeed_rtc.c | 2 +- hw/rtc/ds1338.c | 2 +- hw/rtc/exynos4210_rtc.c | 2 +- hw/rtc/goldfish_rtc.c | 2 +- hw/rtc/ls7a_rtc.c | 2 +- hw/rtc/m48t59-isa.c | 2 +- hw/rtc/m48t59.c | 2 +- hw/rtc/xlnx-zynqmp-rtc.c | 2 +- hw/s390x/ccw-device.c | 2 +- hw/s390x/event-facility.c | 2 +- hw/s390x/ipl.c | 2 +- hw/s390x/s390-pci-bus.c | 4 ++-- hw/s390x/sclpquiesce.c | 2 +- hw/scsi/esp-pci.c | 2 +- hw/scsi/esp.c | 2 +- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/megasas.c | 2 +- hw/scsi/mptsas.c | 2 +- hw/scsi/scsi-disk.c | 2 +- hw/scsi/scsi-generic.c | 2 +- hw/scsi/vmw_pvscsi.c | 2 +- hw/sd/allwinner-sdhost.c | 2 +- hw/sd/aspeed_sdhci.c | 2 +- hw/sd/bcm2835_sdhost.c | 2 +- hw/sd/cadence_sdhci.c | 2 +- hw/sd/npcm7xx_sdhci.c | 2 +- hw/sd/pl181.c | 2 +- hw/sd/pxa2xx_mmci.c | 2 +- hw/sd/sd.c | 2 +- hw/sd/sdhci.c | 2 +- hw/sd/ssi-sd.c | 2 +- hw/sensor/dps310.c | 2 +- hw/sensor/emc141x.c | 2 +- hw/sensor/lsm303dlhc_mag.c | 2 +- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u_iommu.c | 2 +- hw/ssi/aspeed_smc.c | 2 +- hw/ssi/bcm2835_spi.c | 2 +- hw/ssi/ibex_spi_host.c | 2 +- hw/ssi/imx_spi.c | 2 +- hw/ssi/mss-spi.c | 2 +- hw/ssi/pl022.c | 2 +- hw/ssi/pnv_spi.c | 2 +- hw/ssi/sifive_spi.c | 2 +- hw/ssi/stm32f2xx_spi.c | 2 +- hw/ssi/xilinx_spi.c | 2 +- hw/ssi/xilinx_spips.c | 4 ++-- hw/ssi/xlnx-versal-ospi.c | 2 +- hw/timer/a9gtimer.c | 2 +- hw/timer/allwinner-a10-pit.c | 2 +- hw/timer/arm_mptimer.c | 2 +- hw/timer/armv7m_systick.c | 2 +- hw/timer/aspeed_timer.c | 2 +- hw/timer/avr_timer16.c | 2 +- hw/timer/bcm2835_systmr.c | 2 +- hw/timer/cmsdk-apb-dualtimer.c | 2 +- hw/timer/cmsdk-apb-timer.c | 2 +- hw/timer/digic-timer.c | 2 +- hw/timer/exynos4210_mct.c | 2 +- hw/timer/exynos4210_pwm.c | 2 +- hw/timer/grlib_gptimer.c | 2 +- hw/timer/hpet.c | 2 +- hw/timer/i8254.c | 2 +- hw/timer/ibex_timer.c | 2 +- hw/timer/imx_epit.c | 2 +- hw/timer/imx_gpt.c | 2 +- hw/timer/nrf51_timer.c | 2 +- hw/timer/renesas_cmt.c | 2 +- hw/timer/renesas_tmr.c | 2 +- hw/timer/sifive_pwm.c | 2 +- hw/timer/slavio_timer.c | 2 +- hw/timer/sse-counter.c | 2 +- hw/timer/sse-timer.c | 2 +- hw/timer/stm32f2xx_timer.c | 2 +- hw/tpm/tpm_tis_i2c.c | 2 +- hw/tpm/tpm_tis_isa.c | 2 +- hw/tpm/tpm_tis_sysbus.c | 2 +- hw/tricore/tricore_testdevice.c | 2 +- hw/usb/hcd-dwc3.c | 2 +- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-ehci-sysbus.c | 2 +- hw/usb/hcd-ohci-pci.c | 2 +- hw/usb/hcd-ohci-sysbus.c | 2 +- hw/usb/hcd-uhci.c | 2 +- hw/usb/hcd-xhci-pci.c | 2 +- hw/usb/hcd-xhci-sysbus.c | 2 +- hw/usb/hcd-xhci.c | 2 +- hw/usb/imx-usb-phy.c | 2 +- hw/usb/tusb6010.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/pci.c | 2 +- hw/virtio/virtio-mmio.c | 2 +- hw/watchdog/cmsdk-apb-watchdog.c | 2 +- hw/watchdog/sbsa_gwdt.c | 2 +- hw/watchdog/wdt_aspeed.c | 2 +- hw/watchdog/wdt_diag288.c | 2 +- hw/watchdog/wdt_i6300esb.c | 2 +- hw/watchdog/wdt_ib700.c | 2 +- hw/watchdog/wdt_imx2.c | 2 +- 411 files changed, 449 insertions(+), 449 deletions(-)
hw/acpi/erst.c +1 -1
@@ -1030,7 +1030,7 @@ static void erst_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_REDHAT_ACPI_ERST ; k->revision =0x00 ; k->class_id =PCI_CLASS_OTHERS ; - dc->reset = erst_reset; +device_class_set_legacy_reset (dc, erst_reset); dc->vmsd = &erst_vmstate; dc->user_creatable = true; dc->hotpluggable = false;
hw/acpi/piix4.c +1 -1
@@ -633,7 +633,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_INTEL_82371AB_3 ; k->revision =0x03 ; k->class_id =PCI_CLASS_BRIDGE_OTHER ; - dc->reset = piix4_pm_reset; +device_class_set_legacy_reset (dc, piix4_pm_reset); dc->desc ="PM" ; dc->vmsd = &vmstate_acpi;device_class_set_props (dc, piix4_pm_properties);
hw/adc/aspeed_adc.c +1 -1
@@ -297,7 +297,7 @@ static void aspeed_adc_engine_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_adc_engine_realize; - dc->reset = aspeed_adc_engine_reset; +device_class_set_legacy_reset (dc, aspeed_adc_engine_reset);device_class_set_props (dc, aspeed_adc_engine_properties); dc->desc ="Aspeed Analog-to-Digital Engine" ; dc->vmsd = &vmstate_aspeed_adc_engine;
hw/adc/max111x.c +1 -1
@@ -183,7 +183,7 @@ static void max111x_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); k->transfer = max111x_transfer; - dc->reset = max111x_reset; +device_class_set_legacy_reset (dc, max111x_reset); dc->vmsd = &vmstate_max111x;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/adc/stm32f2xx_adc.c +1 -1
@@ -288,7 +288,7 @@ static void stm32f2xx_adc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = stm32f2xx_adc_reset; +device_class_set_legacy_reset (dc, stm32f2xx_adc_reset); dc->vmsd = &vmstate_stm32f2xx_adc; }
hw/adc/zynq-xadc.c +1 -1
@@ -286,7 +286,7 @@ static void zynq_xadc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_zynq_xadc; - dc->reset = zynq_xadc_reset; +device_class_set_legacy_reset (dc, zynq_xadc_reset); }static const TypeInfo zynq_xadc_info = {
hw/arm/armsse.c +1 -1
@@ -1700,7 +1700,7 @@ static void armsse_class_init(ObjectClass *klass, void *data) dc->realize = armsse_realize; dc->vmsd = &armsse_vmstate;device_class_set_props (dc, info->props); - dc->reset = armsse_reset; +device_class_set_legacy_reset (dc, armsse_reset); iic->check = armsse_idau_check; asc->info = info; }
hw/arm/highbank.c +1 -1
@@ -145,7 +145,7 @@ static void highbank_regs_class_init(ObjectClass *klass, void *data) dc->desc ="Calxeda Highbank registers" ; dc->vmsd = &vmstate_highbank_regs; - dc->reset = highbank_regs_reset; +device_class_set_legacy_reset (dc, highbank_regs_reset); }static const TypeInfo highbank_regs_info = {
hw/arm/musicpal.c +3 -3
@@ -411,7 +411,7 @@ static void mv88w8618_pic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = mv88w8618_pic_reset; +device_class_set_legacy_reset (dc, mv88w8618_pic_reset); dc->vmsd = &mv88w8618_pic_vmsd; }
@@ -605,7 +605,7 @@ static void mv88w8618_pit_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = mv88w8618_pit_reset; +device_class_set_legacy_reset (dc, mv88w8618_pit_reset); dc->vmsd = &mv88w8618_pit_vmsd; }
@@ -1030,7 +1030,7 @@ static void musicpal_gpio_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = musicpal_gpio_reset; +device_class_set_legacy_reset (dc, musicpal_gpio_reset); dc->vmsd = &musicpal_gpio_vmsd; }
hw/arm/pxa2xx.c +2 -2
@@ -2051,7 +2051,7 @@ static void pxa2xx_fir_class_init(ObjectClass *klass, void *data) dc->realize = pxa2xx_fir_realize; dc->vmsd = &pxa2xx_fir_vmsd;device_class_set_props (dc, pxa2xx_fir_properties); - dc->reset = pxa2xx_fir_reset; +device_class_set_legacy_reset (dc, pxa2xx_fir_reset); }static const TypeInfo pxa2xx_fir_info = {
@@ -2369,7 +2369,7 @@ static void pxa2xx_ssp_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = pxa2xx_ssp_reset; +device_class_set_legacy_reset (dc, pxa2xx_ssp_reset); dc->vmsd = &vmstate_pxa2xx_ssp; }
hw/arm/strongarm.c +2 -2
@@ -1342,7 +1342,7 @@ static void strongarm_uart_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="StrongARM UART controller" ; - dc->reset = strongarm_uart_reset; +device_class_set_legacy_reset (dc, strongarm_uart_reset); dc->vmsd = &vmstate_strongarm_uart_regs;device_class_set_props (dc, strongarm_uart_properties); dc->realize = strongarm_uart_realize;
@@ -1595,7 +1595,7 @@ static void strongarm_ssp_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="StrongARM SSP controller" ; - dc->reset = strongarm_ssp_reset; +device_class_set_legacy_reset (dc, strongarm_ssp_reset); dc->vmsd = &vmstate_strongarm_ssp_regs; }
hw/audio/ac97.c +1 -1
@@ -1344,7 +1344,7 @@ static void ac97_class_init(ObjectClass *klass, void *data) dc->desc ="Intel 82801AA AC97 Audio" ; dc->vmsd = &vmstate_ac97;device_class_set_props (dc, ac97_properties); - dc->reset = ac97_on_reset; +device_class_set_legacy_reset (dc, ac97_on_reset); }static const TypeInfo ac97_info = {
hw/audio/cs4231.c +1 -1
@@ -164,7 +164,7 @@ static void cs4231_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = cs_reset; +device_class_set_legacy_reset (dc, cs_reset); dc->vmsd = &vmstate_cs4231; }
hw/audio/cs4231a.c +1 -1
@@ -702,7 +702,7 @@ static void cs4231a_class_initfn (ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = cs4231a_realizefn; - dc->reset = cs4231a_reset; +device_class_set_legacy_reset (dc, cs4231a_reset);set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc ="Crystal Semiconductor CS4231A" ; dc->vmsd = &vmstate_cs4231a;
hw/audio/es1370.c +1 -1
@@ -888,7 +888,7 @@ static void es1370_class_init (ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc ="ENSONIQ AudioPCI ES1370" ; dc->vmsd = &vmstate_es1370; - dc->reset = es1370_on_reset; +device_class_set_legacy_reset (dc, es1370_on_reset);device_class_set_props (dc, es1370_properties); }
hw/audio/hda-codec.c +1 -1
@@ -910,7 +910,7 @@ static void hda_audio_base_class_init(ObjectClass *klass, void *data) k->command = hda_audio_command; k->stream = hda_audio_stream;set_bit (DEVICE_CATEGORY_SOUND , dc->categories); - dc->reset = hda_audio_reset; +device_class_set_legacy_reset (dc, hda_audio_reset); dc->vmsd = &vmstate_hda_audio;device_class_set_props (dc, hda_audio_properties); }
hw/audio/intel-hda.c +1 -1
@@ -1231,7 +1231,7 @@ static void intel_hda_class_init(ObjectClass *klass, void *data) k->exit = intel_hda_exit; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->class_id =PCI_CLASS_MULTIMEDIA_HD_AUDIO ; - dc->reset = intel_hda_reset; +device_class_set_legacy_reset (dc, intel_hda_reset); dc->vmsd = &vmstate_intel_hda;device_class_set_props (dc, intel_hda_properties); }
hw/audio/marvell_88w8618.c +1 -1
@@ -292,7 +292,7 @@ static void mv88w8618_audio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = mv88w8618_audio_realize; - dc->reset = mv88w8618_audio_reset; +device_class_set_legacy_reset (dc, mv88w8618_audio_reset); dc->vmsd = &mv88w8618_audio_vmsd; dc->user_creatable = false; }
hw/audio/pl041.c +1 -1
@@ -639,7 +639,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data) dc->realize = pl041_realize;set_bit (DEVICE_CATEGORY_SOUND , dc->categories); - dc->reset = pl041_device_reset; +device_class_set_legacy_reset (dc, pl041_device_reset); dc->vmsd = &vmstate_pl041;device_class_set_props (dc, pl041_device_properties); }
hw/audio/via-ac97.c +1 -1
@@ -478,7 +478,7 @@ static void via_ac97_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, via_ac97_properties);set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc ="VIA AC97" ; - dc->reset = via_ac97_reset; +device_class_set_legacy_reset (dc, via_ac97_reset);/* Reason: Part of a south bridge chip */ dc->user_creatable = false; }
hw/block/fdc-isa.c +1 -1
@@ -307,7 +307,7 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data) dc->desc ="virtual floppy controller" ; dc->realize = isabus_fdc_realize; dc->fw_name ="fdc" ; - dc->reset = fdctrl_external_reset_isa; +device_class_set_legacy_reset (dc, fdctrl_external_reset_isa); dc->vmsd = &vmstate_isa_fdc; adevc->build_dev_aml = build_fdc_aml;device_class_set_props (dc, isa_fdc_properties);
hw/block/fdc-sysbus.c +1 -1
@@ -181,7 +181,7 @@ static void sysbus_fdc_common_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = sysbus_fdc_realize; - dc->reset = fdctrl_external_reset_sysbus; +device_class_set_legacy_reset (dc, fdctrl_external_reset_sysbus); dc->vmsd = &vmstate_sysbus_fdc;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/block/m25p80.c +1 -1
@@ -1824,7 +1824,7 @@ static void m25p80_class_init(ObjectClass *klass, void *data) k->cs_polarity =SSI_CS_LOW ; dc->vmsd = &vmstate_m25p80;device_class_set_props (dc, m25p80_properties); - dc->reset = m25p80_reset; +device_class_set_legacy_reset (dc, m25p80_reset); mc->pi = data; }
hw/block/nand.c +1 -1
@@ -457,7 +457,7 @@ static void nand_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = nand_realize; - dc->reset = nand_reset; +device_class_set_legacy_reset (dc, nand_reset); dc->vmsd = &vmstate_nand;device_class_set_props (dc, nand_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories);
hw/block/onenand.c +1 -1
@@ -846,7 +846,7 @@ static void onenand_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = onenand_realize; - dc->reset = onenand_system_reset; +device_class_set_legacy_reset (dc, onenand_system_reset);device_class_set_props (dc, onenand_properties); }
hw/block/pflash_cfi01.c +1 -1
@@ -940,7 +940,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = pflash_cfi01_system_reset; +device_class_set_legacy_reset (dc, pflash_cfi01_system_reset); dc->realize = pflash_cfi01_realize;device_class_set_props (dc, pflash_cfi01_properties); dc->vmsd = &vmstate_pflash;
hw/block/pflash_cfi02.c +1 -1
@@ -974,7 +974,7 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = pflash_cfi02_realize; - dc->reset = pflash_cfi02_reset; +device_class_set_legacy_reset (dc, pflash_cfi02_reset); dc->unrealize = pflash_cfi02_unrealize;device_class_set_props (dc, pflash_cfi02_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories);
hw/block/swim.c +1 -1
@@ -556,7 +556,7 @@ static void sysbus_swim_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = sysbus_swim_realize; - dc->reset = sysbus_swim_reset; +device_class_set_legacy_reset (dc, sysbus_swim_reset); dc->vmsd = &vmstate_sysbus_swim; }
hw/char/avr_usart.c +1 -1
@@ -300,7 +300,7 @@ static void avr_usart_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = avr_usart_reset; +device_class_set_legacy_reset (dc, avr_usart_reset);device_class_set_props (dc, avr_usart_properties); dc->realize = avr_usart_realize; }
hw/char/cmsdk-apb-uart.c +1 -1
@@ -389,7 +389,7 @@ static void cmsdk_apb_uart_class_init(ObjectClass *klass, void *data) dc->realize = cmsdk_apb_uart_realize; dc->vmsd = &cmsdk_apb_uart_vmstate; - dc->reset = cmsdk_apb_uart_reset; +device_class_set_legacy_reset (dc, cmsdk_apb_uart_reset);device_class_set_props (dc, cmsdk_apb_uart_properties); }
hw/char/digic-uart.c +1 -1
@@ -182,7 +182,7 @@ static void digic_uart_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = digic_uart_realize; - dc->reset = digic_uart_reset; +device_class_set_legacy_reset (dc, digic_uart_reset); dc->vmsd = &vmstate_digic_uart;device_class_set_props (dc, digic_uart_properties); }
hw/char/escc.c +1 -1
@@ -1062,7 +1062,7 @@ static void escc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = escc_reset; +device_class_set_legacy_reset (dc, escc_reset); dc->realize = escc_realize; dc->vmsd = &vmstate_escc;device_class_set_props (dc, escc_properties);
hw/char/etraxfs_ser.c +1 -1
@@ -246,7 +246,7 @@ static void etraxfs_ser_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = etraxfs_ser_reset; +device_class_set_legacy_reset (dc, etraxfs_ser_reset);device_class_set_props (dc, etraxfs_ser_properties); dc->realize = etraxfs_ser_realize; }
hw/char/exynos4210_uart.c +1 -1
@@ -717,7 +717,7 @@ static void exynos4210_uart_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = exynos4210_uart_realize; - dc->reset = exynos4210_uart_reset; +device_class_set_legacy_reset (dc, exynos4210_uart_reset);device_class_set_props (dc, exynos4210_uart_properties); dc->vmsd = &vmstate_exynos4210_uart; }
hw/char/goldfish_tty.c +1 -1
@@ -262,7 +262,7 @@ static void goldfish_tty_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);device_class_set_props (dc, goldfish_tty_properties); - dc->reset = goldfish_tty_reset; +device_class_set_legacy_reset (dc, goldfish_tty_reset); dc->realize = goldfish_tty_realize; dc->unrealize = goldfish_tty_unrealize; dc->vmsd = &vmstate_goldfish_tty;
hw/char/grlib_apbuart.c +1 -1
@@ -287,7 +287,7 @@ static void grlib_apbuart_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = grlib_apbuart_realize; - dc->reset = grlib_apbuart_reset; +device_class_set_legacy_reset (dc, grlib_apbuart_reset);device_class_set_props (dc, grlib_apbuart_properties); }
hw/char/ibex_uart.c +1 -1
@@ -547,7 +547,7 @@ static void ibex_uart_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = ibex_uart_reset; +device_class_set_legacy_reset (dc, ibex_uart_reset); dc->realize = ibex_uart_realize; dc->vmsd = &vmstate_ibex_uart;device_class_set_props (dc, ibex_uart_properties);
hw/char/imx_serial.c +1 -1
@@ -449,7 +449,7 @@ static void imx_serial_class_init(ObjectClass *klass, void *data) dc->realize = imx_serial_realize; dc->vmsd = &vmstate_imx_serial; - dc->reset = imx_serial_reset_at_boot; +device_class_set_legacy_reset (dc, imx_serial_reset_at_boot);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); dc->desc ="i.MX series UART" ;device_class_set_props (dc, imx_serial_properties);
hw/char/mcf_uart.c +1 -1
@@ -322,7 +322,7 @@ static void mcf_uart_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = mcf_uart_realize; - dc->reset = mcf_uart_reset; +device_class_set_legacy_reset (dc, mcf_uart_reset);device_class_set_props (dc, mcf_uart_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/mchp_pfsoc_mmuart.c +1 -1
@@ -126,7 +126,7 @@ static void mchp_pfsoc_mmuart_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = mchp_pfsoc_mmuart_realize; - dc->reset = mchp_pfsoc_mmuart_reset; +device_class_set_legacy_reset (dc, mchp_pfsoc_mmuart_reset); dc->vmsd = &mchp_pfsoc_mmuart_vmstate;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/nrf51_uart.c +1 -1
@@ -313,7 +313,7 @@ static void nrf51_uart_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = nrf51_uart_reset; +device_class_set_legacy_reset (dc, nrf51_uart_reset); dc->realize = nrf51_uart_realize;device_class_set_props (dc, nrf51_uart_properties); dc->vmsd = &nrf51_uart_vmstate;
hw/char/pl011.c +1 -1
@@ -629,7 +629,7 @@ static void pl011_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = pl011_realize; - dc->reset = pl011_reset; +device_class_set_legacy_reset (dc, pl011_reset); dc->vmsd = &vmstate_pl011;device_class_set_props (dc, pl011_properties); }
hw/char/renesas_sci.c +1 -1
@@ -331,7 +331,7 @@ static void rsci_class_init(ObjectClass *klass, void *data) dc->realize = rsci_realize; dc->vmsd = &vmstate_rsci; - dc->reset = rsci_reset; +device_class_set_legacy_reset (dc, rsci_reset);device_class_set_props (dc, rsci_properties); }
hw/char/sclpconsole-lm.c +1 -1
@@ -346,7 +346,7 @@ static void console_class_init(ObjectClass *klass, void *data)SCLPEventClass *ec =SCLP_EVENT_CLASS (klass);device_class_set_props (dc, console_properties); - dc->reset = console_reset; +device_class_set_legacy_reset (dc, console_reset); dc->vmsd = &vmstate_sclplmconsole; ec->init = console_init; ec->get_send_mask = send_mask;
hw/char/sclpconsole.c +1 -1
@@ -262,7 +262,7 @@ static void console_class_init(ObjectClass *klass, void *data)SCLPEventClass *ec =SCLP_EVENT_CLASS (klass);device_class_set_props (dc, console_properties); - dc->reset = console_reset; +device_class_set_legacy_reset (dc, console_reset); dc->vmsd = &vmstate_sclpconsole; ec->init = console_init; ec->get_send_mask = send_mask;
hw/char/sh_serial.c +1 -1
@@ -459,7 +459,7 @@ static void sh_serial_class_init(ObjectClass *oc, void *data)device_class_set_props (dc, sh_serial_properties); dc->realize = sh_serial_realize; - dc->reset = sh_serial_reset; +device_class_set_legacy_reset (dc, sh_serial_reset);/* Reason: part of SuperH CPU/SoC, needs to be wired up */ dc->user_creatable = false; }
hw/char/shakti_uart.c +1 -1
@@ -165,7 +165,7 @@ static Property shakti_uart_properties[] = {static void shakti_uart_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = shakti_uart_reset; +device_class_set_legacy_reset (dc, shakti_uart_reset); dc->realize = shakti_uart_realize;device_class_set_props (dc, shakti_uart_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories);
hw/char/stm32f2xx_usart.c +1 -1
@@ -228,7 +228,7 @@ static void stm32f2xx_usart_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = stm32f2xx_usart_reset; +device_class_set_legacy_reset (dc, stm32f2xx_usart_reset);device_class_set_props (dc, stm32f2xx_usart_properties); dc->realize = stm32f2xx_usart_realize; }
hw/char/xilinx_uartlite.c +1 -1
@@ -234,7 +234,7 @@ static void xilinx_uartlite_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = xilinx_uartlite_reset; +device_class_set_legacy_reset (dc, xilinx_uartlite_reset); dc->realize = xilinx_uartlite_realize;device_class_set_props (dc, xilinx_uartlite_properties); }
hw/core/or-irq.c +1 -1
@@ -124,7 +124,7 @@ static void or_irq_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = or_irq_reset; +device_class_set_legacy_reset (dc, or_irq_reset);device_class_set_props (dc, or_irq_properties); dc->realize = or_irq_realize; dc->vmsd = &vmstate_or_irq;
hw/core/qdev.c +1 -1
@@ -831,7 +831,7 @@ static void device_class_init(ObjectClass *class, void *data)* will be registered as the parent reset method and effectively call * parent reset phases. */ - dc->reset = device_phases_reset; +device_class_set_legacy_reset (dc, device_phases_reset); rc->get_transitional_function = device_get_transitional_reset; object_class_property_add_bool(class, "realized",
hw/cxl/switch-mailbox-cci.c +1 -1
@@ -89,7 +89,7 @@ static void cswmbcci_class_init(ObjectClass *oc, void *data) pc->device_id =0xa123 ; pc->revision =0 ; dc->desc ="CXL Switch Mailbox CCI" ; - dc->reset = cswmbcci_reset; +device_class_set_legacy_reset (dc, cswmbcci_reset);device_class_set_props (dc, cxl_switch_cci_props); }
hw/display/artist.c +1 -1
@@ -1491,7 +1491,7 @@ static void artist_class_init(ObjectClass *klass, void *data) dc->realize = artist_realizefn; dc->vmsd = &vmstate_artist; - dc->reset = artist_reset; +device_class_set_legacy_reset (dc, artist_reset);device_class_set_props (dc, artist_properties); }
hw/display/ati.c +1 -1
@@ -1055,7 +1055,7 @@ static void ati_vga_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - dc->reset = ati_vga_reset; +device_class_set_legacy_reset (dc, ati_vga_reset);device_class_set_props (dc, ati_vga_properties); dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);
hw/display/bcm2835_fb.c +1 -1
@@ -449,7 +449,7 @@ static void bcm2835_fb_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, bcm2835_fb_props); dc->realize = bcm2835_fb_realize; - dc->reset = bcm2835_fb_reset; +device_class_set_legacy_reset (dc, bcm2835_fb_reset); dc->vmsd = &vmstate_bcm2835_fb; }
hw/display/cg3.c +1 -1
@@ -374,7 +374,7 @@ static void cg3_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = cg3_realizefn; - dc->reset = cg3_reset; +device_class_set_legacy_reset (dc, cg3_reset); dc->vmsd = &vmstate_cg3;device_class_set_props (dc, cg3_properties); }
hw/display/dpcd.c +1 -1
@@ -145,7 +145,7 @@ static void dpcd_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->reset = dpcd_reset; +device_class_set_legacy_reset (dc, dpcd_reset); dc->vmsd = &vmstate_dpcd; }
hw/display/exynos4210_fimd.c +1 -1
@@ -1964,7 +1964,7 @@ static void exynos4210_fimd_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &exynos4210_fimd_vmstate; - dc->reset = exynos4210_fimd_reset; +device_class_set_legacy_reset (dc, exynos4210_fimd_reset); dc->realize = exynos4210_fimd_realize;device_class_set_props (dc, exynos4210_fimd_properties); }
hw/display/g364fb.c +1 -1
@@ -534,7 +534,7 @@ static void g364fb_sysbus_class_init(ObjectClass *klass, void *data) dc->realize = g364fb_sysbus_realize;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->desc ="G364 framebuffer" ; - dc->reset = g364fb_sysbus_reset; +device_class_set_legacy_reset (dc, g364fb_sysbus_reset); dc->vmsd = &vmstate_g364fb_sysbus;device_class_set_props (dc, g364fb_sysbus_properties); }
hw/display/i2c-ddc.c +1 -1
@@ -105,7 +105,7 @@ static void i2c_ddc_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);I2CSlaveClass *isc =I2C_SLAVE_CLASS (oc); - dc->reset = i2c_ddc_reset; +device_class_set_legacy_reset (dc, i2c_ddc_reset); dc->vmsd = &vmstate_i2c_ddc;device_class_set_props (dc, i2c_ddc_properties); isc->event = i2c_ddc_event;
hw/display/jazz_led.c +1 -1
@@ -300,7 +300,7 @@ static void jazz_led_class_init(ObjectClass *klass, void *data) dc->desc ="Jazz LED display" , dc->vmsd = &vmstate_jazz_led; - dc->reset = jazz_led_reset; +device_class_set_legacy_reset (dc, jazz_led_reset); dc->realize = jazz_led_realize; }
hw/display/macfb.c +2 -2
@@ -802,7 +802,7 @@ static void macfb_sysbus_class_init(ObjectClass *klass, void *data) dc->realize = macfb_sysbus_realize; dc->desc ="SysBus Macintosh framebuffer" ; - dc->reset = macfb_sysbus_reset; +device_class_set_legacy_reset (dc, macfb_sysbus_reset); dc->vmsd = &vmstate_macfb_sysbus;device_class_set_props (dc, macfb_sysbus_properties); }
@@ -817,7 +817,7 @@ static void macfb_nubus_class_init(ObjectClass *klass, void *data)device_class_set_parent_unrealize (dc, macfb_nubus_unrealize, &ndc->parent_unrealize); dc->desc ="Nubus Macintosh framebuffer" ; - dc->reset = macfb_nubus_reset; +device_class_set_legacy_reset (dc, macfb_nubus_reset); dc->vmsd = &vmstate_macfb_nubus;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);device_class_set_props (dc, macfb_nubus_properties);
hw/display/qxl.c +1 -1
@@ -2486,7 +2486,7 @@ static void qxl_pci_class_init(ObjectClass *klass, void *data) k->vendor_id =REDHAT_PCI_VENDOR_ID ; k->device_id =QXL_DEVICE_ID_STABLE ;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); - dc->reset = qxl_reset_handler; +device_class_set_legacy_reset (dc, qxl_reset_handler); dc->vmsd = &qxl_vmstate;device_class_set_props (dc, qxl_properties); }
hw/display/sii9022.c +1 -1
@@ -175,7 +175,7 @@ static void sii9022_class_init(ObjectClass *klass, void *data) k->event = sii9022_event; k->recv = sii9022_rx; k->send = sii9022_tx; - dc->reset = sii9022_reset; +device_class_set_legacy_reset (dc, sii9022_reset); dc->realize = sii9022_realize; dc->vmsd = &vmstate_sii9022; }
hw/display/sm501.c +2 -2
@@ -2086,7 +2086,7 @@ static void sm501_sysbus_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->desc ="SM501 Multimedia Companion" ;device_class_set_props (dc, sm501_sysbus_properties); - dc->reset = sm501_reset_sysbus; +device_class_set_legacy_reset (dc, sm501_reset_sysbus); dc->vmsd = &vmstate_sm501_sysbus; }
@@ -2181,7 +2181,7 @@ static void sm501_pci_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->desc ="SM501 Display Controller" ;device_class_set_props (dc, sm501_pci_properties); - dc->reset = sm501_reset_pci; +device_class_set_legacy_reset (dc, sm501_reset_pci); dc->hotpluggable = false; dc->vmsd = &vmstate_sm501_pci; }
hw/display/tcx.c +1 -1
@@ -892,7 +892,7 @@ static void tcx_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = tcx_realizefn; - dc->reset = tcx_reset; +device_class_set_legacy_reset (dc, tcx_reset); dc->vmsd = &vmstate_tcx;device_class_set_props (dc, tcx_properties); }
hw/display/vga-isa.c +1 -1
@@ -98,7 +98,7 @@ static void vga_isa_class_initfn(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = vga_isa_realizefn; - dc->reset = vga_isa_reset; +device_class_set_legacy_reset (dc, vga_isa_reset); dc->vmsd = &vmstate_vga_common;device_class_set_props (dc, vga_isa_properties);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);
hw/display/vga-mmio.c +1 -1
@@ -122,7 +122,7 @@ static void vga_mmio_class_initfn(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = vga_mmio_realizefn; - dc->reset = vga_mmio_reset; +device_class_set_legacy_reset (dc, vga_mmio_reset); dc->vmsd = &vmstate_vga_common;device_class_set_props (dc, vga_mmio_properties);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);
hw/display/vga-pci.c +1 -1
@@ -403,7 +403,7 @@ static void secondary_class_init(ObjectClass *klass, void *data) k->exit = pci_secondary_vga_exit; k->class_id =PCI_CLASS_DISPLAY_OTHER ;device_class_set_props (dc, secondary_pci_properties); - dc->reset = pci_secondary_vga_reset; +device_class_set_legacy_reset (dc, pci_secondary_vga_reset); }static const TypeInfo vga_info = {
hw/display/vmware_vga.c +1 -1
@@ -1352,7 +1352,7 @@ static void vmsvga_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_DISPLAY_VGA ; k->subsystem_vendor_id =PCI_VENDOR_ID_VMWARE ; k->subsystem_id =SVGA_PCI_DEVICE_ID ; - dc->reset = vmsvga_reset; +device_class_set_legacy_reset (dc, vmsvga_reset); dc->vmsd = &vmstate_vmware_vga;device_class_set_props (dc, vga_vmware_properties); dc->hotpluggable = false;
hw/display/xlnx_dp.c +1 -1
@@ -1398,7 +1398,7 @@ static void xlnx_dp_class_init(ObjectClass *oc, void *data) dc->realize = xlnx_dp_realize; dc->vmsd = &vmstate_dp; - dc->reset = xlnx_dp_reset; +device_class_set_legacy_reset (dc, xlnx_dp_reset);device_class_set_props (dc, xlnx_dp_device_properties); }
hw/dma/bcm2835_dma.c +1 -1
@@ -390,7 +390,7 @@ static void bcm2835_dma_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = bcm2835_dma_realize; - dc->reset = bcm2835_dma_reset; +device_class_set_legacy_reset (dc, bcm2835_dma_reset); dc->vmsd = &vmstate_bcm2835_dma; }
hw/dma/i8257.c +1 -1
@@ -599,7 +599,7 @@ static void i8257_class_init(ObjectClass *klass, void *data)IsaDmaClass *idc =ISADMA_CLASS (klass); dc->realize = i8257_realize; - dc->reset = i8257_reset; +device_class_set_legacy_reset (dc, i8257_reset); dc->vmsd = &vmstate_i8257;device_class_set_props (dc, i8257_properties);
hw/dma/pl080.c +1 -1
@@ -421,7 +421,7 @@ static void pl080_class_init(ObjectClass *oc, void *data) dc->vmsd = &vmstate_pl080; dc->realize = pl080_realize;device_class_set_props (dc, pl080_properties); - dc->reset = pl080_reset; +device_class_set_legacy_reset (dc, pl080_reset); }static const TypeInfo pl080_info = {
hw/dma/pl330.c +1 -1
@@ -1678,7 +1678,7 @@ static void pl330_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = pl330_realize; - dc->reset = pl330_reset; +device_class_set_legacy_reset (dc, pl330_reset);device_class_set_props (dc, pl330_properties); dc->vmsd = &vmstate_pl330; }
hw/dma/rc4030.c +1 -1
@@ -707,7 +707,7 @@ static void rc4030_class_init(ObjectClass *klass, void *class_data) dc->realize = rc4030_realize; dc->unrealize = rc4030_unrealize; - dc->reset = rc4030_reset; +device_class_set_legacy_reset (dc, rc4030_reset); dc->vmsd = &vmstate_rc4030; }
hw/dma/sparc32_dma.c +1 -1
@@ -278,7 +278,7 @@ static void sparc32_dma_device_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = sparc32_dma_device_reset; +device_class_set_legacy_reset (dc, sparc32_dma_device_reset); dc->vmsd = &vmstate_sparc32_dma_device; }
hw/dma/xilinx_axidma.c +1 -1
@@ -627,7 +627,7 @@ static void axidma_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = xilinx_axidma_realize; - dc->reset = xilinx_axidma_reset; +device_class_set_legacy_reset (dc, xilinx_axidma_reset);device_class_set_props (dc, axidma_properties); }
hw/dma/xlnx-zdma.c +1 -1
@@ -821,7 +821,7 @@ static void zdma_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = zdma_reset; +device_class_set_legacy_reset (dc, zdma_reset); dc->realize = zdma_realize;device_class_set_props (dc, zdma_props); dc->vmsd = &vmstate_zdma;
hw/dma/xlnx-zynq-devcfg.c +1 -1
@@ -384,7 +384,7 @@ static void xlnx_zynq_devcfg_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = xlnx_zynq_devcfg_reset; +device_class_set_legacy_reset (dc, xlnx_zynq_devcfg_reset); dc->vmsd = &vmstate_xlnx_zynq_devcfg; }
hw/dma/xlnx_csu_dma.c +1 -1
@@ -719,7 +719,7 @@ static void xlnx_csu_dma_class_init(ObjectClass *klass, void *data)StreamSinkClass *ssc =STREAM_SINK_CLASS (klass);XlnxCSUDMAClass *xcdc =XLNX_CSU_DMA_CLASS (klass); - dc->reset = xlnx_csu_dma_reset; +device_class_set_legacy_reset (dc, xlnx_csu_dma_reset); dc->realize = xlnx_csu_dma_realize; dc->vmsd = &vmstate_xlnx_csu_dma;device_class_set_props (dc, xlnx_csu_dma_properties);
hw/dma/xlnx_dpdma.c +1 -1
@@ -598,7 +598,7 @@ static void xlnx_dpdma_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->vmsd = &vmstate_xlnx_dpdma; - dc->reset = xlnx_dpdma_reset; +device_class_set_legacy_reset (dc, xlnx_dpdma_reset); }static const TypeInfo xlnx_dpdma_info = {
hw/fsi/aspeed_apb2opb.c +1 -1
@@ -326,7 +326,7 @@ static void fsi_aspeed_apb2opb_class_init(ObjectClass *klass, void *data) dc->desc ="ASPEED APB2OPB Bridge" ; dc->realize = fsi_aspeed_apb2opb_realize; - dc->reset = fsi_aspeed_apb2opb_reset; +device_class_set_legacy_reset (dc, fsi_aspeed_apb2opb_reset); }static const TypeInfo aspeed_apb2opb_info = {
hw/fsi/fsi-master.c +1 -1
@@ -151,7 +151,7 @@ static void fsi_master_class_init(ObjectClass *klass, void *data) dc->bus_type =TYPE_OP_BUS ; dc->desc ="FSI Master" ; dc->realize = fsi_master_realize; - dc->reset = fsi_master_reset; +device_class_set_legacy_reset (dc, fsi_master_reset); }static const TypeInfo fsi_master_info = {
hw/fsi/fsi.c +1 -1
@@ -82,7 +82,7 @@ static void fsi_slave_class_init(ObjectClass *klass, void *data) dc->bus_type =TYPE_FSI_BUS ; dc->desc ="FSI Slave" ; - dc->reset = fsi_slave_reset; +device_class_set_legacy_reset (dc, fsi_slave_reset); }static const TypeInfo fsi_slave_info = {
hw/fsi/lbus.c +1 -1
@@ -97,7 +97,7 @@ static void fsi_scratchpad_class_init(ObjectClass *klass, void *data) dc->bus_type =TYPE_FSI_LBUS ; dc->realize = fsi_scratchpad_realize; - dc->reset = fsi_scratchpad_reset; +device_class_set_legacy_reset (dc, fsi_scratchpad_reset); }static const TypeInfo fsi_scratchpad_info = {
hw/gpio/aspeed_gpio.c +1 -1
@@ -1116,7 +1116,7 @@ static void aspeed_gpio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_gpio_realize; - dc->reset = aspeed_gpio_reset; +device_class_set_legacy_reset (dc, aspeed_gpio_reset); dc->desc ="Aspeed GPIO Controller" ; dc->vmsd = &vmstate_aspeed_gpio; }
hw/gpio/bcm2835_gpio.c +1 -1
@@ -325,7 +325,7 @@ static void bcm2835_gpio_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_bcm2835_gpio; dc->realize = &bcm2835_gpio_realize; - dc->reset = &bcm2835_gpio_reset; +device_class_set_legacy_reset (dc, bcm2835_gpio_reset); }static const TypeInfo bcm2835_gpio_info = {
hw/gpio/bcm2838_gpio.c +1 -1
@@ -371,7 +371,7 @@ static void bcm2838_gpio_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_bcm2838_gpio; dc->realize = &bcm2838_gpio_realize; - dc->reset = &bcm2838_gpio_reset; +device_class_set_legacy_reset (dc, bcm2838_gpio_reset); }static const TypeInfo bcm2838_gpio_info = {
hw/gpio/gpio_key.c +1 -1
@@ -91,7 +91,7 @@ static void gpio_key_class_init(ObjectClass *klass, void *data) dc->realize = gpio_key_realize; dc->vmsd = &vmstate_gpio_key; - dc->reset = &gpio_key_reset; +device_class_set_legacy_reset (dc, gpio_key_reset); }static const TypeInfo gpio_key_info = {
hw/gpio/imx_gpio.c +1 -1
@@ -333,7 +333,7 @@ static void imx_gpio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = imx_gpio_realize; - dc->reset = imx_gpio_reset; +device_class_set_legacy_reset (dc, imx_gpio_reset);device_class_set_props (dc, imx_gpio_properties); dc->vmsd = &vmstate_imx_gpio; dc->desc ="i.MX GPIO controller" ;
hw/gpio/max7310.c +1 -1
@@ -198,7 +198,7 @@ static void max7310_class_init(ObjectClass *klass, void *data) k->event = max7310_event; k->recv = max7310_rx; k->send = max7310_tx; - dc->reset = max7310_reset; +device_class_set_legacy_reset (dc, max7310_reset); dc->vmsd = &vmstate_max7310; }
hw/gpio/mpc8xxx.c +1 -1
@@ -205,7 +205,7 @@ static void mpc8xxx_gpio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_mpc8xxx_gpio; - dc->reset = mpc8xxx_gpio_reset; +device_class_set_legacy_reset (dc, mpc8xxx_gpio_reset); }static const TypeInfo mpc8xxx_gpio_info = {
hw/gpio/nrf51_gpio.c +1 -1
@@ -310,7 +310,7 @@ static void nrf51_gpio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_nrf51_gpio; - dc->reset = nrf51_gpio_reset; +device_class_set_legacy_reset (dc, nrf51_gpio_reset); dc->desc ="nRF51 GPIO" ; }
hw/gpio/omap_gpio.c +2 -2
@@ -757,7 +757,7 @@ static void omap_gpio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = omap_gpio_realize; - dc->reset = omap_gpif_reset; +device_class_set_legacy_reset (dc, omap_gpif_reset);device_class_set_props (dc, omap_gpio_properties);/* Reason: pointer property "clk" */ dc->user_creatable = false;
@@ -792,7 +792,7 @@ static void omap2_gpio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = omap2_gpio_realize; - dc->reset = omap2_gpif_reset; +device_class_set_legacy_reset (dc, omap2_gpif_reset);device_class_set_props (dc, omap2_gpio_properties);/* Reason: pointer properties "iclk", "fclk0", ..., "fclk5" */ dc->user_creatable = false;
hw/gpio/pca9552.c +1 -1
@@ -460,7 +460,7 @@ static void pca9552_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);PCA955xClass *pc =PCA955X_CLASS (oc); - dc->reset = pca9552_reset; +device_class_set_legacy_reset (dc, pca9552_reset); dc->vmsd = &pca9552_vmstate; pc->max_reg =PCA9552_LS3 ; pc->pin_count =16 ;
hw/gpio/pca9554.c +1 -1
@@ -305,7 +305,7 @@ static void pca9554_class_init(ObjectClass *klass, void *data) k->recv = pca9554_recv; k->send = pca9554_send; dc->realize = pca9554_realize; - dc->reset = pca9554_reset; +device_class_set_legacy_reset (dc, pca9554_reset); dc->vmsd = &pca9554_vmstate;device_class_set_props (dc, pca9554_properties); }
hw/gpio/pcf8574.c +1 -1
@@ -146,7 +146,7 @@ static void pcf8574_class_init(ObjectClass *klass, void *data) k->recv = pcf8574_rx; k->send = pcf8574_tx; dc->realize = pcf8574_realize; - dc->reset = pcf8574_reset; +device_class_set_legacy_reset (dc, pcf8574_reset); dc->vmsd = &vmstate_pcf8574; }
hw/gpio/sifive_gpio.c +1 -1
@@ -378,7 +378,7 @@ static void sifive_gpio_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, sifive_gpio_properties); dc->vmsd = &vmstate_sifive_gpio; dc->realize = sifive_gpio_realize; - dc->reset = sifive_gpio_reset; +device_class_set_legacy_reset (dc, sifive_gpio_reset); dc->desc ="SiFive GPIO" ; }
hw/hyperv/hyperv.c +1 -1
@@ -138,7 +138,7 @@ static void synic_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = synic_realize; - dc->reset = synic_reset; +device_class_set_legacy_reset (dc, synic_reset); dc->user_creatable = false; }
hw/hyperv/vmbus.c +1 -1
@@ -2362,7 +2362,7 @@ static void vmbus_dev_class_init(ObjectClass *klass, void *data) kdev->bus_type =TYPE_VMBUS ; kdev->realize = vmbus_dev_realize; kdev->unrealize = vmbus_dev_unrealize; - kdev->reset = vmbus_dev_reset; +device_class_set_legacy_reset (kdev, vmbus_dev_reset); }static void vmbus_dev_instance_init (Object *obj)
hw/i2c/aspeed_i2c.c +2 -2
@@ -1065,7 +1065,7 @@ static void aspeed_i2c_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &aspeed_i2c_vmstate; - dc->reset = aspeed_i2c_reset; +device_class_set_legacy_reset (dc, aspeed_i2c_reset);device_class_set_props (dc, aspeed_i2c_properties); dc->realize = aspeed_i2c_realize; dc->desc ="Aspeed I2C Controller" ;
@@ -1249,7 +1249,7 @@ static void aspeed_i2c_bus_class_init(ObjectClass *klass, void *data) dc->desc ="Aspeed I2C Bus" ; dc->realize = aspeed_i2c_bus_realize; - dc->reset = aspeed_i2c_bus_reset; +device_class_set_legacy_reset (dc, aspeed_i2c_bus_reset);device_class_set_props (dc, aspeed_i2c_bus_properties); }
hw/i2c/bcm2835_i2c.c +1 -1
@@ -262,7 +262,7 @@ static void bcm2835_i2c_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = bcm2835_i2c_reset; +device_class_set_legacy_reset (dc, bcm2835_i2c_reset); dc->realize = bcm2835_i2c_realize; dc->vmsd = &vmstate_bcm2835_i2c; }
hw/i2c/exynos4210_i2c.c +1 -1
@@ -314,7 +314,7 @@ static void exynos4210_i2c_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &exynos4210_i2c_vmstate; - dc->reset = exynos4210_i2c_reset; +device_class_set_legacy_reset (dc, exynos4210_i2c_reset); }static const TypeInfo exynos4210_i2c_type_info = {
hw/i2c/imx_i2c.c +1 -1
@@ -313,7 +313,7 @@ static void imx_i2c_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &imx_i2c_vmstate; - dc->reset = imx_i2c_reset; +device_class_set_legacy_reset (dc, imx_i2c_reset); dc->realize = imx_i2c_realize; dc->desc ="i.MX I2C Controller" ; }
hw/i2c/microbit_i2c.c +1 -1
@@ -110,7 +110,7 @@ static void microbit_i2c_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = µbit_i2c_vmstate; - dc->reset = microbit_i2c_reset; +device_class_set_legacy_reset (dc, microbit_i2c_reset); dc->realize = microbit_i2c_realize; dc->desc ="Microbit I2C controller" ; }
hw/i2c/mpc_i2c.c +1 -1
@@ -339,7 +339,7 @@ static void mpc_i2c_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &mpc_i2c_vmstate ; - dc->reset = mpc_i2c_reset; +device_class_set_legacy_reset (dc, mpc_i2c_reset); dc->realize = mpc_i2c_realize; dc->desc ="MPC I2C Controller" ; }
hw/i2c/omap_i2c.c +1 -1
@@ -521,7 +521,7 @@ static void omap_i2c_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);device_class_set_props (dc, omap_i2c_properties); - dc->reset = omap_i2c_reset; +device_class_set_legacy_reset (dc, omap_i2c_reset);/* Reason: pointer properties "iclk", "fclk" */ dc->user_creatable = false; dc->realize = omap_i2c_realize;
hw/i2c/ppc4xx_i2c.c +1 -1
@@ -358,7 +358,7 @@ static void ppc4xx_i2c_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = ppc4xx_i2c_reset; +device_class_set_legacy_reset (dc, ppc4xx_i2c_reset); }static const TypeInfo ppc4xx_i2c_type_info = {
hw/i2c/smbus_eeprom.c +1 -1
@@ -143,7 +143,7 @@ static void smbus_eeprom_class_initfn(ObjectClass *klass, void *data)SMBusDeviceClass *sc =SMBUS_DEVICE_CLASS (klass); dc->realize = smbus_eeprom_realize; - dc->reset = smbus_eeprom_reset; +device_class_set_legacy_reset (dc, smbus_eeprom_reset); sc->receive_byte = eeprom_receive_byte; sc->write_data = eeprom_write_data; dc->vmsd = &vmstate_smbus_eeprom;
hw/i386/amd_iommu.c +1 -1
@@ -1628,7 +1628,7 @@ static void amdvi_sysbus_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);X86IOMMUClass *dc_class =X86_IOMMU_DEVICE_CLASS (klass); - dc->reset = amdvi_sysbus_reset; +device_class_set_legacy_reset (dc, amdvi_sysbus_reset); dc->vmsd = &vmstate_amdvi_sysbus; dc->hotpluggable = false; dc_class->realize = amdvi_sysbus_realize;
hw/i386/intel_iommu.c +1 -1
@@ -4368,7 +4368,7 @@ static void vtd_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);X86IOMMUClass *x86_class =X86_IOMMU_DEVICE_CLASS (klass); - dc->reset = vtd_reset; +device_class_set_legacy_reset (dc, vtd_reset); dc->vmsd = &vtd_vmstate;device_class_set_props (dc, vtd_properties); dc->hotpluggable = false;
hw/i386/kvm/i8254.c +1 -1
@@ -303,7 +303,7 @@ static void kvm_pit_class_init(ObjectClass *klass, void *data) &kpc->parent_realize); k->set_channel_gate = kvm_pit_set_gate; k->get_channel_info = kvm_pit_get_channel_info; - dc->reset = kvm_pit_reset; +device_class_set_legacy_reset (dc, kvm_pit_reset);device_class_set_props (dc, kvm_pit_properties); }
hw/i386/kvm/i8259.c +1 -1
@@ -145,7 +145,7 @@ static void kvm_i8259_class_init(ObjectClass *klass, void *data)PICCommonClass *k =PIC_COMMON_CLASS (klass);DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = kvm_pic_reset; +device_class_set_legacy_reset (dc, kvm_pic_reset);device_class_set_parent_realize (dc, kvm_pic_realize, &kpc->parent_realize); k->pre_save = kvm_pic_get; k->post_load = kvm_pic_put;
hw/i386/kvm/ioapic.c +1 -1
@@ -146,7 +146,7 @@ static void kvm_ioapic_class_init(ObjectClass *klass, void *data) k->realize = kvm_ioapic_realize; k->pre_save = kvm_ioapic_get; k->post_load = kvm_ioapic_put; - dc->reset = kvm_ioapic_reset; +device_class_set_legacy_reset (dc, kvm_ioapic_reset);device_class_set_props (dc, kvm_ioapic_properties); }
hw/i386/kvm/xen_overlay.c +1 -1
@@ -155,7 +155,7 @@ static void xen_overlay_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = xen_overlay_reset; +device_class_set_legacy_reset (dc, xen_overlay_reset); dc->realize = xen_overlay_realize; dc->vmsd = &xen_overlay_vmstate; }
hw/i386/port92.c +1 -1
@@ -102,7 +102,7 @@ static void port92_class_initfn(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = port92_realizefn; - dc->reset = port92_reset; +device_class_set_legacy_reset (dc, port92_reset); dc->vmsd = &vmstate_port92_isa;/* * Reason: unlike ordinary ISA devices, this one needs additional
hw/i386/vapic.c +1 -1
@@ -850,7 +850,7 @@ static void vapic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = vapic_reset; +device_class_set_legacy_reset (dc, vapic_reset); dc->vmsd = &vmstate_vapic; dc->realize = vapic_realize; }
hw/i386/vmmouse.c +1 -1
@@ -327,7 +327,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = vmmouse_realizefn; - dc->reset = vmmouse_reset; +device_class_set_legacy_reset (dc, vmmouse_reset); dc->vmsd = &vmstate_vmmouse;device_class_set_props (dc, vmmouse_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories);
hw/i386/xen/xen_platform.c +1 -1
@@ -595,7 +595,7 @@ static void xen_platform_class_init(ObjectClass *klass, void *data) k->revision =1 ;set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->desc ="XEN platform pci device" ; - dc->reset = platform_reset; +device_class_set_legacy_reset (dc, platform_reset); dc->vmsd = &vmstate_xen_platform; }
hw/ide/ahci.c +1 -1
@@ -1878,7 +1878,7 @@ static void sysbus_ahci_class_init(ObjectClass *klass, void *data) dc->realize = sysbus_ahci_realize; dc->vmsd = &vmstate_sysbus_ahci;device_class_set_props (dc, sysbus_ahci_properties); - dc->reset = sysbus_ahci_reset; +device_class_set_legacy_reset (dc, sysbus_ahci_reset);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/cmd646.c +1 -1
@@ -323,7 +323,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - dc->reset = cmd646_reset; +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;
hw/ide/ich.c +1 -1
@@ -176,7 +176,7 @@ static void ich_ahci_class_init(ObjectClass *klass, void *data) k->revision =0x02 ; k->class_id =PCI_CLASS_STORAGE_SATA ; dc->vmsd = &vmstate_ich9_ahci; - dc->reset = pci_ich9_reset; +device_class_set_legacy_reset (dc, pci_ich9_reset);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/isa.c +1 -1
@@ -114,7 +114,7 @@ static void isa_ide_class_initfn(ObjectClass *klass, void *data) dc->realize = isa_ide_realizefn; dc->fw_name ="ide" ; - dc->reset = isa_ide_reset; +device_class_set_legacy_reset (dc, isa_ide_reset);device_class_set_props (dc, isa_ide_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/macio.c +1 -1
@@ -476,7 +476,7 @@ static void macio_ide_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = macio_ide_realizefn; - dc->reset = macio_ide_reset; +device_class_set_legacy_reset (dc, macio_ide_reset);device_class_set_props (dc, macio_ide_properties); dc->vmsd = &vmstate_pmac;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories);
hw/ide/microdrive.c +1 -1
@@ -622,7 +622,7 @@ static void microdrive_class_init(ObjectClass *oc, void *data) pcc->io_write = md_common_write; dc->realize = microdrive_realize; - dc->reset = md_reset; +device_class_set_legacy_reset (dc, md_reset); dc->vmsd = &vmstate_microdrive; }
hw/ide/mmio.c +1 -1
@@ -151,7 +151,7 @@ static void mmio_ide_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = mmio_ide_realizefn; - dc->reset = mmio_ide_reset; +device_class_set_legacy_reset (dc, mmio_ide_reset);device_class_set_props (dc, mmio_ide_properties); dc->vmsd = &vmstate_ide_mmio; }
hw/ide/piix.c +2 -2
@@ -183,7 +183,7 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - dc->reset = piix_ide_reset; +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;
@@ -206,7 +206,7 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - dc->reset = piix_ide_reset; +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;
hw/ide/sii3112.c +1 -1
@@ -300,7 +300,7 @@ static void sii3112_pci_class_init(ObjectClass *klass, void *data) pd->class_id =PCI_CLASS_STORAGE_RAID ; pd->revision =1 ; pd->realize = sii3112_pci_realize; - dc->reset = sii3112_reset; +device_class_set_legacy_reset (dc, sii3112_reset); dc->desc ="SiI3112A SATA controller" ;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/via.c +1 -1
@@ -250,7 +250,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); - dc->reset = via_ide_reset; +device_class_set_legacy_reset (dc, via_ide_reset); dc->vmsd = &vmstate_ide_pci;/* Reason: only works as function of VIA southbridge */ dc->user_creatable = false;
hw/input/adb-kbd.c +1 -1
@@ -387,7 +387,7 @@ static void adb_kbd_class_init(ObjectClass *oc, void *data) adc->devreq = adb_kbd_request; adc->devhasdata = adb_kbd_has_data; - dc->reset = adb_kbd_reset; +device_class_set_legacy_reset (dc, adb_kbd_reset); dc->vmsd = &vmstate_adb_kbd; }
hw/input/adb-mouse.c +1 -1
@@ -258,7 +258,7 @@ static void adb_mouse_class_init(ObjectClass *oc, void *data) adc->devreq = adb_mouse_request; adc->devhasdata = adb_mouse_has_data; - dc->reset = adb_mouse_reset; +device_class_set_legacy_reset (dc, adb_mouse_reset); dc->vmsd = &vmstate_adb_mouse; }
hw/input/lm832x.c +1 -1
@@ -505,7 +505,7 @@ static void lm8323_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);I2CSlaveClass *k =I2C_SLAVE_CLASS (klass); - dc->reset = lm_kbd_reset; +device_class_set_legacy_reset (dc, lm_kbd_reset); dc->realize = lm8323_realize; k->event = lm_i2c_event; k->recv = lm_i2c_rx;
hw/input/pckbd.c +2 -2
@@ -756,7 +756,7 @@ static void i8042_mmio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = i8042_mmio_realize; - dc->reset = i8042_mmio_reset; +device_class_set_legacy_reset (dc, i8042_mmio_reset); dc->vmsd = &vmstate_kbd_mmio;device_class_set_props (dc, i8042_mmio_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories);
@@ -947,7 +947,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)AcpiDevAmlIfClass *adevc =ACPI_DEV_AML_IF_CLASS (klass);device_class_set_props (dc, i8042_properties); - dc->reset = i8042_reset; +device_class_set_legacy_reset (dc, i8042_reset); dc->realize = i8042_realizefn; dc->vmsd = &vmstate_kbd_isa; adevc->build_dev_aml = i8042_build_aml;
hw/intc/allwinner-a10-pic.c +1 -1
@@ -191,7 +191,7 @@ static void aw_a10_pic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = aw_a10_pic_reset; +device_class_set_legacy_reset (dc, aw_a10_pic_reset); dc->desc ="allwinner a10 pic" ; dc->vmsd = &vmstate_aw_a10_pic; }
hw/intc/apic_common.c +1 -1
@@ -471,7 +471,7 @@ static void apic_common_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = apic_reset_common; +device_class_set_legacy_reset (dc, apic_reset_common);device_class_set_props (dc, apic_properties_common); dc->realize = apic_common_realize; dc->unrealize = apic_common_unrealize;
hw/intc/armv7m_nvic.c +1 -1
@@ -2737,7 +2737,7 @@ static void armv7m_nvic_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_nvic;device_class_set_props (dc, props_nvic); - dc->reset = armv7m_nvic_reset; +device_class_set_legacy_reset (dc, armv7m_nvic_reset); dc->realize = armv7m_nvic_realize; }
hw/intc/aspeed_intc.c +1 -1
@@ -322,7 +322,7 @@ static void aspeed_intc_class_init(ObjectClass *klass, void *data) dc->desc ="ASPEED INTC Controller" ; dc->realize = aspeed_intc_realize; - dc->reset = aspeed_intc_reset; +device_class_set_legacy_reset (dc, aspeed_intc_reset); dc->vmsd =NULL ; }
hw/intc/aspeed_vic.c +1 -1
@@ -343,7 +343,7 @@ static void aspeed_vic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_vic_realize; - dc->reset = aspeed_vic_reset; +device_class_set_legacy_reset (dc, aspeed_vic_reset); dc->desc ="ASPEED Interrupt Controller (New)" ; dc->vmsd = &vmstate_aspeed_vic; }
hw/intc/bcm2835_ic.c +1 -1
@@ -223,7 +223,7 @@ static void bcm2835_ic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = bcm2835_ic_reset; +device_class_set_legacy_reset (dc, bcm2835_ic_reset); dc->vmsd = &vmstate_bcm2835_ic; }
hw/intc/bcm2836_control.c +1 -1
@@ -388,7 +388,7 @@ static void bcm2836_control_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = bcm2836_control_reset; +device_class_set_legacy_reset (dc, bcm2836_control_reset); dc->vmsd = &vmstate_bcm2836_control; }
hw/intc/exynos4210_combiner.c +1 -1
@@ -334,7 +334,7 @@ static void exynos4210_combiner_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = exynos4210_combiner_reset; +device_class_set_legacy_reset (dc, exynos4210_combiner_reset);device_class_set_props (dc, exynos4210_combiner_properties); dc->vmsd = &vmstate_exynos4210_combiner; }
hw/intc/goldfish_pic.c +1 -1
@@ -191,7 +191,7 @@ static void goldfish_pic_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);InterruptStatsProviderClass *ic =INTERRUPT_STATS_PROVIDER_CLASS (oc); - dc->reset = goldfish_pic_reset; +device_class_set_legacy_reset (dc, goldfish_pic_reset); dc->realize = goldfish_pic_realize; dc->vmsd = &vmstate_goldfish_pic; ic->get_statistics = goldfish_pic_get_statistics;
hw/intc/grlib_irqmp.c +1 -1
@@ -386,7 +386,7 @@ static void grlib_irqmp_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = grlib_irqmp_realize; - dc->reset = grlib_irqmp_reset; +device_class_set_legacy_reset (dc, grlib_irqmp_reset);device_class_set_props (dc, grlib_irqmp_properties); }
hw/intc/heathrow_pic.c +1 -1
@@ -188,7 +188,7 @@ static void heathrow_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->reset = heathrow_reset; +device_class_set_legacy_reset (dc, heathrow_reset); dc->vmsd = &vmstate_heathrow;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/intc/i8259.c +1 -1
@@ -442,7 +442,7 @@ static void i8259_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);device_class_set_parent_realize (dc, pic_realize, &k->parent_realize); - dc->reset = pic_reset; +device_class_set_legacy_reset (dc, pic_reset); }static const TypeInfo i8259_info = {
hw/intc/imx_avic.c +1 -1
@@ -346,7 +346,7 @@ static void imx_avic_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_imx_avic; - dc->reset = imx_avic_reset; +device_class_set_legacy_reset (dc, imx_avic_reset); dc->desc ="i.MX Advanced Vector Interrupt Controller" ; }
hw/intc/imx_gpcv2.c +1 -1
@@ -106,7 +106,7 @@ static void imx_gpcv2_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = imx_gpcv2_reset; +device_class_set_legacy_reset (dc, imx_gpcv2_reset); dc->vmsd = &vmstate_imx_gpcv2; dc->desc ="i.MX GPCv2 Module" ; }
hw/intc/ioapic.c +1 -1
@@ -493,7 +493,7 @@ static void ioapic_class_init(ObjectClass *klass, void *data)* migration, otherwise first 24 gsi routes will be invalid. */ k->post_load = ioapic_update_kvm_routes; - dc->reset = ioapic_reset_common; +device_class_set_legacy_reset (dc, ioapic_reset_common);device_class_set_props (dc, ioapic_properties); }
hw/intc/loongarch_extioi.c +1 -1
@@ -440,7 +440,7 @@ static void loongarch_extioi_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = loongarch_extioi_realize; - dc->reset = loongarch_extioi_reset; +device_class_set_legacy_reset (dc, loongarch_extioi_reset);device_class_set_props (dc, extioi_properties); dc->vmsd = &vmstate_loongarch_extioi; }
hw/intc/loongarch_pch_pic.c +1 -1
@@ -442,7 +442,7 @@ static void loongarch_pch_pic_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = loongarch_pch_pic_realize; - dc->reset = loongarch_pch_pic_reset; +device_class_set_legacy_reset (dc, loongarch_pch_pic_reset); dc->vmsd = &vmstate_loongarch_pch_pic;device_class_set_props (dc, loongarch_pch_pic_properties); }
hw/intc/m68k_irqc.c +1 -1
@@ -99,7 +99,7 @@ static void m68k_irqc_class_init(ObjectClass *oc, void *data)device_class_set_props (dc, m68k_irqc_properties); nc->nmi_monitor_handler = m68k_nmi; - dc->reset = m68k_irqc_reset; +device_class_set_legacy_reset (dc, m68k_irqc_reset); dc->vmsd = &vmstate_m68k_irqc; ic->get_statistics = m68k_irqc_get_statistics; ic->print_info = m68k_irqc_print_info;
hw/intc/omap_intc.c +2 -2
@@ -406,7 +406,7 @@ static void omap_intc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = omap_inth_reset; +device_class_set_legacy_reset (dc, omap_inth_reset);device_class_set_props (dc, omap_intc_properties);/* Reason: pointer property "clk" */ dc->user_creatable = false;
@@ -659,7 +659,7 @@ static void omap2_intc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = omap_inth_reset; +device_class_set_legacy_reset (dc, omap_inth_reset);device_class_set_props (dc, omap2_intc_properties);/* Reason: pointer property "iclk", "fclk" */ dc->user_creatable = false;
hw/intc/openpic.c +1 -1
@@ -1620,7 +1620,7 @@ static void openpic_class_init(ObjectClass *oc, void *data) dc->realize = openpic_realize;device_class_set_props (dc, openpic_properties); - dc->reset = openpic_reset; +device_class_set_legacy_reset (dc, openpic_reset); dc->vmsd = &vmstate_openpic;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/intc/openpic_kvm.c +1 -1
@@ -274,7 +274,7 @@ static void kvm_openpic_class_init(ObjectClass *oc, void *data) dc->realize = kvm_openpic_realize;device_class_set_props (dc, kvm_openpic_properties); - dc->reset = kvm_openpic_reset; +device_class_set_legacy_reset (dc, kvm_openpic_reset);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/intc/pl190.c +1 -1
@@ -277,7 +277,7 @@ static void pl190_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = pl190_reset; +device_class_set_legacy_reset (dc, pl190_reset); dc->vmsd = &vmstate_pl190; }
hw/intc/ppc-uic.c +1 -1
@@ -286,7 +286,7 @@ static void ppc_uic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = ppc_uic_reset; +device_class_set_legacy_reset (dc, ppc_uic_reset); dc->realize = ppc_uic_realize; dc->vmsd = &ppc_uic_vmstate;device_class_set_props (dc, ppc_uic_properties);
hw/intc/s390_flic.c +1 -1
@@ -457,7 +457,7 @@ static void qemu_s390_flic_class_init(ObjectClass *oc, void *data)S390FLICStateClass *fsc =S390_FLIC_COMMON_CLASS (oc);device_class_set_props (dc, qemu_s390_flic_properties); - dc->reset = qemu_s390_flic_reset; +device_class_set_legacy_reset (dc, qemu_s390_flic_reset); dc->vmsd = &qemu_s390_flic_vmstate; fsc->register_io_adapter = qemu_s390_register_io_adapter; fsc->io_adapter_map = qemu_s390_io_adapter_map;
hw/intc/s390_flic_kvm.c +1 -1
@@ -679,7 +679,7 @@ static void kvm_s390_flic_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, kvm_s390_flic_realize, &kfsc->parent_realize); dc->vmsd = &kvm_s390_flic_vmstate; - dc->reset = kvm_s390_flic_reset; +device_class_set_legacy_reset (dc, kvm_s390_flic_reset); fsc->register_io_adapter = kvm_s390_register_io_adapter; fsc->io_adapter_map = kvm_s390_io_adapter_map; fsc->add_adapter_routes = kvm_s390_add_adapter_routes;
hw/intc/sifive_plic.c +1 -1
@@ -444,7 +444,7 @@ static void sifive_plic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = sifive_plic_reset; +device_class_set_legacy_reset (dc, sifive_plic_reset);device_class_set_props (dc, sifive_plic_properties); dc->realize = sifive_plic_realize; dc->vmsd = &vmstate_sifive_plic;
hw/intc/slavio_intctl.c +1 -1
@@ -446,7 +446,7 @@ static void slavio_intctl_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);InterruptStatsProviderClass *ic =INTERRUPT_STATS_PROVIDER_CLASS (klass); - dc->reset = slavio_intctl_reset; +device_class_set_legacy_reset (dc, slavio_intctl_reset); dc->vmsd = &vmstate_intctl;#ifdef DEBUG_IRQ_COUNT ic->get_statistics = slavio_intctl_get_statistics;
hw/intc/xlnx-pmu-iomod-intc.c +1 -1
@@ -536,7 +536,7 @@ static void xlnx_pmu_io_intc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = xlnx_pmu_io_intc_reset; +device_class_set_legacy_reset (dc, xlnx_pmu_io_intc_reset); dc->realize = xlnx_pmu_io_intc_realize; dc->vmsd = &vmstate_xlnx_pmu_io_intc;device_class_set_props (dc, xlnx_pmu_io_intc_properties);
hw/intc/xlnx-zynqmp-ipi.c +1 -1
@@ -359,7 +359,7 @@ static void xlnx_zynqmp_ipi_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = xlnx_zynqmp_ipi_reset; +device_class_set_legacy_reset (dc, xlnx_zynqmp_ipi_reset); dc->realize = xlnx_zynqmp_ipi_realize; dc->vmsd = &vmstate_zynqmp_pmu_ipi; }
hw/isa/lpc_ich9.c +1 -1
@@ -871,7 +871,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)AcpiDevAmlIfClass *amldevc =ACPI_DEV_AML_IF_CLASS (klass);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); - dc->reset = ich9_lpc_reset; +device_class_set_legacy_reset (dc, ich9_lpc_reset); k->realize = ich9_lpc_realize; dc->vmsd = &vmstate_ich9_lpc;device_class_set_props (dc, ich9_lpc_properties);
hw/isa/pc87312.c +1 -1
@@ -338,7 +338,7 @@ static void pc87312_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass); - dc->reset = pc87312_reset; +device_class_set_legacy_reset (dc, pc87312_reset); dc->vmsd = &vmstate_pc87312;device_class_set_parent_realize (dc, pc87312_realize, &sc->parent_realize);
hw/isa/piix.c +1 -1
@@ -425,7 +425,7 @@ static void pci_piix_class_init(ObjectClass *klass, void *data)AcpiDevAmlIfClass *adevc =ACPI_DEV_AML_IF_CLASS (klass); k->config_write = piix_write_config; - dc->reset = piix_reset; +device_class_set_legacy_reset (dc, piix_reset); dc->desc ="ISA bridge" ; dc->hotpluggable = false; k->vendor_id =PCI_VENDOR_ID_INTEL ;
hw/isa/vt82c686.c +5 -5
@@ -232,7 +232,7 @@ static void via_pm_class_init(ObjectClass *klass, void *data) k->device_id = info->device_id; k->class_id =PCI_CLASS_BRIDGE_OTHER ; k->revision =0x40 ; - dc->reset = via_pm_reset; +device_class_set_legacy_reset (dc, via_pm_reset);/* Reason: part of VIA south bridge, does not exist stand alone */ dc->user_creatable = false; dc->vmsd = &vmstate_acpi;
@@ -461,7 +461,7 @@ static void vt82c686b_superio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass); - dc->reset = vt82c686b_superio_reset; +device_class_set_legacy_reset (dc, vt82c686b_superio_reset); sc->serial.count =2 ; sc->parallel.count =1 ; sc->ide.count =0 ;/* emulated by via-ide */
@@ -570,7 +570,7 @@ static void vt8231_superio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass); - dc->reset = vt8231_superio_reset; +device_class_set_legacy_reset (dc, vt8231_superio_reset); sc->serial.count =1 ; sc->parallel.count =1 ; sc->ide.count =0 ;/* emulated by via-ide */
@@ -843,7 +843,7 @@ static void vt82c686b_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_VIA_82C686B_ISA ; k->class_id =PCI_CLASS_BRIDGE_ISA ; k->revision =0x40 ; - dc->reset = vt82c686b_isa_reset; +device_class_set_legacy_reset (dc, vt82c686b_isa_reset); dc->desc ="ISA bridge" ; dc->vmsd = &vmstate_via;/* Reason: part of VIA VT82C686 southbridge, needs to be wired up */
@@ -908,7 +908,7 @@ static void vt8231_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_VIA_8231_ISA ; k->class_id =PCI_CLASS_BRIDGE_ISA ; k->revision =0x10 ; - dc->reset = vt8231_isa_reset; +device_class_set_legacy_reset (dc, vt8231_isa_reset); dc->desc ="ISA bridge" ; dc->vmsd = &vmstate_via;/* Reason: part of VIA VT8231 southbridge, needs to be wired up */
hw/m68k/mcf5206.c +1 -1
@@ -614,7 +614,7 @@ static void mcf5206_mbar_class_init(ObjectClass *oc, void *data)set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->desc ="MCF5206 system integration module" ; dc->realize = mcf5206_mbar_realize; - dc->reset = m5206_mbar_reset; +device_class_set_legacy_reset (dc, m5206_mbar_reset); }static const TypeInfo mcf5206_mbar_info = {
hw/m68k/mcf_intc.c +1 -1
@@ -189,7 +189,7 @@ static void mcf_intc_class_init(ObjectClass *oc, void *data)device_class_set_props (dc, mcf_intc_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->reset = mcf_intc_reset; +device_class_set_legacy_reset (dc, mcf_intc_reset); }static const TypeInfo mcf_intc_gate_info = {
hw/m68k/next-cube.c +1 -1
@@ -959,7 +959,7 @@ static void next_pc_class_init(ObjectClass *klass, void *data) dc->desc ="NeXT Peripheral Controller" ; dc->realize = next_pc_realize; - dc->reset = next_pc_reset; +device_class_set_legacy_reset (dc, next_pc_reset);device_class_set_props (dc, next_pc_properties); dc->vmsd = &next_pc_vmstate; }
hw/m68k/next-kbd.c +1 -1
@@ -271,7 +271,7 @@ static void nextkbd_class_init(ObjectClass *oc, void *data)set_bit (DEVICE_CATEGORY_INPUT , dc->categories); dc->vmsd = &nextkbd_vmstate; dc->realize = nextkbd_realize; - dc->reset = nextkbd_reset; +device_class_set_legacy_reset (dc, nextkbd_reset); }static const TypeInfo nextkbd_info = {
hw/mem/cxl_type3.c +1 -1
@@ -2144,7 +2144,7 @@ static void ct3_class_init(ObjectClass *oc, void *data)set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); dc->desc ="CXL Memory Device (Type 3)" ; - dc->reset = ct3d_reset; +device_class_set_legacy_reset (dc, ct3d_reset);device_class_set_props (dc, ct3_props); cvc->get_lsa_size = get_lsa_size;
hw/misc/a9scu.c +1 -1
@@ -134,7 +134,7 @@ static void a9_scu_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, a9_scu_properties); dc->vmsd = &vmstate_a9_scu; - dc->reset = a9_scu_reset; +device_class_set_legacy_reset (dc, a9_scu_reset); dc->realize = a9_scu_realize; }
hw/misc/allwinner-cpucfg.c +1 -1
@@ -262,7 +262,7 @@ static void allwinner_cpucfg_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_cpucfg_reset; +device_class_set_legacy_reset (dc, allwinner_cpucfg_reset); dc->vmsd = &allwinner_cpucfg_vmstate; }
hw/misc/allwinner-h3-ccu.c +1 -1
@@ -222,7 +222,7 @@ static void allwinner_h3_ccu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_h3_ccu_reset; +device_class_set_legacy_reset (dc, allwinner_h3_ccu_reset); dc->vmsd = &allwinner_h3_ccu_vmstate; }
hw/misc/allwinner-h3-dramc.c +1 -1
@@ -336,7 +336,7 @@ static void allwinner_h3_dramc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_h3_dramc_reset; +device_class_set_legacy_reset (dc, allwinner_h3_dramc_reset); dc->vmsd = &allwinner_h3_dramc_vmstate; dc->realize = allwinner_h3_dramc_realize;device_class_set_props (dc, allwinner_h3_dramc_properties);
hw/misc/allwinner-h3-sysctrl.c +1 -1
@@ -120,7 +120,7 @@ static void allwinner_h3_sysctrl_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_h3_sysctrl_reset; +device_class_set_legacy_reset (dc, allwinner_h3_sysctrl_reset); dc->vmsd = &allwinner_h3_sysctrl_vmstate; }
hw/misc/allwinner-r40-ccu.c +1 -1
@@ -189,7 +189,7 @@ static void allwinner_r40_ccu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_r40_ccu_reset; +device_class_set_legacy_reset (dc, allwinner_r40_ccu_reset); dc->vmsd = &allwinner_r40_ccu_vmstate; }
hw/misc/allwinner-r40-dramc.c +1 -1
@@ -489,7 +489,7 @@ static void allwinner_r40_dramc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_r40_dramc_reset; +device_class_set_legacy_reset (dc, allwinner_r40_dramc_reset); dc->vmsd = &allwinner_r40_dramc_vmstate; dc->realize = allwinner_r40_dramc_realize;device_class_set_props (dc, allwinner_r40_dramc_properties);
hw/misc/allwinner-sid.c +1 -1
@@ -148,7 +148,7 @@ static void allwinner_sid_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_sid_reset; +device_class_set_legacy_reset (dc, allwinner_sid_reset); dc->vmsd = &allwinner_sid_vmstate;device_class_set_props (dc, allwinner_sid_properties); }
hw/misc/allwinner-sramc.c +1 -1
@@ -139,7 +139,7 @@ static void allwinner_sramc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_sramc_reset; +device_class_set_legacy_reset (dc, allwinner_sramc_reset); dc->vmsd = &allwinner_sramc_vmstate; }
hw/misc/applesmc.c +1 -1
@@ -383,7 +383,7 @@ static void qdev_applesmc_class_init(ObjectClass *klass, void *data) dc->realize = applesmc_isa_realize; dc->unrealize = applesmc_unrealize; - dc->reset = qdev_applesmc_isa_reset; +device_class_set_legacy_reset (dc, qdev_applesmc_isa_reset);device_class_set_props (dc, applesmc_isa_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); adevc->build_dev_aml = build_applesmc_aml;
hw/misc/arm_l2x0.c +1 -1
@@ -184,7 +184,7 @@ static void l2x0_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_l2x0;device_class_set_props (dc, l2x0_properties); - dc->reset = l2x0_priv_reset; +device_class_set_legacy_reset (dc, l2x0_priv_reset); }static const TypeInfo l2x0_info = {
hw/misc/arm_sysctl.c +1 -1
@@ -640,7 +640,7 @@ static void arm_sysctl_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = arm_sysctl_realize; - dc->reset = arm_sysctl_reset; +device_class_set_legacy_reset (dc, arm_sysctl_reset); dc->vmsd = &vmstate_arm_sysctl;device_class_set_props (dc, arm_sysctl_properties); }
hw/misc/armsse-cpu-pwrctrl.c +1 -1
@@ -129,7 +129,7 @@ static void pwrctrl_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = pwrctrl_reset; +device_class_set_legacy_reset (dc, pwrctrl_reset); dc->vmsd = &pwrctrl_vmstate; }
hw/misc/armsse-mhu.c +1 -1
@@ -180,7 +180,7 @@ static void armsse_mhu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = armsse_mhu_reset; +device_class_set_legacy_reset (dc, armsse_mhu_reset); dc->vmsd = &armsse_mhu_vmstate; }
hw/misc/aspeed_hace.c +1 -1
@@ -446,7 +446,7 @@ static void aspeed_hace_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_hace_realize; - dc->reset = aspeed_hace_reset; +device_class_set_legacy_reset (dc, aspeed_hace_reset);device_class_set_props (dc, aspeed_hace_properties); dc->vmsd = &vmstate_aspeed_hace; }
hw/misc/aspeed_i3c.c +2 -2
@@ -334,7 +334,7 @@ static void aspeed_i3c_device_class_init(ObjectClass *klass, void *data) dc->desc ="Aspeed I3C Device" ; dc->realize = aspeed_i3c_device_realize; - dc->reset = aspeed_i3c_device_reset; +device_class_set_legacy_reset (dc, aspeed_i3c_device_reset);device_class_set_props (dc, aspeed_i3c_device_properties); }
@@ -362,7 +362,7 @@ static void aspeed_i3c_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_i3c_realize; - dc->reset = aspeed_i3c_reset; +device_class_set_legacy_reset (dc, aspeed_i3c_reset); dc->desc ="Aspeed I3C Controller" ; dc->vmsd = &vmstate_aspeed_i3c; }
hw/misc/aspeed_lpc.c +1 -1
@@ -464,7 +464,7 @@ static void aspeed_lpc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_lpc_realize; - dc->reset = aspeed_lpc_reset; +device_class_set_legacy_reset (dc, aspeed_lpc_reset); dc->desc ="Aspeed LPC Controller" , dc->vmsd = &vmstate_aspeed_lpc;device_class_set_props (dc, aspeed_lpc_properties);
hw/misc/aspeed_peci.c +1 -1
@@ -135,7 +135,7 @@ static void aspeed_peci_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_peci_realize; - dc->reset = aspeed_peci_reset; +device_class_set_legacy_reset (dc, aspeed_peci_reset); dc->desc ="Aspeed PECI Controller" ; }
hw/misc/aspeed_sbc.c +1 -1
@@ -147,7 +147,7 @@ static void aspeed_sbc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_sbc_realize; - dc->reset = aspeed_sbc_reset; +device_class_set_legacy_reset (dc, aspeed_sbc_reset); dc->vmsd = &vmstate_aspeed_sbc;device_class_set_props (dc, aspeed_sbc_properties); }
hw/misc/aspeed_scu.c +5 -5
@@ -614,7 +614,7 @@ static void aspeed_scu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_scu_realize; - dc->reset = aspeed_scu_reset; +device_class_set_legacy_reset (dc, aspeed_scu_reset); dc->desc ="ASPEED System Control Unit" ; dc->vmsd = &vmstate_aspeed_scu;device_class_set_props (dc, aspeed_scu_properties);
@@ -831,7 +831,7 @@ static void aspeed_2600_scu_class_init(ObjectClass *klass, void *data)AspeedSCUClass *asc =ASPEED_SCU_CLASS (klass); dc->desc ="ASPEED 2600 System Control Unit" ; - dc->reset = aspeed_ast2600_scu_reset; +device_class_set_legacy_reset (dc, aspeed_ast2600_scu_reset); asc->resets = ast2600_a3_resets; asc->calc_hpll = aspeed_2600_scu_calc_hpll; asc->get_apb = aspeed_2600_scu_get_apb_freq;
@@ -947,7 +947,7 @@ static void aspeed_2700_scu_class_init(ObjectClass *klass, void *data)AspeedSCUClass *asc =ASPEED_SCU_CLASS (klass); dc->desc ="ASPEED 2700 System Control Unit" ; - dc->reset = aspeed_ast2700_scu_reset; +device_class_set_legacy_reset (dc, aspeed_ast2700_scu_reset); asc->resets = ast2700_a0_resets; asc->calc_hpll = aspeed_2600_scu_calc_hpll; asc->get_apb = aspeed_2700_scu_get_apb_freq;
@@ -1061,7 +1061,7 @@ static void aspeed_2700_scuio_class_init(ObjectClass *klass, void *data)AspeedSCUClass *asc =ASPEED_SCU_CLASS (klass); dc->desc ="ASPEED 2700 System Control Unit I/O" ; - dc->reset = aspeed_ast2700_scu_reset; +device_class_set_legacy_reset (dc, aspeed_ast2700_scu_reset); asc->resets = ast2700_a0_resets_io; asc->calc_hpll = aspeed_2600_scu_calc_hpll; asc->get_apb = aspeed_2700_scuio_get_apb_freq;
@@ -1119,7 +1119,7 @@ static void aspeed_1030_scu_class_init(ObjectClass *klass, void *data)AspeedSCUClass *asc =ASPEED_SCU_CLASS (klass); dc->desc ="ASPEED 1030 System Control Unit" ; - dc->reset = aspeed_ast1030_scu_reset; +device_class_set_legacy_reset (dc, aspeed_ast1030_scu_reset); asc->resets = ast1030_a1_resets; asc->calc_hpll = aspeed_2600_scu_calc_hpll; asc->get_apb = aspeed_1030_scu_get_apb_freq;
hw/misc/aspeed_sdmc.c +2 -2
@@ -304,7 +304,7 @@ static void aspeed_sdmc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aspeed_sdmc_realize; - dc->reset = aspeed_sdmc_reset; +device_class_set_legacy_reset (dc, aspeed_sdmc_reset); dc->desc ="ASPEED SDRAM Memory Controller" ; dc->vmsd = &vmstate_aspeed_sdmc;device_class_set_props (dc, aspeed_sdmc_properties);
@@ -677,7 +677,7 @@ static void aspeed_2700_sdmc_class_init(ObjectClass *klass, void *data)AspeedSDMCClass *asc =ASPEED_SDMC_CLASS (klass); dc->desc ="ASPEED 2700 SDRAM Memory Controller" ; - dc->reset = aspeed_2700_sdmc_reset; +device_class_set_legacy_reset (dc, aspeed_2700_sdmc_reset); asc->is_bus64bit = true; asc->max_ram_size =8 * GiB;
hw/misc/aspeed_xdma.c +1 -1
@@ -222,7 +222,7 @@ static void aspeed_xdma_class_init(ObjectClass *classp, void *data)DeviceClass *dc =DEVICE_CLASS (classp); dc->realize = aspeed_xdma_realize; - dc->reset = aspeed_xdma_reset; +device_class_set_legacy_reset (dc, aspeed_xdma_reset); dc->vmsd = &aspeed_xdma_vmstate; }
hw/misc/avr_power.c +1 -1
@@ -94,7 +94,7 @@ static void avr_mask_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = avr_mask_reset; +device_class_set_legacy_reset (dc, avr_mask_reset); }static const TypeInfo avr_mask_info = {
hw/misc/bcm2835_cprman.c +4 -4
@@ -135,7 +135,7 @@ static void pll_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = pll_reset; +device_class_set_legacy_reset (dc, pll_reset); dc->vmsd = &pll_vmstate; }
@@ -239,7 +239,7 @@ static void pll_channel_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = pll_channel_reset; +device_class_set_legacy_reset (dc, pll_channel_reset); dc->vmsd = &pll_channel_vmstate; }
@@ -360,7 +360,7 @@ static void clock_mux_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = clock_mux_reset; +device_class_set_legacy_reset (dc, clock_mux_reset); dc->vmsd = &clock_mux_vmstate; }
@@ -788,7 +788,7 @@ static void cprman_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = cprman_realize; - dc->reset = cprman_reset; +device_class_set_legacy_reset (dc, cprman_reset); dc->vmsd = &cprman_vmstate;device_class_set_props (dc, cprman_properties); }
hw/misc/bcm2835_mbox.c +1 -1
@@ -319,7 +319,7 @@ static void bcm2835_mbox_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = bcm2835_mbox_realize; - dc->reset = bcm2835_mbox_reset; +device_class_set_legacy_reset (dc, bcm2835_mbox_reset); dc->vmsd = &vmstate_bcm2835_mbox; }
hw/misc/bcm2835_mphi.c +1 -1
@@ -171,7 +171,7 @@ static void mphi_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = mphi_realize; - dc->reset = mphi_reset; +device_class_set_legacy_reset (dc, mphi_reset); dc->vmsd = &vmstate_mphi_state; }
hw/misc/bcm2835_powermgt.c +1 -1
@@ -140,7 +140,7 @@ static void bcm2835_powermgt_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = bcm2835_powermgt_reset; +device_class_set_legacy_reset (dc, bcm2835_powermgt_reset); dc->vmsd = &vmstate_bcm2835_powermgt; }
hw/misc/bcm2835_rng.c +1 -1
@@ -127,7 +127,7 @@ static void bcm2835_rng_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = bcm2835_rng_reset; +device_class_set_legacy_reset (dc, bcm2835_rng_reset); dc->vmsd = &vmstate_bcm2835_rng; }
hw/misc/bcm2835_thermal.c +1 -1
@@ -118,7 +118,7 @@ static void bcm2835_thermal_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = bcm2835_thermal_realize; - dc->reset = bcm2835_thermal_reset; +device_class_set_legacy_reset (dc, bcm2835_thermal_reset); dc->vmsd = &bcm2835_thermal_vmstate; }
hw/misc/eccmemctl.c +1 -1
@@ -335,7 +335,7 @@ static void ecc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = ecc_realize; - dc->reset = ecc_reset; +device_class_set_legacy_reset (dc, ecc_reset); dc->vmsd = &vmstate_ecc;device_class_set_props (dc, ecc_properties); }
hw/misc/exynos4210_clk.c +1 -1
@@ -145,7 +145,7 @@ static void exynos4210_clk_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = exynos4210_clk_reset; +device_class_set_legacy_reset (dc, exynos4210_clk_reset); dc->vmsd = &exynos4210_clk_vmstate; }
hw/misc/exynos4210_pmu.c +1 -1
@@ -502,7 +502,7 @@ static void exynos4210_pmu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = exynos4210_pmu_reset; +device_class_set_legacy_reset (dc, exynos4210_pmu_reset); dc->vmsd = &exynos4210_pmu_vmstate; }
hw/misc/exynos4210_rng.c +1 -1
@@ -259,7 +259,7 @@ static void exynos4210_rng_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = exynos4210_rng_reset; +device_class_set_legacy_reset (dc, exynos4210_rng_reset); dc->vmsd = &exynos4210_rng_vmstate; }
hw/misc/imx25_ccm.c +1 -1
@@ -297,7 +297,7 @@ static void imx25_ccm_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);IMXCCMClass *ccm =IMX_CCM_CLASS (klass); - dc->reset = imx25_ccm_reset; +device_class_set_legacy_reset (dc, imx25_ccm_reset); dc->vmsd = &vmstate_imx25_ccm; dc->desc ="i.MX25 Clock Control Module" ;
hw/misc/imx31_ccm.c +1 -1
@@ -324,7 +324,7 @@ static void imx31_ccm_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);IMXCCMClass *ccm =IMX_CCM_CLASS (klass); - dc->reset = imx31_ccm_reset; +device_class_set_legacy_reset (dc, imx31_ccm_reset); dc->vmsd = &vmstate_imx31_ccm; dc->desc ="i.MX31 Clock Control Module" ;
hw/misc/imx6_ccm.c +1 -1
@@ -747,7 +747,7 @@ static void imx6_ccm_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);IMXCCMClass *ccm =IMX_CCM_CLASS (klass); - dc->reset = imx6_ccm_reset; +device_class_set_legacy_reset (dc, imx6_ccm_reset); dc->vmsd = &vmstate_imx6_ccm; dc->desc ="i.MX6 Clock Control Module" ;
hw/misc/imx6_src.c +1 -1
@@ -291,7 +291,7 @@ static void imx6_src_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = imx6_src_realize; - dc->reset = imx6_src_reset; +device_class_set_legacy_reset (dc, imx6_src_reset); dc->vmsd = &vmstate_imx6_src; dc->desc ="i.MX6 System Reset Controller" ; }
hw/misc/imx6ul_ccm.c +1 -1
@@ -909,7 +909,7 @@ static void imx6ul_ccm_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);IMXCCMClass *ccm =IMX_CCM_CLASS (klass); - dc->reset = imx6ul_ccm_reset; +device_class_set_legacy_reset (dc, imx6ul_ccm_reset); dc->vmsd = &vmstate_imx6ul_ccm; dc->desc ="i.MX6UL Clock Control Module" ;
hw/misc/imx7_ccm.c +2 -2
@@ -267,7 +267,7 @@ static void imx7_ccm_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);IMXCCMClass *ccm =IMX_CCM_CLASS (klass); - dc->reset = imx7_ccm_reset; +device_class_set_legacy_reset (dc, imx7_ccm_reset); dc->vmsd = &vmstate_imx7_ccm; dc->desc ="i.MX7 Clock Control Module" ;
@@ -297,7 +297,7 @@ static void imx7_analog_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = imx7_analog_reset; +device_class_set_legacy_reset (dc, imx7_analog_reset); dc->vmsd = &vmstate_imx7_analog; dc->desc ="i.MX7 Analog Module" ; }
hw/misc/imx7_snvs.c +1 -1
@@ -147,7 +147,7 @@ static void imx7_snvs_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = imx7_snvs_reset; +device_class_set_legacy_reset (dc, imx7_snvs_reset); dc->vmsd = &vmstate_imx7_snvs; dc->desc ="i.MX7 Secure Non-Volatile Storage Module" ; }
hw/misc/imx7_src.c +1 -1
@@ -256,7 +256,7 @@ static void imx7_src_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = imx7_src_realize; - dc->reset = imx7_src_reset; +device_class_set_legacy_reset (dc, imx7_src_reset); dc->vmsd = &vmstate_imx7_src; dc->desc ="i.MX6 System Reset Controller" ; }
hw/misc/imx_rngc.c +1 -1
@@ -259,7 +259,7 @@ static void imx_rngc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = imx_rngc_realize; - dc->reset = imx_rngc_reset; +device_class_set_legacy_reset (dc, imx_rngc_reset); dc->desc =RNGC_NAME , dc->vmsd = &vmstate_imx_rngc; }
hw/misc/iotkit-secctl.c +1 -1
@@ -824,7 +824,7 @@ static void iotkit_secctl_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &iotkit_secctl_vmstate; - dc->reset = iotkit_secctl_reset; +device_class_set_legacy_reset (dc, iotkit_secctl_reset); dc->realize = iotkit_secctl_realize;device_class_set_props (dc, iotkit_secctl_props); }
hw/misc/iotkit-sysctl.c +1 -1
@@ -850,7 +850,7 @@ static void iotkit_sysctl_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &iotkit_sysctl_vmstate; - dc->reset = iotkit_sysctl_reset; +device_class_set_legacy_reset (dc, iotkit_sysctl_reset);device_class_set_props (dc, iotkit_sysctl_props); dc->realize = iotkit_sysctl_realize; }
hw/misc/ivshmem.c +1 -1
@@ -991,7 +991,7 @@ static void ivshmem_common_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_IVSHMEM ; k->class_id =PCI_CLASS_MEMORY_RAM ; k->revision =1 ; - dc->reset = ivshmem_reset; +device_class_set_legacy_reset (dc, ivshmem_reset);set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->desc ="Inter-VM shared memory" ; }
hw/misc/lasi.c +1 -1
@@ -267,7 +267,7 @@ static void lasi_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = lasi_reset; +device_class_set_legacy_reset (dc, lasi_reset); dc->vmsd = &vmstate_lasi; }
hw/misc/led.c +1 -1
@@ -114,7 +114,7 @@ static void led_class_init(ObjectClass *klass, void *data) dc->desc ="LED" ; dc->vmsd = &vmstate_led; - dc->reset = led_reset; +device_class_set_legacy_reset (dc, led_reset); dc->realize = led_realize;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);device_class_set_props (dc, led_properties);
hw/misc/macio/cuda.c +1 -1
@@ -564,7 +564,7 @@ static void cuda_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = cuda_realize; - dc->reset = cuda_reset; +device_class_set_legacy_reset (dc, cuda_reset); dc->vmsd = &vmstate_cuda;device_class_set_props (dc, cuda_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);
hw/misc/macio/gpio.c +1 -1
@@ -194,7 +194,7 @@ static void macio_gpio_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);NMIClass *nc =NMI_CLASS (oc); - dc->reset = macio_gpio_reset; +device_class_set_legacy_reset (dc, macio_gpio_reset); dc->vmsd = &vmstate_macio_gpio; nc->nmi_monitor_handler = macio_gpio_nmi; }
hw/misc/macio/mac_dbdma.c +1 -1
@@ -922,7 +922,7 @@ static void mac_dbdma_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = mac_dbdma_realize; - dc->reset = mac_dbdma_reset; +device_class_set_legacy_reset (dc, mac_dbdma_reset); dc->vmsd = &vmstate_dbdma; }
hw/misc/macio/pmu.c +1 -1
@@ -770,7 +770,7 @@ static void pmu_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = pmu_realize; - dc->reset = pmu_reset; +device_class_set_legacy_reset (dc, pmu_reset); dc->vmsd = &vmstate_pmu;device_class_set_props (dc, pmu_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);
hw/misc/mips_cmgcr.c +1 -1
@@ -235,7 +235,7 @@ static void mips_gcr_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);device_class_set_props (dc, mips_gcr_properties); dc->vmsd = &vmstate_mips_gcr; - dc->reset = mips_gcr_reset; +device_class_set_legacy_reset (dc, mips_gcr_reset); dc->realize = mips_gcr_realize; }
hw/misc/mips_cpc.c +1 -1
@@ -174,7 +174,7 @@ static void mips_cpc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = mips_cpc_realize; - dc->reset = mips_cpc_reset; +device_class_set_legacy_reset (dc, mips_cpc_reset); dc->vmsd = &vmstate_mips_cpc;device_class_set_props (dc, mips_cpc_properties); }
hw/misc/mips_itu.c +1 -1
@@ -547,7 +547,7 @@ static void mips_itu_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, mips_itu_properties); dc->realize = mips_itu_realize; - dc->reset = mips_itu_reset; +device_class_set_legacy_reset (dc, mips_itu_reset); }static const TypeInfo mips_itu_info = {
hw/misc/mps2-fpgaio.c +1 -1
@@ -335,7 +335,7 @@ static void mps2_fpgaio_class_init(ObjectClass *klass, void *data) dc->vmsd = &mps2_fpgaio_vmstate; dc->realize = mps2_fpgaio_realize; - dc->reset = mps2_fpgaio_reset; +device_class_set_legacy_reset (dc, mps2_fpgaio_reset);device_class_set_props (dc, mps2_fpgaio_properties); }
hw/misc/mps2-scc.c +1 -1
@@ -481,7 +481,7 @@ static void mps2_scc_class_init(ObjectClass *klass, void *data) dc->realize = mps2_scc_realize; dc->vmsd = &mps2_scc_vmstate; - dc->reset = mps2_scc_reset; +device_class_set_legacy_reset (dc, mps2_scc_reset);device_class_set_props (dc, mps2_scc_properties); }
hw/misc/msf2-sysreg.c +1 -1
@@ -142,7 +142,7 @@ static void msf2_sysreg_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_msf2_sysreg; - dc->reset = msf2_sysreg_reset; +device_class_set_legacy_reset (dc, msf2_sysreg_reset);device_class_set_props (dc, msf2_sysreg_properties); dc->realize = msf2_sysreg_realize; }
hw/misc/nrf51_rng.c +1 -1
@@ -247,7 +247,7 @@ static void nrf51_rng_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, nrf51_rng_properties); dc->vmsd = &vmstate_rng; - dc->reset = nrf51_rng_reset; +device_class_set_legacy_reset (dc, nrf51_rng_reset); }static const TypeInfo nrf51_rng_info = {
hw/misc/pci-testdev.c +1 -1
@@ -337,7 +337,7 @@ static void pci_testdev_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_OTHERS ; dc->desc ="PCI Test Device" ;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->reset = qdev_pci_testdev_reset; +device_class_set_legacy_reset (dc, qdev_pci_testdev_reset);device_class_set_props (dc, pci_testdev_properties); }
hw/misc/sifive_e_aon.c +1 -1
@@ -299,7 +299,7 @@ static void sifive_e_aon_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->reset = sifive_e_aon_reset; +device_class_set_legacy_reset (dc, sifive_e_aon_reset);device_class_set_props (dc, sifive_e_aon_properties); }
hw/misc/sifive_u_prci.c +1 -1
@@ -151,7 +151,7 @@ static void sifive_u_prci_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = sifive_u_prci_realize; - dc->reset = sifive_u_prci_reset; +device_class_set_legacy_reset (dc, sifive_u_prci_reset); }static const TypeInfo sifive_u_prci_info = {
hw/misc/slavio_misc.c +1 -1
@@ -487,7 +487,7 @@ static void slavio_misc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = slavio_misc_reset; +device_class_set_legacy_reset (dc, slavio_misc_reset); dc->vmsd = &vmstate_misc; }
hw/misc/stm32f2xx_syscfg.c +1 -1
@@ -142,7 +142,7 @@ static void stm32f2xx_syscfg_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = stm32f2xx_syscfg_reset; +device_class_set_legacy_reset (dc, stm32f2xx_syscfg_reset); }static const TypeInfo stm32f2xx_syscfg_info = {
hw/misc/stm32f4xx_exti.c +1 -1
@@ -168,7 +168,7 @@ static void stm32f4xx_exti_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = stm32f4xx_exti_reset; +device_class_set_legacy_reset (dc, stm32f4xx_exti_reset); dc->vmsd = &vmstate_stm32f4xx_exti; }
hw/misc/stm32f4xx_syscfg.c +1 -1
@@ -151,7 +151,7 @@ static void stm32f4xx_syscfg_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = stm32f4xx_syscfg_reset; +device_class_set_legacy_reset (dc, stm32f4xx_syscfg_reset); dc->vmsd = &vmstate_stm32f4xx_syscfg; }
hw/misc/tz-mpc.c +1 -1
@@ -599,7 +599,7 @@ static void tz_mpc_class_init(ObjectClass *klass, void *data) dc->realize = tz_mpc_realize; dc->vmsd = &tz_mpc_vmstate; - dc->reset = tz_mpc_reset; +device_class_set_legacy_reset (dc, tz_mpc_reset);device_class_set_props (dc, tz_mpc_properties); }
hw/misc/tz-msc.c +1 -1
@@ -292,7 +292,7 @@ static void tz_msc_class_init(ObjectClass *klass, void *data) dc->realize = tz_msc_realize; dc->vmsd = &tz_msc_vmstate; - dc->reset = tz_msc_reset; +device_class_set_legacy_reset (dc, tz_msc_reset);device_class_set_props (dc, tz_msc_properties); }
hw/misc/tz-ppc.c +1 -1
@@ -332,7 +332,7 @@ static void tz_ppc_class_init(ObjectClass *klass, void *data) dc->realize = tz_ppc_realize; dc->vmsd = &tz_ppc_vmstate; - dc->reset = tz_ppc_reset; +device_class_set_legacy_reset (dc, tz_ppc_reset);device_class_set_props (dc, tz_ppc_properties); }
hw/misc/virt_ctrl.c +1 -1
@@ -129,7 +129,7 @@ static void virt_ctrl_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->reset = virt_ctrl_reset; +device_class_set_legacy_reset (dc, virt_ctrl_reset); dc->realize = virt_ctrl_realize; dc->vmsd = &vmstate_virt_ctrl; }
hw/misc/xlnx-versal-cfu.c +1 -1
@@ -495,7 +495,7 @@ static void cfu_apb_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = cfu_apb_reset; +device_class_set_legacy_reset (dc, cfu_apb_reset); dc->vmsd = &vmstate_cfu_apb;device_class_set_props (dc, cfu_props); }
hw/net/allwinner-sun8i-emac.c +1 -1
@@ -881,7 +881,7 @@ static void allwinner_sun8i_emac_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = allwinner_sun8i_emac_realize; - dc->reset = allwinner_sun8i_emac_reset; +device_class_set_legacy_reset (dc, allwinner_sun8i_emac_reset); dc->vmsd = &vmstate_aw_emac;device_class_set_props (dc, allwinner_sun8i_emac_properties); }
hw/net/allwinner_emac.c +1 -1
@@ -521,7 +521,7 @@ static void aw_emac_class_init(ObjectClass *klass, void *data) dc->realize = aw_emac_realize;device_class_set_props (dc, aw_emac_properties); - dc->reset = aw_emac_reset; +device_class_set_legacy_reset (dc, aw_emac_reset); dc->vmsd = &vmstate_aw_emac; }
hw/net/cadence_gem.c +1 -1
@@ -1809,7 +1809,7 @@ static void gem_class_init(ObjectClass *klass, void *data) dc->realize = gem_realize;device_class_set_props (dc, gem_properties); dc->vmsd = &vmstate_cadence_gem; - dc->reset = gem_reset; +device_class_set_legacy_reset (dc, gem_reset); }static const TypeInfo gem_info = {
hw/net/can/can_kvaser_pci.c +1 -1
@@ -299,7 +299,7 @@ static void kvaser_pci_class_init(ObjectClass *klass, void *data) k->class_id =0x00ff00 ; dc->desc ="Kvaser PCICANx" ; dc->vmsd = &vmstate_kvaser_pci; - dc->reset = kvaser_pci_reset; +device_class_set_legacy_reset (dc, kvaser_pci_reset);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/net/can/can_mioe3680_pci.c +1 -1
@@ -243,7 +243,7 @@ static void mioe3680_pci_class_init(ObjectClass *klass, void *data) dc->desc ="Mioe3680 PCICANx" ; dc->vmsd = &vmstate_mioe3680_pci;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->reset = mioe3680_pci_reset; +device_class_set_legacy_reset (dc, mioe3680_pci_reset); }static const TypeInfo mioe3680_pci_info = {
hw/net/can/can_pcm3680_pci.c +1 -1
@@ -244,7 +244,7 @@ static void pcm3680i_pci_class_init(ObjectClass *klass, void *data) dc->desc ="Pcm3680i PCICANx" ; dc->vmsd = &vmstate_pcm3680i_pci;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->reset = pcm3680i_pci_reset; +device_class_set_legacy_reset (dc, pcm3680i_pci_reset); }static const TypeInfo pcm3680i_pci_info = {
hw/net/can/ctucan_pci.c +1 -1
@@ -257,7 +257,7 @@ static void ctucan_pci_class_init(ObjectClass *klass, void *data) dc->desc ="CTU CAN PCI" ; dc->vmsd = &vmstate_ctucan_pci;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->reset = ctucan_pci_reset; +device_class_set_legacy_reset (dc, ctucan_pci_reset); }static const TypeInfo ctucan_pci_info = {
hw/net/can/xlnx-versal-canfd.c +1 -1
@@ -2088,7 +2088,7 @@ static void canfd_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = canfd_reset; +device_class_set_legacy_reset (dc, canfd_reset); dc->realize = canfd_realize;device_class_set_props (dc, canfd_core_properties); dc->vmsd = &vmstate_canfd;
hw/net/dp8393x.c +1 -1
@@ -946,7 +946,7 @@ static void dp8393x_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->realize = dp8393x_realize; - dc->reset = dp8393x_reset; +device_class_set_legacy_reset (dc, dp8393x_reset); dc->vmsd = &vmstate_dp8393x;device_class_set_props (dc, dp8393x_properties); }
hw/net/etraxfs_eth.c +1 -1
@@ -638,7 +638,7 @@ static void etraxfs_eth_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = etraxfs_eth_realize; - dc->reset = etraxfs_eth_reset; +device_class_set_legacy_reset (dc, etraxfs_eth_reset);device_class_set_props (dc, etraxfs_eth_properties);/* Reason: dma_out, dma_in are not user settable */ dc->user_creatable = false;
hw/net/fsl_etsec/etsec.c +1 -1
@@ -425,7 +425,7 @@ static void etsec_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = etsec_realize; - dc->reset = etsec_reset; +device_class_set_legacy_reset (dc, etsec_reset);device_class_set_props (dc, etsec_properties);/* Supported by ppce500 machine */ dc->user_creatable = true;
hw/net/ftgmac100.c +2 -2
@@ -1267,7 +1267,7 @@ static void ftgmac100_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_ftgmac100; - dc->reset = ftgmac100_reset; +device_class_set_legacy_reset (dc, ftgmac100_reset);device_class_set_props (dc, ftgmac100_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->realize = ftgmac100_realize;
@@ -1427,7 +1427,7 @@ static void aspeed_mii_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_aspeed_mii; - dc->reset = aspeed_mii_reset; +device_class_set_legacy_reset (dc, aspeed_mii_reset); dc->realize = aspeed_mii_realize; dc->desc ="Aspeed MII controller" ;device_class_set_props (dc, aspeed_mii_properties);
hw/net/imx_fec.c +1 -1
@@ -1354,7 +1354,7 @@ static void imx_eth_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_imx_eth; - dc->reset = imx_eth_reset; +device_class_set_legacy_reset (dc, imx_eth_reset);device_class_set_props (dc, imx_eth_properties); dc->realize = imx_eth_realize; dc->desc ="i.MX FEC/ENET Ethernet Controller" ;
hw/net/lan9118.c +1 -1
@@ -1408,7 +1408,7 @@ static void lan9118_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = lan9118_reset; +device_class_set_legacy_reset (dc, lan9118_reset);device_class_set_props (dc, lan9118_properties); dc->vmsd = &vmstate_lan9118; dc->realize = lan9118_realize;
hw/net/lance.c +1 -1
@@ -151,7 +151,7 @@ static void lance_class_init(ObjectClass *klass, void *data) dc->realize = lance_realize;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->fw_name ="ethernet" ; - dc->reset = lance_reset; +device_class_set_legacy_reset (dc, lance_reset); dc->vmsd = &vmstate_lance;device_class_set_props (dc, lance_properties); }
hw/net/lasi_i82596.c +1 -1
@@ -170,7 +170,7 @@ static void lasi_82596_class_init(ObjectClass *klass, void *data) dc->realize = lasi_82596_realize;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->fw_name ="ethernet" ; - dc->reset = lasi_82596_reset; +device_class_set_legacy_reset (dc, lasi_82596_reset); dc->vmsd = &vmstate_lasi_82596; dc->user_creatable = false;device_class_set_props (dc, lasi_82596_properties);
hw/net/mcf_fec.c +1 -1
@@ -673,7 +673,7 @@ static void mcf_fec_class_init(ObjectClass *oc, void *data)set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->realize = mcf_fec_realize; dc->desc ="MCF Fast Ethernet Controller network device" ; - dc->reset = mcf_fec_reset; +device_class_set_legacy_reset (dc, mcf_fec_reset);device_class_set_props (dc, mcf_fec_properties); }
hw/net/mipsnet.c +1 -1
@@ -278,7 +278,7 @@ static void mipsnet_class_init(ObjectClass *klass, void *data) dc->realize = mipsnet_realize;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->desc ="MIPS Simulator network device" ; - dc->reset = mipsnet_sysbus_reset; +device_class_set_legacy_reset (dc, mipsnet_sysbus_reset); dc->vmsd = &vmstate_mipsnet;device_class_set_props (dc, mipsnet_properties); }
hw/net/msf2-emac.c +1 -1
@@ -571,7 +571,7 @@ static void msf2_emac_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = msf2_emac_realize; - dc->reset = msf2_emac_reset; +device_class_set_legacy_reset (dc, msf2_emac_reset); dc->vmsd = &vmstate_msf2_emac;device_class_set_props (dc, msf2_emac_properties); }
hw/net/npcm7xx_emc.c +1 -1
@@ -859,7 +859,7 @@ static void npcm7xx_emc_class_init(ObjectClass *klass, void *data) dc->desc ="NPCM7xx EMC Controller" ; dc->realize = npcm7xx_emc_realize; dc->unrealize = npcm7xx_emc_unrealize; - dc->reset = npcm7xx_emc_reset; +device_class_set_legacy_reset (dc, npcm7xx_emc_reset); dc->vmsd = &vmstate_npcm7xx_emc;device_class_set_props (dc, npcm7xx_emc_properties); }
hw/net/npcm_gmac.c +1 -1
@@ -926,7 +926,7 @@ static void npcm_gmac_class_init(ObjectClass *klass, void *data) dc->desc ="NPCM GMAC Controller" ; dc->realize = npcm_gmac_realize; dc->unrealize = npcm_gmac_unrealize; - dc->reset = npcm_gmac_reset; +device_class_set_legacy_reset (dc, npcm_gmac_reset); dc->vmsd = &vmstate_npcm_gmac;device_class_set_props (dc, npcm_gmac_properties); }
hw/net/opencores_eth.c +1 -1
@@ -755,7 +755,7 @@ static void open_eth_class_init(ObjectClass *klass, void *data) dc->realize = sysbus_open_eth_realize;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->desc ="Opencores 10/100 Mbit Ethernet" ; - dc->reset = qdev_open_eth_reset; +device_class_set_legacy_reset (dc, qdev_open_eth_reset);device_class_set_props (dc, open_eth_properties); }
hw/net/pcnet-pci.c +1 -1
@@ -269,7 +269,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_AMD_LANCE ; k->revision =0x10 ; k->class_id =PCI_CLASS_NETWORK_ETHERNET ; - dc->reset = pci_reset; +device_class_set_legacy_reset (dc, pci_reset); dc->vmsd = &vmstate_pci_pcnet;device_class_set_props (dc, pcnet_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories);
hw/net/rocker/rocker.c +1 -1
@@ -1494,7 +1494,7 @@ static void rocker_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_NETWORK_OTHER ;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->desc ="Rocker Switch" ; - dc->reset = rocker_reset; +device_class_set_legacy_reset (dc, rocker_reset);device_class_set_props (dc, rocker_properties); dc->vmsd = &rocker_vmsd; }
hw/net/rtl8139.c +1 -1
@@ -3429,7 +3429,7 @@ static void rtl8139_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_REALTEK_8139 ; k->revision =RTL8139_PCI_REVID ;/* >=0x20 is for 8139C+ */ k->class_id =PCI_CLASS_NETWORK_ETHERNET ; - dc->reset = rtl8139_reset; +device_class_set_legacy_reset (dc, rtl8139_reset); dc->vmsd = &vmstate_rtl8139;device_class_set_props (dc, rtl8139_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories);
hw/net/smc91c111.c +1 -1
@@ -799,7 +799,7 @@ static void smc91c111_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = smc91c111_realize; - dc->reset = smc91c111_reset; +device_class_set_legacy_reset (dc, smc91c111_reset); dc->vmsd = &vmstate_smc91c111;device_class_set_props (dc, smc91c111_properties); }
hw/net/stellaris_enet.c +1 -1
@@ -507,7 +507,7 @@ static void stellaris_enet_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = stellaris_enet_realize; - dc->reset = stellaris_enet_reset; +device_class_set_legacy_reset (dc, stellaris_enet_reset);device_class_set_props (dc, stellaris_enet_properties); dc->vmsd = &vmstate_stellaris_enet; }
hw/net/sungem.c +1 -1
@@ -1467,7 +1467,7 @@ static void sungem_class_init(ObjectClass *klass, void *data) k->revision =0x01 ; k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->vmsd = &vmstate_sungem; - dc->reset = sungem_reset; +device_class_set_legacy_reset (dc, sungem_reset);device_class_set_props (dc, sungem_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/sunhme.c +1 -1
@@ -948,7 +948,7 @@ static void sunhme_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_SUN_HME ; k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->vmsd = &vmstate_hme; - dc->reset = sunhme_reset; +device_class_set_legacy_reset (dc, sunhme_reset);device_class_set_props (dc, sunhme_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/tulip.c +1 -1
@@ -1026,7 +1026,7 @@ static void tulip_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->vmsd = &vmstate_pci_tulip;device_class_set_props (dc, tulip_properties); - dc->reset = tulip_qdev_reset; +device_class_set_legacy_reset (dc, tulip_qdev_reset);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/vmxnet3.c +1 -1
@@ -2512,7 +2512,7 @@ static void vmxnet3_class_init(ObjectClass *class, void *data)device_class_set_parent_realize (dc, vmxnet3_realize, &vc->parent_dc_realize); dc->desc ="VMWare Paravirtualized Ethernet v3" ; - dc->reset = vmxnet3_qdev_reset; +device_class_set_legacy_reset (dc, vmxnet3_qdev_reset); dc->vmsd = &vmstate_vmxnet3;device_class_set_props (dc, vmxnet3_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories);
hw/net/xilinx_axienet.c +1 -1
@@ -1014,7 +1014,7 @@ static void xilinx_enet_class_init(ObjectClass *klass, void *data) dc->realize = xilinx_enet_realize;device_class_set_props (dc, xilinx_enet_properties); - dc->reset = xilinx_axienet_reset; +device_class_set_legacy_reset (dc, xilinx_axienet_reset); } static void xilinx_enet_control_stream_class_init(ObjectClass *klass,
hw/net/xilinx_ethlite.c +1 -1
@@ -263,7 +263,7 @@ static void xilinx_ethlite_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = xilinx_ethlite_realize; - dc->reset = xilinx_ethlite_reset; +device_class_set_legacy_reset (dc, xilinx_ethlite_reset);device_class_set_props (dc, xilinx_ethlite_properties); }
hw/nvme/ctrl.c +1 -1
@@ -8845,7 +8845,7 @@ static void nvme_class_init(ObjectClass *oc, void *data) dc->desc ="Non-Volatile Memory Express" ;device_class_set_props (dc, nvme_props); dc->vmsd = &nvme_vmstate; - dc->reset = nvme_pci_reset; +device_class_set_legacy_reset (dc, nvme_pci_reset); }static void nvme_instance_init (Object *obj)
hw/nvram/eeprom_at24c.c +1 -1
@@ -254,7 +254,7 @@ void at24c_eeprom_class_init(ObjectClass *klass, void *data) k->send = &at24c_eeprom_send;device_class_set_props (dc, at24c_eeprom_props); - dc->reset = at24c_eeprom_reset; +device_class_set_legacy_reset (dc, at24c_eeprom_reset); } static
hw/nvram/fw_cfg.c +1 -1
@@ -1260,7 +1260,7 @@ static void fw_cfg_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = fw_cfg_reset; +device_class_set_legacy_reset (dc, fw_cfg_reset); dc->vmsd = &vmstate_fw_cfg;device_class_set_props (dc, fw_cfg_properties);
hw/nvram/mac_nvram.c +1 -1
@@ -147,7 +147,7 @@ static void macio_nvram_class_init(ObjectClass *oc, void *data) dc->realize = macio_nvram_realizefn; dc->unrealize = macio_nvram_unrealizefn; - dc->reset = macio_nvram_reset; +device_class_set_legacy_reset (dc, macio_nvram_reset); dc->vmsd = &vmstate_macio_nvram;device_class_set_props (dc, macio_nvram_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories);
hw/nvram/nrf51_nvm.c +1 -1
@@ -378,7 +378,7 @@ static void nrf51_nvm_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, nrf51_nvm_properties); dc->vmsd = &vmstate_nvm; dc->realize = nrf51_nvm_realize; - dc->reset = nrf51_nvm_reset; +device_class_set_legacy_reset (dc, nrf51_nvm_reset); }static const TypeInfo nrf51_nvm_info = {
hw/pci-bridge/cxl_downstream.c +1 -1
@@ -236,7 +236,7 @@ static void cxl_dsp_class_init(ObjectClass *oc, void *data) k->revision =0 ;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->desc ="CXL Switch Downstream Port" ; - dc->reset = cxl_dsp_reset; +device_class_set_legacy_reset (dc, cxl_dsp_reset); }static const TypeInfo cxl_dsp_info = {
hw/pci-bridge/cxl_upstream.c +1 -1
@@ -380,7 +380,7 @@ static void cxl_upstream_class_init(ObjectClass *oc, void *data) k->revision =0 ;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->desc ="CXL Switch Upstream Port" ; - dc->reset = cxl_usp_reset; +device_class_set_legacy_reset (dc, cxl_usp_reset);device_class_set_props (dc, cxl_upstream_props); }
hw/pci-bridge/i82801b11.c +1 -1
@@ -98,7 +98,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data) k->realize = i82801b11_bridge_realize; k->config_write = pci_bridge_write_config; dc->vmsd = &i82801b11_bridge_dev_vmstate; - dc->reset = pci_bridge_reset; +device_class_set_legacy_reset (dc, pci_bridge_reset);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); }
hw/pci-bridge/pci_bridge_dev.c +1 -1
@@ -254,7 +254,7 @@ static void pci_bridge_dev_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_REDHAT_BRIDGE ; k->class_id =PCI_CLASS_BRIDGE_PCI ; dc->desc ="Standard PCI Bridge" ; - dc->reset = qdev_pci_bridge_dev_reset; +device_class_set_legacy_reset (dc, qdev_pci_bridge_dev_reset);device_class_set_props (dc, pci_bridge_dev_properties); dc->vmsd = &pci_bridge_dev_vmstate;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);
hw/pci-bridge/pci_expander_bridge.c +1 -1
@@ -515,7 +515,7 @@ static void pxb_cxl_dev_class_init(ObjectClass *klass, void *data)/* Host bridges aren't hotpluggable. FIXME: spec reference */ dc->hotpluggable = false; - dc->reset = pxb_cxl_dev_reset; +device_class_set_legacy_reset (dc, pxb_cxl_dev_reset); }static const TypeInfo pxb_cxl_dev_info = {
hw/pci-bridge/pcie_pci_bridge.c +1 -1
@@ -152,7 +152,7 @@ static void pcie_pci_bridge_class_init(ObjectClass *klass, void *data) 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); - dc->reset = &pcie_pci_bridge_reset; +device_class_set_legacy_reset (dc, pcie_pci_bridge_reset);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); hc->plug = pci_bridge_dev_plug_cb; hc->unplug = pci_bridge_dev_unplug_cb;
hw/pci-bridge/simba.c +1 -1
@@ -78,7 +78,7 @@ static void simba_pci_bridge_class_init(ObjectClass *klass, void *data) k->revision =0x11 ; k->config_write = pci_bridge_write_config;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); - dc->reset = pci_bridge_reset; +device_class_set_legacy_reset (dc, pci_bridge_reset); dc->vmsd = &vmstate_pci_device; }
hw/pci-bridge/xio3130_downstream.c +1 -1
@@ -167,7 +167,7 @@ static void xio3130_downstream_class_init(ObjectClass *klass, void *data) k->revision =XIO3130_REVISION ;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->desc ="TI X3130 Downstream Port of PCI Express Switch" ; - dc->reset = xio3130_downstream_reset; +device_class_set_legacy_reset (dc, xio3130_downstream_reset); dc->vmsd = &vmstate_xio3130_downstream;device_class_set_props (dc, xio3130_downstream_props); }
hw/pci-bridge/xio3130_upstream.c +1 -1
@@ -136,7 +136,7 @@ static void xio3130_upstream_class_init(ObjectClass *klass, void *data) k->revision =XIO3130_REVISION ;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->desc ="TI X3130 Upstream Port of PCI Express Switch" ; - dc->reset = xio3130_upstream_reset; +device_class_set_legacy_reset (dc, xio3130_upstream_reset); dc->vmsd = &vmstate_xio3130_upstream; }
hw/pci-host/astro.c +2 -2
@@ -489,7 +489,7 @@ static void elroy_pcihost_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = elroy_reset; +device_class_set_legacy_reset (dc, elroy_reset);device_class_set_props (dc, elroy_pcihost_properties); dc->vmsd = &vmstate_elroy; dc->user_creatable = false;
@@ -865,7 +865,7 @@ static void astro_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = astro_reset; +device_class_set_legacy_reset (dc, astro_reset); dc->vmsd = &vmstate_astro; dc->realize = astro_realize;/*
hw/pci-host/designware.c +1 -1
@@ -607,7 +607,7 @@ static void designware_pcie_root_class_init(ObjectClass *klass, void *data) k->config_read = designware_pcie_root_config_read; k->config_write = designware_pcie_root_config_write; - dc->reset = pci_bridge_reset; +device_class_set_legacy_reset (dc, pci_bridge_reset);/* * PCI-facing part of the host bridge, not usable without the * host-facing part, which can't be device_add'ed, yet.
hw/pci-host/dino.c +1 -1
@@ -502,7 +502,7 @@ static void dino_pcihost_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = dino_pcihost_reset; +device_class_set_legacy_reset (dc, dino_pcihost_reset); dc->realize = dino_pcihost_realize; dc->unrealize = dino_pcihost_unrealize;device_class_set_props (dc, dino_pcihost_properties);
hw/pci-host/gt64120.c +1 -1
@@ -1289,7 +1289,7 @@ static void gt64120_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);device_class_set_props (dc, gt64120_properties); dc->realize = gt64120_realize; - dc->reset = gt64120_reset; +device_class_set_legacy_reset (dc, gt64120_reset); dc->vmsd = &vmstate_gt64120; }
hw/pci-host/mv64361.c +1 -1
@@ -928,7 +928,7 @@ static void mv64361_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = mv64361_realize; - dc->reset = mv64361_reset; +device_class_set_legacy_reset (dc, mv64361_reset); }static const TypeInfo mv64361_type_info = {
hw/pci-host/ppc440_pcix.c +1 -1
@@ -524,7 +524,7 @@ static void ppc440_pcix_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = ppc440_pcix_realize; - dc->reset = ppc440_pcix_reset; +device_class_set_legacy_reset (dc, ppc440_pcix_reset); }static const TypeInfo ppc440_pcix_info = {
hw/pci-host/q35.c +1 -1
@@ -686,7 +686,7 @@ static void mch_class_init(ObjectClass *klass, void *data) k->realize = mch_realize; k->config_write = mch_write_config; - dc->reset = mch_reset; +device_class_set_legacy_reset (dc, mch_reset);device_class_set_props (dc, mch_props);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->desc ="Host bridge" ;
hw/pci-host/sabre.c +1 -1
@@ -504,7 +504,7 @@ static void sabre_class_init(ObjectClass *klass, void *data)SysBusDeviceClass *sbc =SYS_BUS_DEVICE_CLASS (klass); dc->realize = sabre_realize; - dc->reset = sabre_reset; +device_class_set_legacy_reset (dc, sabre_reset);device_class_set_props (dc, sabre_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->fw_name ="pci" ;
hw/pci-host/versatile.c +1 -1
@@ -509,7 +509,7 @@ static void pci_vpb_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = pci_vpb_realize; - dc->reset = pci_vpb_reset; +device_class_set_legacy_reset (dc, pci_vpb_reset); dc->vmsd = &pci_vpb_vmstate;device_class_set_props (dc, pci_vpb_properties); }
hw/pci-host/xilinx-pcie.c +1 -1
@@ -300,7 +300,7 @@ static void xilinx_pcie_root_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_BRIDGE_HOST ; k->realize = xilinx_pcie_root_realize; k->exit = pci_bridge_exitfn; - dc->reset = pci_bridge_reset; +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/ppc/pnv_psi.c +2 -2
@@ -897,7 +897,7 @@ static void pnv_psi_power9_class_init(ObjectClass *klass, void *data) dc->desc ="PowerNV PSI Controller POWER9" ; dc->realize = pnv_psi_power9_realize; - dc->reset = pnv_psi_power9_reset; +device_class_set_legacy_reset (dc, pnv_psi_power9_reset); ppc->xscom_pcba =PNV9_XSCOM_PSIHB_BASE ; ppc->xscom_size =PNV9_XSCOM_PSIHB_SIZE ;
@@ -949,7 +949,7 @@ static void pnv_psi_class_init(ObjectClass *klass, void *data) dc->desc ="PowerNV PSI Controller" ;device_class_set_props (dc, pnv_psi_properties); - dc->reset = pnv_psi_reset; +device_class_set_legacy_reset (dc, pnv_psi_reset); dc->user_creatable = false; }
hw/ppc/ppc405_boards.c +1 -1
@@ -457,7 +457,7 @@ static void ref405ep_fpga_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ref405ep_fpga_realize; - dc->reset = ref405ep_fpga_reset; +device_class_set_legacy_reset (dc, ref405ep_fpga_reset);/* Reason: only works as part of a ppc405 board */ dc->user_creatable = false; }
hw/ppc/ppc405_uc.c +6 -6
@@ -119,7 +119,7 @@ static void ppc405_pob_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_pob_realize; - dc->reset = ppc405_pob_reset; +device_class_set_legacy_reset (dc, ppc405_pob_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false; }
@@ -196,7 +196,7 @@ static void ppc405_opba_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_opba_realize; - dc->reset = ppc405_opba_reset; +device_class_set_legacy_reset (dc, ppc405_opba_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false; }
@@ -302,7 +302,7 @@ static void ppc405_dma_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_dma_realize; - dc->reset = ppc405_dma_reset; +device_class_set_legacy_reset (dc, ppc405_dma_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false; }
@@ -492,7 +492,7 @@ static void ppc405_ocm_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_ocm_realize; - dc->reset = ppc405_ocm_reset; +device_class_set_legacy_reset (dc, ppc405_ocm_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false; }
@@ -726,7 +726,7 @@ static void ppc405_gpt_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_gpt_realize; - dc->reset = ppc405_gpt_reset; +device_class_set_legacy_reset (dc, ppc405_gpt_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false; }
@@ -975,7 +975,7 @@ static void ppc405_cpc_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_cpc_realize; - dc->reset = ppc405_cpc_reset; +device_class_set_legacy_reset (dc, ppc405_cpc_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false;device_class_set_props (dc, ppc405_cpc_properties);
hw/ppc/ppc4xx_devs.c +3 -3
@@ -242,7 +242,7 @@ static void ppc4xx_mal_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc4xx_mal_realize; - dc->reset = ppc4xx_mal_reset; +device_class_set_legacy_reset (dc, ppc4xx_mal_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false;device_class_set_props (dc, ppc4xx_mal_properties);
@@ -332,7 +332,7 @@ static void ppc405_plb_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_plb_realize; - dc->reset = ppc405_plb_reset; +device_class_set_legacy_reset (dc, ppc405_plb_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false; }
@@ -518,7 +518,7 @@ static void ppc405_ebc_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc405_ebc_realize; - dc->reset = ppc405_ebc_reset; +device_class_set_legacy_reset (dc, ppc405_ebc_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false; }
hw/ppc/ppc4xx_sdram.c +2 -2
@@ -437,7 +437,7 @@ static void ppc4xx_sdram_ddr_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc4xx_sdram_ddr_realize; - dc->reset = ppc4xx_sdram_ddr_reset; +device_class_set_legacy_reset (dc, ppc4xx_sdram_ddr_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false;device_class_set_props (dc, ppc4xx_sdram_ddr_props);
@@ -722,7 +722,7 @@ static void ppc4xx_sdram_ddr2_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = ppc4xx_sdram_ddr2_realize; - dc->reset = ppc4xx_sdram_ddr2_reset; +device_class_set_legacy_reset (dc, ppc4xx_sdram_ddr2_reset);/* Reason: only works as function of a ppc4xx SoC */ dc->user_creatable = false;device_class_set_props (dc, ppc4xx_sdram_ddr2_props);
hw/ppc/ppce500_spin.c +1 -1
@@ -191,7 +191,7 @@ static void ppce500_spin_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = spin_reset; +device_class_set_legacy_reset (dc, spin_reset); }static const TypeInfo ppce500_spin_info = {
hw/ppc/spapr_cpu_core.c +1 -1
@@ -378,7 +378,7 @@ static void spapr_cpu_core_class_init(ObjectClass *oc, void *data) dc->realize = spapr_cpu_core_realize; dc->unrealize = spapr_cpu_core_unrealize; - dc->reset = spapr_cpu_core_reset; +device_class_set_legacy_reset (dc, spapr_cpu_core_reset);device_class_set_props (dc, spapr_cpu_core_properties); scc->cpu_type = data; }
hw/ppc/spapr_iommu.c +1 -1
@@ -672,7 +672,7 @@ static void spapr_tce_table_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = spapr_tce_table_realize; - dc->reset = spapr_tce_reset; +device_class_set_legacy_reset (dc, spapr_tce_reset); dc->unrealize = spapr_tce_table_unrealize;/* Reason: This is just an internal device for handling the hypercalls */ dc->user_creatable = false;
hw/ppc/spapr_pci.c +1 -1
@@ -2248,7 +2248,7 @@ static void spapr_phb_class_init(ObjectClass *klass, void *data) dc->realize = spapr_phb_realize; dc->unrealize = spapr_phb_unrealize;device_class_set_props (dc, spapr_phb_properties); - dc->reset = spapr_phb_reset; +device_class_set_legacy_reset (dc, spapr_phb_reset); dc->vmsd = &vmstate_spapr_pci;/* Supported by TYPE_SPAPR_MACHINE */ dc->user_creatable = true;
hw/ppc/spapr_vio.c +1 -1
@@ -635,7 +635,7 @@ static void vio_spapr_device_class_init(ObjectClass *klass, void *data) {DeviceClass *k =DEVICE_CLASS (klass); k->realize = spapr_vio_busdev_realize; - k->reset = spapr_vio_busdev_reset; +device_class_set_legacy_reset (k, spapr_vio_busdev_reset); k->bus_type =TYPE_SPAPR_VIO_BUS ; }
hw/remote/proxy.c +1 -1
@@ -206,7 +206,7 @@ static void pci_proxy_dev_class_init(ObjectClass *klass, void *data) k->config_read = pci_proxy_read_config; k->config_write = pci_proxy_write_config; - dc->reset = proxy_device_reset; +device_class_set_legacy_reset (dc, proxy_device_reset);device_class_set_props (dc, proxy_properties); }
hw/rtc/allwinner-rtc.c +1 -1
@@ -320,7 +320,7 @@ static void allwinner_rtc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_rtc_reset; +device_class_set_legacy_reset (dc, allwinner_rtc_reset); dc->vmsd = &allwinner_rtc_vmstate;device_class_set_props (dc, allwinner_rtc_properties); }
hw/rtc/aspeed_rtc.c +1 -1
@@ -162,7 +162,7 @@ static void aspeed_rtc_class_init(ObjectClass *klass, void *data) dc->realize = aspeed_rtc_realize; dc->vmsd = &vmstate_aspeed_rtc; - dc->reset = aspeed_rtc_reset; +device_class_set_legacy_reset (dc, aspeed_rtc_reset); }static const TypeInfo aspeed_rtc_info = {
hw/rtc/ds1338.c +1 -1
@@ -223,7 +223,7 @@ static void ds1338_class_init(ObjectClass *klass, void *data) k->event = ds1338_event; k->recv = ds1338_recv; k->send = ds1338_send; - dc->reset = ds1338_reset; +device_class_set_legacy_reset (dc, ds1338_reset); dc->vmsd = &vmstate_ds1338; }
hw/rtc/exynos4210_rtc.c +1 -1
@@ -596,7 +596,7 @@ static void exynos4210_rtc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = exynos4210_rtc_reset; +device_class_set_legacy_reset (dc, exynos4210_rtc_reset); dc->vmsd = &vmstate_exynos4210_rtc_state; }
hw/rtc/goldfish_rtc.c +1 -1
@@ -298,7 +298,7 @@ static void goldfish_rtc_class_init(ObjectClass *klass, void *data)device_class_set_props (dc, goldfish_rtc_properties); dc->realize = goldfish_rtc_realize; - dc->reset = goldfish_rtc_reset; +device_class_set_legacy_reset (dc, goldfish_rtc_reset); dc->vmsd = &goldfish_rtc_vmstate; }
hw/rtc/ls7a_rtc.c +1 -1
@@ -469,7 +469,7 @@ static void ls7a_rtc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_ls7a_rtc; dc->realize = ls7a_rtc_realize; - dc->reset = ls7a_rtc_reset; +device_class_set_legacy_reset (dc, ls7a_rtc_reset); dc->desc ="ls7a rtc" ; }
hw/rtc/m48t59-isa.c +1 -1
@@ -120,7 +120,7 @@ static void m48txx_isa_class_init(ObjectClass *klass, void *data)NvramClass *nc =NVRAM_CLASS (klass); dc->realize = m48t59_isa_realize; - dc->reset = m48t59_reset_isa; +device_class_set_legacy_reset (dc, m48t59_reset_isa);device_class_set_props (dc, m48t59_isa_properties); nc->read = m48txx_isa_read; nc->write = m48txx_isa_write;
hw/rtc/m48t59.c +1 -1
@@ -629,7 +629,7 @@ static void m48txx_sysbus_class_init(ObjectClass *klass, void *data)NvramClass *nc =NVRAM_CLASS (klass); dc->realize = m48t59_realize; - dc->reset = m48t59_reset_sysbus; +device_class_set_legacy_reset (dc, m48t59_reset_sysbus);device_class_set_props (dc, m48t59_sysbus_properties); dc->vmsd = &vmstate_m48t59; nc->read = m48txx_sysbus_read;
hw/rtc/xlnx-zynqmp-rtc.c +1 -1
@@ -255,7 +255,7 @@ static void rtc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = rtc_reset; +device_class_set_legacy_reset (dc, rtc_reset); dc->vmsd = &vmstate_rtc; }
hw/s390x/ccw-device.c +1 -1
@@ -59,7 +59,7 @@ static void ccw_device_class_init(ObjectClass *klass, void *data) k->realize = ccw_device_realize; k->refill_ids = ccw_device_refill_ids;device_class_set_props (dc, ccw_device_properties); - dc->reset = ccw_device_reset; +device_class_set_legacy_reset (dc, ccw_device_reset); dc->bus_type =TYPE_VIRTUAL_CSS_BUS ; }
hw/s390x/event-facility.c +1 -1
@@ -467,7 +467,7 @@ static void init_event_facility_class(ObjectClass *klass, void *data)SCLPEventFacilityClass *k =EVENT_FACILITY_CLASS (dc); dc->realize = realize_event_facility; - dc->reset = reset_event_facility; +device_class_set_legacy_reset (dc, reset_event_facility); dc->vmsd = &vmstate_event_facility;set_bit (DEVICE_CATEGORY_MISC , dc->categories); k->command_handler = command_handler;
hw/s390x/ipl.c +1 -1
@@ -770,7 +770,7 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data) dc->realize = s390_ipl_realize;device_class_set_props (dc, s390_ipl_properties); - dc->reset = s390_ipl_reset; +device_class_set_legacy_reset (dc, s390_ipl_reset); dc->vmsd = &vmstate_ipl;set_bit (DEVICE_CATEGORY_MISC , dc->categories);/* Reason: Loads the ROMs and thus can only be used one time - internally */
hw/s390x/s390-pci-bus.c +2 -2
@@ -1323,7 +1323,7 @@ static void s390_pcihost_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);HotplugHandlerClass *hc =HOTPLUG_HANDLER_CLASS (klass); - dc->reset = s390_pcihost_reset; +device_class_set_legacy_reset (dc, s390_pcihost_reset); dc->realize = s390_pcihost_realize; dc->unrealize = s390_pcihost_unrealize; hc->pre_plug = s390_pcihost_pre_plug;
@@ -1506,7 +1506,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data) dc->desc ="zpci device" ;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->reset = s390_pci_device_reset; +device_class_set_legacy_reset (dc, s390_pci_device_reset); dc->bus_type =TYPE_S390_PCI_BUS ; dc->realize = s390_pci_device_realize;device_class_set_props (dc, s390_pci_device_properties);
hw/s390x/sclpquiesce.c +1 -1
@@ -117,7 +117,7 @@ static void quiesce_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);SCLPEventClass *k =SCLP_EVENT_CLASS (klass); - dc->reset = quiesce_reset; +device_class_set_legacy_reset (dc, quiesce_reset); dc->vmsd = &vmstate_sclpquiesce;set_bit (DEVICE_CATEGORY_MISC , dc->categories);/*
hw/scsi/esp-pci.c +1 -1
@@ -440,7 +440,7 @@ static void esp_pci_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_STORAGE_SCSI ;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); dc->desc ="AMD Am53c974 PCscsi-PCI SCSI adapter" ; - dc->reset = esp_pci_hard_reset; +device_class_set_legacy_reset (dc, esp_pci_hard_reset); dc->vmsd = &vmstate_esp_pci_scsi; }
hw/scsi/esp.c +1 -1
@@ -1576,7 +1576,7 @@ static void sysbus_esp_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = sysbus_esp_realize; - dc->reset = sysbus_esp_hard_reset; +device_class_set_legacy_reset (dc, sysbus_esp_hard_reset); dc->vmsd = &vmstate_sysbus_esp_scsi;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/scsi/lsi53c895a.c +1 -1
@@ -2386,7 +2386,7 @@ static void lsi_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_LSI_53C895A ; k->class_id =PCI_CLASS_STORAGE_SCSI ; k->subsystem_id =0x1000 ; - dc->reset = lsi_scsi_reset; +device_class_set_legacy_reset (dc, lsi_scsi_reset); dc->vmsd = &vmstate_lsi_scsi;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/scsi/megasas.c +1 -1
@@ -2557,7 +2557,7 @@ static void megasas_class_init(ObjectClass *oc, void *data) e->product_name = info->product_name; e->product_version = info->product_version;device_class_set_props (dc, info->props); - dc->reset = megasas_scsi_reset; +device_class_set_legacy_reset (dc, megasas_scsi_reset); dc->vmsd = info->vmsd;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); dc->desc = info->desc;
hw/scsi/mptsas.c +1 -1
@@ -1431,7 +1431,7 @@ static void mptsas1068_class_init(ObjectClass *oc, void *data) pc->subsystem_id =0x8000 ; pc->class_id =PCI_CLASS_STORAGE_SCSI ;device_class_set_props (dc, mptsas_properties); - dc->reset = mptsas_reset; +device_class_set_legacy_reset (dc, mptsas_reset); dc->vmsd = &vmstate_mptsas; dc->desc ="LSI SAS 1068" ;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories);
hw/scsi/scsi-disk.c +1 -1
@@ -3141,7 +3141,7 @@ static void scsi_disk_base_class_initfn(ObjectClass *klass, void *data)SCSIDiskClass *sdc =SCSI_DISK_BASE_CLASS (klass); dc->fw_name ="disk" ; - dc->reset = scsi_disk_reset; +device_class_set_legacy_reset (dc, scsi_disk_reset); sdc->dma_readv = scsi_dma_readv; sdc->dma_writev = scsi_dma_writev; sdc->need_fua_emulation = scsi_is_cmd_fua;
hw/scsi/scsi-generic.c +1 -1
@@ -797,7 +797,7 @@ static void scsi_generic_class_initfn(ObjectClass *klass, void *data) sc->parse_cdb = scsi_generic_parse_cdb; dc->fw_name ="disk" ; dc->desc ="pass through generic scsi device (/dev/sg*)" ; - dc->reset = scsi_generic_reset; +device_class_set_legacy_reset (dc, scsi_generic_reset);device_class_set_props (dc, scsi_generic_properties); dc->vmsd = &vmstate_scsi_device; }
hw/scsi/vmw_pvscsi.c +1 -1
@@ -1333,7 +1333,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data) k->subsystem_id =0x1000 ;device_class_set_parent_realize (dc, pvscsi_realize, &pvs_k->parent_dc_realize); - dc->reset = pvscsi_reset; +device_class_set_legacy_reset (dc, pvscsi_reset); dc->vmsd = &vmstate_pvscsi;device_class_set_props (dc, pvscsi_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories);
hw/sd/allwinner-sdhost.c +1 -1
@@ -900,7 +900,7 @@ static void allwinner_sdhost_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = allwinner_sdhost_reset; +device_class_set_legacy_reset (dc, allwinner_sdhost_reset); dc->vmsd = &vmstate_allwinner_sdhost; dc->realize = allwinner_sdhost_realize;device_class_set_props (dc, allwinner_sdhost_properties);
hw/sd/aspeed_sdhci.c +1 -1
@@ -193,7 +193,7 @@ static void aspeed_sdhci_class_init(ObjectClass *classp, void *data)DeviceClass *dc =DEVICE_CLASS (classp); dc->realize = aspeed_sdhci_realize; - dc->reset = aspeed_sdhci_reset; +device_class_set_legacy_reset (dc, aspeed_sdhci_reset); dc->vmsd = &vmstate_aspeed_sdhci;device_class_set_props (dc, aspeed_sdhci_properties); }
hw/sd/bcm2835_sdhost.c +1 -1
@@ -432,7 +432,7 @@ static void bcm2835_sdhost_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->reset = bcm2835_sdhost_reset; +device_class_set_legacy_reset (dc, bcm2835_sdhost_reset); dc->vmsd = &vmstate_bcm2835_sdhost; }
hw/sd/cadence_sdhci.c +1 -1
@@ -171,7 +171,7 @@ static void cadence_sdhci_class_init(ObjectClass *classp, void *data) dc->desc ="Cadence SD/SDIO/eMMC Host Controller (SD4HC)" ; dc->realize = cadence_sdhci_realize; - dc->reset = cadence_sdhci_reset; +device_class_set_legacy_reset (dc, cadence_sdhci_reset); dc->vmsd = &vmstate_cadence_sdhci; }
hw/sd/npcm7xx_sdhci.c +1 -1
@@ -155,7 +155,7 @@ static void npcm7xx_sdhci_class_init(ObjectClass *classp, void *data) dc->desc ="NPCM7xx SD/eMMC Host Controller" ; dc->realize = npcm7xx_sdhci_realize; - dc->reset = npcm7xx_sdhci_reset; +device_class_set_legacy_reset (dc, npcm7xx_sdhci_reset); dc->vmsd = &vmstate_npcm7xx_sdhci; }
hw/sd/pl181.c +1 -1
@@ -514,7 +514,7 @@ static void pl181_class_init(ObjectClass *klass, void *data)DeviceClass *k =DEVICE_CLASS (klass); k->vmsd = &vmstate_pl181; - k->reset = pl181_reset; +device_class_set_legacy_reset (k, pl181_reset);/* Reason: output IRQs should be wired up */ k->user_creatable = false; }
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH for-9.2 08/10] hw: Use device_class_set_legacy_reset() instead of opencoding
Quoted 9 lines · Peter Maydell
Use
device_class_set_legacy_reset()instead of opencoding an assignmenttoDeviceClass::reset. This change was produced with:spatch --macro-file scripts/cocci-macro-file.h \ --sp-file scripts/coccinelle/device-reset.cocci \ --keep-comments --smpl-spacing --in-place --dir hwSigned-off-by Peter Maydell<[email protected]>---
Spot-checked. :-)
r~
PATCH 9/10 hw: Rename DeviceClass::reset field to legacy_reset
In reply to Peter MaydellRename the DeviceClass::reset field to legacy_reset; this is helpful both in flagging up that it's best not used in new code and in making it easy to search for where it's being used still.
--- include/hw/qdev-core.h | 4 ++-- hw/core/qdev.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
include/hw/qdev-core.h +2 -2
@@ -152,14 +152,14 @@ struct DeviceClass {/* callbacks */ /** -* @reset: deprecated device reset method pointer +* @legacy_reset: deprecated device reset method pointer * * Modern code should use the ResettableClass interface to * implement a multi-phase reset. * * TODO: remove once every reset callback is unused */ -DeviceReset reset; +DeviceReset legacy_reset;DeviceRealize realize;DeviceUnrealize unrealize;
hw/core/qdev.c +4 -4
@@ -776,8 +776,8 @@ static void device_transitional_reset(Object *obj)* devices) or a device's specific method for not-yet transitioned devices. * In both case, it does not reset children. */ -if (dc->reset) { - dc->reset (DEVICE (obj)); +if (dc->legacy_reset) { + dc->legacy_reset (DEVICE (obj)); } }
@@ -788,7 +788,7 @@ static void device_transitional_reset(Object *obj)static ResettableTrFunction device_get_transitional_reset (Object *obj) {DeviceClass *dc =DEVICE_GET_CLASS (obj); -if (dc->reset != device_phases_reset) { +if (dc->legacy_reset != device_phases_reset) {/* * dc->reset has been overridden by a subclass, * the device is not ready for multi phase yet.
@@ -846,7 +846,7 @@ static void device_class_init(ObjectClass *class, void *data)void device_class_set_legacy_reset (DeviceClass *dc,DeviceReset dev_reset) { - dc->reset = dev_reset; + dc->legacy_reset = dev_reset; } void device_class_set_parent_realize(DeviceClass *dc,
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 09/10] hw: Rename DeviceClass::reset field to legacy_reset
Quoted 9 lines · Peter Maydell
Rename
theDeviceClass::resetfield tolegacy_reset; this is helpful both in flagging up that it's best not used in new code and in making it easy to search for where it's being used still.Signed-off-by Peter Maydell<[email protected]>--- include/hw/qdev-core.h | 4 ++-- hw/core/qdev.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
r~
Re: [PATCH for-9.2 09/10] hw: Rename DeviceClass::reset field to legacy_reset
In reply to Peter MaydellQuoted 9 lines · Peter Maydell
Rename the
DeviceClass::resetfield tolegacy_reset; this is helpful both in flagging up that it's best not used in new code and in making it easy to search for where it's being used still.Signed-off-by Peter Maydell <[email protected]>--- include/hw/qdev-core.h | 4 ++-- hw/core/qdev.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
PATCH 10/10 hw: Remove device_phases_reset()
In reply to Peter MaydellCurrently we have transitional machinery between legacy reset and three phase reset that works in two directions:
* if you invoke three phase reset on a device which has set the DeviceClass::legacy_reset method, we detect this in device_get_transitional_reset() and arrange that we call the legacy_reset method during the hold phase of reset
* if you invoke legacy reset on a device which implements three phase reset, the default legacy_reset method is device_phases_reset(), which does a three-phase reset of the device
However, we have now eliminated all the places which could invoke legacy reset on a device, which means that the function device_phases_reset() is never called -- it serves only as the value of DeviceClass::legacy_reset that indicates that the subclass never overrode the legacy reset method. So we can delete it, and instead check for legacy_reset != NULL.
--- hw/core/qdev.c | 51 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 39 deletions(-)
hw/core/qdev.c +12 -39
@@ -747,38 +747,16 @@ device_vmstate_if_get_id(VMStateIf *obj)return qdev_get_dev_path (dev); } -/** -* device_phases_reset: -* Transition reset method for devices to allow moving -* smoothly from legacy reset method to multi-phases -*/ -static void device_phases_reset (DeviceState *dev) -{ -ResettableClass *rc =RESETTABLE_GET_CLASS (dev); - -if (rc->phases.enter) { - rc->phases.enter (OBJECT (dev),RESET_TYPE_COLD ); - } -if (rc->phases.hold) { - rc->phases.hold (OBJECT (dev),RESET_TYPE_COLD ); - } -if (rc->phases.exit) { - rc->phases.exit (OBJECT (dev),RESET_TYPE_COLD ); - } -} -static void device_transitional_reset (Object *obj) {DeviceClass *dc =DEVICE_GET_CLASS (obj);/* -* This will call either @device_phases_reset (for multi-phases transitioned -* devices) or a device's specific method for not-yet transitioned devices. -* In both case, it does not reset children. +* Device still using DeviceClass legacy_reset method. This doesn't +* reset children. device_get_transitional_reset() checked that +* this isn't NULL. */ -if (dc->legacy_reset) { - dc->legacy_reset (DEVICE (obj)); - } + dc->legacy_reset (DEVICE (obj)); }/**
@@ -788,7 +766,7 @@ static void device_transitional_reset(Object *obj)static ResettableTrFunction device_get_transitional_reset (Object *obj) {DeviceClass *dc =DEVICE_GET_CLASS (obj); -if (dc->legacy_reset != device_phases_reset) { +if (dc->legacy_reset) {/* * dc->reset has been overridden by a subclass, * the device is not ready for multi phase yet.
@@ -819,19 +797,14 @@ static void device_class_init(ObjectClass *class, void *data) rc->child_foreach = device_reset_child_foreach;/* -* @device_phases_reset is put as the default reset method below, allowing -* to do the multi-phase transition from base classes to leaf classes. It -* allows a legacy-reset Device class to extend a multi-phases-reset -* Device class for the following reason: -* + If a base class B has been moved to multi-phase, then it does not -* override this default reset method and may have defined phase methods. -* + A child class C (extending class B) which uses -* device_class_set_parent_reset() (or similar means) to override the -* reset method will still work as expected. @device_phases_reset function -* will be registered as the parent reset method and effectively call -* parent reset phases. +* A NULL legacy_reset implies a three-phase reset device. Devices can +* only be reset using three-phase aware mechanisms, but we still support +* for transitional purposes leaf classes which set the old legacy_reset +* method via device_class_set_legacy_reset(). If they do so, then +* device_get_transitional_reset() will notice and arrange for the +* DeviceClass::legacy_reset() method to be called during the hold phase. */ -device_class_set_legacy_reset (dc, device_phases_reset); + dc->legacy_reset =NULL ; rc->get_transitional_function = device_get_transitional_reset; object_class_property_add_bool(class, "realized",
Signature · 1 line
2.34.1
Re: [PATCH for-9.2 10/10] hw: Remove device_phases_reset()
Quoted 18 lines · Peter Maydell
Currently we have transitional machinery between legacy reset and three phase reset that works in two directions:
* if you invoke three phase reset on a device which has settheDeviceClass::legacy_resetmethod, we detect this indevice_get_transitional_reset()and arrange that we call thelegacy_resetmethod during the hold phase of reset
* if you invoke legacy reset on a device which implements three phase reset, the defaultlegacy_resetmethod isdevice_phases_reset(), which does a three-phase reset of the deviceHowever, we have now eliminated all the places which could invoke legacy reset on a device, which means that the function
device_phases_reset()is never called -- it serves only as the valueofDeviceClass::legacy_resetthat indicates that the subclass never overrode the legacy reset method. So we can delete it, and instead check forlegacy_reset!= NULL.
Quoted 4 lines
Signed-off-by Peter Maydell<[email protected]>--- hw/core/qdev.c | 51 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 39 deletions(-)
Is the reason we prioritize resettable_get_tr_func over rc->phases to allow for a legacy device to be attached to a resettable bus?
I wonder if device_class_set_legacy_reset can simplify that, with
static void do_legacy_reset(...)
{
dc->legacy_reset(...);
}void device_class_set_legacy_reset(DeviceClass *dc, DeviceReset dev_reset)
{
dc->legacy_reset = dev_reset;
/* Parent enter/exit are not invoked with a legacy child. */
dc->resettable.enter = NULL;
dc->resettable.exit = NULL;
dc->resettable.hold = do_legacy_reset;
}Which would eliminate resettable_get_tr_func and the supporting layers completely.
r~
Re: [PATCH for-9.2 10/10] hw: Remove device_phases_reset()
Quoted 25 lines · Richard Henderson
Quoted 18 lines · Peter Maydell
Currently we have transitional machinery between legacy reset and three phase reset that works in two directions:
* if you invoke three phase reset on a device which has settheDeviceClass::legacy_resetmethod, we detect this indevice_get_transitional_reset()and arrange that we call thelegacy_resetmethod during the hold phase of reset
* if you invoke legacy reset on a device which implements three phase reset, the defaultlegacy_resetmethod isdevice_phases_reset(), which does a three-phase reset of the deviceHowever, we have now eliminated all the places which could invoke legacy reset on a device, which means that the function
device_phases_reset()is never called -- it serves only as the valueofDeviceClass::legacy_resetthat indicates that the subclass never overrode the legacy reset method. So we can delete it, and instead check forlegacy_reset!= NULL.Quoted 4 lines
Signed-off-by Peter Maydell<[email protected]>--- hw/core/qdev.c | 51 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 39 deletions(-)
Quoted 5 lines
Reviewed-by Richard Henderson <[email protected]>Is the reason we prioritize
resettable_get_tr_funcoverrc->phasesto allow for a legacy device to be attached to a resettable bus?
It's to handle devices which implement only Device::legacy_reset. Those devices must have their legacy_reset function called (and I think it should always be the case that there are no rc->phases methods in that case). (All buses now are always 3-phase aware, incidentally.)
Quoted 17 lines
I wonder if
device_class_set_legacy_resetcan simplify that, withstatic void
do_legacy_reset(...){ dc->legacy_reset(...); }void
device_class_set_legacy_reset(DeviceClass *dc, DeviceReset dev_reset){ dc->legacy_reset = dev_reset; /* Parent enter/exit are not invoked with a legacy child. */ dc->resettable.enter = NULL; dc->resettable.exit = NULL; dc->resettable.hold = do_legacy_reset; }
Quoted 1 line
Which would eliminate
resettable_get_tr_funcand the supporting layers completely.
I did think about something like this but wasn't sure that there was much benefit from changing from one workaround to the other. But this does look like it's less complication than we have now. I'll come back to this if my idea about using coccinelle to make a mass conversion of legacy_reset to 3-phase doesn't pan out.
thanks
-- PMM
Am 13.08.24 um 18:52 schrieb Peter Maydell:
Quoted 77 lines
The main aim of this patchseries is to remove the two remaining uses of
device_class_set_parent_reset()in the tree, which are virtio-ccw and the s390 CPU class. Doing that lets us do some followup cleanup. (The diffstat looks alarming but is almost all coccinelle automated changes.)virtio-ccw is a simple conversion, because it's a leaf class and no other code interacts with the reset function. So we convert to three-phase and
resettable_class_set_parent_phases().The s390 CPU is trickier, because s390 has its own set of different kinds of reset (the S390_CPU_RESET_* enum values). At the moment we have a single function implementing the reset, which always chains to the parent
DeviceClass::reset, and which can be called both from the CPU object's ownDeviceClass::resetmethod and also from other s390 code.I opted to handle this by adding two new S390-CPU-specific reset types to the Resettable ResetType enum. Now instead of having an underlying implementation of reset that is s390-specific and which might be called either directly or via the
DeviceClass::resetmethod, we can implement only the Resettable hold phase method, and have the places that need to trigger an s390-specific reset type do so by callingresettable_reset().The other option would have been to smuggle in the s390 reset type via, for instance, a field in the CPU state that we set in
s390_do_cpu_initial_reset()etc and then examined in the reset method, but doing it this way seems cleaner.The rest of the series is largely cleanup. Some small stuff:
* remove the now-unuseddevice_class_set_parent_reset()function
* remove some CPU state struct fields in alpha and hppa that were simply unused
* fix an accidental comma inxilinx_axidmathat confused a Coccinelle script
*hw/remote/message.cshould not be directly invoking theDeviceClass::resetmethodThere are also patches here which convert devices from directly setting:
dc->reset = my_reset_function; to using a function call: device_class_set_legacy_reset(dc, my_reset_function);The conversion is entirely scripted using a coccinelle patch, and it is responsible for the large diffstat here.
If people feel this is unnecessary churn I'm open to that argument, but my motivation here is:
* it means that people writing device code see the "legacy" word and get a hint that a new QEMU device probably should be using something else (i.e. Resettable)
* it makes it easier to find the places in the code that are still using legacy-reset with a simple grepIn particular, having done that makes it easier to rename the
DeviceState::resetfield toDeviceState::legacy_reset, and that in turn is how I found that hw/remote/ was still directly invoking it.The last patch removes
device_phases_reset(), which was the part of the reset transition glue that supported "device is reset via the legacy reset method but it is a three-phase device". Now we know there is no way to directly invoke legacy-reset any more, we can drop that bit of glue. (The opposite direction, "device is reset via a three-phase-aware method but only implements the legacy reset method", is still supported.)I am pondering the idea of a further Coccinelle-driven conversion of
device_class_set_legacy_reset()calls into three-phase setting of the Resettable hold phase method. This would be a zero behaviour change, but the difficult part will be where we have devices which make direct function calls to their reset function as well as registering it as the reset method; I'm not sure if Coccinelle can do "match functions which are not referenced elsewhere in the file" checks.
Quoted 3 lines
Note that my testing here has only been "make check" and "make check-avocado", which I know doesn't really exercise reset very heavily.
Nina, can you have a look at those patches?
Quoted 8 lines · Christian Borntraeger
Am 13.08.24 um 18:52 schrieb Peter Maydell:
Quoted 6 lines
The main aim of this patchseries is to remove the two remaining uses of
device_class_set_parent_reset()in the tree, which are virtio-ccw and the s390 CPU class. Doing that lets us do some followup cleanup. (The diffstat looks alarming but is almost all coccinelle automated changes.)
Quoted 5 lines
Quoted 3 lines
Note that my testing here has only been "make check" and "make check-avocado", which I know doesn't really exercise reset very heavily.
Nina, can you have a look at those patches?
If you plan to do any testing you'll want to locally fix the silly mistake I made in patch 2 (a RESET_TYPE_COLD where it should say RESET_TYPE_S390_CPU_NORMAL) -- see the review comments on that patch. Sorry about that one...
thanks
-- PMM
Quoted 16 lines · Peter Maydell
Quoted 8 lines · Christian Borntraeger
Am 13.08.24 um 18:52 schrieb Peter Maydell:
Quoted 6 lines
The main aim of this patchseries is to remove the two remaining uses of
device_class_set_parent_reset()in the tree, which are virtio-ccw and the s390 CPU class. Doing that lets us do some followup cleanup. (The diffstat looks alarming but is almost all coccinelle automated changes.)Quoted 5 lines
Quoted 3 lines
Note that my testing here has only been "make check" and "make check-avocado", which I know doesn't really exercise reset very heavily.
Nina, can you have a look at those patches?
Quoted 8 lines
If you plan to do any testing you'll want to locally fix the silly mistake I made in patch 2 (a
RESET_TYPE_COLDwhere it should sayRESET_TYPE_S390_CPU_NORMAL) -- see the review comments on that patch. Sorry about that one...thanks
-- PMM
I'll run it through our CI and see if anything pops up.
Quoting Nina Schoetterl-Glausch (2024-08-22 12:34:14)
Quoted 1 line
I'll run it through our CI and see if anything pops up.
Nina is on holiday, she asked me to quickly report back.
There was a little hickup without the fixup to patch 2, but after Nina pushed the fixup, we did not observe any failures related to your changes in our CI. Thanks!
Quoting Nico Boehr (2024-08-26 14:08:20)
Quoted 3 lines
There was a little hickup without the fixup to patch 2, but after Nina pushed the fixup, we did not observe any failures related to your changes in our CI. Thanks!
Peter, after a few CI runs, we unfortunately did find some issues with your patch :-(
Rebooting a guest in a loop sometimes fails. Michael was able to bisect it to your series.
The problem is intermittent. The guest is unable to load its initramfs:
[ 0.560674] rootfs image is not initramfs (no cpio magic); looks like an initrd [ 0.588605] Freeing initrd memory: 95680K [ 0.593143] md: Waiting for all devices to be available before autodetect [ 0.593144] md: If you don't use raid, use raid=noautodetect [ 0.593145] md: Autodetecting RAID arrays. [ 0.593146] md: autorun ... [ 0.593147] md: ... autorun DONE. [ 0.593156] RAMDISK: gzip image found at block 0 [ 0.609110] RAMDISK: incomplete write (29120 != 32768) [ 0.609113] write error
...and then a panic because the kernel doesn't find a rootfs.
It seems like the compressed initramfs is corrupted somehow, since "rootfs image is not initramfs" doesn't appear on a successful boot.
initramfs and kernel are loaded via direct kernel boot. Running under KVM.
Some vhost error messages do appear before the guest panics, but it is not entirely clear to me whether they are related:
[...]
2024-08-28T06:56:29.765324Z qemu-system-s390x: vhost vring error in virtqueue 0: Invalid argument (22) 2024-08-28T06:56:32.210982Z qemu-system-s390x: vhost vring error in virtqueue 0: Invalid argument (22) 2024-08-28 06:56:35.430+0000: panic s390: core='0' psw-mask='0x0002000180000000' psw-addr='0x00000387b028c67e' reason='disabled-wait'
Any idea?
Quoted 35 lines · Nico Boehr
Quoting Nico Boehr (2024-08-26 14:08:20)
Quoted 3 lines
There was a little hickup without the fixup to patch 2, but after Nina pushed the fixup, we did not observe any failures related to your changes in our CI. Thanks!
Peter, after a few CI runs, we unfortunately did find some issues with your patch :-(
Rebooting a guest in a loop sometimes fails. Michael was able to bisect it to your series.
The problem is intermittent. The guest is unable to load its initramfs:
[ 0.560674] rootfs image is not initramfs (no cpio magic); looks like an initrd [ 0.588605] Freeing initrd memory: 95680K [ 0.593143] md: Waiting for all devices to be available before autodetect [ 0.593144] md: If you don't use raid, use raid=noautodetect [ 0.593145] md: Autodetecting RAID arrays. [ 0.593146] md: autorun ... [ 0.593147] md: ... autorun DONE. [ 0.593156] RAMDISK: gzip image found at block 0 [ 0.609110] RAMDISK: incomplete write (29120 != 32768) [ 0.609113] write error...and then a panic because the kernel doesn't find a rootfs.
It seems like the compressed initramfs is corrupted somehow, since "rootfs image is not initramfs" doesn't appear on a successful boot.
initramfs and kernel are loaded via direct kernel boot. Running under KVM.
Some vhost error messages do appear before the guest panics, but it is not entirely clear to me whether they are related:
Quoted 6 lines
[...]
2024-08-28T06:56:29.765324Z qemu-system-s390x: vhost vring error in virtqueue 0: Invalid argument (22) 2024-08-28T06:56:32.210982Z qemu-system-s390x: vhost vring error in virtqueue 0: Invalid argument (22) 2024-08-28 06:56:35.430+0000: panic s390: core='0' psw-mask='0x0002000180000000' psw-addr='0x00000387b028c67e' reason='disabled-wait'Any idea?
Well, the series is *supposed* to be just a refactoring, not a change of behaviour, so I'm not sure. I don't suppose you have a reproduce case that I can run? (I do have access to an s390 machine if that helps.)
thanks
-- PMM
Quoting Peter Maydell (2024-08-28 17:46:42)
[...]
Quoted 3 lines
Well, the series is *supposed* to be just a refactoring, not a change of behaviour, so I'm not sure. I don't suppose you have a reproduce case that I can run? (I do have access to an s390 machine if that helps.)
Well, it's on an internal testing framework which we do not release publicly. :-(
Luckily, it's not that difficult to reproduce. It seems like this only happens when a reboot is initiated over SSH connection via vsock. Here are some instructions on how to reproduce (with mkosi and Fedora):
1. Craft an mkosi.conf like this:
[Distribution]
Distribution=fedora
Architecture=s390x
[Output]
Format=cpio
CompressOutput=xz
[Content]
Packages=openssh-server
Packages=kernel-modules-core-6.8.5-301.fc40.s390x
Bootloader=none
MakeInitrd=no
Ssh=yes
Autologin=yes
RootPassword=hunter
Timezone=Etc/UTC
Locale=C.UTF-8
2. Generate SSH host key:
mkdir -p mkosi.extra/etc/ssh && ssh-keygen -t ed25519 -f mkosi.extra/etc/ssh/ssh_host_ed25519_key
3. Build image:
mkosi
4. Boot with QEMU:
qemu-system-s390x -machine s390-ccw-virtio,accel=kvm -nodefaults -nographic -chardev stdio,id=con0 -device sclpconsole,chardev=con0 -m 2048 -kernel image.vmlinuz -initrd image.cpio.xz -device vhost-vsock-ccw,guest-cid=3
5. In a different terminal, run a reboot loop:
i=0; while true; do ssh -o ProxyCommand='socat VSOCK-CONNECT:3:22 -' localhost -l root reboot; echo $i; let i=i+1; done
After a while (10 minutes, sometimes longer) you should see the quest crash either with "Attempted to kill init" or "Unable to mount rootfs" and a message about corrupted initramfs:
[ 1.599082] Initramfs unpacking failed: XZ-compressed data is corrupt
I had this run without your series for 45 minutes, while with your series this crashed within ~5-10 minutes.
Thanks!
Quoted 39 lines · Nico Boehr
Quoting Peter Maydell (2024-08-28 17:46:42)
[...]Quoted 3 lines
Well, the series is *supposed* to be just a refactoring, not a change of behaviour, so I'm not sure. I don't suppose you have a reproduce case that I can run? (I do have access to an s390 machine if that helps.)
Well, it's on an internal testing framework which we do not release publicly. :-(
Luckily, it's not that difficult to reproduce. It seems like this only happens when a reboot is initiated over SSH connection via vsock. Here are some instructions on how to reproduce (with mkosi and Fedora):
1. Craft an mkosi.conf like this:
[Distribution] Distribution=fedora Architecture=s390x [Output] Format=cpio CompressOutput=xz [Content] Packages=openssh-server Packages=kernel-modules-core-6.8.5-301.fc40.s390x Bootloader=none MakeInitrd=no Ssh=yes Autologin=yes RootPassword=hunter Timezone=Etc/UTC Locale=C.UTF-8 2. Generate SSH host key: mkdir -p mkosi.extra/etc/ssh && ssh-keygen -t ed25519 -f mkosi.extra/etc/ssh/ssh_host_ed25519_key 3. Build image: mkosi 4. Boot with QEMU: qemu-system-s390x -machine s390-ccw-virtio,accel=kvm -nodefaults -nographic -chardev stdio,id=con0 -device sclpconsole,chardev=con0 -m 2048 -kernel image.vmlinuz -initrd image.cpio.xz -device vhost-vsock-ccw,guest-cid=3
Quoted 2 lines
5. In a different terminal, run a reboot loop:
i=0; while true; do ssh -o ProxyCommand='socat VSOCK-CONNECT:3:22 -' localhost -l root reboot; echo $i; let i=i+1; done
Thanks. I tried this repro, but mkosi falls over almost immediately:
‣ Detaching namespace
‣ Setting up package cache…
‣ Setting up package cache /home/linux1/s390-failure/.mkosi-htsau2ot complete ‣ Setting up temporary workspace.
‣ Temporary workspace set up in /var/tmp/mkosi-tjc0nror
‣ Running second (final) stage…
‣ Creating image with partition table…
Disk /home/linux1/s390-failure/.mkosi-ddkx5xpb: 3 GiB, 3221266432 bytes, 6291536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Script header accepted.
Script header accepted.
Script header accepted.
Created a new GPT disklabel (GUID: 14CF3B05-D072-0A45-8EE4-3219112ACB2E).
/home/linux1/s390-failure/.mkosi-ddkx5xpb1: Created a new partition 1 of type 'unknown' and of size 3 GiB. /home/linux1/s390-failure/.mkosi-ddkx5xpb2: Done.
New situation:
Disklabel type: gpt
Disk identifier: 14CF3B05-D072-0A45-8EE4-3219112ACB2E
Device Start End Sectors Size Type/home/linux1/s390-failure/.mkosi-ddkx5xpb1 40 6291495 6291456 3G unknown
The partition table has been altered.
‣ Created image with partition table as/home/linux1/s390-failure/.mkosi-ddkx5xpb
‣ Attaching /home/linux1/s390-failure/.mkosi-ddkx5xpb as loopback… ‣ Attached /dev/loop13 ‣ Formatting root partition…
mke2fs 1.46.5 (30-Dec-2021)
The file /dev/loop13p1 does not exist and no size was specified.
‣ (Detaching /dev/loop13)
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/mkosi/__main__.py", line 32, in <module>
main()
File "/usr/lib/python3/dist-packages/mkosi/__main__.py", line 26, in main
run_verb(a) File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 7809,
in run_verb
manifest = build_stuff(args)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 7227,
in build_stuff
image = build_image(args, root, manifest=manifest,
do_run_build_script=False, cleanup=True)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 6941,
in build_image
prepare_root(args, encrypted.root, cached)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 1308,
in prepare_root
mkfs_generic(args, label, path, dev)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 1031,
in mkfs_generic
run([*cmdline, dev])
File "/usr/lib/python3/dist-packages/mkosi/backend.py", line 699, in run
return subprocess.run(cmdline, check=check, stdout=stdout,
stderr=stderr, **kwargs)
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mkfs.ext4', '-I', '256', '-L', 'root', '-M', '/', '/dev/loop13p1']' returned non-zero exit status 1.
(My s390 box is running Ubuntu, in case that makes a difference.)
Maybe you could put the kernel and initrd somewhere I can get them from?
-- PMM
Quoted 5 lines
(My s390 box is running Ubuntu, in case that makes a difference.)
Maybe you could put the kernel and initrd somewhere I can get them from?
I am also trying. See :
https://www.kaod.org/qemu/s390x/
These were generated on my x86/f40 laptop.
C.
Quoting Peter Maydell (2024-08-29 15:09:44)
Quoted 74 lines
Thanks. I tried this repro, but mkosi falls over almost immediately:
‣ Detaching namespace
‣ Setting up package cache…
‣ Setting up package cache/home/linux1/s390-failure/.mkosi-htsau2otcomplete ‣ Setting up temporary workspace.
‣ Temporary workspace set up in/var/tmp/mkosi-tjc0nror
‣ Running second (final) stage…
‣ Creating image with partition table…
Disk/home/linux1/s390-failure/.mkosi-ddkx5xpb: 3 GiB, 3221266432 bytes, 6291536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
Script header accepted.
Script header accepted.
Script header accepted.
Created a new GPT disklabel (GUID: 14CF3B05-D072-0A45-8EE4-3219112ACB2E).
/home/linux1/s390-failure/.mkosi-ddkx5xpb1: Created a new partition 1 of type 'unknown' and of size 3 GiB./home/linux1/s390-failure/.mkosi-ddkx5xpb2: Done.New situation:
Disklabel type: gpt
Disk identifier: 14CF3B05-D072-0A45-8EE4-3219112ACB2EDevice Start End Sectors Size Type
/home/linux1/s390-failure/.mkosi-ddkx5xpb140 6291495 6291456 3G unknownThe partition table has been altered.
‣ Created image with partition table as/home/linux1/s390-failure/.mkosi-ddkx5xpb‣ Attaching /home/linux1/s390-failure/.mkosi-ddkx5xpb as loopback… ‣ Attached /dev/loop13 ‣ Formatting root partition…mke2fs 1.46.5 (30-Dec-2021)
The file/dev/loop13p1does not exist and no size was specified.
‣ (Detaching/dev/loop13)
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in_run_module_as_main
return _run_code(code,main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in_run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/mkosi/__main__.py", line 32, in <module>main() File "/usr/lib/python3/dist-packages/mkosi/__main__.py", line 26, in main run_verb(a)File "
/usr/lib/python3/dist-packages/mkosi/__init__.py", line 7809,
inrun_verb
manifest =build_stuff(args)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 7227,
inbuild_stuff
image = build_image(args, root, manifest=manifest,
do_run_build_script=False, cleanup=True)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 6941,
inbuild_image
prepare_root(args, encrypted.root, cached)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 1308,
inprepare_root
mkfs_generic(args, label, path, dev)
File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 1031,
inmkfs_genericrun([*cmdline, dev])File "
/usr/lib/python3/dist-packages/mkosi/backend.py", line 699, in run
return subprocess.run(cmdline, check=check, stdout=stdout,
stderr=stderr, **kwargs)
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mkfs.ext4', '-I', '256', '-L', 'root', '-M', '/', '/dev/loop13p1']' returned non-zero exit status 1.
Quoted 4 lines
(My s390 box is running Ubuntu, in case that makes a difference.)
Maybe you could put the kernel and initrd somewhere I can get them from?
Sigh. Yeah, I'll try to find a way (may take a while).
In the meantime, looks like mkosi is trying to create an block image, but that's not what it's configured to do; are you sure mkosi.conf is in the same directory you're calling it from?
Quoted 8 lines · Nico Boehr
Quoting Peter Maydell (2024-08-29 15:09:44)
Quoted 2 lines
Thanks. I tried this repro, but mkosi falls over almost immediately:
In the meantime, looks like mkosi is trying to create an block image, but that's not what it's configured to do; are you sure mkosi.conf is in the same directory you're calling it from?
It is. I notice however that the manpage for mkosi says that it looks for "mkosi.default", not "mkosi.conf". Maybe it needs a newer mkosi than Ubuntu ships? (mkosi --version says "mkosi 12".)
I'll use the images Cédric has kindly generated.
-- PMM
Quoting Peter Maydell (2024-08-29 15:35:30)
Quoted 6 lines · Nico Boehr
Quoted 4 lines
Quoting Peter Maydell (2024-08-29 15:09:44)
Quoted 2 lines
Thanks. I tried this repro, but mkosi falls over almost immediately:
Quoted 8 lines
Quoted 3 lines
In the meantime, looks like mkosi is trying to create an block image, but that's not what it's configured to do; are you sure mkosi.conf is in the same directory you're calling it from?
It is. I notice however that the manpage for mkosi says that it looks for "mkosi.default", not "mkosi.conf". Maybe it needs a newer mkosi than Ubuntu ships? (mkosi --version says "mkosi 12".)
Likely. I have mkosi 22 here.
Quoted 1 line
I'll use the images Cédric has kindly generated.
Thanks, images by Cédric look good, but I forgot to tell you that you need a SSH key for login too :)
You could unpack image.cpio.gz, add your key to root/.ssh and repack the whole thing to image.new.xz:
- mkdir xtract && cd xtract
- unxz < ../image.cpio.xz | cpio -H newc -iv
- cp ~/.ssh/authorized_keys root/.ssh/
- find . 2>/dev/null | cpio -o -c -R root:root | xz -9 --format=lzma > ../image.new.xz
Quoted 24 lines · Nico Boehr
Quoting Peter Maydell (2024-08-29 15:35:30)
Quoted 6 lines · Nico Boehr
Quoted 4 lines
Quoting Peter Maydell (2024-08-29 15:09:44)
Quoted 2 lines
Thanks. I tried this repro, but mkosi falls over almost immediately:
Quoted 8 lines
Quoted 3 lines
In the meantime, looks like mkosi is trying to create an block image, but that's not what it's configured to do; are you sure mkosi.conf is in the same directory you're calling it from?
It is. I notice however that the manpage for mkosi says that it looks for "mkosi.default", not "mkosi.conf". Maybe it needs a newer mkosi than Ubuntu ships? (mkosi --version says "mkosi 12".)
Likely. I have mkosi 22 here.
Quoted 1 line
I'll use the images Cédric has kindly generated.
Thanks, images by Cédric look good, but I forgot to tell you that you need a SSH key for login too :)
Quoted 6 lines
You could unpack image.cpio.gz, add your key to root/.ssh and repack the whole thing to image.new.xz:
- mkdir xtract && cd xtract
- unxz < ../image.cpio.xz | cpio -H newc -iv
- cp ~/.ssh/authorized_keys root/.ssh/
- find . 2>/dev/null | cpio -o -c -R root:root | xz -9 --format=lzma > ../image.new.xz
Thanks, I was just wondering how to get the ssh key into there.
I found I needed ... cpio -H newc -o -R root:root | xz -9 -C crc32 when creating the new image, otherwise the kernel doesn't like the format. (Also since I'm not root I needed to sprinkle in some sudo invocations.)
-- PMM
Quoted 25 lines · Nico Boehr
Quoting Nico Boehr (2024-08-26 14:08:20)
Quoted 3 lines
There was a little hickup without the fixup to patch 2, but after Nina pushed the fixup, we did not observe any failures related to your changes in our CI. Thanks!
Peter, after a few CI runs, we unfortunately did find some issues with your patch :-(
Rebooting a guest in a loop sometimes fails. Michael was able to bisect it to your series.
The problem is intermittent. The guest is unable to load its initramfs:
[ 0.560674] rootfs image is not initramfs (no cpio magic); looks like an initrd [ 0.588605] Freeing initrd memory: 95680K [ 0.593143] md: Waiting for all devices to be available before autodetect [ 0.593144] md: If you don't use raid, use raid=noautodetect [ 0.593145] md: Autodetecting RAID arrays. [ 0.593146] md: autorun ... [ 0.593147] md: ... autorun DONE. [ 0.593156] RAMDISK: gzip image found at block 0 [ 0.609110] RAMDISK: incomplete write (29120 != 32768) [ 0.609113] write error
Quoted 1 line
...and then a panic because the kernel doesn't find a rootfs.
I repro'd *something*, but it wasn't quite this. I got:
[ 4.691853] clk: Disabling unused clocks [ 4.695419] Freeing unused kernel image (initmem) memory: 6520K [ 4.695430] Write protected read-only-after-init data: 144k [ 4.695834] Checked W+X mappings: passed, no unexpected W+X pages found [ 4.695849] Run /init as init process /init: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory [ 4.697009] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 [ 4.697030] CPU: 0 PID: 1 Comm: init Not tainted 6.8.5-301.fc40.s390x #1 [ 4.697035] Hardware name: IBM 8561 LT1 400 (KVM/Linux) [ 4.697040] Call Trace: [ 4.697047] [<000000007ab6ae36>] dump_stack_lvl+0x66/0x88 [ 4.697081] [<0000000079e17c2a>] panic+0x312/0x328 [ 4.697096] [<0000000079e1de84>] do_exit+0x8a4/0xae8 [ 4.697101] [<0000000079e1e2e0>] do_group_exit+0x40/0xb8 [ 4.697103] [<0000000079e1e386>] __s390x_sys_exit_group+0x2e/0x30 [ 4.697105] [<000000007ab9526a>] __do_syscall+0x252/0x2c0 [ 4.697113] [<000000007aba8840>] system_call+0x70/0x98
Which I guess could be caused by a different corruption of the initramfs ?
thanks
-- PMM
Quoting Peter Maydell (2024-08-29 17:53:02)
Quoted 51 lines · Nico Boehr
Quoted 25 lines
Quoting Nico Boehr (2024-08-26 14:08:20)
Quoted 3 lines
There was a little hickup without the fixup to patch 2, but after Nina pushed the fixup, we did not observe any failures related to your changes in our CI. Thanks!
Peter, after a few CI runs, we unfortunately did find some issues with your patch :-(
Rebooting a guest in a loop sometimes fails. Michael was able to bisect it to your series.
The problem is intermittent. The guest is unable to load its initramfs:
[ 0.560674] rootfs image is not initramfs (no cpio magic); looks like an initrd [ 0.588605] Freeing initrd memory: 95680K [ 0.593143] md: Waiting for all devices to be available before autodetect [ 0.593144] md: If you don't use raid, use raid=noautodetect [ 0.593145] md: Autodetecting RAID arrays. [ 0.593146] md: autorun ... [ 0.593147] md: ... autorun DONE. [ 0.593156] RAMDISK: gzip image found at block 0 [ 0.609110] RAMDISK: incomplete write (29120 != 32768) [ 0.609113] write errorQuoted 1 line
...and then a panic because the kernel doesn't find a rootfs.
I repro'd *something*, but it wasn't quite this. I got:
[ 4.691853] clk: Disabling unused clocks [ 4.695419] Freeing unused kernel image (initmem) memory: 6520K [ 4.695430] Write protected read-only-after-init data: 144k [ 4.695834] Checked W+X mappings: passed, no unexpected W+X pages found [ 4.695849] Run /init as init process /init: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory [ 4.697009] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 [ 4.697030] CPU: 0 PID: 1 Comm: init Not tainted 6.8.5-301.fc40.s390x #1 [ 4.697035] Hardware name: IBM 8561 LT1 400 (KVM/Linux) [ 4.697040] Call Trace: [ 4.697047] [<000000007ab6ae36>] dump_stack_lvl+0x66/0x88 [ 4.697081] [<0000000079e17c2a>] panic+0x312/0x328 [ 4.697096] [<0000000079e1de84>] do_exit+0x8a4/0xae8 [ 4.697101] [<0000000079e1e2e0>] do_group_exit+0x40/0xb8 [ 4.697103] [<0000000079e1e386>] __s390x_sys_exit_group+0x2e/0x30 [ 4.697105] [<000000007ab9526a>] __do_syscall+0x252/0x2c0 [ 4.697113] [<000000007aba8840>] system_call+0x70/0x98
Quoted 2 lines
Which I guess could be caused by a different corruption of the initramfs ?
I think that is the problem, just a different symptom. I also got this sometimes (in random libraries all over the place).
And yes, agree, it is a corruption of the initramfs:
[ 1.597465] Initramfs unpacking failed: XZ-compressed data is corrupt
Quoted 25 lines · Nico Boehr
Quoting Peter Maydell (2024-08-29 17:53:02)
Quoted 23 lines
I repro'd *something*, but it wasn't quite this. I got:
[ 4.691853] clk: Disabling unused clocks [ 4.695419] Freeing unused kernel image (initmem) memory: 6520K [ 4.695430] Write protected read-only-after-init data: 144k [ 4.695834] Checked W+X mappings: passed, no unexpected W+X pages found [ 4.695849] Run /init as init process /init: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory [ 4.697009] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 [ 4.697030] CPU: 0 PID: 1 Comm: init Not tainted 6.8.5-301.fc40.s390x #1 [ 4.697035] Hardware name: IBM 8561 LT1 400 (KVM/Linux) [ 4.697040] Call Trace: [ 4.697047] [<000000007ab6ae36>] dump_stack_lvl+0x66/0x88 [ 4.697081] [<0000000079e17c2a>] panic+0x312/0x328 [ 4.697096] [<0000000079e1de84>] do_exit+0x8a4/0xae8 [ 4.697101] [<0000000079e1e2e0>] do_group_exit+0x40/0xb8 [ 4.697103] [<0000000079e1e386>] __s390x_sys_exit_group+0x2e/0x30 [ 4.697105] [<000000007ab9526a>] __do_syscall+0x252/0x2c0 [ 4.697113] [<000000007aba8840>] system_call+0x70/0x98
Quoted 5 lines
Quoted 2 lines
Which I guess could be caused by a different corruption of the initramfs ?
I think that is the problem, just a different symptom. I also got this sometimes (in random libraries all over the place).
I ran overnight with none of the patchset applied, and it never failed (as expected). Running with just the first virtio-ccw patch does fall over fairly quickly. So something's up with that patch, which is curious because that's the one I thought was a straightforward conversion without any complications :-)
I'll investigate further today, I have the beginnings of a theory about what might be happening...
-- PMM
Quoting Peter Maydell (2024-08-30 12:01:47)
Quoted 32 lines · Nico Boehr
Quoted 25 lines
Quoting Peter Maydell (2024-08-29 17:53:02)
Quoted 23 lines
I repro'd *something*, but it wasn't quite this. I got:
[ 4.691853] clk: Disabling unused clocks [ 4.695419] Freeing unused kernel image (initmem) memory: 6520K [ 4.695430] Write protected read-only-after-init data: 144k [ 4.695834] Checked W+X mappings: passed, no unexpected W+X pages found [ 4.695849] Run /init as init process /init: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory [ 4.697009] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 [ 4.697030] CPU: 0 PID: 1 Comm: init Not tainted 6.8.5-301.fc40.s390x #1 [ 4.697035] Hardware name: IBM 8561 LT1 400 (KVM/Linux) [ 4.697040] Call Trace: [ 4.697047] [<000000007ab6ae36>] dump_stack_lvl+0x66/0x88 [ 4.697081] [<0000000079e17c2a>] panic+0x312/0x328 [ 4.697096] [<0000000079e1de84>] do_exit+0x8a4/0xae8 [ 4.697101] [<0000000079e1e2e0>] do_group_exit+0x40/0xb8 [ 4.697103] [<0000000079e1e386>] __s390x_sys_exit_group+0x2e/0x30 [ 4.697105] [<000000007ab9526a>] __do_syscall+0x252/0x2c0 [ 4.697113] [<000000007aba8840>] system_call+0x70/0x98Quoted 5 lines
Quoted 2 lines
Which I guess could be caused by a different corruption of the initramfs ?
I think that is the problem, just a different symptom. I also got this sometimes (in random libraries all over the place).
Quoted 8 lines
I ran overnight with none of the patchset applied, and it never failed (as expected). Running with just the first virtio-ccw patch does fall over fairly quickly. So something's up with that patch, which is curious because that's the one I thought was a straightforward conversion without any complications :-)
I'll investigate further today, I have the beginnings of a theory about what might be happening...
Thanks for taking the time, Peter! Let me know when you have insights.
Quoted 8 lines · Nico Boehr
Quoting Peter Maydell (2024-08-30 12:01:47)
Quoted 6 lines
I ran overnight with none of the patchset applied, and it never failed (as expected). Running with just the first virtio-ccw patch does fall over fairly quickly. So something's up with that patch, which is curious because that's the one I thought was a straightforward conversion without any complications :-)
Quoted 4 lines
Quoted 2 lines
I'll investigate further today, I have the beginnings of a theory about what might be happening...
Thanks for taking the time, Peter! Let me know when you have insights.
I think I've found the problem, I'm just testing it to see if it does properly fix the intermittent. The issue is that before we can convert a class to three-phase reset we need to have already converted all its parent classes. TYPE_VIRTIO_CCW_DEVICE is a subclass of TYPE_CCW_DEVICE, but I forgot to convert TYPE_CCW_DEVICE to three-phase reset. The result is that the reset in the parent class was not happening at all (presumably leaving the TYPE_CCW_DEVICE in an invalid/unexpected state on reboot). The fix is to add an extra patch at the start of the series. Once I've tested this I'll send out a v2 of the series, maybe also adding the cleanup RTH suggested in one of the later patches. (Ironically, if we do that cleanup then the bug would also go away, because old-style DeviceClass:reset methods will get called in exactly the same way as if they were registered as phases.hold methods, rather than being specially handled...)
commit ff9bc4c8910f636f20e9b6e91d63dd003408ce10
Author: Peter Maydell <[email protected]> Date: Fri Aug 30 12:50:03 2024 +0100
hw/s390/ccw-device: Convert to three-phase reset
Convert the TYPE_CCW_DEVICE to three-phase reset. This is a device class which is subclassed, so it needs to be three-phase before we can convert the subclass.
hw/s390x/ccw-device.c +2 -2
@@ -44,9 +44,9 @@ static Property ccw_device_properties[] = { DEFINE_PROP_END_OF_LIST(), }; -static void ccw_device_reset (DeviceState *d) +static void ccw_device_reset_hold (Object *obj,ResetType type) { -CcwDevice *ccw_dev =CCW_DEVICE (d); +CcwDevice *ccw_dev =CCW_DEVICE (obj);css_reset_sch (ccw_dev->sch); }
@@ -55,11 +55,12 @@ static void ccw_device_class_init(ObjectClass
*klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
CCWDeviceClass *k = CCW_DEVICE_CLASS(klass);+ ResettableClass *rc = RESETTABLE_CLASS(klass);
k->realize = ccw_device_realize;
k->refill_ids = ccw_device_refill_ids;
device_class_set_props(dc, ccw_device_properties);
- dc->reset = ccw_device_reset;
+ rc->phases.hold = ccw_device_reset_hold;
dc->bus_type = TYPE_VIRTUAL_CSS_BUS;}
-- PMM
Quoted 15 lines · Peter Maydell
Quoted 8 lines · Nico Boehr
Quoting Peter Maydell (2024-08-30 12:01:47)
Quoted 6 lines
I ran overnight with none of the patchset applied, and it never failed (as expected). Running with just the first virtio-ccw patch does fall over fairly quickly. So something's up with that patch, which is curious because that's the one I thought was a straightforward conversion without any complications :-)
Quoted 4 lines
Quoted 2 lines
I'll investigate further today, I have the beginnings of a theory about what might be happening...
Thanks for taking the time, Peter! Let me know when you have insights.
Quoted 7 lines
I think I've found the problem, I'm just testing it to see if it does properly fix the intermittent.
The fix is to add an extra patch at the start of the series. Once I've tested this I'll send out a v2 of the series, maybe also adding the cleanup RTH suggested in one of the later patches.
By the way, how would you like this series to go upstream? I can think of three options:
* you take the whole thing through the s390 tree
* I take the whole thing through my tree
* you take the s390 specific patches, and I take the remaining reset-cleanup patches once those have landed
Any preference?
thanks
-- PMM
Quoted 24 lines · Peter Maydell
Quoted 15 lines · Peter Maydell
Quoted 8 lines · Nico Boehr
Quoting Peter Maydell (2024-08-30 12:01:47)
Quoted 6 lines
I ran overnight with none of the patchset applied, and it never failed (as expected). Running with just the first virtio-ccw patch does fall over fairly quickly. So something's up with that patch, which is curious because that's the one I thought was a straightforward conversion without any complications :-)
Quoted 4 lines
Quoted 2 lines
I'll investigate further today, I have the beginnings of a theory about what might be happening...
Thanks for taking the time, Peter! Let me know when you have insights.
Quoted 7 lines
I think I've found the problem, I'm just testing it to see if it does properly fix the intermittent.
The fix is to add an extra patch at the start of the series. Once I've tested this I'll send out a v2 of the series, maybe also adding the cleanup RTH suggested in one of the later patches.
Quoted 8 lines
By the way, how would you like this series to go upstream? I can think of three options:
* you take the whole thing through the s390 tree
* I take the whole thing through my tree
* you take the s390 specific patches, and I take the remaining reset-cleanup patches once those have landedAny preference?
I'm fine if you take the patches through your tree along with the other reset-related patches.
Thomas