Misc patches for 2020-01-23
Subsystems (12)
The following changes since commit 3e08b2b9cb64bff2b73fa9128c0e49bfcde0dd40:
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/edk2-next-20200121' into staging (2020-01-21 15:29:25 +0000)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 2851f936954cd168c720e38bf6be98c251b6c38f:
target/i386: Add the 'model-id' for Skylake -v3 CPU models (2020-01-23 10:27:58 +0100)
----------------------------------------------------------------
* Register qdev properties as class properties (Marc-André)
* Cleanups (Philippe)
* virtio-scsi fix (Pan Nengyuan)
* Tweak Skylake-v3 model id (Kashyap)
* x86 UCODE_REV support and nested live migration fix (myself)
* Advisory mode for pvpanic (Zhenwei)
----------------------------------------------------------------
Greg Kurz (2):
cpu: Introduce cpu_class_set_parent_reset()
cpu: Use cpu_class_set_parent_reset()
Kashyap Chamarthy (1):
target/i386: Add the 'model-id' for Skylake -v3 CPU models
Marc-André Lureau (26):
object: add extra sanity checks
qdev: remove duplicated qdev_property_add_static() doc
qdev: remove extraneous error
qdev: move helper function to monitor/misc
object: avoid extra class property key duplication
object: add class property initializer
object: add object_property_get_defaut()
object: make object_class_property_add* return property
qstring: add qstring_free()
object: add object_property_set_defaut_{bool, str, int, uint}()
object: do not free class properties
object: check strong flag with &
object: rename link "child" to "target"
object: add direct link flag
object: express const link with link property
object: add object_class_property_add_link()
object: release all props
object: return self in object_ref()
qdev: set properties with device_class_set_props()
qdev: move instance properties to class properties
qdev: register properties as class properties
vl: print default value in object help
qom: simplify qmp_device_list_properties()
qom: introduce object_property_help()
qapi/qmp: add ObjectPropertyInfo.default-value
qdev: use object_property_help()
Pan Nengyuan (2):
virtio-scsi: delete vqs in unrealize to avoid memleaks
virtio-scsi: convert to new virtio_delete_queue
Paolo Bonzini (3):
target/i386: kvm: initialize feature MSRs very early target/i386: add a ucode-rev property target/i386: kvm: initialize microcode revision from KVM
Philippe Mathieu-Daudé (21):
qom/object: Display more helpful message when an interface is missing audio/audio: Add missing fall through comment hw/display/tcx: Add missing fall through comments hw/timer/aspeed_timer: Add a fall through comment hw/net/imx_fec: Rewrite fall through comments hw/net/imx_fec: Remove unuseful FALLTHROUGH comments hw/pci-host/designware: Remove unuseful FALLTHROUGH comment
configure: Do not build libfdt if not required
Makefile: Clarify all the codebase requires qom/ objects
Makefile: Restrict system emulation and tools objects
Makefile: Remove unhelpful comment
hw/core: Restrict reset handlers API to system-mode hw/core/Makefile: Group generic objects versus system-mode objects hw/ppc/spapr_rtas: Use local MachineState variable hw/ppc/spapr_rtas: Access MachineState via SpaprMachineState argument hw/ppc/spapr_rtas: Remove local variable
target/arm/kvm: Use CPUState::kvm_state in kvm_arm_pmu_supported() qom/object: Display more helpful message when a parent is missing
accel: Introduce the current_accel() wrapper
accel: Replace current_machine->accelerator by current_accel() wrapper accel/tcg: Sanitize include path
Zhenwei Pi (2):
pvpanic: introduce crashloaded for pvpanic
pvpanic: implement crashloaded event handling
Makefile.objs | 31 ++-- accel/accel.c | 5 + accel/kvm/kvm-all.c | 4 +- accel/tcg/tcg-all.c | 8 +- audio/audio.c | 1 + configure | 2 + docs/specs/pvpanic.txt | 18 +- hw/9pfs/virtio-9p-device.c | 2 +- hw/acpi/generic_event_device.c | 2 +- hw/acpi/piix4.c | 2 +- hw/acpi/vmgenid.c | 2 +- hw/arm/armsse.c | 2 +- hw/arm/armv7m.c | 4 +- hw/arm/aspeed_soc.c | 2 +- hw/arm/bcm2836.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/msf2-soc.c | 2 +- hw/arm/musicpal.c | 2 +- hw/arm/nrf51_soc.c | 2 +- hw/arm/pxa2xx.c | 4 +- hw/arm/pxa2xx_gpio.c | 2 +- hw/arm/smmu-common.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/stm32f205_soc.c | 2 +- hw/arm/strongarm.c | 2 +- hw/arm/xlnx-versal.c | 2 +- hw/arm/xlnx-zynqmp.c | 2 +- hw/audio/ac97.c | 2 +- hw/audio/adlib.c | 2 +- hw/audio/cs4231.c | 2 +- hw/audio/cs4231a.c | 2 +- hw/audio/es1370.c | 2 +- hw/audio/gus.c | 2 +- hw/audio/hda-codec.c | 2 +- hw/audio/intel-hda.c | 4 +- hw/audio/milkymist-ac97.c | 2 +- hw/audio/pcspk.c | 2 +- hw/audio/pl041.c | 2 +- hw/audio/sb16.c | 2 +- hw/audio/wm8750.c | 2 +- hw/block/fdc.c | 8 +- hw/block/m25p80.c | 2 +- hw/block/nand.c | 2 +- hw/block/nvme.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/block/vhost-user-blk.c | 2 +- hw/block/virtio-blk.c | 2 +- hw/block/xen-block.c | 2 +- hw/char/bcm2835_aux.c | 2 +- hw/char/cadence_uart.c | 2 +- hw/char/cmsdk-apb-uart.c | 2 +- hw/char/debugcon.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/grlib_apbuart.c | 2 +- hw/char/imx_serial.c | 2 +- hw/char/ipoctal232.c | 2 +- hw/char/lm32_juart.c | 2 +- hw/char/lm32_uart.c | 2 +- hw/char/mcf_uart.c | 2 +- hw/char/milkymist-uart.c | 2 +- hw/char/nrf51_uart.c | 2 +- hw/char/parallel.c | 2 +- hw/char/pl011.c | 2 +- hw/char/sclpconsole-lm.c | 2 +- hw/char/sclpconsole.c | 2 +- hw/char/serial-isa.c | 2 +- hw/char/serial-pci-multi.c | 4 +- hw/char/serial-pci.c | 2 +- hw/char/serial.c | 4 +- hw/char/spapr_vty.c | 2 +- hw/char/stm32f2xx_usart.c | 2 +- hw/char/terminal3270.c | 2 +- hw/char/virtio-console.c | 2 +- hw/char/virtio-serial-bus.c | 4 +- hw/char/xilinx_uartlite.c | 2 +- hw/core/Makefile.objs | 31 ++-- hw/core/cpu.c | 10 +- hw/core/generic-loader.c | 2 +- hw/core/or-irq.c | 2 +- hw/core/platform-bus.c | 2 +- hw/core/qdev-properties.c | 38 ++--- hw/core/qdev.c | 155 ++++++++---------- hw/core/split-irq.c | 2 +- hw/cpu/a15mpcore.c | 2 +- hw/cpu/a9mpcore.c | 2 +- hw/cpu/arm11mpcore.c | 2 +- hw/cpu/cluster.c | 2 +- hw/cpu/realview_mpcore.c | 2 +- hw/display/ati.c | 2 +- hw/display/bcm2835_fb.c | 2 +- hw/display/bochs-display.c | 2 +- hw/display/cg3.c | 2 +- hw/display/cirrus_vga.c | 2 +- hw/display/cirrus_vga_isa.c | 2 +- hw/display/g364fb.c | 2 +- hw/display/i2c-ddc.c | 2 +- hw/display/macfb.c | 4 +- hw/display/milkymist-vgafb.c | 2 +- hw/display/qxl.c | 2 +- hw/display/ramfb-standalone.c | 2 +- hw/display/sm501.c | 4 +- hw/display/tcx.c | 4 +- hw/display/vga-isa.c | 2 +- hw/display/vga-pci.c | 4 +- hw/display/vhost-user-gpu.c | 2 +- hw/display/virtio-gpu-pci.c | 2 +- hw/display/virtio-gpu.c | 2 +- hw/display/virtio-vga.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/dma/i82374.c | 2 +- hw/dma/i8257.c | 2 +- hw/dma/pl080.c | 2 +- hw/dma/pl330.c | 2 +- hw/dma/pxa2xx_dma.c | 2 +- hw/dma/xilinx_axidma.c | 2 +- hw/dma/xlnx-zdma.c | 2 +- hw/gpio/imx_gpio.c | 2 +- hw/gpio/omap_gpio.c | 4 +- hw/i2c/aspeed_i2c.c | 2 +- hw/i2c/core.c | 2 +- hw/i2c/omap_i2c.c | 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/clock.c | 2 +- hw/i386/kvm/i8254.c | 2 +- hw/i386/kvm/ioapic.c | 2 +- hw/i386/vmmouse.c | 2 +- hw/i386/x86-iommu.c | 2 +- hw/i386/xen/xen_pvdevice.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/qdev.c | 8 +- hw/input/adb.c | 2 +- hw/input/milkymist-softusb.c | 2 +- hw/input/virtio-input-hid.c | 6 +- hw/input/virtio-input-host.c | 2 +- hw/input/virtio-input.c | 2 +- hw/intc/apic_common.c | 2 +- hw/intc/arm_gic_common.c | 2 +- hw/intc/arm_gicv2m.c | 2 +- hw/intc/arm_gicv3_common.c | 2 +- hw/intc/arm_gicv3_its_kvm.c | 2 +- hw/intc/armv7m_nvic.c | 2 +- hw/intc/exynos4210_combiner.c | 2 +- hw/intc/exynos4210_gic.c | 4 +- hw/intc/i8259_common.c | 2 +- hw/intc/ioapic.c | 2 +- hw/intc/mips_gic.c | 2 +- hw/intc/omap_intc.c | 4 +- hw/intc/ompic.c | 2 +- hw/intc/openpic.c | 2 +- hw/intc/openpic_kvm.c | 2 +- hw/intc/pnv_xive.c | 2 +- hw/intc/s390_flic.c | 2 +- hw/intc/spapr_xive.c | 2 +- hw/intc/xics.c | 4 +- hw/intc/xilinx_intc.c | 2 +- hw/intc/xive.c | 6 +- hw/intc/xlnx-pmu-iomod-intc.c | 2 +- hw/ipack/ipack.c | 2 +- hw/ipmi/ipmi.c | 2 +- hw/ipmi/ipmi_bmc_extern.c | 2 +- hw/ipmi/ipmi_bmc_sim.c | 2 +- hw/ipmi/isa_ipmi_bt.c | 2 +- hw/ipmi/isa_ipmi_kcs.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/pc87312.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/mem/nvdimm.c | 2 +- hw/mem/pc-dimm.c | 2 +- hw/mips/cps.c | 2 +- hw/misc/a9scu.c | 2 +- hw/misc/applesmc.c | 2 +- hw/misc/arm11scu.c | 2 +- hw/misc/arm_l2x0.c | 2 +- hw/misc/arm_sysctl.c | 2 +- hw/misc/armsse-cpuid.c | 2 +- hw/misc/aspeed_scu.c | 2 +- hw/misc/aspeed_sdmc.c | 2 +- hw/misc/bcm2835_property.c | 2 +- hw/misc/debugexit.c | 2 +- hw/misc/eccmemctl.c | 2 +- hw/misc/iotkit-sysctl.c | 2 +- hw/misc/iotkit-sysinfo.c | 2 +- hw/misc/ivshmem.c | 4 +- hw/misc/mac_via.c | 2 +- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/macio.c | 4 +- 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/mos6522.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/pvpanic.c | 13 +- hw/misc/tz-mpc.c | 2 +- hw/misc/tz-msc.c | 2 +- hw/misc/tz-ppc.c | 2 +- hw/misc/unimp.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/cadence_gem.c | 2 +- hw/net/dp8393x.c | 2 +- hw/net/e1000.c | 2 +- hw/net/e1000e.c | 2 +- hw/net/eepro100.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 | 9 +- hw/net/lan9118.c | 2 +- hw/net/lance.c | 2 +- hw/net/mcf_fec.c | 2 +- hw/net/milkymist-minimac2.c | 2 +- hw/net/mipsnet.c | 2 +- hw/net/ne2000-isa.c | 2 +- hw/net/ne2000-pci.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/spapr_llan.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/virtio-net.c | 2 +- hw/net/vmxnet3.c | 2 +- hw/net/xgmac.c | 2 +- hw/net/xilinx_axienet.c | 2 +- hw/net/xilinx_ethlite.c | 2 +- hw/nvram/ds1225y.c | 2 +- hw/nvram/eeprom_at24c.c | 2 +- hw/nvram/fw_cfg.c | 4 +- hw/nvram/mac_nvram.c | 2 +- hw/nvram/nrf51_nvm.c | 2 +- hw/nvram/spapr_nvram.c | 2 +- hw/pci-bridge/gen_pcie_root_port.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 4 +- hw/pci-bridge/pcie_pci_bridge.c | 2 +- hw/pci-bridge/pcie_root_port.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-host/designware.c | 2 +- hw/pci-host/grackle.c | 2 +- hw/pci-host/i440fx.c | 2 +- hw/pci-host/ppce500.c | 2 +- hw/pci-host/prep.c | 2 +- hw/pci-host/q35.c | 4 +- hw/pci-host/sabre.c | 2 +- hw/pci-host/uninorth.c | 2 +- hw/pci-host/versatile.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/pci/pci.c | 2 +- hw/pci/pcie_port.c | 4 +- hw/ppc/pnv.c | 2 +- hw/ppc/pnv_core.c | 4 +- hw/ppc/pnv_homer.c | 2 +- hw/ppc/pnv_lpc.c | 2 +- hw/ppc/pnv_occ.c | 2 +- hw/ppc/pnv_pnor.c | 2 +- hw/ppc/pnv_psi.c | 2 +- hw/ppc/ppc440_uc.c | 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/rs6000_mc.c | 2 +- hw/ppc/spapr_cpu_core.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_rng.c | 2 +- hw/ppc/spapr_rtas.c | 9 +- hw/ppc/spapr_tpm_proxy.c | 2 +- hw/rdma/vmw/pvrdma_main.c | 2 +- hw/riscv/riscv_hart.c | 2 +- hw/riscv/sifive_clint.c | 2 +- hw/riscv/sifive_plic.c | 2 +- hw/riscv/sifive_u_otp.c | 2 +- hw/rtc/m48t59-isa.c | 2 +- hw/rtc/m48t59.c | 2 +- hw/rtc/mc146818rtc.c | 2 +- hw/rtc/pl031.c | 2 +- hw/s390x/3270-ccw.c | 2 +- hw/s390x/ccw-device.c | 2 +- hw/s390x/css-bridge.c | 2 +- hw/s390x/ipl.c | 2 +- hw/s390x/s390-pci-bus.c | 2 +- hw/s390x/vhost-vsock-ccw.c | 2 +- hw/s390x/virtio-ccw-9p.c | 2 +- hw/s390x/virtio-ccw-balloon.c | 2 +- hw/s390x/virtio-ccw-blk.c | 2 +- hw/s390x/virtio-ccw-crypto.c | 2 +- hw/s390x/virtio-ccw-gpu.c | 2 +- hw/s390x/virtio-ccw-input.c | 2 +- hw/s390x/virtio-ccw-net.c | 2 +- hw/s390x/virtio-ccw-rng.c | 2 +- hw/s390x/virtio-ccw-scsi.c | 4 +- hw/s390x/virtio-ccw-serial.c | 2 +- hw/scsi/megasas.c | 2 +- hw/scsi/mptsas.c | 2 +- hw/scsi/scsi-bus.c | 2 +- hw/scsi/scsi-disk.c | 8 +- hw/scsi/scsi-generic.c | 2 +- hw/scsi/spapr_vscsi.c | 2 +- hw/scsi/vhost-scsi.c | 2 +- hw/scsi/vhost-user-scsi.c | 2 +- hw/scsi/virtio-scsi.c | 8 +- hw/scsi/vmw_pvscsi.c | 2 +- hw/sd/sd.c | 2 +- hw/sd/sdhci-pci.c | 2 +- hw/sd/sdhci.c | 2 +- hw/sparc/sun4m.c | 4 +- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u.c | 6 +- hw/ssi/aspeed_smc.c | 2 +- hw/ssi/xilinx_spi.c | 2 +- hw/ssi/xilinx_spips.c | 4 +- hw/timer/a9gtimer.c | 2 +- hw/timer/allwinner-a10-pit.c | 2 +- hw/timer/altera_timer.c | 2 +- hw/timer/arm_mptimer.c | 2 +- hw/timer/arm_timer.c | 2 +- hw/timer/aspeed_timer.c | 4 +- hw/timer/cmsdk-apb-dualtimer.c | 2 +- hw/timer/cmsdk-apb-timer.c | 2 +- hw/timer/grlib_gptimer.c | 2 +- hw/timer/hpet.c | 2 +- hw/timer/i8254.c | 2 +- hw/timer/lm32_timer.c | 2 +- hw/timer/milkymist-sysctl.c | 2 +- hw/timer/mss-timer.c | 2 +- hw/timer/pxa2xx_timer.c | 4 +- hw/timer/slavio_timer.c | 2 +- hw/timer/stm32f2xx_timer.c | 2 +- hw/timer/xilinx_timer.c | 2 +- hw/tpm/tpm_crb.c | 2 +- hw/tpm/tpm_tis.c | 2 +- hw/usb/bus.c | 2 +- hw/usb/ccid-card-emulated.c | 2 +- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-audio.c | 2 +- hw/usb/dev-hid.c | 6 +- hw/usb/dev-hub.c | 2 +- hw/usb/dev-mtp.c | 2 +- hw/usb/dev-network.c | 2 +- hw/usb/dev-serial.c | 4 +- hw/usb/dev-smartcard-reader.c | 4 +- hw/usb/dev-storage.c | 2 +- hw/usb/dev-uas.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.c | 2 +- hw/usb/hcd-uhci.c | 4 +- hw/usb/hcd-xhci-nec.c | 2 +- hw/usb/hcd-xhci.c | 2 +- hw/usb/host-libusb.c | 2 +- hw/usb/redirect.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/pci.c | 4 +- hw/vfio/platform.c | 2 +- hw/virtio/vhost-scsi-pci.c | 2 +- hw/virtio/vhost-user-blk-pci.c | 2 +- hw/virtio/vhost-user-fs-pci.c | 2 +- hw/virtio/vhost-user-fs.c | 2 +- hw/virtio/vhost-user-scsi-pci.c | 2 +- hw/virtio/vhost-vsock-pci.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- hw/virtio/virtio-9p-pci.c | 2 +- hw/virtio/virtio-balloon-pci.c | 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio-blk-pci.c | 2 +- hw/virtio/virtio-crypto-pci.c | 2 +- hw/virtio/virtio-crypto.c | 2 +- hw/virtio/virtio-input-pci.c | 2 +- hw/virtio/virtio-mmio.c | 2 +- hw/virtio/virtio-net-pci.c | 2 +- hw/virtio/virtio-pci.c | 4 +- hw/virtio/virtio-pmem.c | 2 +- hw/virtio/virtio-rng.c | 2 +- hw/virtio/virtio-scsi-pci.c | 2 +- hw/virtio/virtio-serial-pci.c | 2 +- hw/virtio/virtio.c | 2 +- hw/watchdog/cmsdk-apb-watchdog.c | 2 +- hw/watchdog/wdt_aspeed.c | 2 +- hw/xen/xen-bus.c | 2 +- hw/xen/xen-legacy-backend.c | 4 +- hw/xen/xen_pt.c | 2 +- include/hw/core/cpu.h | 4 + include/hw/qdev-core.h | 8 +- include/hw/qdev-properties.h | 3 +- include/qapi/qmp/qstring.h | 1 + include/qom/object.h | 126 ++++++++++++-- include/sysemu/accel.h | 2 + include/sysemu/runstate.h | 1 + memory.c | 2 +- migration/migration.c | 2 +- monitor/misc.c | 26 +++ qapi/qom.json | 7 +- qapi/run-state.json | 24 ++- qdev-monitor.c | 15 +- qobject/qstring.c | 27 ++- qom/object.c | 316 ++++++++++++++++++++++++++++-------- qom/object_interfaces.c | 33 ++-- qom/qom-qmp-cmds.c | 54 +----- target/arm/cpu.c | 39 ++--- target/arm/kvm.c | 4 +- target/arm/kvm64.c | 5 +- target/cris/cpu.c | 3 +- target/i386/cpu.c | 25 ++- target/i386/cpu.h | 3 + target/i386/hvf/x86_emu.c | 4 +- target/i386/kvm.c | 88 ++++++---- target/i386/kvm_i386.h | 1 + target/i386/misc_helper.c | 4 + target/lm32/cpu.c | 3 +- target/m68k/cpu.c | 3 +- target/microblaze/cpu.c | 5 +- target/mips/cpu.c | 3 +- target/moxie/cpu.c | 3 +- target/nios2/cpu.c | 5 +- target/openrisc/cpu.c | 3 +- target/ppc/kvm.c | 4 +- target/ppc/translate_init.inc.c | 13 +- target/riscv/cpu.c | 5 +- target/s390x/cpu.c | 5 +- target/sh4/cpu.c | 3 +- target/sparc/cpu.c | 5 +- target/tilegx/cpu.c | 3 +- target/tricore/cpu.c | 3 +- target/xtensa/cpu.c | 3 +- tests/test-qdev-global-props.c | 2 +- vl.c | 14 +- 443 files changed, 1229 insertions(+), 891 deletions(-)
Signature · 1 line
1.8.3.1
[PULL 10/59] hw/net/imx_fec: Remove unuseful FALLTHROUGH comments
From: Philippe Mathieu-Daudé <[email protected]>
We don't need to explicit these obvious switch fall through comments. Stay consistent with the rest of the codebase.
Message-Id: <[email protected]>
--- hw/net/imx_fec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/net/imx_fec.c +2 -2
@@ -901,8 +901,8 @@ static void imx_eth_write(void *opaque, hwaddr offset, uint64_t value, s->regs[index] =0 ; }break ; -case ENET_TDAR1 :/* FALLTHROUGH */ -case ENET_TDAR2 :/* FALLTHROUGH */ +case ENET_TDAR1 : +case ENET_TDAR2 :if (unlikely (single_tx_ring)) { qemu_log_mask(LOG_GUEST_ERROR, "[%s]%s: trying to access TDAR2 or TDAR1\n",
Signature · 1 line
1.8.3.1
[PULL 13/59] Makefile: Clarify all the codebase requires qom/ objects
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
QEMU user-mode also requires the qom/ objects, it is not only used by "system emulation and qemu-img". As we will use a big if() block, move it upper in the "Common libraries for tools and emulators" section.
Message-Id: <[email protected]>
--- Makefile.objs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile.objs +1 -5
@@ -2,6 +2,7 @@ # Common libraries for tools and emulators stub-obj-y = stubs/ util-obj-y = crypto/ util/ qobject/ qapi/ +qom-obj-y = qom/ chardev-obj-y = chardev/
@@ -27,11 +28,6 @@ block-obj-m = block/ crypto-obj-y = crypto/ ####################################################################### -# qom-obj-y is code used by both qemu system emulation and qemu-img - -qom-obj-y = qom/ - -####################################################################### # io-obj-y is code used by both qemu system emulation and qemu-img io-obj-y = io/
Signature · 1 line
1.8.3.1
[PULL 14/59] Makefile: Restrict system emulation and tools objects
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
Restrict all the system emulation and tools objects with a Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check.
Using the same description over and over is not very helpful. Use it once, just before the if() block.
Message-Id: <[email protected]>
--- Makefile.objs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
Makefile.objs +7 -12
@@ -4,15 +4,14 @@ stub-obj-y = stubs/ util-obj-y = crypto/ util/ qobject/ qapi/ qom-obj-y = qom/ -chardev-obj-y = chardev/ - ####################################################################### -# authz-obj-y is code used by both qemu system emulation and qemu-img +# code used by both qemu system emulation and qemu-img -authz-obj-y = authz/ +ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y) -####################################################################### -# block-obj-y is code used by both qemu system emulation and qemu-img +chardev-obj-y = chardev/ + +authz-obj-y = authz/ block-obj-y = nbd/ block-obj-y += block.o blockjob.o job.o
@@ -22,16 +21,12 @@ block-obj-$(CONFIG_REPLICATION) += replication.o block-obj-m = block/ -####################################################################### -# crypto-obj-y is code used by both qemu system emulation and qemu-img - crypto-obj-y = crypto/ -####################################################################### -# io-obj-y is code used by both qemu system emulation and qemu-img - io-obj-y = io/ +endif # CONFIG_SOFTMMU or CONFIG_TOOLS + ###################################################################### # Target independent part of system emulation. The long term path is to # suppress *all* target specific code in case of system emulation, i.e. a
Signature · 1 line
1.8.3.1
[PULL 15/59] Makefile: Remove unhelpful comment
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
It is pointless to keep qapi/ object separate from the other common-objects. Drop the comment.
Message-Id: <[email protected]>
--- Makefile.objs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Makefile.objs +2 -4
@@ -71,11 +71,9 @@ qemu-seccomp.o-libs := $(SECCOMP_LIBS) common-obj-$(CONFIG_FDT) += device_tree.o -###################################################################### -# qapi - common-obj-y += qapi/ -endif + +endif # CONFIG_SOFTMMU ####################################################################### # Target-independent parts used in system and user emulation
Signature · 1 line
1.8.3.1
[PULL 18/59] target/i386: kvm: initialize feature MSRs very early
In reply to Paolo BonziniSome read-only MSRs affect the behavior of ioctls such as KVM_SET_NESTED_STATE. We can initialize them once and for all right after the CPU is realized, since they will never be modified by the guest.
Message-Id: <[email protected]>
--- target/i386/kvm.c | 81 ++++++++++++++++++++++++++++++-------------------- target/i386/kvm_i386.h | 1 + 2 files changed, 49 insertions(+), 33 deletions(-)
target/i386/kvm.c +48 -33
@@ -67,6 +67,8 @@* 255 kvm_msr_entry structs */ #define MSR_BUF_SIZE 4096 +static void kvm_init_msrs (X86CPU *cpu); +const KVMCapabilityInfo kvm_arch_required_capabilities[] = {KVM_CAP_INFO (SET_TSS_ADDR ),KVM_CAP_INFO (EXT_CPUID ),
@@ -1842,6 +1844,8 @@ int kvm_arch_init_vcpu(CPUState *cs) has_msr_tsc_aux = false; } +kvm_init_msrs (cpu); + r =hyperv_init_vcpu (cpu);if (r) { goto fail;
@@ -2660,11 +2664,53 @@ static void kvm_msr_entry_add_vmx(X86CPU *cpu, FeatureWordArray f) VMCS12_MAX_FIELD_INDEX << 1); } +static int kvm_buf_set_msrs (X86CPU *cpu) +{ +int ret =kvm_vcpu_ioctl (CPU (cpu),KVM_SET_MSRS , cpu->kvm_msr_buf); +if (ret <0 ) { +return ret; + } + +if (ret < cpu->kvm_msr_buf->nmsrs) { +struct kvm_msr_entry *e = &cpu->kvm_msr_buf->entries[ret]; +error_report ("error: failed to set MSR 0x%" PRIx32" to 0x%" PRIx64, + (uint32_t )e->index, (uint64_t )e->data); + } + +assert (ret == cpu->kvm_msr_buf->nmsrs); +return 0 ; +} + +static void kvm_init_msrs (X86CPU *cpu) +{ +CPUX86State *env = &cpu->env; + +kvm_msr_buf_reset (cpu); +if (has_msr_arch_capabs) { +kvm_msr_entry_add (cpu,MSR_IA32_ARCH_CAPABILITIES , + env->features[FEAT_ARCH_CAPABILITIES ]); + } + +if (has_msr_core_capabs) { +kvm_msr_entry_add (cpu,MSR_IA32_CORE_CAPABILITY , + env->features[FEAT_CORE_CAPABILITY ]); + } + +/* +* Older kernels do not include VMX MSRs in KVM_GET_MSR_INDEX_LIST, but +* all kernels with MSR features should have them. +*/ +if (kvm_feature_msrs &&cpu_has_vmx (env)) { +kvm_msr_entry_add_vmx (cpu, env->features); + } + +assert (kvm_buf_set_msrs (cpu) ==0 ); +} +static int kvm_put_msrs (X86CPU *cpu,int level) {CPUX86State *env = &cpu->env;int i; -int ret;kvm_msr_buf_reset (cpu);
@@ -2722,17 +2768,6 @@ static int kvm_put_msrs(X86CPU *cpu, int level) }#endif -/* If host supports feature MSR, write down. */ -if (has_msr_arch_capabs) { -kvm_msr_entry_add (cpu,MSR_IA32_ARCH_CAPABILITIES , - env->features[FEAT_ARCH_CAPABILITIES ]); - } - -if (has_msr_core_capabs) { -kvm_msr_entry_add (cpu,MSR_IA32_CORE_CAPABILITY , - env->features[FEAT_CORE_CAPABILITY ]); - } -/* * The following MSRs have side effects on the guest or are too heavy * for normal writeback. Limit them to reset or full state updates.
@@ -2910,14 +2945,6 @@ static int kvm_put_msrs(X86CPU *cpu, int level)/* Note: MSR_IA32_FEATURE_CONTROL is written separately, see * kvm_put_msr_feature_control. */ - -/* -* Older kernels do not include VMX MSRs in KVM_GET_MSR_INDEX_LIST, but -* all kernels with MSR features should have them. -*/ -if (kvm_feature_msrs &&cpu_has_vmx (env)) { -kvm_msr_entry_add_vmx (cpu, env->features); - } }if (env->mcg_cap) {
@@ -2933,19 +2960,7 @@ static int kvm_put_msrs(X86CPU *cpu, int level) } } - ret =kvm_vcpu_ioctl (CPU (cpu),KVM_SET_MSRS , cpu->kvm_msr_buf); -if (ret <0 ) { -return ret; - } - -if (ret < cpu->kvm_msr_buf->nmsrs) { -struct kvm_msr_entry *e = &cpu->kvm_msr_buf->entries[ret]; -error_report ("error: failed to set MSR 0x%" PRIx32" to 0x%" PRIx64, - (uint32_t )e->index, (uint64_t )e->data); - } - -assert (ret == cpu->kvm_msr_buf->nmsrs); -return 0 ; +return kvm_buf_set_msrs (cpu); }
target/i386/kvm_i386.h +1 -0
@@ -46,4 +46,5 @@ bool kvm_enable_x2apic(void);bool kvm_has_x2apic_api (void );bool kvm_hv_vpindex_settable (void ); +#endif
Signature · 1 line
1.8.3.1
[PULL 22/59] virtio-scsi: convert to new virtio_delete_queue
In reply to Paolo BonziniFrom: Pan Nengyuan <[email protected]>
Use virtio_delete_queue to make it more clear.
Message-Id: <[email protected]>
--- hw/scsi/virtio-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
hw/scsi/virtio-scsi.c +3 -3
@@ -945,10 +945,10 @@ void virtio_scsi_common_unrealize(DeviceState *dev)VirtIOSCSICommon *vs =VIRTIO_SCSI_COMMON (dev);int i; -virtio_del_queue (vdev,0 ); -virtio_del_queue (vdev,1 ); +virtio_delete_queue (vs->ctrl_vq); +virtio_delete_queue (vs->event_vq);for (i =0 ; i < vs->conf.num_queues; i++) { -virtio_del_queue (vdev, i +2 ); +virtio_delete_queue (vs->cmd_vqs[i]); }g_free (vs->cmd_vqs);virtio_cleanup (vdev);
Signature · 1 line
1.8.3.1
[PULL 31/59] object: add extra sanity checks
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Type system checked that children class_size >= parent class_size, but not instances. Fix that.
Message-Id: <[email protected]>
--- qom/object.c | 1 + 1 file changed, 1 insertion(+)
qom/object.c +1 -0
@@ -307,6 +307,7 @@ static void type_initialize(TypeImpl *ti)int i;g_assert (parent->class_size <= ti->class_size); +g_assert (parent->instance_size <= ti->instance_size);memcpy (ti->class, parent->class, parent->class_size); ti->class->interfaces =NULL ; ti->class->properties = g_hash_table_new_full(
Signature · 1 line
1.8.3.1
[PULL 33/59] qdev: remove extraneous error
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
All callers use error_abort, and even the function itself calls with error_abort.
Message-Id: <[email protected]>
--- hw/core/qdev.c | 15 ++++----------- include/hw/qdev-properties.h | 3 +-- target/arm/cpu.c | 36 ++++++++++++------------------------ 3 files changed, 17 insertions(+), 37 deletions(-)
hw/core/qdev.c +4 -11
@@ -717,24 +717,17 @@ static void qdev_property_add_legacy(DeviceState *dev, Property *prop,g_free (name); } -void qdev_property_add_static (DeviceState *dev,Property *prop, -Error **errp) +void qdev_property_add_static (DeviceState *dev,Property *prop) { -Error *local_err =NULL ;Object *obj =OBJECT (dev);if (prop->info->create) { - prop->info->create (obj, prop, &local_err); + prop->info->create (obj, prop, &error_abort); }else {object_property_add (obj, prop->name, prop->info->name, prop->info->get, prop->info->set, prop->info->release, - prop, &local_err); - } - -if (local_err) { -error_propagate (errp, local_err); -return ; + prop, &error_abort); } object_property_set_description(obj, prop->name,
@@ -989,7 +982,7 @@ static void device_initfn(Object *obj)do {for (prop =DEVICE_CLASS (class)->props; prop && prop->name; prop++) {qdev_property_add_legacy (dev, prop, &error_abort); -qdev_property_add_static (dev, prop, &error_abort); +qdev_property_add_static (dev, prop); } class =object_class_get_parent (class); }while (class !=object_class_by_name (TYPE_DEVICE ));
include/hw/qdev-properties.h +1 -2
@@ -253,13 +253,12 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,* qdev_property_add_static: * @dev: Device to add the property to. * @prop: The qdev property definition. -* @errp: location to store error information. * * Add a static QOM property to @dev for qdev property @prop. * On error, store error in @errp. Static properties access data in a struct. * The type of the QOM property is derived from prop->info. */ -void qdev_property_add_static (DeviceState *dev,Property *prop,Error **errp); +void qdev_property_add_static (DeviceState *dev,Property *prop);void qdev_alias_all_properties (DeviceState *target,Object *source);
target/arm/cpu.c +12 -24
@@ -1104,26 +1104,22 @@ void arm_cpu_post_init(Object *obj)if (arm_feature (&cpu->env,ARM_FEATURE_CBAR ) ||arm_feature (&cpu->env,ARM_FEATURE_CBAR_RO )) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_reset_cbar_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_reset_cbar_property); }if (!arm_feature (&cpu->env,ARM_FEATURE_M )) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_reset_hivecs_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_reset_hivecs_property); }if (arm_feature (&cpu->env,ARM_FEATURE_AARCH64 )) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_rvbar_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_rvbar_property); }if (arm_feature (&cpu->env,ARM_FEATURE_EL3 )) {/* Add the has_el3 state CPU property only if EL3 is allowed. This will * prevent "has_el3" from existing on CPUs which cannot support EL3. */ -qdev_property_add_static (DEVICE (obj), &arm_cpu_has_el3_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_has_el3_property);#ifndef CONFIG_USER_ONLY object_property_add_link(obj, "secure-memory",
@@ -1136,8 +1132,7 @@ void arm_cpu_post_init(Object *obj) }if (arm_feature (&cpu->env,ARM_FEATURE_EL2 )) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_has_el2_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_has_el2_property); }if (arm_feature (&cpu->env,ARM_FEATURE_PMU )) {
@@ -1154,32 +1149,27 @@ void arm_cpu_post_init(Object *obj)if (arm_feature (&cpu->env,ARM_FEATURE_VFP )) { cpu->has_vfp = true;if (!kvm_enabled ()) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_has_vfp_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_has_vfp_property); } }if (arm_feature (&cpu->env,ARM_FEATURE_NEON )) { cpu->has_neon = true;if (!kvm_enabled ()) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_has_neon_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_has_neon_property); } }if (arm_feature (&cpu->env,ARM_FEATURE_M ) &&arm_feature (&cpu->env,ARM_FEATURE_THUMB_DSP )) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_has_dsp_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_has_dsp_property); }if (arm_feature (&cpu->env,ARM_FEATURE_PMSA )) { -qdev_property_add_static (DEVICE (obj), &arm_cpu_has_mpu_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_has_mpu_property);if (arm_feature (&cpu->env,ARM_FEATURE_V7 )) {qdev_property_add_static (DEVICE (obj), - &arm_cpu_pmsav7_dregion_property, - &error_abort); + &arm_cpu_pmsav7_dregion_property); } }
@@ -1198,12 +1188,10 @@ void arm_cpu_post_init(Object *obj) NULL, NULL, &error_abort); } -qdev_property_add_static (DEVICE (obj), &arm_cpu_cfgend_property, - &error_abort); +qdev_property_add_static (DEVICE (obj), &arm_cpu_cfgend_property);if (arm_feature (&cpu->env,ARM_FEATURE_GENERIC_TIMER )) { -qdev_property_add_static (DEVICE (cpu), &arm_cpu_gt_cntfrq_property, - &error_abort); +qdev_property_add_static (DEVICE (cpu), &arm_cpu_gt_cntfrq_property); } }
Signature · 1 line
1.8.3.1
[PULL 34/59] qdev: move helper function to monitor/misc
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Move the one-user function to the place it is being used.
Message-Id: <[email protected]>
--- hw/core/qdev.c | 26 -------------------------- include/hw/qdev-core.h | 2 -- monitor/misc.c | 26 ++++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 28 deletions(-)
hw/core/qdev.c +0 -26
@@ -760,32 +760,6 @@ void qdev_alias_all_properties(DeviceState *target, Object *source) }while (class !=object_class_by_name (TYPE_DEVICE )); } -static int qdev_add_hotpluggable_device (Object *obj,void *opaque) -{ -GSList **list = opaque; -DeviceState *dev = (DeviceState *)object_dynamic_cast (OBJECT (obj), -TYPE_DEVICE ); - -if (dev ==NULL ) { -return 0 ; - } - -if (dev->realized &&object_property_get_bool (obj,"hotpluggable" ,NULL )) { - *list =g_slist_append (*list, dev); - } - -return 0 ; -} - -GSList *qdev_build_hotpluggable_device_list (Object *peripheral) -{ -GSList *list =NULL ; - -object_child_foreach (peripheral, qdev_add_hotpluggable_device, &list); - -return list; -} -static bool device_get_realized (Object *obj,Error **errp) {DeviceState *dev =DEVICE (obj);
include/hw/qdev-core.h +0 -2
@@ -457,8 +457,6 @@ extern bool qdev_hot_removed;char *qdev_get_dev_path (DeviceState *dev); -GSList *qdev_build_hotpluggable_device_list (Object *peripheral); -void qbus_set_hotplug_handler (BusState *bus,Object *handler,Error **errp);void qbus_set_bus_hotplug_handler (BusState *bus,Error **errp);
monitor/misc.c +26 -0
@@ -1959,6 +1959,32 @@ void object_add_completion(ReadLineState *rs, int nb_args, const char *str)g_slist_free (list); } +static int qdev_add_hotpluggable_device (Object *obj,void *opaque) +{ +GSList **list = opaque; +DeviceState *dev = (DeviceState *)object_dynamic_cast (OBJECT (obj), +TYPE_DEVICE ); + +if (dev ==NULL ) { +return 0 ; + } + +if (dev->realized &&object_property_get_bool (obj,"hotpluggable" ,NULL )) { + *list =g_slist_append (*list, dev); + } + +return 0 ; +} + +static GSList *qdev_build_hotpluggable_device_list (Object *peripheral) +{ +GSList *list =NULL ; + +object_child_foreach (peripheral, qdev_add_hotpluggable_device, &list); + +return list; +} +static void peripheral_device_del_completion (ReadLineState *rs,const char *str,size_t len) {
Signature · 1 line
1.8.3.1
[PULL 35/59] object: avoid extra class property key duplication
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Like object properties, no need to duplicate property name, as it is owned already by ObjectProperty value.
Message-Id: <[email protected]>
--- qom/object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
qom/object.c +3 -3
@@ -311,7 +311,7 @@ static void type_initialize(TypeImpl *ti)memcpy (ti->class, parent->class, parent->class_size); ti->class->interfaces =NULL ; ti->class->properties =g_hash_table_new_full ( - g_str_hash, g_str_equal, g_free, object_property_free); + g_str_hash, g_str_equal,NULL , object_property_free);for (e = parent->class->interfaces; e; e = e->next) {InterfaceClass *iface = e->data;
@@ -343,7 +343,7 @@ static void type_initialize(TypeImpl *ti) } }else { ti->class->properties =g_hash_table_new_full ( - g_str_hash, g_str_equal, g_free, object_property_free); + g_str_hash, g_str_equal,NULL , object_property_free); } ti->class->type = ti;
@@ -1187,7 +1187,7 @@ object_class_property_add(ObjectClass *klass, prop->release = release; prop->opaque = opaque; -g_hash_table_insert (klass->properties,g_strdup (name), prop); +g_hash_table_insert (klass->properties, prop->name, prop);return prop; }
Signature · 1 line
1.8.3.1
[PULL 06/59] audio/audio: Add missing fall through comment
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
When building with GCC9 using CFLAG -Wimplicit-fallthrough=2 we get:
audio/audio.c: In function ‘audio_pcm_init_info’:
audio/audio.c:306:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
306 | sign = 1;
| ~~~~~^~~
audio/audio.c:307:5: note: here
307 | case AUDIO_FORMAT_U8:
| ^~~~cc1: all warnings being treated as errors
Similarly to e46349414, add the missing fall through comment to hint GCC.
Message-Id: <[email protected]>
--- audio/audio.c | 1 + 1 file changed, 1 insertion(+)
audio/audio.c +1 -0
@@ -304,6 +304,7 @@ void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as)switch (as->fmt) {case AUDIO_FORMAT_S8 : sign =1 ; +/* fall through */ case AUDIO_FORMAT_U8 : mul =1 ;break ;
Signature · 1 line
1.8.3.1
[PULL 39/59] qstring: add qstring_free()
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Similar to g_string_free(), optionally return the underlying char*.
Message-Id: <[email protected]>
--- include/qapi/qmp/qstring.h | 1 + qobject/qstring.c | 27 ++++++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-)
include/qapi/qmp/qstring.h +1 -0
@@ -33,6 +33,7 @@ void qstring_append_int(QString *qstring, int64_t value);void qstring_append (QString *qstring,const char *str);void qstring_append_chr (QString *qstring,int c);bool qstring_is_equal (const QObject *x,const QObject *y); +char *qstring_free (QString *qstring,bool return_str);void qstring_destroy_obj (QObject *obj);#endif /* QSTRING_H */
qobject/qstring.c +22 -5
@@ -150,15 +150,32 @@ bool qstring_is_equal(const QObject *x, const QObject *y) }/** +* qstring_free(): Free the memory allocated by a QString object +* +* Return: if @return_str, return the underlying string, to be +* g_free(), otherwise NULL is returned. +*/ +char *qstring_free (QString *qstring,bool return_str) +{ +char *rv =NULL ; + +if (return_str) { + rv = qstring->string; + }else { +g_free (qstring->string); + } + +g_free (qstring); + +return rv; +} + +/** * qstring_destroy_obj(): Free all memory allocated by a QString * object */ void qstring_destroy_obj (QObject *obj) { -QString *qs; -assert (obj !=NULL ); - qs =qobject_to (QString, obj); -g_free (qs->string); -g_free (qs); +qstring_free (qobject_to (QString, obj), FALSE); }
Signature · 1 line
1.8.3.1
[PULL 12/59] configure: Do not build libfdt if not required
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
We only require libfdt for system emulation, in a small set of architecture:
4077 # fdt support is mandatory for at least some target architectures, 4078 # so insist on it if we're building those system emulators. 4079 fdt_required=no 4080 for target in $target_list; do
4081 case $target in
4082 aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
4083 fdt_required=yes
Do not build libfdt if we did not manually specified --enable-fdt, or have one of the platforms that require it in our target list.
Message-Id: <[email protected]>
--- configure | 2 ++ 1 file changed, 2 insertions(+)
configure +2 -0
@@ -4095,6 +4095,8 @@ if test "$fdt_required" = "yes"; then "targets which need it (by specifying a cut down --target-list)." fi fdt=yes +elif test "$fdt" != "yes" ; then + fdt=no fi if test "$fdt" != "no" ; then
Signature · 1 line
1.8.3.1
[PULL 41/59] object: do not free class properties
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
The release callback is called during object_property_del_all(), on a live instance. But class properties are common among all instances. It is not currently called, because we don't release classes, but it would not be correct if we did.
Message-Id: <[email protected]>
--- qom/object.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
qom/object.c +4 -4
@@ -2143,7 +2143,7 @@ object_class_property_add_str(ObjectClass *klass, const char *name, rv =object_class_property_add (klass, name,"string" , get ? property_get_str :NULL , set ? property_set_str :NULL , - property_release_str, +NULL , prop, &local_err);if (local_err) {error_propagate (errp, local_err);
@@ -2236,7 +2236,7 @@ object_class_property_add_bool(ObjectClass *klass, const char *name, rv =object_class_property_add (klass, name,"bool" , get ? property_get_bool :NULL , set ? property_set_bool :NULL , - property_release_bool, +NULL , prop, &local_err);if (local_err) {error_propagate (errp, local_err);
@@ -2328,7 +2328,7 @@ object_class_property_add_enum(ObjectClass *klass, const char *name, rv =object_class_property_add (klass, name, typename, get ? property_get_enum :NULL , set ? property_set_enum :NULL , - property_release_enum, +NULL , prop, &local_err);if (local_err) {error_propagate (errp, local_err);
@@ -2429,7 +2429,7 @@ object_class_property_add_tm(ObjectClass *klass, const char *name, rv =object_class_property_add (klass, name,"struct tm" , get ? property_get_tm :NULL ,NULL , - property_release_tm, +NULL , prop, &local_err);if (local_err) {error_propagate (errp, local_err);
Signature · 1 line
1.8.3.1
[PULL 16/59] hw/core: Restrict reset handlers API to system-mode
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
The user-mode code does not use this API, restrict it to the system-mode.
Message-Id: <[email protected]>
--- hw/core/Makefile.objs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/core/Makefile.objs +2 -1
@@ -1,6 +1,7 @@ # core qdev-related obj files, also used by *-user: common-obj-y += qdev.o qdev-properties.o -common-obj-y += bus.o reset.o +common-obj-y += bus.o +common-obj-$(CONFIG_SOFTMMU) += reset.o common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o # irq.o needed for qdev GPIO handling:
Signature · 1 line
1.8.3.1
[PULL 43/59] object: rename link "child" to "target"
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
A child property is a different kind of property. Let's use "target" for the link target.
Message-Id: <[email protected]>
--- include/qom/object.h | 4 ++-- qom/object.c | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-)
include/qom/object.h +2 -2
@@ -1545,7 +1545,7 @@ void object_property_allow_set_link(const Object *, const char *,* @obj: the object to add a property to * @name: the name of the property * @type: the qobj type of the link -* @child: a pointer to where the link object reference is stored +* @targetp: a pointer to where the link object reference is stored * @check: callback to veto setting or NULL if the property is read-only * @flags: additional options for the link * @errp: if an error occurs, a pointer to an area to store the error
@@ -1570,7 +1570,7 @@ void object_property_allow_set_link(const Object *, const char *,* modified. */ void object_property_add_link(Object *obj, const char *name, - const char *type, Object **child, + const char *type, Object **targetp, void (*check)(const Object *obj, const char *name, Object *val, Error **errp), ObjectPropertyLinkFlags flags,
qom/object.c +12 -12
@@ -1729,7 +1729,7 @@ void object_property_allow_set_link(const Object *obj, const char *name, }typedef struct { -Object **child; +Object **targetp;void (*check)(const Object *,const char *,Object *,Error **);ObjectPropertyLinkFlags flags; }LinkProperty ;
@@ -1739,11 +1739,11 @@ static void object_get_link_property(Object *obj, Visitor *v, Error **errp) {LinkProperty *lprop = opaque; -Object **child = lprop->child; +Object **targetp = lprop->targetp;gchar *path; -if (*child) { - path =object_get_canonical_path (*child); +if (*targetp) { + path =object_get_canonical_path (*targetp);visit_type_str (v, name, &path, errp);g_free (path); }else {
@@ -1798,8 +1798,8 @@ static void object_set_link_property(Object *obj, Visitor *v, {Error *local_err =NULL ;LinkProperty *prop = opaque; -Object **child = prop->child; -Object *old_target = *child; +Object **targetp = prop->targetp; +Object *old_target = *targetp;Object *new_target =NULL ;char *path =NULL ;
@@ -1821,7 +1821,7 @@ static void object_set_link_property(Object *obj, Visitor *v,return ; } - *child = new_target; + *targetp = new_target;if (prop->flags &OBJ_PROP_LINK_STRONG ) {object_ref (new_target);object_unref (old_target);
@@ -1832,7 +1832,7 @@ static Object *object_resolve_link_property(Object *parent, void *opaque, const {LinkProperty *lprop = opaque; -return *lprop->child; +return *lprop->targetp; } static void object_release_link_property(Object *obj, const char *name,
@@ -1840,14 +1840,14 @@ static void object_release_link_property(Object *obj, const char *name, {LinkProperty *prop = opaque; -if ((prop->flags &OBJ_PROP_LINK_STRONG ) && *prop->child) { -object_unref (*prop->child); +if ((prop->flags &OBJ_PROP_LINK_STRONG ) && *prop->targetp) { +object_unref (*prop->targetp); }g_free (prop); } void object_property_add_link(Object *obj, const char *name, - const char *type, Object **child, + const char *type, Object **targetp, void (*check)(const Object *, const char *, Object *, Error **), ObjectPropertyLinkFlags flags,
@@ -1858,7 +1858,7 @@ void object_property_add_link(Object *obj, const char *name,gchar *full_type;ObjectProperty *op; - prop->child = child; + prop->targetp = targetp; prop->check = check; prop->flags = flags;
Signature · 1 line
1.8.3.1
[PULL 17/59] hw/core/Makefile: Group generic objects versus system-mode objects
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
To ease review/modifications of this Makefile, group generic objects first, then system-mode specific ones, and finally peripherals (which are only used in system-mode).
No logical changes introduced here.
Message-Id: <[email protected]>
--- hw/core/Makefile.objs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
hw/core/Makefile.objs +14 -14
@@ -1,32 +1,32 @@ # core qdev-related obj files, also used by *-user: common-obj-y += qdev.o qdev-properties.o common-obj-y += bus.o +common-obj-y += cpu.o +common-obj-y += hotplug.o +common-obj-y += vmstate-if.o +# irq.o needed for qdev GPIO handling: +common-obj-y += irq.o + common-obj-$(CONFIG_SOFTMMU) += reset.o common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o -# irq.o needed for qdev GPIO handling: -common-obj-y += irq.o -common-obj-y += hotplug.o common-obj-$(CONFIG_SOFTMMU) += nmi.o common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o -common-obj-y += cpu.o -common-obj-y += vmstate-if.o +common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o +common-obj-$(CONFIG_SOFTMMU) += sysbus.o +common-obj-$(CONFIG_SOFTMMU) += machine.o +common-obj-$(CONFIG_SOFTMMU) += null-machine.o +common-obj-$(CONFIG_SOFTMMU) += loader.o +common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o +obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o +obj-$(CONFIG_SOFTMMU) += numa.o common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o common-obj-$(CONFIG_XILINX_AXI) += stream.o common-obj-$(CONFIG_PTIMER) += ptimer.o -common-obj-$(CONFIG_SOFTMMU) += sysbus.o -common-obj-$(CONFIG_SOFTMMU) += machine.o -common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o -common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_OR_IRQ) += or-irq.o common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o -common-obj-$(CONFIG_SOFTMMU) += null-machine.o - -obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o -obj-$(CONFIG_SOFTMMU) += numa.o -common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
Signature · 1 line
1.8.3.1
[PULL 45/59] object: express const link with link property
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Let's not mix child property and link property callbacks, as this is confusing, use LinkProperty with DIRECT flag to hold the target pointer.
Message-Id: <[email protected]>
--- qom/object.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-)
qom/object.c +23 -18
@@ -1860,19 +1860,23 @@ static void object_release_link_property(Object *obj, const char *name,g_free (prop); } -void object_property_add_link (Object *obj,const char *name, -const char *type,Object **targetp, -void (*check)(const Object *,const char *, -Object *,Error **), -ObjectPropertyLinkFlags flags, -Error **errp) +static void object_add_link_prop (Object *obj,const char *name, +const char *type,void *ptr, +void (*check)(const Object *,const char *, +Object *,Error **), +ObjectPropertyLinkFlags flags, +Error **errp) {Error *local_err =NULL ;LinkProperty *prop =g_malloc (sizeof (*prop));gchar *full_type;ObjectProperty *op; - prop->targetp = targetp; +if (flags &OBJ_PROP_LINK_DIRECT ) { + prop->target = ptr; + }else { + prop->targetp = ptr; + } prop->check = check; prop->flags = flags;
@@ -1896,20 +1900,21 @@ out:g_free (full_type); } +void object_property_add_link (Object *obj,const char *name, +const char *type,Object **targetp, +void (*check)(const Object *,const char *, +Object *,Error **), +ObjectPropertyLinkFlags flags, +Error **errp) +{ +object_add_link_prop (obj, name, type, targetp, check, flags, errp); +} +void object_property_add_const_link (Object *obj,const char *name,Object *target,Error **errp) { -char *link_type; -ObjectProperty *op; - - link_type =g_strdup_printf ("link<%s>" ,object_get_typename (target)); - op =object_property_add (obj, name, link_type, - object_get_child_property,NULL , -NULL , target, errp); -if (op !=NULL ) { - op->resolve = object_resolve_child_property; - } -g_free (link_type); +object_add_link_prop (obj, name,object_get_typename (target), target, +NULL ,OBJ_PROP_LINK_DIRECT , errp); }gchar *object_get_canonical_path_component (Object *obj)
Signature · 1 line
1.8.3.1
[PULL 19/59] target/i386: add a ucode-rev property
In reply to Paolo BonziniAdd the property and plumb it in TCG and HVF (the latter of which tried to support returning a constant value but used the wrong MSR).
Message-Id: <[email protected]>
--- target/i386/cpu.c | 10 ++++++++++ target/i386/cpu.h | 3 +++ target/i386/hvf/x86_emu.c | 4 +--- target/i386/misc_helper.c | 4 ++++ 4 files changed, 18 insertions(+), 3 deletions(-)
target/i386/cpu.c +10 -0
@@ -6418,6 +6418,15 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) } } +if (cpu->ucode_rev ==0 ) { +/* The default is the same as KVM's. */ +if (IS_AMD_CPU (env)) { + cpu->ucode_rev =0x01000065 ; + }else { + cpu->ucode_rev =0x100000000ULL ; + } + } +/* mwait extended info: needed for Core compatibility */ /* We always wake on interrupt even if host does not have the capability */ cpu->mwait.ecx |=CPUID_MWAIT_EMX |CPUID_MWAIT_IBE ;
@@ -7100,6 +7109,7 @@ static Property x86_cpu_properties[] = {DEFINE_PROP_UINT32 ("min-level" ,X86CPU , env.cpuid_min_level,0 ),DEFINE_PROP_UINT32 ("min-xlevel" ,X86CPU , env.cpuid_min_xlevel,0 ),DEFINE_PROP_UINT32 ("min-xlevel2" ,X86CPU , env.cpuid_min_xlevel2,0 ), +DEFINE_PROP_UINT64 ("ucode-rev" ,X86CPU , ucode_rev,0 ),DEFINE_PROP_BOOL ("full-cpuid-auto-level" ,X86CPU , full_cpuid_auto_level, true),DEFINE_PROP_STRING ("hv-vendor-id" ,X86CPU , hyperv_vendor_id), DEFINE_PROP_BOOL("cpuid-0xb", X86CPU, enable_cpuid_0xb, true),
target/i386/cpu.h +3 -0
@@ -348,6 +348,7 @@ typedef enum X86Seg {#define MSR_IA32_SPEC_CTRL 0x48#define MSR_VIRT_SSBD 0xc001011f#define MSR_IA32_PRED_CMD 0x49 +#define MSR_IA32_UCODE_REV 0x8b#define MSR_IA32_CORE_CAPABILITY 0xcf#define MSR_IA32_ARCH_CAPABILITIES 0x10a
@@ -1627,6 +1628,8 @@ struct X86CPU {CPUNegativeOffsetState neg;CPUX86State env; +uint64_t ucode_rev; +uint32_t hyperv_spinlock_attempts;char *hyperv_vendor_id;bool hyperv_synic_kvm_only;
target/i386/hvf/x86_emu.c +1 -3
@@ -664,8 +664,6 @@ static void exec_lods(struct CPUX86State *env, struct x86_decode *decode)RIP (env) += decode->len; } -#define MSR_IA32_UCODE_REV 0x00000017 -void simulate_rdmsr (struct CPUState *cpu) {X86CPU *x86_cpu =X86_CPU (cpu);
@@ -681,7 +679,7 @@ void simulate_rdmsr(struct CPUState *cpu) val =cpu_get_apic_base (X86_CPU (cpu)->apic_state);break ;case MSR_IA32_UCODE_REV : - val = (0x100000000ULL <<32 ) |0x100000000ULL ; + val = x86_cpu->ucode_rev;break ;case MSR_EFER : val =rvmcs (cpu->hvf_fd,VMCS_GUEST_IA32_EFER );
target/i386/misc_helper.c +4 -0
@@ -229,6 +229,7 @@ void helper_rdmsr(CPUX86State *env)#else void helper_wrmsr (CPUX86State *env) { +X86CPU *x86_cpu =env_archcpu (env);uint64_t val;cpu_svm_check_intercept_param (env,SVM_EXIT_MSR ,1 ,GETPC ());
@@ -371,6 +372,9 @@ void helper_wrmsr(CPUX86State *env) env->msr_bndcfgs = val;cpu_sync_bndcs_hflags (env);break ; +case MSR_IA32_UCODE_REV : + val = x86_cpu->ucode_rev; +break ;default :if ((uint32_t )env->regs[R_ECX ] >=MSR_MC0_CTL && (uint32_t)env->regs[R_ECX] < MSR_MC0_CTL +
Signature · 1 line
1.8.3.1
[PULL 47/59] object: release all props
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Class properties may have to release resources when the object is destroyed. Let's use the existing release() callback for that, but class properties must not release ObjectProperty, as it can be shared by various instances.
Message-Id: <[email protected]>
--- qom/object.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
qom/object.c +10 -11
@@ -592,23 +592,22 @@ static inline bool object_property_is_child(ObjectProperty *prop)static void object_property_del_all (Object *obj) { +g_autoptr (GHashTable) done =g_hash_table_new (NULL ,NULL );ObjectProperty *prop; -GHashTableIter iter; -gpointer key, value; +ObjectPropertyIterator iter;bool released;do { released = false; -g_hash_table_iter_init (&iter, obj->properties); -while (g_hash_table_iter_next (&iter, &key, &value)) { - prop = value; -if (prop->release) { - prop->release (obj, prop->name, prop->opaque); - prop->release =NULL ; - released = true; -break ; +object_property_iter_init (&iter, obj); +while ((prop =object_property_iter_next (&iter)) !=NULL ) { +if (g_hash_table_add (done, prop)) { +if (prop->release) { + prop->release (obj, prop->name, prop->opaque); + released = true; +break ; + } } -g_hash_table_iter_remove (&iter); } }while (released);
Signature · 1 line
1.8.3.1
[PULL 20/59] target/i386: kvm: initialize microcode revision from KVM
In reply to Paolo BonziniKVM can return the host microcode revision as a feature MSR. Use it as the default value for -cpu host.
Message-Id: <[email protected]>
--- target/i386/cpu.c | 4 ++++ target/i386/kvm.c | 5 +++++ 2 files changed, 9 insertions(+)
target/i386/cpu.c +4 -0
@@ -6416,6 +6416,10 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) &cpu->mwait.ecx, &cpu->mwait.edx); env->features[FEAT_1_ECX ] |=CPUID_EXT_MONITOR ; } +if (kvm_enabled () && cpu->ucode_rev ==0 ) { + cpu->ucode_rev =kvm_arch_get_supported_msr_feature (kvm_state, +MSR_IA32_UCODE_REV ); + } }if (cpu->ucode_rev ==0 ) {
target/i386/kvm.c +5 -0
@@ -2696,6 +2696,11 @@ static void kvm_init_msrs(X86CPU *cpu) env->features[FEAT_CORE_CAPABILITY]); } +if (kvm_arch_get_supported_msr_feature (kvm_state, +MSR_IA32_UCODE_REV )) { +kvm_msr_entry_add (cpu,MSR_IA32_UCODE_REV , cpu->ucode_rev); + } +/* * Older kernels do not include VMX MSRs in KVM_GET_MSR_INDEX_LIST, but * all kernels with MSR features should have them.
Signature · 1 line
1.8.3.1
[PULL 50/59] qdev: move instance properties to class properties
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
--- hw/core/qdev.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
hw/core/qdev.c +13 -11
@@ -944,14 +944,6 @@ static void device_initfn(Object *obj) dev->realized = false; dev->allow_unplug_during_migration = false; -object_property_add_bool (obj,"realized" , - device_get_realized, device_set_realized,NULL ); -object_property_add_bool (obj,"hotpluggable" , - device_get_hotpluggable,NULL ,NULL ); -object_property_add_bool (obj,"hotplugged" , - device_get_hotplugged,NULL , - &error_abort); - class =object_get_class (OBJECT (dev)); do { for (prop = DEVICE_CLASS(class)->props; prop && prop->name; prop++) {
@@ -961,9 +953,6 @@ static void device_initfn(Object *obj) class =object_class_get_parent (class); }while (class !=object_class_by_name (TYPE_DEVICE )); -object_property_add_link (OBJECT (dev),"parent_bus" ,TYPE_BUS , - (Object **)&dev->parent_bus,NULL ,0 , - &error_abort);QLIST_INIT (&dev->gpios); }
@@ -1059,6 +1048,19 @@ static void device_class_init(ObjectClass *class, void *data) dc->hotpluggable = true; dc->user_creatable = true; vc->get_id = device_vmstate_if_get_id; + +object_class_property_add_bool (class,"realized" , + device_get_realized, device_set_realized, + &error_abort); +object_class_property_add_bool (class,"hotpluggable" , + device_get_hotpluggable,NULL , + &error_abort); +object_class_property_add_bool (class,"hotplugged" , + device_get_hotplugged,NULL , + &error_abort); +object_class_property_add_link (class,"parent_bus" ,TYPE_BUS , + offsetof(DeviceState , parent_bus),NULL ,0 , + &error_abort); }void device_class_set_props (DeviceClass *dc,Property *props)
Signature · 1 line
1.8.3.1
[PULL 28/59] accel: Introduce the current_accel() wrapper
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
The accel/ code only accesses the MachineState::accel field. As we simply want to access the accelerator, not the machine, add a current_accel() wrapper.
Message-Id: <[email protected]>
--- accel/accel.c | 5 +++++ include/sysemu/accel.h | 2 ++ 2 files changed, 7 insertions(+)
accel/accel.c +5 -0
@@ -63,6 +63,11 @@ int accel_init_machine(AccelState *accel, MachineState *ms)return ret; } +AccelState *current_accel (void ) +{ +return current_machine->accelerator; +} +void accel_setup_post (MachineState *ms) {AccelState *accel = ms->accelerator;
include/sysemu/accel.h +2 -0
@@ -70,4 +70,6 @@ int accel_init_machine(AccelState *accel, MachineState *ms);/* Called just before os_setup_post (ie just before drop OS privs) */ void accel_setup_post (MachineState *ms); +AccelState *current_accel (void ); +#endif
Signature · 1 line
1.8.3.1
[PULL 38/59] object: make object_class_property_add* return property
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
This will help calling other ObjectProperty associated functions easily after.
Message-Id: <[email protected]>
--- include/qom/object.h | 24 +++++++++++++------- qom/object.c | 64 ++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 60 insertions(+), 28 deletions(-)
include/qom/object.h +16 -8
@@ -1556,7 +1556,8 @@ void object_property_add_str(Object *obj, const char *name,void (*set)(Object *,const char *,Error **), Error **errp); -void object_class_property_add_str(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_str(ObjectClass *klass, + const char *name, char *(*get)(Object *, Error **), void (*set)(Object *, const char *, Error **),
@@ -1578,7 +1579,8 @@ void object_property_add_bool(Object *obj, const char *name,void (*set)(Object *,bool ,Error **), Error **errp); -void object_class_property_add_bool (ObjectClass *klass,const char *name, +ObjectProperty *object_class_property_add_bool (ObjectClass *klass, +const char *name,bool (*get)(Object *,Error **),void (*set)(Object *,bool ,Error **),Error **errp);
@@ -1602,7 +1604,8 @@ void object_property_add_enum(Object *obj, const char *name,void (*set)(Object *,int ,Error **), Error **errp); -void object_class_property_add_enum(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_enum(ObjectClass *klass, + const char *name, const char *typename, const QEnumLookup *lookup, int (*get)(Object *, Error **),
@@ -1623,7 +1626,8 @@ void object_property_add_tm(Object *obj, const char *name,void (*get)(Object *,struct tm *,Error **), Error **errp); -void object_class_property_add_tm (ObjectClass *klass,const char *name, +ObjectProperty *object_class_property_add_tm (ObjectClass *klass, +const char *name,void (*get)(Object *,struct tm *,Error **),Error **errp);
@@ -1639,7 +1643,8 @@ void object_class_property_add_tm(ObjectClass *klass, const char *name,*/ void object_property_add_uint8_ptr (Object *obj,const char *name,const uint8_t *v,Error **errp); -void object_class_property_add_uint8_ptr (ObjectClass *klass,const char *name, +ObjectProperty *object_class_property_add_uint8_ptr (ObjectClass *klass, +const char *name,const uint8_t *v,Error **errp);/**
@@ -1654,7 +1659,8 @@ void object_class_property_add_uint8_ptr(ObjectClass *klass, const char *name,*/ void object_property_add_uint16_ptr (Object *obj,const char *name,const uint16_t *v,Error **errp); -void object_class_property_add_uint16_ptr (ObjectClass *klass,const char *name, +ObjectProperty *object_class_property_add_uint16_ptr (ObjectClass *klass, +const char *name,const uint16_t *v,Error **errp);/**
@@ -1669,7 +1675,8 @@ void object_class_property_add_uint16_ptr(ObjectClass *klass, const char *name,*/ void object_property_add_uint32_ptr (Object *obj,const char *name,const uint32_t *v,Error **errp); -void object_class_property_add_uint32_ptr (ObjectClass *klass,const char *name, +ObjectProperty *object_class_property_add_uint32_ptr (ObjectClass *klass, +const char *name,const uint32_t *v,Error **errp);/**
@@ -1684,7 +1691,8 @@ void object_class_property_add_uint32_ptr(ObjectClass *klass, const char *name,*/ void object_property_add_uint64_ptr (Object *obj,const char *name,const uint64_t *v,Error **errp); -void object_class_property_add_uint64_ptr (ObjectClass *klass,const char *name, +ObjectProperty *object_class_property_add_uint64_ptr (ObjectClass *klass, +const char *name,const uint64_t *v,Error **errp);/**
qom/object.c +44 -20
183 lines not on this page · raw message
Signature · 1 line
1.8.3.1
[PULL 03/59] pvpanic: introduce crashloaded for pvpanic
In reply to Paolo BonziniFrom: zhenwei pi <[email protected]>
Add bit 1 for pvpanic. This bit means that guest hits a panic, but guest wants to handle error by itself. Typical case: Linux guest runs kdump in panic. It will help us to separate the abnormal reboot from normal operation.
Message-Id: <[email protected]>
--- docs/specs/pvpanic.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
docs/specs/pvpanic.txt +6 -2
@@ -16,8 +16,12 @@ pvpanic exposes a single I/O port, by default 0x505. On read, the bits recognized by the device are set. Software should ignore bits it doesn't recognize. On write, the bits not recognized by the device are ignored. Software should set only bits both itself and the device recognize. -Currently, only bit 0 is recognized, setting it indicates a guest panic -has happened. + +Bit Definition +-------------- +bit 0: setting it indicates a guest panic has happened. +bit 1: named crashloaded. setting it indicates a guest panic and run + kexec to handle error by guest itself. ACPI Interface --------------
Signature · 1 line
1.8.3.1
[PULL 48/59] object: return self in object_ref()
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
This allow for simpler assignment with ref: foo = object_ref(bar)
Message-Id: <[email protected]>
--- include/qom/object.h | 3 ++- qom/object.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
include/qom/object.h +2 -1
@@ -1013,8 +1013,9 @@ GSList *object_class_get_list_sorted(const char *implements_type,* * Increase the reference count of a object. A object cannot be freed as long * as its reference count is greater than zero. +* Returns: @obj */ -void object_ref (Object *obj); +Object *object_ref (Object *obj);/** * object_unref:
qom/object.c +3 -2
@@ -1107,12 +1107,13 @@ GSList *object_class_get_list_sorted(const char *implements_type, object_class_cmp); } -void object_ref (Object *obj) +Object *object_ref (Object *obj) {if (!obj) { -return ; +return NULL ; }atomic_inc (&obj->ref); +return obj; }void object_unref (Object *obj)
Signature · 1 line
1.8.3.1
[PULL 05/59] qom/object: Display more helpful message when an interface is missing
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
When adding new devices implementing QOM interfaces, we might forgot to add the Kconfig dependency that pulls the required objects in when building.
Since QOM dependencies are resolved at runtime, we don't get any link-time failures, and QEMU aborts while starting:
$ qemu ... Segmentation fault (core dumped)
(gdb) bt
#0 0x00007ff6e96b1e35 in raise () from /lib64/libc.so.6 #1 0x00007ff6e969c895 in abort () from /lib64/libc.so.6 #2 0x00005572bc5051cf in type_initialize (ti=0x5572be6f1200) at qom/object.c:323 #3 0x00005572bc505074 in type_initialize (ti=0x5572be6f1800) at qom/object.c:301 #4 0x00005572bc505074 in type_initialize (ti=0x5572be6e48e0) at qom/object.c:301 #5 0x00005572bc506939 in object_class_by_name (typename=0x5572bc56109a) at qom/object.c:959 #6 0x00005572bc503dd5 in cpu_class_by_name (typename=0x5572bc56109a, cpu_model=0x5572be6d9930) at hw/core/cpu.c:286
Since the caller has access to the qdev parent/interface names, we can simply display them to avoid starting a debugger:
$ qemu ... qemu: missing interface 'fancy-if' for object 'fancy-dev' Aborted (core dumped)
This commit is similar to e02bdf1cecd2 ("Display more helpful message when an object type is missing").
Message-Id: <[email protected]>
--- qom/object.c | 5 +++++ 1 file changed, 5 insertions(+)
qom/object.c +5 -0
@@ -317,6 +317,11 @@ static void type_initialize(TypeImpl *ti)for (i =0 ; i < ti->num_interfaces; i++) {TypeImpl *t =type_get_by_name (ti->interfaces[i].typename); +if (!t) { +error_report ("missing interface '%s' for object '%s'" , + ti->interfaces[i].typename, parent->name); +abort (); + }for (e = ti->class->interfaces; e; e = e->next) {TypeImpl *target_type =OBJECT_CLASS (e->data)->type;
Signature · 1 line
1.8.3.1
[PULL 07/59] hw/display/tcx: Add missing fall through comments
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
When building with GCC9 using CFLAG -Wimplicit-fallthrough=2 we get:
hw/display/tcx.c: In function ‘tcx_dac_writel’:
hw/display/tcx.c:453:26: error: this statement may fall through [-Werror=implicit-fallthrough=]
453 | s->dac_index = (s->dac_index + 1) & 0xff; /* Index autoincrement */
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/display/tcx.c:454:9: note: here
454 | default:
| ^~~~~~~
hw/display/tcx.c: In function ‘tcx_dac_readl’:
hw/display/tcx.c:412:22: error: this statement may fall through [-Werror=implicit-fallthrough=]
412 | s->dac_index = (s->dac_index + 1) & 0xff; /* Index autoincrement */
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/display/tcx.c:413:5: note: here
413 | default:
| ^~~~~~~cc1: all warnings being treated as errors
Give a hint to GCC by adding the missing fall through comments.
Message-Id: <[email protected]>
--- hw/display/tcx.c | 2 ++ 1 file changed, 2 insertions(+)
hw/display/tcx.c +2 -0
@@ -410,6 +410,7 @@ static uint64_t tcx_dac_readl(void *opaque, hwaddr addr,case 2 : val = s->b[s->dac_index] <<24 ; s->dac_index = (s->dac_index +1 ) &0xff ;/* Index autoincrement */ +/* fall through */ default : s->dac_state =0 ;break ;
@@ -451,6 +452,7 @@ static void tcx_dac_writel(void *opaque, hwaddr addr, uint64_t val, s->b[index] = val >>24 ;update_palette_entries (s, index, index +1 ); s->dac_index = (s->dac_index +1 ) &0xff ;/* Index autoincrement */ +/* fall through */ default : s->dac_state =0 ;break ;
Signature · 1 line
1.8.3.1
[PULL 01/59] cpu: Introduce cpu_class_set_parent_reset()
In reply to Paolo BonziniFrom: Greg Kurz <[email protected]>
Similarly to what we already do with qdev, use a helper to overload the reset QOM methods of the parent in children classes, for clarity.
Message-Id: <[email protected]>
--- hw/core/cpu.c | 8 ++++++++ include/hw/core/cpu.h | 4 ++++ 2 files changed, 12 insertions(+)
hw/core/cpu.c +8 -0
@@ -239,6 +239,14 @@ void cpu_dump_statistics(CPUState *cpu, int flags) } } +void cpu_class_set_parent_reset (CPUClass *cc, +void (*child_reset)(CPUState *cpu), +void (**parent_reset)(CPUState *cpu)) +{ + *parent_reset = cc->reset; + cc->reset = child_reset; +} +void cpu_reset (CPUState *cpu) {CPUClass *klass =CPU_GET_CLASS (cpu);
include/hw/core/cpu.h +4 -0
@@ -1135,6 +1135,10 @@ void cpu_exec_unrealizefn(CPUState *cpu);*/ bool target_words_bigendian (void ); +void cpu_class_set_parent_reset (CPUClass *cc, +void (*child_reset)(CPUState *cpu), +void (**parent_reset)(CPUState *cpu)); +#ifdef NEED_CPU_H #ifdef CONFIG_SOFTMMU
Signature · 1 line
1.8.3.1
[PULL 04/59] pvpanic: implement crashloaded event handling
In reply to Paolo BonziniFrom: zhenwei pi <[email protected]>
Handle bit 1 write, then post event to monitor.
Suggested by Paolo, declear a new event, using GUEST_PANICKED could cause upper layers to react by shutting down or rebooting the guest.
In advance for extention, add GuestPanicInformation in event message.
Message-Id: <[email protected]>
--- docs/specs/pvpanic.txt | 16 ++++++++-------- hw/misc/pvpanic.c | 11 +++++++++-- include/sysemu/runstate.h | 1 + qapi/run-state.json | 24 ++++++++++++++++++++++-- vl.c | 12 ++++++++++++ 5 files changed, 52 insertions(+), 12 deletions(-)
docs/specs/pvpanic.txt +8 -8
@@ -19,9 +19,10 @@ Software should set only bits both itself and the device recognize. Bit Definition -------------- -bit 0: setting it indicates a guest panic has happened. -bit 1: named crashloaded. setting it indicates a guest panic and run - kexec to handle error by guest itself. +bit 0: a guest panic has happened and should be processed by the host +bit 1: a guest panic has happened and will be handled by the guest; + the host should record it or report it, but should not affect + the execution of the guest. ACPI Interface --------------
@@ -30,13 +31,12 @@ pvpanic device is defined with ACPI ID "QEMU0001". Custom methods: RDPT: To determine whether guest panic notification is supported. Arguments: None -Return: Returns a byte, bit 0 set to indicate guest panic - notification is supported. Other bits are reserved and - should be ignored. +Return: Returns a byte, with the same semantics as the I/O port + interface. WRPT: To send a guest panic event -Arguments: Arg0 is a byte, with bit 0 set to indicate guest panic has - happened. Other bits are reserved and should be cleared. +Arguments: Arg0 is a byte to be written, with the same semantics as + the I/O interface. Return: None The ACPI device will automatically refer to the right port in case it
hw/misc/pvpanic.c +9 -2
@@ -21,11 +21,13 @@#include "hw/qdev-properties.h" #include "hw/misc/pvpanic.h" -/* The bit of supported pv event */ +/* The bit of supported pv event, TODO: include uapi header and remove this */ #define PVPANIC_F_PANICKED 0 +#define PVPANIC_F_CRASHLOADED 1/* The pv event value */ #define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED) +#define PVPANIC_CRASHLOADED (1 << PVPANIC_F_CRASHLOADED)#define ISA_PVPANIC_DEVICE (obj) \ OBJECT_CHECK(PVPanicState, (obj), TYPE_PVPANIC)
@@ -34,7 +36,7 @@ static void handle_event(int event) {static bool logged; -if (event & ~PVPANIC_PANICKED && !logged) { +if (event & ~(PVPANIC_PANICKED |PVPANIC_CRASHLOADED ) && !logged) {qemu_log_mask (LOG_GUEST_ERROR ,"pvpanic: unknown event %#x.\n" , event); logged = true; }
@@ -43,6 +45,11 @@ static void handle_event(int event)qemu_system_guest_panicked (NULL );return ; } + +if (event &PVPANIC_CRASHLOADED ) { +qemu_system_guest_crashloaded (NULL ); +return ; + } }#include "hw/isa/isa.h"
include/sysemu/runstate.h +1 -0
@@ -63,6 +63,7 @@ ShutdownCause qemu_reset_requested_get(void);void qemu_system_killed (int signal,pid_t pid);void qemu_system_reset (ShutdownCause reason);void qemu_system_guest_panicked (GuestPanicInformation *info); +void qemu_system_guest_crashloaded (GuestPanicInformation *info);#endif
qapi/run-state.json +22 -2
@@ -357,16 +357,36 @@ 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } } ## +# @GUEST_CRASHLOADED: +# +# Emitted when guest OS crash loaded is detected +# +# @action: action that has been taken, currently always "run" +# +# @info: information about a panic +# +# Since: 5.0 +# +# Example: +# +# <- { "event": "GUEST_CRASHLOADED", +# "data": { "action": "run" } } +# +## +{ 'event': 'GUEST_CRASHLOADED', + 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } } + +## # @GuestPanicAction: # # An enumeration of the actions taken when guest OS panic is detected # # @pause: system pauses # -# Since: 2.1 (poweroff since 2.8) +# Since: 2.1 (poweroff since 2.8, run since 5.0) ## { 'enum': 'GuestPanicAction', - 'data': [ 'pause', 'poweroff' ] } + 'data': [ 'pause', 'poweroff', 'run' ] } ## # @GuestPanicInformationType:
vl.c +12 -0
@@ -1468,6 +1468,18 @@ void qemu_system_guest_panicked(GuestPanicInformation *info) } } +void qemu_system_guest_crashloaded (GuestPanicInformation *info) +{ +qemu_log_mask (LOG_GUEST_ERROR ,"Guest crash loaded" ); + +qapi_event_send_guest_crashloaded (GUEST_PANIC_ACTION_RUN , + !!info, info); + +if (info) { +qapi_free_GuestPanicInformation (info); + } +} +void qemu_system_reset_request (ShutdownCause reason) {if (no_reboot && reason !=SHUTDOWN_CAUSE_SUBSYSTEM_RESET ) {
Signature · 1 line
1.8.3.1
[PULL 02/59] cpu: Use cpu_class_set_parent_reset()
In reply to Paolo BonziniFrom: Greg Kurz <[email protected]>
Convert all targets to use cpu_class_set_parent_reset() with the following coccinelle script:
@@
type CPUParentClass;
CPUParentClass *pcc;
CPUClass *cc;
identifier parent_fn;
identifier child_fn;
@@
+cpu_class_set_parent_reset(cc, child_fn, &pcc->parent_fn); -pcc->parent_fn = cc->reset;
...
-cc->reset = child_fn;
Message-Id: <[email protected]>
--- target/arm/cpu.c | 3 +-- target/cris/cpu.c | 3 +-- target/i386/cpu.c | 3 +-- target/lm32/cpu.c | 3 +-- target/m68k/cpu.c | 3 +-- target/microblaze/cpu.c | 3 +-- target/mips/cpu.c | 3 +-- target/moxie/cpu.c | 3 +-- target/nios2/cpu.c | 3 +-- target/openrisc/cpu.c | 3 +-- target/ppc/translate_init.inc.c | 3 +-- target/riscv/cpu.c | 3 +-- target/s390x/cpu.c | 3 +-- target/sh4/cpu.c | 3 +-- target/sparc/cpu.c | 3 +-- target/tilegx/cpu.c | 3 +-- target/tricore/cpu.c | 3 +-- target/xtensa/cpu.c | 3 +-- 18 files changed, 18 insertions(+), 36 deletions(-)
target/arm/cpu.c +1 -2
@@ -2707,8 +2707,7 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data) &acc->parent_realize); dc->props = arm_cpu_properties; - acc->parent_reset = cc->reset; - cc->reset = arm_cpu_reset; +cpu_class_set_parent_reset (cc, arm_cpu_reset, &acc->parent_reset); cc->class_by_name = arm_cpu_class_by_name; cc->has_work = arm_cpu_has_work;
target/cris/cpu.c +1 -2
@@ -264,8 +264,7 @@ static void cris_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, cris_cpu_realizefn, &ccc->parent_realize); - ccc->parent_reset = cc->reset; - cc->reset = cris_cpu_reset; +cpu_class_set_parent_reset (cc, cris_cpu_reset, &ccc->parent_reset); cc->class_by_name = cris_cpu_class_by_name; cc->has_work = cris_cpu_has_work;
target/i386/cpu.c +1 -2
@@ -7149,8 +7149,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data) &xcc->parent_unrealize); dc->props = x86_cpu_properties; - xcc->parent_reset = cc->reset; - cc->reset = x86_cpu_reset; +cpu_class_set_parent_reset (cc, x86_cpu_reset, &xcc->parent_reset); cc->reset_dump_flags =CPU_DUMP_FPU |CPU_DUMP_CCOP ; cc->class_by_name = x86_cpu_class_by_name;
target/lm32/cpu.c +1 -2
@@ -218,8 +218,7 @@ static void lm32_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, lm32_cpu_realizefn, &lcc->parent_realize); - lcc->parent_reset = cc->reset; - cc->reset = lm32_cpu_reset; +cpu_class_set_parent_reset (cc, lm32_cpu_reset, &lcc->parent_reset); cc->class_by_name = lm32_cpu_class_by_name; cc->has_work = lm32_cpu_has_work;
target/m68k/cpu.c +1 -2
@@ -273,8 +273,7 @@ static void m68k_cpu_class_init(ObjectClass *c, void *data)device_class_set_parent_realize (dc, m68k_cpu_realizefn, &mcc->parent_realize); - mcc->parent_reset = cc->reset; - cc->reset = m68k_cpu_reset; +cpu_class_set_parent_reset (cc, m68k_cpu_reset, &mcc->parent_reset); cc->class_by_name = m68k_cpu_class_by_name; cc->has_work = m68k_cpu_has_work;
target/microblaze/cpu.c +1 -2
@@ -292,8 +292,7 @@ static void mb_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, mb_cpu_realizefn, &mcc->parent_realize); - mcc->parent_reset = cc->reset; - cc->reset = mb_cpu_reset; +cpu_class_set_parent_reset (cc, mb_cpu_reset, &mcc->parent_reset); cc->class_by_name = mb_cpu_class_by_name; cc->has_work = mb_cpu_has_work;
target/mips/cpu.c +1 -2
@@ -189,8 +189,7 @@ static void mips_cpu_class_init(ObjectClass *c, void *data)device_class_set_parent_realize (dc, mips_cpu_realizefn, &mcc->parent_realize); - mcc->parent_reset = cc->reset; - cc->reset = mips_cpu_reset; +cpu_class_set_parent_reset (cc, mips_cpu_reset, &mcc->parent_reset); cc->class_by_name = mips_cpu_class_by_name; cc->has_work = mips_cpu_has_work;
target/moxie/cpu.c +1 -2
@@ -101,8 +101,7 @@ static void moxie_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, moxie_cpu_realizefn, &mcc->parent_realize); - mcc->parent_reset = cc->reset; - cc->reset = moxie_cpu_reset; +cpu_class_set_parent_reset (cc, moxie_cpu_reset, &mcc->parent_reset); cc->class_by_name = moxie_cpu_class_by_name;
target/nios2/cpu.c +1 -2
@@ -188,8 +188,7 @@ static void nios2_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, nios2_cpu_realizefn, &ncc->parent_realize); dc->props = nios2_properties; - ncc->parent_reset = cc->reset; - cc->reset = nios2_cpu_reset; +cpu_class_set_parent_reset (cc, nios2_cpu_reset, &ncc->parent_reset); cc->class_by_name = nios2_cpu_class_by_name; cc->has_work = nios2_cpu_has_work;
target/openrisc/cpu.c +1 -2
@@ -150,8 +150,7 @@ static void openrisc_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, openrisc_cpu_realizefn, &occ->parent_realize); - occ->parent_reset = cc->reset; - cc->reset = openrisc_cpu_reset; +cpu_class_set_parent_reset (cc, openrisc_cpu_reset, &occ->parent_reset); cc->class_by_name = openrisc_cpu_class_by_name; cc->has_work = openrisc_cpu_has_work;
target/ppc/translate_init.inc.c +1 -2
@@ -10873,8 +10873,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data) pcc->interrupts_big_endian = ppc_cpu_interrupts_big_endian_always; dc->props = ppc_cpu_properties; - pcc->parent_reset = cc->reset; - cc->reset = ppc_cpu_reset; +cpu_class_set_parent_reset (cc, ppc_cpu_reset, &pcc->parent_reset); cc->class_by_name = ppc_cpu_class_by_name; pcc->parent_parse_features = cc->parse_features;
target/riscv/cpu.c +1 -2
@@ -462,8 +462,7 @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)device_class_set_parent_realize (dc, riscv_cpu_realize, &mcc->parent_realize); - mcc->parent_reset = cc->reset; - cc->reset = riscv_cpu_reset; +cpu_class_set_parent_reset (cc, riscv_cpu_reset, &mcc->parent_reset); cc->class_by_name = riscv_cpu_class_by_name; cc->has_work = riscv_cpu_has_work;
target/s390x/cpu.c +1 -2
@@ -456,12 +456,11 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) dc->props = s390x_cpu_properties; dc->user_creatable = true; - scc->parent_reset = cc->reset; +cpu_class_set_parent_reset (cc, s390_cpu_reset_full, &scc->parent_reset);#if !defined(CONFIG_USER_ONLY ) scc->load_normal = s390_cpu_load_normal;#endif scc->reset = s390_cpu_reset; - cc->reset = s390_cpu_reset_full; cc->class_by_name = s390_cpu_class_by_name, cc->has_work = s390_cpu_has_work;#ifdef CONFIG_TCG
target/sh4/cpu.c +1 -2
@@ -214,8 +214,7 @@ static void superh_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, superh_cpu_realizefn, &scc->parent_realize); - scc->parent_reset = cc->reset; - cc->reset = superh_cpu_reset; +cpu_class_set_parent_reset (cc, superh_cpu_reset, &scc->parent_reset); cc->class_by_name = superh_cpu_class_by_name; cc->has_work = superh_cpu_has_work;
target/sparc/cpu.c +1 -2
@@ -859,8 +859,7 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data) &scc->parent_realize); dc->props = sparc_cpu_properties; - scc->parent_reset = cc->reset; - cc->reset = sparc_cpu_reset; +cpu_class_set_parent_reset (cc, sparc_cpu_reset, &scc->parent_reset); cc->class_by_name = sparc_cpu_class_by_name; cc->parse_features = sparc_cpu_parse_features;
target/tilegx/cpu.c +1 -2
@@ -142,8 +142,7 @@ static void tilegx_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, tilegx_cpu_realizefn, &tcc->parent_realize); - tcc->parent_reset = cc->reset; - cc->reset = tilegx_cpu_reset; +cpu_class_set_parent_reset (cc, tilegx_cpu_reset, &tcc->parent_reset); cc->class_by_name = tilegx_cpu_class_by_name; cc->has_work = tilegx_cpu_has_work;
target/tricore/cpu.c +1 -2
@@ -153,8 +153,7 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data)device_class_set_parent_realize (dc, tricore_cpu_realizefn, &mcc->parent_realize); - mcc->parent_reset = cc->reset; - cc->reset = tricore_cpu_reset; +cpu_class_set_parent_reset (cc, tricore_cpu_reset, &mcc->parent_reset); cc->class_by_name = tricore_cpu_class_by_name; cc->has_work = tricore_cpu_has_work;
target/xtensa/cpu.c +1 -2
@@ -184,8 +184,7 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data)device_class_set_parent_realize (dc, xtensa_cpu_realizefn, &xcc->parent_realize); - xcc->parent_reset = cc->reset; - cc->reset = xtensa_cpu_reset; +cpu_class_set_parent_reset (cc, xtensa_cpu_reset, &xcc->parent_reset); cc->class_by_name = xtensa_cpu_class_by_name; cc->has_work = xtensa_cpu_has_work;
Signature · 1 line
1.8.3.1
[PULL 08/59] hw/timer/aspeed_timer: Add a fall through comment
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
hw/timer/aspeed_timer.c: In function ‘aspeed_timer_set_value’:
hw/timer/aspeed_timer.c:283:24: error: this statement may fall through [-Werror=implicit-fallthrough=]
283 | if (old_reload || !t->reload) {
| ~~~~~~~~~~~^~~~~~~~~~~~~
hw/timer/aspeed_timer.c:287:5: note: here
287 | case TIMER_REG_STATUS:
| ^~~~cc1: all warnings being treated as errors
Add the missing fall through comment.
Message-Id: <[email protected]>
--- hw/timer/aspeed_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/timer/aspeed_timer.c +1 -1
@@ -283,7 +283,7 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,if (old_reload || !t->reload) {break ; } - +/* fall through to re-enable */ case TIMER_REG_STATUS :if (timer_enabled (t)) {uint64_t now =qemu_clock_get_ns (QEMU_CLOCK_VIRTUAL );
Signature · 1 line
1.8.3.1
[PULL 09/59] hw/net/imx_fec: Rewrite fall through comments
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2:
hw/net/imx_fec.c: In function ‘imx_eth_write’:
hw/net/imx_fec.c:906:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
906 | if (unlikely(single_tx_ring)) {
| ^
hw/net/imx_fec.c:912:5: note: here
912 | case ENET_TDAR: /* FALLTHROUGH */
| ^~~~cc1: all warnings being treated as errors
Rewrite the comments in the correct place, using 'fall through' which is recognized by GCC and static analyzers.
Message-Id: <[email protected]>
--- hw/net/imx_fec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/net/imx_fec.c +2 -1
@@ -909,7 +909,8 @@ static void imx_eth_write(void *opaque, hwaddr offset, uint64_t value, TYPE_IMX_FEC, __func__);return ; } -case ENET_TDAR :/* FALLTHROUGH */ +/* fall through */ +case ENET_TDAR :if (s->regs[ENET_ECR ] &ENET_ECR_ETHEREN ) { s->regs[index] =ENET_TDAR_TDAR ;imx_eth_do_tx (s, index);
Signature · 1 line
1.8.3.1
[PULL 11/59] hw/pci-host/designware: Remove unuseful FALLTHROUGH comment
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
We don't need to explicit this obvious switch fall through. Stay consistent with the rest of the codebase.
Message-Id: <[email protected]>
--- hw/pci-host/designware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/designware.c +1 -1
@@ -182,7 +182,7 @@ designware_pcie_root_config_read(PCIDevice *d, uint32_t address, int len)break ;case DESIGNWARE_PCIE_ATU_CR1 : -case DESIGNWARE_PCIE_ATU_CR2 :/* FALLTHROUGH */ +case DESIGNWARE_PCIE_ATU_CR2 : val = viewport->cr[(address -DESIGNWARE_PCIE_ATU_CR1 ) /sizeof (uint32_t )];break ;
Signature · 1 line
1.8.3.1
[PULL 23/59] hw/ppc/spapr_rtas: Use local MachineState variable
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
Since we have the MachineState already available locally, use it instead of the global current_machine.
Message-Id: <[email protected]>
--- hw/ppc/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr_rtas.c +1 -1
@@ -281,7 +281,7 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu,"DesProcs=%d," "MaxPlatProcs=%d" , max_cpus, - current_machine->ram_size / MiB, + ms->ram_size / MiB, ms->smp.cpus, max_cpus);if (pcc->n_host_threads >0 ) {
Signature · 1 line
1.8.3.1
[PULL 21/59] virtio-scsi: delete vqs in unrealize to avoid memleaks
In reply to Paolo BonziniFrom: Pan Nengyuan <[email protected]>
This patch fix memleaks when attaching/detaching virtio-scsi device, the memory leak stack is as follow:
Direct leak of 21504 byte(s) in 3 object(s) allocated from:
#0 0x7f491f2f2970 (/lib64/libasan.so.5+0xef970) ??:? #1 0x7f491e94649d (/lib64/libglib-2.0.so.0+0x5249d) ??:?
#2 0x564d0f3919fa (./x86_64-softmmu/qemu-system-x86_64+0x2c3e9fa) /mnt/sdb/qemu/hw/virtio/virtio.c:2333 #3 0x564d0f2eca55 (./x86_64-softmmu/qemu-system-x86_64+0x2b99a55) /mnt/sdb/qemu/hw/scsi/virtio-scsi.c:912 #4 0x564d0f2ece7b (./x86_64-softmmu/qemu-system-x86_64+0x2b99e7b) /mnt/sdb/qemu/hw/scsi/virtio-scsi.c:924 #5 0x564d0f39ee47 (./x86_64-softmmu/qemu-system-x86_64+0x2c4be47) /mnt/sdb/qemu/hw/virtio/virtio.c:3531 #6 0x564d0f980224 (./x86_64-softmmu/qemu-system-x86_64+0x322d224) /mnt/sdb/qemu/hw/core/qdev.c:865
Message-Id: <[email protected]>
--- hw/scsi/virtio-scsi.c | 6 ++++++ 1 file changed, 6 insertions(+)
hw/scsi/virtio-scsi.c +6 -0
@@ -943,7 +943,13 @@ void virtio_scsi_common_unrealize(DeviceState *dev) {VirtIODevice *vdev =VIRTIO_DEVICE (dev);VirtIOSCSICommon *vs =VIRTIO_SCSI_COMMON (dev); +int i; +virtio_del_queue (vdev,0 ); +virtio_del_queue (vdev,1 ); +for (i =0 ; i < vs->conf.num_queues; i++) { +virtio_del_queue (vdev, i +2 ); + }g_free (vs->cmd_vqs);virtio_cleanup (vdev); }
Signature · 1 line
1.8.3.1
[PULL 25/59] hw/ppc/spapr_rtas: Remove local variable
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
We only access this variable in the RTAS_SYSPARM_SPLPAR_CHARACTERISTICS case. Use it in place and remove the local declaration.
Message-Id: <[email protected]>
--- hw/ppc/spapr_rtas.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
hw/ppc/spapr_rtas.c +2 -3
@@ -268,7 +268,6 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, {PowerPCCPUClass *pcc =POWERPC_CPU_GET_CLASS (cpu);MachineState *ms =MACHINE (spapr); -unsigned int max_cpus = ms->smp.max_cpus;target_ulong parameter =rtas_ld (args,0 );target_ulong buffer =rtas_ld (args,1 );target_ulong length =rtas_ld (args,2 );
@@ -280,10 +279,10 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu,"DesMem=%" PRIu64"," "DesProcs=%d," "MaxPlatProcs=%d" , - max_cpus, + ms->smp.max_cpus, ms->ram_size / MiB, ms->smp.cpus, - max_cpus); + ms->smp.max_cpus);if (pcc->n_host_threads >0 ) {char *hostthr_val, *old = param_val;
Signature · 1 line
1.8.3.1
[PULL 24/59] hw/ppc/spapr_rtas: Access MachineState via SpaprMachineState argument
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
We received a SpaprMachineState argument. Since SpaprMachineState inherits of MachineState, use it instead of calling qdev_get_machine.
Message-Id: <[email protected]>
--- hw/ppc/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr_rtas.c +1 -1
@@ -267,7 +267,7 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, uint32_t nret, target_ulong rets) {PowerPCCPUClass *pcc =POWERPC_CPU_GET_CLASS (cpu); -MachineState *ms =MACHINE (qdev_get_machine ()); +MachineState *ms =MACHINE (spapr);unsigned int max_cpus = ms->smp.max_cpus;target_ulong parameter =rtas_ld (args,0 );target_ulong buffer =rtas_ld (args,1 );
Signature · 1 line
1.8.3.1
[PULL 27/59] qom/object: Display more helpful message when a parent is missing
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
QEMU object model is scarse in documentation. Some calls are recursive, and it might be hard to figure out even trivial issues.
We can avoid developers to waste time in a debugging session by displaying a simple error message.
This commit is also similar to e02bdf1cecd2 ("Display more helpful message when an object type is missing").
Message-Id: <[email protected]>
--- qom/object.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
qom/object.c +5 -1
@@ -173,7 +173,11 @@ static TypeImpl *type_get_parent(TypeImpl *type) {if (!type->parent_type && type->parent) { type->parent_type =type_get_by_name (type->parent); -g_assert (type->parent_type !=NULL ); +if (!type->parent_type) { +fprintf (stderr,"Type '%s' is missing its parent '%s'\n" , + type->name, type->parent); +abort (); + } }return type->parent_type;
Signature · 1 line
1.8.3.1
[PULL 26/59] target/arm/kvm: Use CPUState::kvm_state in kvm_arm_pmu_supported()
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
KVMState is already accessible via CPUState::kvm_state, use it.
Message-Id: <[email protected]>
--- target/arm/kvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
target/arm/kvm.c +1 -3
@@ -181,9 +181,7 @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu)bool kvm_arm_pmu_supported (CPUState *cpu) { -KVMState *s =KVM_STATE (current_machine->accelerator); - -return kvm_check_extension (s,KVM_CAP_ARM_PMU_V3 ); +return kvm_check_extension (cpu->kvm_state,KVM_CAP_ARM_PMU_V3 ); }int kvm_arm_get_max_vm_ipa_size (MachineState *ms)
Signature · 1 line
1.8.3.1
[PULL 30/59] accel/tcg: Sanitize include path
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
Commit af0440ae852 moved the qemu_tcg_configure() function, but introduced extraneous 'include/' in the includes path. As it is not necessary, remove it.
Message-Id: <[email protected]>
--- accel/tcg/tcg-all.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
accel/tcg/tcg-all.c +3 -3
@@ -31,9 +31,9 @@#include "sysemu/cpus.h" #include "qemu/main-loop.h" #include "tcg/tcg.h" -#include "include/qapi/error.h" -#include "include/qemu/error-report.h" -#include "include/hw/boards.h" +#include "qapi/error.h" +#include "qemu/error-report.h" +#include "hw/boards.h" #include "qapi/qapi-builtin-visit.h" typedef struct TCGState {
Signature · 1 line
1.8.3.1
[PULL 29/59] accel: Replace current_machine->accelerator by current_accel() wrapper
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
We actually want to access the accelerator, not the machine, so use the current_accel() wrapper instead.
Message-Id: <[email protected]>
--- accel/kvm/kvm-all.c | 4 ++-- accel/tcg/tcg-all.c | 2 +- memory.c | 2 +- target/arm/kvm64.c | 5 ++--- target/i386/kvm.c | 2 +- target/ppc/kvm.c | 4 ++-- vl.c | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-)
accel/kvm/kvm-all.c +2 -2
@@ -164,7 +164,7 @@ static NotifierList kvm_irqchip_change_notifiers =int kvm_get_max_memslots (void ) { -KVMState *s =KVM_STATE (current_machine->accelerator); +KVMState *s =KVM_STATE (current_accel ());return s->nr_slots; }
@@ -1848,7 +1848,7 @@ static int kvm_max_vcpu_id(KVMState *s)bool kvm_vcpu_id_is_valid (int vcpu_id) { -KVMState *s =KVM_STATE (current_machine->accelerator); +KVMState *s =KVM_STATE (current_accel ());return vcpu_id >=0 && vcpu_id <kvm_max_vcpu_id (s); }
accel/tcg/tcg-all.c +1 -1
@@ -124,7 +124,7 @@ static void tcg_accel_instance_init(Object *obj)static int tcg_init (MachineState *ms) { -TCGState *s =TCG_STATE (current_machine->accelerator); +TCGState *s =TCG_STATE (current_accel ());tcg_exec_init (s->tb_size *1024 *1024 ); cpu_interrupt_handler = tcg_handle_interrupt;
memory.c +1 -1
@@ -3104,7 +3104,7 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner) };GArray *fv_address_spaces;GHashTable *views =g_hash_table_new (g_direct_hash, g_direct_equal); -AccelClass *ac =ACCEL_GET_CLASS (current_machine->accelerator); +AccelClass *ac =ACCEL_GET_CLASS (current_accel ());if (ac->has_memory) { fvi.ac = ac;
target/arm/kvm64.c +2 -3
@@ -26,7 +26,6 @@#include "sysemu/kvm.h" #include "sysemu/kvm_int.h" #include "kvm_arm.h" -#include "hw/boards.h" #include "internals.h" static bool have_guest_debug;
@@ -613,14 +612,14 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)bool kvm_arm_aarch32_supported (CPUState *cpu) { -KVMState *s =KVM_STATE (current_machine->accelerator); +KVMState *s =KVM_STATE (current_accel ());return kvm_check_extension (s,KVM_CAP_ARM_EL1_32BIT ); }bool kvm_arm_sve_supported (CPUState *cpu) { -KVMState *s =KVM_STATE (current_machine->accelerator); +KVMState *s =KVM_STATE (current_accel ());return kvm_check_extension (s,KVM_CAP_ARM_SVE ); }
target/i386/kvm.c +1 -1
@@ -149,7 +149,7 @@ bool kvm_allows_irq0_override(void)static bool kvm_x2apic_api_set_flags (uint64_t flags) { -KVMState *s =KVM_STATE (current_machine->accelerator); +KVMState *s =KVM_STATE (current_accel ());return !kvm_vm_enable_cap (s,KVM_CAP_X2APIC_API ,0 , flags); }
target/ppc/kvm.c +2 -2
@@ -258,7 +258,7 @@ static void kvm_get_smmu_info(struct kvm_ppc_smmu_info *info, Error **errp)struct ppc_radix_page_info *kvm_get_radix_page_info (void ) { -KVMState *s =KVM_STATE (current_machine->accelerator); +KVMState *s =KVM_STATE (current_accel ());struct ppc_radix_page_info *radix_page_info;struct kvm_ppc_rmmu_info rmmu_info;int i;
@@ -2907,7 +2907,7 @@ void kvmppc_svm_off(Error **errp)return ; } - rc =kvm_vm_ioctl (KVM_STATE (current_machine->accelerator),KVM_PPC_SVM_OFF ); + rc =kvm_vm_ioctl (KVM_STATE (current_accel ()),KVM_PPC_SVM_OFF );if (rc && rc != -ENOTTY ) {error_setg_errno (errp, -rc,"KVM_PPC_SVM_OFF ioctl failed" ); }
vl.c +1 -1
@@ -2824,7 +2824,7 @@ static void configure_accelerators(const char *progname) }if (init_failed) { -AccelClass *ac =ACCEL_GET_CLASS (current_machine->accelerator); +AccelClass *ac =ACCEL_GET_CLASS (current_accel ());error_report ("falling back to %s" , ac->name); }
Signature · 1 line
1.8.3.1
[PULL 36/59] object: add class property initializer
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
This callback is used to set default value in following patch "object:
add object_property_set_defaut_{bool,str,int,uint}()".
Message-Id: <[email protected]>
--- include/qom/object.h | 16 ++++++++++++++-- qom/object.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-)
include/qom/object.h +14 -2
@@ -309,6 +309,8 @@ typedef struct InterfaceInfo InterfaceInfo;*/ +typedef struct ObjectProperty ObjectProperty ; +/** * ObjectPropertyAccessor: * @obj: the object that owns the property
@@ -356,7 +358,16 @@ typedef void (ObjectPropertyRelease)(Object *obj,const char *name, void *opaque); -typedef struct ObjectProperty +/** +* ObjectPropertyInit: +* @obj: the object that owns the property +* @prop: the property to set +* +* Called when a property is initialized. +*/ +typedef void (ObjectPropertyInit )(Object *obj,ObjectProperty *prop); + +struct ObjectProperty {gchar *name;gchar *type;
@@ -365,8 +376,9 @@ typedef struct ObjectPropertyObjectPropertyAccessor *set;ObjectPropertyResolve *resolve;ObjectPropertyRelease *release; +ObjectPropertyInit *init;void *opaque; -} ObjectProperty; +};/** * ObjectUnparent:
qom/object.c +14 -0
@@ -478,6 +478,19 @@ void object_apply_compat_props(Object *obj) } } +static void object_class_property_init_all (Object *obj) +{ +ObjectPropertyIterator iter; +ObjectProperty *prop; + +object_class_property_iter_init (&iter,object_get_class (obj)); +while ((prop =object_property_iter_next (&iter))) { +if (prop->init) { + prop->init (obj, prop); + } + } +} +static void object_initialize_with_type (void *data,size_t size,TypeImpl *type) {Object *obj = data;
@@ -491,6 +504,7 @@ static void object_initialize_with_type(void *data, size_t size, TypeImpl *type)memset (obj,0 , type->instance_size); obj->class = type->class;object_ref (obj); +object_class_property_init_all (obj); obj->properties =g_hash_table_new_full (g_str_hash, g_str_equal,NULL , object_property_free);object_init_with_type (obj, type);
Signature · 1 line
1.8.3.1
[PULL 32/59] qdev: remove duplicated qdev_property_add_static() doc
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
The function is already documented in the header.
Message-Id: <[email protected]>
--- hw/core/qdev.c | 10 ---------- 1 file changed, 10 deletions(-)
hw/core/qdev.c +0 -10
@@ -717,16 +717,6 @@ static void qdev_property_add_legacy(DeviceState *dev, Property *prop,g_free (name); } -/** -* qdev_property_add_static: -* @dev: Device to add the property to. -* @prop: The qdev property definition. -* @errp: location to store error information. -* -* Add a static QOM property to @dev for qdev property @prop. -* On error, store error in @errp. Static properties access data in a struct. -* The type of the QOM property is derived from prop->info. -*/ void qdev_property_add_static (DeviceState *dev,Property *prop,Error **errp) {
Signature · 1 line
1.8.3.1
[PULL 40/59] object: add object_property_set_defaut_{bool, str, int, uint}()
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
--- include/qom/object.h | 37 ++++++++++++++++++++++++++++++++++ qom/object.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+)
include/qom/object.h +37 -0
@@ -386,6 +386,7 @@ struct ObjectPropertyObjectPropertyInit *init;ObjectPropertyGetDefault *get_default;void *opaque; +QObject *defval; };/**
@@ -1064,6 +1065,42 @@ ObjectProperty *object_class_property_add(ObjectClass *klass, const char *name, void *opaque, Error **errp);/** +* object_property_set_defaut_bool: +* @prop: the property to set +* @value: the value to be written to the property +* +* Set the property default value. +*/ +void object_property_set_defaut_bool (ObjectProperty *prop,bool value); + +/** +* object_property_set_defaut_str: +* @prop: the property to set +* @value: the value to be written to the property +* +* Set the property default value. +*/ +void object_property_set_defaut_str (ObjectProperty *prop,const char *value); + +/** +* object_property_set_defaut_int: +* @prop: the property to set +* @value: the value to be written to the property +* +* Set the property default value. +*/ +void object_property_set_defaut_int (ObjectProperty *prop,int64_t value); + +/** +* object_property_set_defaut_uint: +* @prop: the property to set +* @value: the value to be written to the property +* +* Set the property default value. +*/ +void object_property_set_defaut_uint (ObjectProperty *prop,uint64_t value); + +/** * object_property_find: * @obj: the object * @name: the name of the property
qom/object.c +56 -0
82 lines not on this page · raw message
Signature · 1 line
1.8.3.1
[PULL 37/59] object: add object_property_get_defaut()
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
The new callback will be used in following "object: add object_property_set_defaut_{bool,str,int,uint}()" and "vl: print default value in object help" patches.
Message-Id: <[email protected]>
--- include/qom/object.h | 17 +++++++++++++++++ qom/object.c | 9 +++++++++ 2 files changed, 26 insertions(+)
include/qom/object.h +17 -0
@@ -367,6 +367,13 @@ typedef void (ObjectPropertyRelease)(Object *obj,*/ typedef void (ObjectPropertyInit )(Object *obj,ObjectProperty *prop); +/** +* ObjectPropertyGetDefault: +* +* Get an allocated string representation of the default value. +*/ +typedef char *(ObjectPropertyGetDefault )(ObjectProperty *prop); +struct ObjectProperty {gchar *name;
@@ -377,6 +384,7 @@ struct ObjectPropertyObjectPropertyResolve *resolve;ObjectPropertyRelease *release;ObjectPropertyInit *init; +ObjectPropertyGetDefault *get_default;void *opaque; };
@@ -1234,6 +1242,15 @@ void object_property_set_int(Object *obj, int64_t value, const char *name, Error **errp);/** +* object_property_get_defaut: +* @prop: the property to get default value +* +* Return an allocated string that represents the default property +* value or NULL. +*/ +char *object_property_get_default (ObjectProperty *prop); + +/** * object_property_get_int: * @obj: the object * @name: the name of the property
qom/object.c +9 -0
@@ -1438,6 +1438,15 @@ int64_t object_property_get_int(Object *obj, const char *name,return retval; } +char *object_property_get_default (ObjectProperty *prop) +{ +if (!prop->get_default) { +return NULL ; + } + +return prop->get_default (prop); +} +void object_property_set_uint (Object *obj,uint64_t value,const char *name,Error **errp) {
Signature · 1 line
1.8.3.1
[PULL 42/59] object: check strong flag with &
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
The following patch is going to introduce more flags.
Message-Id: <[email protected]>
--- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qom/object.c +1 -1
@@ -1822,7 +1822,7 @@ static void object_set_link_property(Object *obj, Visitor *v, } *child = new_target; -if (prop->flags ==OBJ_PROP_LINK_STRONG ) { +if (prop->flags &OBJ_PROP_LINK_STRONG ) {object_ref (new_target);object_unref (old_target); }
Signature · 1 line
1.8.3.1
[PULL 44/59] object: add direct link flag
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Allow the link property to hold the pointer to the target, instead of indirectly through another variable.
Message-Id: <[email protected]>
--- include/qom/object.h | 3 +++ qom/object.c | 26 ++++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-)
include/qom/object.h +3 -0
@@ -1528,6 +1528,9 @@ void object_property_add_child(Object *obj, const char *name,typedef enum {/* Unref the link pointer when the property is deleted */ OBJ_PROP_LINK_STRONG =0x1 , + +/* private */ +OBJ_PROP_LINK_DIRECT =0x2 , }ObjectPropertyLinkFlags ;/**
qom/object.c +20 -6
@@ -1729,17 +1729,30 @@ void object_property_allow_set_link(const Object *obj, const char *name, }typedef struct { -Object **targetp; +union { +Object **targetp; +Object *target;/* if OBJ_PROP_LINK_DIRECT, when holding the pointer */ + };void (*check)(const Object *,const char *,Object *,Error **);ObjectPropertyLinkFlags flags; }LinkProperty ; +static Object ** +object_link_get_targetp (Object *obj,LinkProperty *lprop) +{ +if (lprop->flags &OBJ_PROP_LINK_DIRECT ) { +return &lprop->target; + }else { +return lprop->targetp; + } +} +static void object_get_link_property (Object *obj,Visitor *v,const char *name,void *opaque,Error **errp) {LinkProperty *lprop = opaque; -Object **targetp = lprop->targetp; +Object **targetp =object_link_get_targetp (obj, lprop);gchar *path;if (*targetp) {
@@ -1798,7 +1811,7 @@ static void object_set_link_property(Object *obj, Visitor *v, {Error *local_err =NULL ;LinkProperty *prop = opaque; -Object **targetp = prop->targetp; +Object **targetp =object_link_get_targetp (obj, prop);Object *old_target = *targetp;Object *new_target =NULL ;char *path =NULL ;
@@ -1832,16 +1845,17 @@ static Object *object_resolve_link_property(Object *parent, void *opaque, const {LinkProperty *lprop = opaque; -return *lprop->targetp; +return *object_link_get_targetp (parent, lprop); }static void object_release_link_property (Object *obj,const char *name,void *opaque) {LinkProperty *prop = opaque; +Object **targetp =object_link_get_targetp (obj, prop); -if ((prop->flags &OBJ_PROP_LINK_STRONG ) && *prop->targetp) { -object_unref (*prop->targetp); +if ((prop->flags &OBJ_PROP_LINK_STRONG ) && *targetp) { +object_unref (*targetp); }g_free (prop); }
Signature · 1 line
1.8.3.1
[PULL 46/59] object: add object_class_property_add_link()
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
--- include/qom/object.h | 9 +++++++++ qom/object.c | 46 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-)
include/qom/object.h +9 -0
@@ -1531,6 +1531,7 @@ typedef enum {/* private */ OBJ_PROP_LINK_DIRECT =0x2 , +OBJ_PROP_LINK_CLASS =0x4 , } ObjectPropertyLinkFlags;/**
@@ -1579,6 +1580,14 @@ void object_property_add_link(Object *obj, const char *name,ObjectPropertyLinkFlags flags, Error **errp); +ObjectProperty *object_class_property_add_link (ObjectClass *oc, +const char *name, +const char *type,ptrdiff_t offset, +void (*check)(const Object *obj,const char *name, +Object *val,Error **errp), +ObjectPropertyLinkFlags flags, +Error **errp); +/** * object_property_add_str: * @obj: the object to add a property to
qom/object.c +45 -1
70 lines not on this page · raw message
Signature · 1 line
1.8.3.1
[PULL 49/59] qdev: set properties with device_class_set_props()
In reply to Paolo BonziniFrom: Marc-André Lureau <[email protected]>
The following patch will need to handle properties registration during class_init time. Let's use a device_class_set_props() setter.
spatch --macro-file scripts/cocci-macro-file.h --sp-file ./scripts/coccinelle/qdev-set-props.cocci --keep-comments --in-place --dir .
@@
typedef DeviceClass;
DeviceClass *d;
expression val;
@@
- d->props = val
+ device_class_set_props(d, val)
Message-Id: <[email protected]>
--- hw/9pfs/virtio-9p-device.c | 2 +- hw/acpi/generic_event_device.c | 2 +- hw/acpi/piix4.c | 2 +- hw/acpi/vmgenid.c | 2 +- hw/arm/armsse.c | 2 +- hw/arm/armv7m.c | 4 ++-- hw/arm/aspeed_soc.c | 2 +- hw/arm/bcm2836.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/msf2-soc.c | 2 +- hw/arm/musicpal.c | 2 +- hw/arm/nrf51_soc.c | 2 +- hw/arm/pxa2xx.c | 4 ++-- hw/arm/pxa2xx_gpio.c | 2 +- hw/arm/smmu-common.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/stm32f205_soc.c | 2 +- hw/arm/strongarm.c | 2 +- hw/arm/xlnx-versal.c | 2 +- hw/arm/xlnx-zynqmp.c | 2 +- hw/audio/ac97.c | 2 +- hw/audio/adlib.c | 2 +- hw/audio/cs4231.c | 2 +- hw/audio/cs4231a.c | 2 +- hw/audio/es1370.c | 2 +- hw/audio/gus.c | 2 +- hw/audio/hda-codec.c | 2 +- hw/audio/intel-hda.c | 4 ++-- hw/audio/milkymist-ac97.c | 2 +- hw/audio/pcspk.c | 2 +- hw/audio/pl041.c | 2 +- hw/audio/sb16.c | 2 +- hw/audio/wm8750.c | 2 +- hw/block/fdc.c | 8 ++++---- hw/block/m25p80.c | 2 +- hw/block/nand.c | 2 +- hw/block/nvme.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/block/vhost-user-blk.c | 2 +- hw/block/virtio-blk.c | 2 +- hw/block/xen-block.c | 2 +- hw/char/bcm2835_aux.c | 2 +- hw/char/cadence_uart.c | 2 +- hw/char/cmsdk-apb-uart.c | 2 +- hw/char/debugcon.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/grlib_apbuart.c | 2 +- hw/char/imx_serial.c | 2 +- hw/char/ipoctal232.c | 2 +- hw/char/lm32_juart.c | 2 +- hw/char/lm32_uart.c | 2 +- hw/char/mcf_uart.c | 2 +- hw/char/milkymist-uart.c | 2 +- hw/char/nrf51_uart.c | 2 +- hw/char/parallel.c | 2 +- hw/char/pl011.c | 2 +- hw/char/sclpconsole-lm.c | 2 +- hw/char/sclpconsole.c | 2 +- hw/char/serial-isa.c | 2 +- hw/char/serial-pci-multi.c | 4 ++-- hw/char/serial-pci.c | 2 +- hw/char/serial.c | 4 ++-- hw/char/spapr_vty.c | 2 +- hw/char/stm32f2xx_usart.c | 2 +- hw/char/terminal3270.c | 2 +- hw/char/virtio-console.c | 2 +- hw/char/virtio-serial-bus.c | 4 ++-- hw/char/xilinx_uartlite.c | 2 +- hw/core/cpu.c | 2 +- hw/core/generic-loader.c | 2 +- hw/core/or-irq.c | 2 +- hw/core/platform-bus.c | 2 +- hw/core/qdev.c | 5 +++++ hw/core/split-irq.c | 2 +- hw/cpu/a15mpcore.c | 2 +- hw/cpu/a9mpcore.c | 2 +- hw/cpu/arm11mpcore.c | 2 +- hw/cpu/cluster.c | 2 +- hw/cpu/realview_mpcore.c | 2 +- hw/display/ati.c | 2 +- hw/display/bcm2835_fb.c | 2 +- hw/display/bochs-display.c | 2 +- hw/display/cg3.c | 2 +- hw/display/cirrus_vga.c | 2 +- hw/display/cirrus_vga_isa.c | 2 +- hw/display/g364fb.c | 2 +- hw/display/i2c-ddc.c | 2 +- hw/display/macfb.c | 4 ++-- hw/display/milkymist-vgafb.c | 2 +- hw/display/qxl.c | 2 +- hw/display/ramfb-standalone.c | 2 +- hw/display/sm501.c | 4 ++-- hw/display/tcx.c | 2 +- hw/display/vga-isa.c | 2 +- hw/display/vga-pci.c | 4 ++-- hw/display/vhost-user-gpu.c | 2 +- hw/display/virtio-gpu-pci.c | 2 +- hw/display/virtio-gpu.c | 2 +- hw/display/virtio-vga.c | 2 +- hw/display/vmware_vga.c | 2 +- hw/dma/i82374.c | 2 +- hw/dma/i8257.c | 2 +- hw/dma/pl080.c | 2 +- hw/dma/pl330.c | 2 +- hw/dma/pxa2xx_dma.c | 2 +- hw/dma/xilinx_axidma.c | 2 +- hw/dma/xlnx-zdma.c | 2 +- hw/gpio/imx_gpio.c | 2 +- hw/gpio/omap_gpio.c | 4 ++-- hw/i2c/aspeed_i2c.c | 2 +- hw/i2c/core.c | 2 +- hw/i2c/omap_i2c.c | 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/clock.c | 2 +- hw/i386/kvm/i8254.c | 2 +- hw/i386/kvm/ioapic.c | 2 +- hw/i386/vmmouse.c | 2 +- hw/i386/x86-iommu.c | 2 +- hw/i386/xen/xen_pvdevice.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/qdev.c | 8 ++++---- hw/input/adb.c | 2 +- hw/input/milkymist-softusb.c | 2 +- hw/input/virtio-input-hid.c | 6 +++--- hw/input/virtio-input-host.c | 2 +- hw/input/virtio-input.c | 2 +- hw/intc/apic_common.c | 2 +- hw/intc/arm_gic_common.c | 2 +- hw/intc/arm_gicv2m.c | 2 +- hw/intc/arm_gicv3_common.c | 2 +- hw/intc/arm_gicv3_its_kvm.c | 2 +- hw/intc/armv7m_nvic.c | 2 +- hw/intc/exynos4210_combiner.c | 2 +- hw/intc/exynos4210_gic.c | 4 ++-- hw/intc/i8259_common.c | 2 +- hw/intc/ioapic.c | 2 +- hw/intc/mips_gic.c | 2 +- hw/intc/omap_intc.c | 4 ++-- hw/intc/ompic.c | 2 +- hw/intc/openpic.c | 2 +- hw/intc/openpic_kvm.c | 2 +- hw/intc/pnv_xive.c | 2 +- hw/intc/s390_flic.c | 2 +- hw/intc/spapr_xive.c | 2 +- hw/intc/xics.c | 4 ++-- hw/intc/xilinx_intc.c | 2 +- hw/intc/xive.c | 6 +++--- hw/intc/xlnx-pmu-iomod-intc.c | 2 +- hw/ipack/ipack.c | 2 +- hw/ipmi/ipmi.c | 2 +- hw/ipmi/ipmi_bmc_extern.c | 2 +- hw/ipmi/ipmi_bmc_sim.c | 2 +- hw/ipmi/isa_ipmi_bt.c | 2 +- hw/ipmi/isa_ipmi_kcs.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/pc87312.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/mem/nvdimm.c | 2 +- hw/mem/pc-dimm.c | 2 +- hw/mips/cps.c | 2 +- hw/misc/a9scu.c | 2 +- hw/misc/applesmc.c | 2 +- hw/misc/arm11scu.c | 2 +- hw/misc/arm_l2x0.c | 2 +- hw/misc/arm_sysctl.c | 2 +- hw/misc/armsse-cpuid.c | 2 +- hw/misc/aspeed_scu.c | 2 +- hw/misc/aspeed_sdmc.c | 2 +- hw/misc/bcm2835_property.c | 2 +- hw/misc/debugexit.c | 2 +- hw/misc/eccmemctl.c | 2 +- hw/misc/iotkit-sysctl.c | 2 +- hw/misc/iotkit-sysinfo.c | 2 +- hw/misc/ivshmem.c | 4 ++-- hw/misc/mac_via.c | 2 +- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/macio.c | 4 ++-- 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/mos6522.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/pvpanic.c | 2 +- hw/misc/tz-mpc.c | 2 +- hw/misc/tz-msc.c | 2 +- hw/misc/tz-ppc.c | 2 +- hw/misc/unimp.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/cadence_gem.c | 2 +- hw/net/dp8393x.c | 2 +- hw/net/e1000.c | 2 +- hw/net/e1000e.c | 2 +- hw/net/eepro100.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/mcf_fec.c | 2 +- hw/net/milkymist-minimac2.c | 2 +- hw/net/mipsnet.c | 2 +- hw/net/ne2000-isa.c | 2 +- hw/net/ne2000-pci.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/spapr_llan.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/virtio-net.c | 2 +- hw/net/vmxnet3.c | 2 +- hw/net/xgmac.c | 2 +- hw/net/xilinx_axienet.c | 2 +- hw/net/xilinx_ethlite.c | 2 +- hw/nvram/ds1225y.c | 2 +- hw/nvram/eeprom_at24c.c | 2 +- hw/nvram/fw_cfg.c | 4 ++-- hw/nvram/mac_nvram.c | 2 +- hw/nvram/nrf51_nvm.c | 2 +- hw/nvram/spapr_nvram.c | 2 +- hw/pci-bridge/gen_pcie_root_port.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 4 ++-- hw/pci-bridge/pcie_pci_bridge.c | 2 +- hw/pci-bridge/pcie_root_port.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-host/grackle.c | 2 +- hw/pci-host/i440fx.c | 2 +- hw/pci-host/ppce500.c | 2 +- hw/pci-host/prep.c | 2 +- hw/pci-host/q35.c | 4 ++-- hw/pci-host/sabre.c | 2 +- hw/pci-host/uninorth.c | 2 +- hw/pci-host/versatile.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- hw/pci/pci.c | 2 +- hw/pci/pcie_port.c | 4 ++-- hw/ppc/pnv.c | 2 +- hw/ppc/pnv_core.c | 4 ++-- hw/ppc/pnv_homer.c | 2 +- hw/ppc/pnv_lpc.c | 2 +- hw/ppc/pnv_occ.c | 2 +- hw/ppc/pnv_pnor.c | 2 +- hw/ppc/pnv_psi.c | 2 +- hw/ppc/ppc440_uc.c | 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/rs6000_mc.c | 2 +- hw/ppc/spapr_cpu_core.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_rng.c | 2 +- hw/ppc/spapr_tpm_proxy.c | 2 +- hw/rdma/vmw/pvrdma_main.c | 2 +- hw/riscv/riscv_hart.c | 2 +- hw/riscv/sifive_clint.c | 2 +- hw/riscv/sifive_plic.c | 2 +- hw/riscv/sifive_u_otp.c | 2 +- hw/rtc/m48t59-isa.c | 2 +- hw/rtc/m48t59.c | 2 +- hw/rtc/mc146818rtc.c | 2 +- hw/rtc/pl031.c | 2 +- hw/s390x/3270-ccw.c | 2 +- hw/s390x/ccw-device.c | 2 +- hw/s390x/css-bridge.c | 2 +- hw/s390x/ipl.c | 2 +- hw/s390x/s390-pci-bus.c | 2 +- hw/s390x/vhost-vsock-ccw.c | 2 +- hw/s390x/virtio-ccw-9p.c | 2 +- hw/s390x/virtio-ccw-balloon.c | 2 +- hw/s390x/virtio-ccw-blk.c | 2 +- hw/s390x/virtio-ccw-crypto.c | 2 +- hw/s390x/virtio-ccw-gpu.c | 2 +- hw/s390x/virtio-ccw-input.c | 2 +- hw/s390x/virtio-ccw-net.c | 2 +- hw/s390x/virtio-ccw-rng.c | 2 +- hw/s390x/virtio-ccw-scsi.c | 4 ++-- hw/s390x/virtio-ccw-serial.c | 2 +- hw/scsi/megasas.c | 2 +- hw/scsi/mptsas.c | 2 +- hw/scsi/scsi-bus.c | 2 +- hw/scsi/scsi-disk.c | 8 ++++---- hw/scsi/scsi-generic.c | 2 +- hw/scsi/spapr_vscsi.c | 2 +- hw/scsi/vhost-scsi.c | 2 +- hw/scsi/vhost-user-scsi.c | 2 +- hw/scsi/virtio-scsi.c | 2 +- hw/scsi/vmw_pvscsi.c | 2 +- hw/sd/sd.c | 2 +- hw/sd/sdhci-pci.c | 2 +- hw/sd/sdhci.c | 2 +- hw/sparc/sun4m.c | 4 ++-- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u.c | 6 +++--- hw/ssi/aspeed_smc.c | 2 +- hw/ssi/xilinx_spi.c | 2 +- hw/ssi/xilinx_spips.c | 4 ++-- hw/timer/a9gtimer.c | 2 +- hw/timer/allwinner-a10-pit.c | 2 +- hw/timer/altera_timer.c | 2 +- hw/timer/arm_mptimer.c | 2 +- hw/timer/arm_timer.c | 2 +- hw/timer/aspeed_timer.c | 2 +- hw/timer/cmsdk-apb-dualtimer.c | 2 +- hw/timer/cmsdk-apb-timer.c | 2 +- hw/timer/grlib_gptimer.c | 2 +- hw/timer/hpet.c | 2 +- hw/timer/i8254.c | 2 +- hw/timer/lm32_timer.c | 2 +- hw/timer/milkymist-sysctl.c | 2 +- hw/timer/mss-timer.c | 2 +- hw/timer/pxa2xx_timer.c | 4 ++-- hw/timer/slavio_timer.c | 2 +- hw/timer/stm32f2xx_timer.c | 2 +- hw/timer/xilinx_timer.c | 2 +- hw/tpm/tpm_crb.c | 2 +- hw/tpm/tpm_tis.c | 2 +- hw/usb/bus.c | 2 +- hw/usb/ccid-card-emulated.c | 2 +- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-audio.c | 2 +- hw/usb/dev-hid.c | 6 +++--- hw/usb/dev-hub.c | 2 +- hw/usb/dev-mtp.c | 2 +- hw/usb/dev-network.c | 2 +- hw/usb/dev-serial.c | 4 ++-- hw/usb/dev-smartcard-reader.c | 4 ++-- hw/usb/dev-storage.c | 2 +- hw/usb/dev-uas.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.c | 2 +- hw/usb/hcd-uhci.c | 4 ++-- hw/usb/hcd-xhci-nec.c | 2 +- hw/usb/hcd-xhci.c | 2 +- hw/usb/host-libusb.c | 2 +- hw/usb/redirect.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/pci.c | 4 ++-- hw/vfio/platform.c | 2 +- hw/virtio/vhost-scsi-pci.c | 2 +- hw/virtio/vhost-user-blk-pci.c | 2 +- hw/virtio/vhost-user-fs-pci.c | 2 +- hw/virtio/vhost-user-fs.c | 2 +- hw/virtio/vhost-user-scsi-pci.c | 2 +- hw/virtio/vhost-vsock-pci.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- hw/virtio/virtio-9p-pci.c | 2 +- hw/virtio/virtio-balloon-pci.c | 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio-blk-pci.c | 2 +- hw/virtio/virtio-crypto-pci.c | 2 +- hw/virtio/virtio-crypto.c | 2 +- hw/virtio/virtio-input-pci.c | 2 +- hw/virtio/virtio-mmio.c | 2 +- hw/virtio/virtio-net-pci.c | 2 +- hw/virtio/virtio-pci.c | 4 ++-- hw/virtio/virtio-pmem.c | 2 +- hw/virtio/virtio-rng.c | 2 +- hw/virtio/virtio-scsi-pci.c | 2 +- hw/virtio/virtio-serial-pci.c | 2 +- hw/virtio/virtio.c | 2 +- hw/watchdog/cmsdk-apb-watchdog.c | 2 +- hw/watchdog/wdt_aspeed.c | 2 +- hw/xen/xen-bus.c | 2 +- hw/xen/xen-legacy-backend.c | 4 ++-- hw/xen/xen_pt.c | 2 +- include/hw/qdev-core.h | 2 ++ migration/migration.c | 2 +- target/i386/cpu.c | 4 ++-- target/microblaze/cpu.c | 2 +- target/nios2/cpu.c | 2 +- target/ppc/translate_init.inc.c | 10 +++++----- target/riscv/cpu.c | 2 +- target/s390x/cpu.c | 2 +- target/sparc/cpu.c | 2 +- tests/test-qdev-global-props.c | 2 +- 397 files changed, 455 insertions(+), 448 deletions(-)
hw/9pfs/virtio-9p-device.c +1 -1
@@ -245,7 +245,7 @@ static void virtio_9p_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass); - dc->props = virtio_9p_properties; +device_class_set_props (dc, virtio_9p_properties); dc->vmsd = &vmstate_virtio_9p;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); vdc->realize = virtio_9p_device_realize;
hw/acpi/generic_event_device.c +1 -1
@@ -282,7 +282,7 @@ static void acpi_ged_class_init(ObjectClass *class, void *data)AcpiDeviceIfClass *adevc =ACPI_DEVICE_IF_CLASS (class); dc->desc ="ACPI Generic Event Device" ; - dc->props = acpi_ged_properties; +device_class_set_props (dc, acpi_ged_properties); dc->vmsd = &vmstate_acpi_ged; hc->plug = acpi_ged_device_plug_cb;
hw/acpi/piix4.c +1 -1
@@ -653,7 +653,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data) dc->reset = piix4_pm_reset; dc->desc ="PM" ; dc->vmsd = &vmstate_acpi; - dc->props = piix4_pm_properties; +device_class_set_props (dc, piix4_pm_properties);/* * Reason: part of PIIX4 southbridge, needs to be wired up, * e.g. by mips_malta_init()
hw/acpi/vmgenid.c +1 -1
@@ -226,7 +226,7 @@ static void vmgenid_device_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_vmgenid; dc->realize = vmgenid_realize; - dc->props = vmgenid_device_properties; +device_class_set_props (dc, vmgenid_device_properties); dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/arm/armsse.c +1 -1
@@ -1283,7 +1283,7 @@ static void armsse_class_init(ObjectClass *klass, void *data) dc->realize = armsse_realize; dc->vmsd = &armsse_vmstate; - dc->props = info->props; +device_class_set_props (dc, info->props); dc->reset = armsse_reset; iic->check = armsse_idau_check; asc->info = info;
hw/arm/armv7m.c +2 -2
@@ -288,7 +288,7 @@ static void armv7m_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = armv7m_realize; - dc->props = armv7m_properties; +device_class_set_props (dc, armv7m_properties); }static const TypeInfo armv7m_info = {
@@ -367,7 +367,7 @@ static void bitband_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = bitband_realize; - dc->props = bitband_properties; +device_class_set_props (dc, bitband_properties); }static const TypeInfo bitband_info = {
hw/arm/aspeed_soc.c +1 -1
@@ -449,7 +449,7 @@ static void aspeed_soc_class_init(ObjectClass *oc, void *data) dc->realize = aspeed_soc_realize;/* Reason: Uses serial_hds and nd_table in realize() directly */ dc->user_creatable = false; - dc->props = aspeed_soc_properties; +device_class_set_props (dc, aspeed_soc_properties); }static const TypeInfo aspeed_soc_type_info = {
hw/arm/bcm2836.c +1 -1
@@ -180,7 +180,7 @@ static void bcm283x_class_init(ObjectClass *oc, void *data) bc->info = data; dc->realize = bcm2836_realize; - dc->props = bcm2836_props; +device_class_set_props (dc, bcm2836_props);/* Reason: Must be wired up in code (see raspi_init() function) */ dc->user_creatable = false; }
hw/arm/integratorcp.c +1 -1
@@ -673,7 +673,7 @@ static void core_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = core_properties; +device_class_set_props (dc, core_properties); dc->realize = integratorcm_realize; dc->vmsd = &vmstate_integratorcm; }
hw/arm/msf2-soc.c +1 -1
@@ -229,7 +229,7 @@ static void m2sxxx_soc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = m2sxxx_soc_realize; - dc->props = m2sxxx_soc_properties; +device_class_set_props (dc, m2sxxx_soc_properties); }static const TypeInfo m2sxxx_soc_info = {
hw/arm/musicpal.c +1 -1
@@ -435,7 +435,7 @@ static void mv88w8618_eth_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &mv88w8618_eth_vmsd; - dc->props = mv88w8618_eth_properties; +device_class_set_props (dc, mv88w8618_eth_properties); dc->realize = mv88w8618_eth_realize; }
hw/arm/nrf51_soc.c +1 -1
@@ -224,7 +224,7 @@ static void nrf51_soc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = nrf51_soc_realize; - dc->props = nrf51_soc_properties; +device_class_set_props (dc, nrf51_soc_properties); }static const TypeInfo nrf51_soc_info = {
hw/arm/pxa2xx.c +2 -2
@@ -1531,7 +1531,7 @@ static void pxa2xx_i2c_class_init(ObjectClass *klass, void *data) dc->desc ="PXA2xx I2C Bus Controller" ; dc->vmsd = &vmstate_pxa2xx_i2c; - dc->props = pxa2xx_i2c_properties; +device_class_set_props (dc, pxa2xx_i2c_properties); }static const TypeInfo pxa2xx_i2c_info = {
@@ -2015,7 +2015,7 @@ static void pxa2xx_fir_class_init(ObjectClass *klass, void *data) dc->realize = pxa2xx_fir_realize; dc->vmsd = &pxa2xx_fir_vmsd; - dc->props = pxa2xx_fir_properties; +device_class_set_props (dc, pxa2xx_fir_properties); dc->reset = pxa2xx_fir_reset; }
hw/arm/pxa2xx_gpio.c +1 -1
@@ -347,7 +347,7 @@ static void pxa2xx_gpio_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="PXA2xx GPIO controller" ; - dc->props = pxa2xx_gpio_properties; +device_class_set_props (dc, pxa2xx_gpio_properties); dc->vmsd = &vmstate_pxa2xx_gpio_regs; dc->realize = pxa2xx_gpio_realize; }
hw/arm/smmu-common.c +1 -1
@@ -461,7 +461,7 @@ static void smmu_base_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);SMMUBaseClass *sbc =ARM_SMMU_CLASS (klass); - dc->props = smmu_dev_properties; +device_class_set_props (dc, smmu_dev_properties);device_class_set_parent_realize (dc, smmu_base_realize, &sbc->parent_realize); dc->reset = smmu_base_reset;
hw/arm/spitz.c +1 -1
@@ -1083,7 +1083,7 @@ static void sl_nand_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_sl_nand_info; - dc->props = sl_nand_properties; +device_class_set_props (dc, sl_nand_properties); dc->realize = sl_nand_realize;/* Reason: init() method uses drive_get() */ dc->user_creatable = false;
hw/arm/stm32f205_soc.c +1 -1
@@ -207,7 +207,7 @@ static void stm32f205_soc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = stm32f205_soc_realize; - dc->props = stm32f205_soc_properties; +device_class_set_props (dc, stm32f205_soc_properties); }static const TypeInfo stm32f205_soc_info = {
hw/arm/strongarm.c +1 -1
@@ -1327,7 +1327,7 @@ static void strongarm_uart_class_init(ObjectClass *klass, void *data) dc->desc ="StrongARM UART controller" ; dc->reset = strongarm_uart_reset; dc->vmsd = &vmstate_strongarm_uart_regs; - dc->props = strongarm_uart_properties; +device_class_set_props (dc, strongarm_uart_properties); dc->realize = strongarm_uart_realize; }
hw/arm/xlnx-versal.c +1 -1
@@ -305,7 +305,7 @@ static void versal_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = versal_realize; - dc->props = versal_properties; +device_class_set_props (dc, versal_properties);/* No VMSD since we haven't got any top-level SoC state to save. */ }
hw/arm/xlnx-zynqmp.c +1 -1
@@ -657,7 +657,7 @@ static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->props = xlnx_zynqmp_props; +device_class_set_props (dc, xlnx_zynqmp_props); dc->realize = xlnx_zynqmp_realize;/* Reason: Uses serial_hds in realize function, thus can't be used twice */ dc->user_creatable = false;
hw/audio/ac97.c +1 -1
@@ -1420,7 +1420,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc ="Intel 82801AA AC97 Audio" ; dc->vmsd = &vmstate_ac97; - dc->props = ac97_properties; +device_class_set_props (dc, ac97_properties); dc->reset = ac97_on_reset; }
hw/audio/adlib.c +1 -1
@@ -312,7 +312,7 @@ static void adlib_class_initfn (ObjectClass *klass, void *data) dc->realize = adlib_realizefn;set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc =ADLIB_DESC ; - dc->props = adlib_properties; +device_class_set_props (dc, adlib_properties); }static const TypeInfo adlib_info = {
hw/audio/cs4231.c +1 -1
@@ -168,7 +168,7 @@ static void cs4231_class_init(ObjectClass *klass, void *data) dc->reset = cs_reset; dc->vmsd = &vmstate_cs4231; - dc->props = cs4231_properties; +device_class_set_props (dc, cs4231_properties); }static const TypeInfo cs4231_info = {
hw/audio/cs4231a.c +1 -1
@@ -706,7 +706,7 @@ static void cs4231a_class_initfn (ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc ="Crystal Semiconductor CS4231A" ; dc->vmsd = &vmstate_cs4231a; - dc->props = cs4231a_properties; +device_class_set_props (dc, cs4231a_properties); }static const TypeInfo cs4231a_info = {
hw/audio/es1370.c +1 -1
@@ -908,7 +908,7 @@ static void es1370_class_init (ObjectClass *klass, void *data) dc->desc ="ENSONIQ AudioPCI ES1370" ; dc->vmsd = &vmstate_es1370; dc->reset = es1370_on_reset; - dc->props = es1370_properties; +device_class_set_props (dc, es1370_properties); }static const TypeInfo es1370_info = {
hw/audio/gus.c +1 -1
@@ -315,7 +315,7 @@ static void gus_class_initfn (ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc ="Gravis Ultrasound GF1" ; dc->vmsd = &vmstate_gus; - dc->props = gus_properties; +device_class_set_props (dc, gus_properties); }static const TypeInfo gus_info = {
hw/audio/hda-codec.c +1 -1
@@ -892,7 +892,7 @@ static void hda_audio_base_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->reset = hda_audio_reset; dc->vmsd = &vmstate_hda_audio; - dc->props = hda_audio_properties; +device_class_set_props (dc, hda_audio_properties); }static const TypeInfo hda_audio_info = {
hw/audio/intel-hda.c +2 -2
@@ -1233,7 +1233,7 @@ static void intel_hda_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_MULTIMEDIA_HD_AUDIO ; dc->reset = intel_hda_reset; dc->vmsd = &vmstate_intel_hda; - dc->props = intel_hda_properties; +device_class_set_props (dc, intel_hda_properties); }static void intel_hda_class_init_ich6 (ObjectClass *klass,void *data)
@@ -1289,7 +1289,7 @@ static void hda_codec_device_class_init(ObjectClass *klass, void *data) k->unrealize = hda_codec_dev_unrealize;set_bit (DEVICE_CATEGORY_SOUND , k->categories); k->bus_type =TYPE_HDA_BUS ; - k->props = hda_props; +device_class_set_props (k, hda_props); }static const TypeInfo hda_codec_device_type_info = {
hw/audio/milkymist-ac97.c +1 -1
@@ -342,7 +342,7 @@ static void milkymist_ac97_class_init(ObjectClass *klass, void *data) dc->realize = milkymist_ac97_realize; dc->reset = milkymist_ac97_reset; dc->vmsd = &vmstate_milkymist_ac97; - dc->props = milkymist_ac97_properties; +device_class_set_props (dc, milkymist_ac97_properties); }static const TypeInfo milkymist_ac97_info = {
hw/audio/pcspk.c +1 -1
@@ -222,7 +222,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data) dc->realize = pcspk_realizefn;set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->vmsd = &vmstate_spk; - dc->props = pcspk_properties; +device_class_set_props (dc, pcspk_properties);/* Reason: realize sets global pcspk_state */ /* Reason: pit object link */ dc->user_creatable = false;
hw/audio/pl041.c +1 -1
@@ -640,7 +640,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->reset = pl041_device_reset; dc->vmsd = &vmstate_pl041; - dc->props = pl041_device_properties; +device_class_set_props (dc, pl041_device_properties); }static const TypeInfo pl041_device_info = {
hw/audio/sb16.c +1 -1
@@ -1439,7 +1439,7 @@ static void sb16_class_initfn (ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_SOUND , dc->categories); dc->desc ="Creative Sound Blaster 16" ; dc->vmsd = &vmstate_sb16; - dc->props = sb16_properties; +device_class_set_props (dc, sb16_properties); }static const TypeInfo sb16_info = {
hw/audio/wm8750.c +1 -1
@@ -717,7 +717,7 @@ static void wm8750_class_init(ObjectClass *klass, void *data) sc->recv = wm8750_rx; sc->send = wm8750_tx; dc->vmsd = &vmstate_wm8750; - dc->props = wm8750_properties; +device_class_set_props (dc, wm8750_properties); }static const TypeInfo wm8750_info = {
hw/block/fdc.c +4 -4
@@ -606,7 +606,7 @@ static void floppy_drive_class_init(ObjectClass *klass, void *data) k->realize = floppy_drive_realize;set_bit (DEVICE_CATEGORY_STORAGE , k->categories); k->bus_type =TYPE_FLOPPY_BUS ; - k->props = floppy_drive_properties; +device_class_set_props (k, floppy_drive_properties); k->desc ="virtual floppy drive" ; }
@@ -2827,7 +2827,7 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data) dc->fw_name ="fdc" ; dc->reset = fdctrl_external_reset_isa; dc->vmsd = &vmstate_isa_fdc; - dc->props = isa_fdc_properties; +device_class_set_props (dc, isa_fdc_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
@@ -2880,7 +2880,7 @@ static void sysbus_fdc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = sysbus_fdc_properties; +device_class_set_props (dc, sysbus_fdc_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
@@ -2906,7 +2906,7 @@ static void sun4m_fdc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = sun4m_fdc_properties; +device_class_set_props (dc, sun4m_fdc_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/block/m25p80.c +1 -1
@@ -1391,7 +1391,7 @@ static void m25p80_class_init(ObjectClass *klass, void *data) k->set_cs = m25p80_cs; k->cs_polarity =SSI_CS_LOW ; dc->vmsd = &vmstate_m25p80; - dc->props = m25p80_properties; +device_class_set_props (dc, m25p80_properties); dc->reset = m25p80_reset; mc->pi = data; }
hw/block/nand.c +1 -1
@@ -448,7 +448,7 @@ static void nand_class_init(ObjectClass *klass, void *data) dc->realize = nand_realize; dc->reset = nand_reset; dc->vmsd = &vmstate_nand; - dc->props = nand_properties; +device_class_set_props (dc, nand_properties); }static const TypeInfo nand_info = {
hw/block/nvme.c +1 -1
@@ -1475,7 +1475,7 @@ static void nvme_class_init(ObjectClass *oc, void *data)set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); dc->desc ="Non-Volatile Memory Express" ; - dc->props = nvme_props; +device_class_set_props (dc, nvme_props); dc->vmsd = &nvme_vmstate; }
hw/block/onenand.c +1 -1
@@ -845,7 +845,7 @@ static void onenand_class_init(ObjectClass *klass, void *data) dc->realize = onenand_realize; dc->reset = onenand_system_reset; - dc->props = onenand_properties; +device_class_set_props (dc, onenand_properties); }static const TypeInfo onenand_info = {
hw/block/pflash_cfi01.c +1 -1
@@ -930,7 +930,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data) dc->reset = pflash_cfi01_system_reset; dc->realize = pflash_cfi01_realize; - dc->props = pflash_cfi01_properties; +device_class_set_props (dc, pflash_cfi01_properties); dc->vmsd = &vmstate_pflash;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/block/pflash_cfi02.c +1 -1
@@ -963,7 +963,7 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data) dc->realize = pflash_cfi02_realize; dc->unrealize = pflash_cfi02_unrealize; - dc->props = pflash_cfi02_properties; +device_class_set_props (dc, pflash_cfi02_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/block/swim.c +1 -1
@@ -239,7 +239,7 @@ static void swim_drive_class_init(ObjectClass *klass, void *data) k->realize = swim_drive_realize;set_bit (DEVICE_CATEGORY_STORAGE , k->categories); k->bus_type =TYPE_SWIM_BUS ; - k->props = swim_drive_properties; +device_class_set_props (k, swim_drive_properties); k->desc ="virtual SWIM drive" ; }
hw/block/vhost-user-blk.c +1 -1
@@ -511,7 +511,7 @@ static void vhost_user_blk_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass); - dc->props = vhost_user_blk_properties; +device_class_set_props (dc, vhost_user_blk_properties); dc->vmsd = &vmstate_vhost_user_blk;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); vdc->realize = vhost_user_blk_device_realize;
hw/block/virtio-blk.c +1 -1
@@ -1294,7 +1294,7 @@ static void virtio_blk_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass); - dc->props = virtio_blk_properties; +device_class_set_props (dc, virtio_blk_properties); dc->vmsd = &vmstate_virtio_blk;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); vdc->realize = virtio_blk_device_realize;
hw/block/xen-block.c +1 -1
@@ -554,7 +554,7 @@ static void xen_block_class_init(ObjectClass *class, void *data) xendev_class->frontend_changed = xen_block_frontend_changed; xendev_class->unrealize = xen_block_unrealize; - dev_class->props = xen_block_props; +device_class_set_props (dev_class, xen_block_props); }static const TypeInfo xen_block_type_info = {
hw/char/bcm2835_aux.c +1 -1
@@ -299,7 +299,7 @@ static void bcm2835_aux_class_init(ObjectClass *oc, void *data) dc->realize = bcm2835_aux_realize; dc->vmsd = &vmstate_bcm2835_aux;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); - dc->props = bcm2835_aux_props; +device_class_set_props (dc, bcm2835_aux_props); }static const TypeInfo bcm2835_aux_info = {
hw/char/cadence_uart.c +1 -1
@@ -550,7 +550,7 @@ static void cadence_uart_class_init(ObjectClass *klass, void *data) dc->realize = cadence_uart_realize; dc->vmsd = &vmstate_cadence_uart; dc->reset = cadence_uart_reset; - dc->props = cadence_uart_properties; +device_class_set_props (dc, cadence_uart_properties); }static const TypeInfo cadence_uart_info = {
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; - dc->props = cmsdk_apb_uart_properties; +device_class_set_props (dc, cmsdk_apb_uart_properties); }static const TypeInfo cmsdk_apb_uart_info = {
hw/char/debugcon.c +1 -1
@@ -125,7 +125,7 @@ static void debugcon_isa_class_initfn(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = debugcon_isa_realizefn; - dc->props = debugcon_isa_properties; +device_class_set_props (dc, debugcon_isa_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/char/digic-uart.c +1 -1
@@ -183,7 +183,7 @@ static void digic_uart_class_init(ObjectClass *klass, void *data) dc->realize = digic_uart_realize; dc->reset = digic_uart_reset; dc->vmsd = &vmstate_digic_uart; - dc->props = digic_uart_properties; +device_class_set_props (dc, digic_uart_properties); }static const TypeInfo digic_uart_info = {
hw/char/escc.c +1 -1
@@ -865,7 +865,7 @@ static void escc_class_init(ObjectClass *klass, void *data) dc->reset = escc_reset; dc->realize = escc_realize; dc->vmsd = &vmstate_escc; - dc->props = escc_properties; +device_class_set_props (dc, escc_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/etraxfs_ser.c +1 -1
@@ -244,7 +244,7 @@ static void etraxfs_ser_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = etraxfs_ser_reset; - dc->props = etraxfs_ser_properties; +device_class_set_props (dc, etraxfs_ser_properties); dc->realize = etraxfs_ser_realize; }
hw/char/exynos4210_uart.c +1 -1
@@ -645,7 +645,7 @@ static void exynos4210_uart_class_init(ObjectClass *klass, void *data) dc->realize = exynos4210_uart_realize; dc->reset = exynos4210_uart_reset; - dc->props = exynos4210_uart_properties; +device_class_set_props (dc, exynos4210_uart_properties); dc->vmsd = &vmstate_exynos4210_uart; }
hw/char/grlib_apbuart.c +1 -1
@@ -285,7 +285,7 @@ static void grlib_apbuart_class_init(ObjectClass *klass, void *data) dc->realize = grlib_apbuart_realize; dc->reset = grlib_apbuart_reset; - dc->props = grlib_apbuart_properties; +device_class_set_props (dc, grlib_apbuart_properties); }static const TypeInfo grlib_apbuart_info = {
hw/char/imx_serial.c +1 -1
@@ -372,7 +372,7 @@ static void imx_serial_class_init(ObjectClass *klass, void *data) dc->reset = imx_serial_reset_at_boot;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); dc->desc ="i.MX series UART" ; - dc->props = imx_serial_properties; +device_class_set_props (dc, imx_serial_properties); }static const TypeInfo imx_serial_info = {
hw/char/ipoctal232.c +1 -1
@@ -588,7 +588,7 @@ static void ipoctal_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_INPUT , dc->categories); dc->desc ="GE IP-Octal 232 8-channel RS-232 IndustryPack" ; - dc->props = ipoctal_properties; +device_class_set_props (dc, ipoctal_properties); dc->vmsd = &vmstate_ipoctal; }
hw/char/lm32_juart.c +1 -1
@@ -146,7 +146,7 @@ static void lm32_juart_class_init(ObjectClass *klass, void *data) dc->reset = juart_reset; dc->vmsd = &vmstate_lm32_juart; - dc->props = lm32_juart_properties; +device_class_set_props (dc, lm32_juart_properties); dc->realize = lm32_juart_realize; }
hw/char/lm32_uart.c +1 -1
@@ -293,7 +293,7 @@ static void lm32_uart_class_init(ObjectClass *klass, void *data) dc->reset = uart_reset; dc->vmsd = &vmstate_lm32_uart; - dc->props = lm32_uart_properties; +device_class_set_props (dc, lm32_uart_properties); dc->realize = lm32_uart_realize; }
hw/char/mcf_uart.c +1 -1
@@ -320,7 +320,7 @@ static void mcf_uart_class_init(ObjectClass *oc, void *data) dc->realize = mcf_uart_realize; dc->reset = mcf_uart_reset; - dc->props = mcf_uart_properties; +device_class_set_props (dc, mcf_uart_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/milkymist-uart.c +1 -1
@@ -239,7 +239,7 @@ static void milkymist_uart_class_init(ObjectClass *klass, void *data) dc->realize = milkymist_uart_realize; dc->reset = milkymist_uart_reset; dc->vmsd = &vmstate_milkymist_uart; - dc->props = milkymist_uart_properties; +device_class_set_props (dc, milkymist_uart_properties); }static const TypeInfo milkymist_uart_info = {
hw/char/nrf51_uart.c +1 -1
@@ -314,7 +314,7 @@ static void nrf51_uart_class_init(ObjectClass *klass, void *data) dc->reset = nrf51_uart_reset; dc->realize = nrf51_uart_realize; - dc->props = nrf51_uart_properties; +device_class_set_props (dc, nrf51_uart_properties); dc->vmsd = &nrf51_uart_vmstate; }
hw/char/parallel.c +1 -1
@@ -627,7 +627,7 @@ static void parallel_isa_class_initfn(ObjectClass *klass, void *data) dc->realize = parallel_isa_realizefn; dc->vmsd = &vmstate_parallel_isa; - dc->props = parallel_isa_properties; +device_class_set_props (dc, parallel_isa_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/pl011.c +1 -1
@@ -356,7 +356,7 @@ static void pl011_class_init(ObjectClass *oc, void *data) dc->realize = pl011_realize; dc->vmsd = &vmstate_pl011; - dc->props = pl011_properties; +device_class_set_props (dc, pl011_properties); }static const TypeInfo pl011_arm_info = {
hw/char/sclpconsole-lm.c +1 -1
@@ -342,7 +342,7 @@ static void console_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);SCLPEventClass *ec =SCLP_EVENT_CLASS (klass); - dc->props = console_properties; +device_class_set_props (dc, console_properties); dc->reset = console_reset; dc->vmsd = &vmstate_sclplmconsole; ec->init = console_init;
hw/char/sclpconsole.c +1 -1
@@ -258,7 +258,7 @@ static void console_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);SCLPEventClass *ec =SCLP_EVENT_CLASS (klass); - dc->props = console_properties; +device_class_set_props (dc, console_properties); dc->reset = console_reset; dc->vmsd = &vmstate_sclpconsole; ec->init = console_init;
hw/char/serial-isa.c +1 -1
@@ -106,7 +106,7 @@ static void serial_isa_class_initfn(ObjectClass *klass, void *data) dc->realize = serial_isa_realizefn; dc->vmsd = &vmstate_isa_serial; - dc->props = serial_isa_properties; +device_class_set_props (dc, serial_isa_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/serial-pci-multi.c +2 -2
@@ -161,7 +161,7 @@ static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data) pc->revision =1 ; pc->class_id =PCI_CLASS_COMMUNICATION_SERIAL ; dc->vmsd = &vmstate_pci_multi_serial; - dc->props = multi_2x_serial_pci_properties; +device_class_set_props (dc, multi_2x_serial_pci_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
@@ -176,7 +176,7 @@ static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data) pc->revision =1 ; pc->class_id =PCI_CLASS_COMMUNICATION_SERIAL ; dc->vmsd = &vmstate_pci_multi_serial; - dc->props = multi_4x_serial_pci_properties; +device_class_set_props (dc, multi_4x_serial_pci_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/serial-pci.c +1 -1
@@ -100,7 +100,7 @@ static void serial_pci_class_initfn(ObjectClass *klass, void *data) pc->revision =1 ; pc->class_id =PCI_CLASS_COMMUNICATION_SERIAL ; dc->vmsd = &vmstate_pci_serial; - dc->props = serial_pci_properties; +device_class_set_props (dc, serial_pci_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/char/serial.c +2 -2
@@ -1044,7 +1044,7 @@ static void serial_class_init(ObjectClass *klass, void* data) dc->realize = serial_realize; dc->unrealize = serial_unrealize; dc->vmsd = &vmstate_serial; - dc->props = serial_properties; +device_class_set_props (dc, serial_properties); }static const TypeInfo serial_info = {
@@ -1159,7 +1159,7 @@ static void serial_mm_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->props = serial_mm_properties; +device_class_set_props (dc, serial_mm_properties); dc->realize = serial_mm_realize; }
hw/char/spapr_vty.c +1 -1
@@ -193,7 +193,7 @@ static void spapr_vty_class_init(ObjectClass *klass, void *data) k->dt_type ="serial" ; k->dt_compatible ="hvterm1" ;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); - dc->props = spapr_vty_properties; +device_class_set_props (dc, spapr_vty_properties); dc->vmsd = &vmstate_spapr_vty; }
hw/char/stm32f2xx_usart.c +1 -1
@@ -222,7 +222,7 @@ static void stm32f2xx_usart_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = stm32f2xx_usart_reset; - dc->props = stm32f2xx_usart_properties; +device_class_set_props (dc, stm32f2xx_usart_properties); dc->realize = stm32f2xx_usart_realize; }
hw/char/terminal3270.c +1 -1
@@ -288,7 +288,7 @@ static void terminal_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);EmulatedCcw3270Class *ck =EMULATED_CCW_3270_CLASS (klass); - dc->props = terminal_properties; +device_class_set_props (dc, terminal_properties); dc->vmsd = &terminal3270_vmstate; ck->init = terminal_init; ck->read_payload_3270 = read_payload_3270;
hw/char/virtio-console.c +1 -1
@@ -287,7 +287,7 @@ static void virtserialport_class_init(ObjectClass *klass, void *data) k->set_guest_connected = set_guest_connected; k->enable_backend = virtconsole_enable_backend; k->guest_writable = guest_writable; - dc->props = virtserialport_properties; +device_class_set_props (dc, virtserialport_properties); }static const TypeInfo virtserialport_info = {
hw/char/virtio-serial-bus.c +2 -2
@@ -1110,7 +1110,7 @@ static void virtio_serial_port_class_init(ObjectClass *klass, void *data) k->bus_type =TYPE_VIRTIO_SERIAL_BUS ; k->realize = virtser_port_device_realize; k->unrealize = virtser_port_device_unrealize; - k->props = virtser_props; +device_class_set_props (k, virtser_props); }static const TypeInfo virtio_serial_port_type_info = {
@@ -1179,7 +1179,7 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)QLIST_INIT (&vserdevices.devices); - dc->props = virtio_serial_properties; +device_class_set_props (dc, virtio_serial_properties); dc->vmsd = &vmstate_virtio_console;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); vdc->realize = virtio_serial_device_realize;
hw/char/xilinx_uartlite.c +1 -1
@@ -236,7 +236,7 @@ static void xilinx_uartlite_class_init(ObjectClass *klass, void *data) dc->reset = xilinx_uartlite_reset; dc->realize = xilinx_uartlite_realize; - dc->props = xilinx_uartlite_properties; +device_class_set_props (dc, xilinx_uartlite_properties); }static const TypeInfo xilinx_uartlite_info = {
hw/core/cpu.c +1 -1
@@ -440,7 +440,7 @@ static void cpu_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_CPU , dc->categories); dc->realize = cpu_common_realizefn; dc->unrealize = cpu_common_unrealizefn; - dc->props = cpu_common_props; +device_class_set_props (dc, cpu_common_props);/* * Reason: CPUs still need special care by board code: wiring up * IRQs, adding reset handlers, halting non-first CPUs, ...
hw/core/generic-loader.c +1 -1
@@ -201,7 +201,7 @@ static void generic_loader_class_init(ObjectClass *klass, void *data)*/ dc->realize = generic_loader_realize; dc->unrealize = generic_loader_unrealize; - dc->props = generic_loader_props; +device_class_set_props (dc, generic_loader_props); dc->desc ="Generic Loader" ;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/core/or-irq.c +1 -1
@@ -125,7 +125,7 @@ static void or_irq_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = or_irq_reset; - dc->props = or_irq_properties; +device_class_set_props (dc, or_irq_properties); dc->realize = or_irq_realize; dc->vmsd = &vmstate_or_irq;
hw/core/platform-bus.c +1 -1
@@ -211,7 +211,7 @@ static void platform_bus_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = platform_bus_realize; - dc->props = platform_bus_properties; +device_class_set_props (dc, platform_bus_properties); }static const TypeInfo platform_bus_info = {
hw/core/qdev.c +5 -0
@@ -1061,6 +1061,11 @@ static void device_class_init(ObjectClass *class, void *data) vc->get_id = device_vmstate_if_get_id; } +void device_class_set_props (DeviceClass *dc,Property *props) +{ + dc->props = props; +} +void device_class_set_parent_reset (DeviceClass *dc,DeviceReset dev_reset,DeviceReset *parent_reset)
hw/core/split-irq.c +1 -1
@@ -69,7 +69,7 @@ static void split_irq_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);/* No state to reset or migrate */ - dc->props = split_irq_properties; +device_class_set_props (dc, split_irq_properties); dc->realize = split_irq_realize;/* Reason: Needs to be wired up to work */
hw/cpu/a15mpcore.c +1 -1
@@ -164,7 +164,7 @@ static void a15mp_priv_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = a15mp_priv_realize; - dc->props = a15mp_priv_properties; +device_class_set_props (dc, a15mp_priv_properties);/* We currently have no savable state */ }
hw/cpu/a9mpcore.c +1 -1
@@ -175,7 +175,7 @@ static void a9mp_priv_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = a9mp_priv_realize; - dc->props = a9mp_priv_properties; +device_class_set_props (dc, a9mp_priv_properties); }static const TypeInfo a9mp_priv_info = {
hw/cpu/arm11mpcore.c +1 -1
@@ -156,7 +156,7 @@ static void mpcore_priv_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = mpcore_priv_realize; - dc->props = mpcore_priv_properties; +device_class_set_props (dc, mpcore_priv_properties); }static const TypeInfo mpcore_priv_info = {
hw/cpu/cluster.c +1 -1
@@ -78,7 +78,7 @@ static void cpu_cluster_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = cpu_cluster_properties; +device_class_set_props (dc, cpu_cluster_properties); dc->realize = cpu_cluster_realize;/* This is not directly for users, CPU children must be attached by code */
hw/cpu/realview_mpcore.c +1 -1
@@ -125,7 +125,7 @@ static void mpcore_rirq_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = realview_mpcore_realize; - dc->props = mpcore_rirq_properties; +device_class_set_props (dc, mpcore_rirq_properties); }static const TypeInfo mpcore_rirq_info = {
hw/display/ati.c +1 -1
@@ -980,7 +980,7 @@ static void ati_vga_class_init(ObjectClass *klass, void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); dc->reset = ati_vga_reset; - dc->props = ati_vga_properties; +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
@@ -451,7 +451,7 @@ static void bcm2835_fb_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = bcm2835_fb_props; +device_class_set_props (dc, bcm2835_fb_props); dc->realize = bcm2835_fb_realize; dc->reset = bcm2835_fb_reset; dc->vmsd = &vmstate_bcm2835_fb;
hw/display/bochs-display.c +1 -1
@@ -364,7 +364,7 @@ static void bochs_display_class_init(ObjectClass *klass, void *data) k->romfile ="vgabios-bochs-display.bin" ; k->exit = bochs_display_exit; dc->vmsd = &vmstate_bochs_display; - dc->props = bochs_display_properties; +device_class_set_props (dc, bochs_display_properties);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); }
hw/display/cg3.c +1 -1
@@ -382,7 +382,7 @@ static void cg3_class_init(ObjectClass *klass, void *data) dc->realize = cg3_realizefn; dc->reset = cg3_reset; dc->vmsd = &vmstate_cg3; - dc->props = cg3_properties; +device_class_set_props (dc, cg3_properties); }static const TypeInfo cg3_info = {
hw/display/cirrus_vga.c +1 -1
@@ -3031,7 +3031,7 @@ static void cirrus_vga_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->desc ="Cirrus CLGD 54xx VGA" ; dc->vmsd = &vmstate_pci_cirrus_vga; - dc->props = pci_vga_cirrus_properties; +device_class_set_props (dc, pci_vga_cirrus_properties); dc->hotpluggable = false; }
hw/display/cirrus_vga_isa.c +1 -1
@@ -80,7 +80,7 @@ static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_cirrus_vga; dc->realize = isa_cirrus_vga_realizefn; - dc->props = isa_cirrus_vga_properties; +device_class_set_props (dc, isa_cirrus_vga_properties);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); }
hw/display/g364fb.c +1 -1
@@ -526,7 +526,7 @@ static void g364fb_sysbus_class_init(ObjectClass *klass, void *data) dc->desc ="G364 framebuffer" ; dc->reset = g364fb_sysbus_reset; dc->vmsd = &vmstate_g364fb; - dc->props = g364fb_sysbus_properties; +device_class_set_props (dc, g364fb_sysbus_properties); }static const TypeInfo g364fb_sysbus_info = {
hw/display/i2c-ddc.c +1 -1
@@ -107,7 +107,7 @@ static void i2c_ddc_class_init(ObjectClass *oc, void *data) dc->reset = i2c_ddc_reset; dc->vmsd = &vmstate_i2c_ddc; - dc->props = i2c_ddc_properties; +device_class_set_props (dc, i2c_ddc_properties); isc->event = i2c_ddc_event; isc->recv = i2c_ddc_rx; isc->send = i2c_ddc_tx;
hw/display/macfb.c +2 -2
@@ -437,7 +437,7 @@ static void macfb_sysbus_class_init(ObjectClass *klass, void *data) dc->desc ="SysBus Macintosh framebuffer" ; dc->reset = macfb_sysbus_reset; dc->vmsd = &vmstate_macfb; - dc->props = macfb_sysbus_properties; +device_class_set_props (dc, macfb_sysbus_properties); }static void macfb_nubus_class_init (ObjectClass *klass,void *data)
@@ -450,7 +450,7 @@ static void macfb_nubus_class_init(ObjectClass *klass, void *data) dc->desc ="Nubus Macintosh framebuffer" ; dc->reset = macfb_nubus_reset; dc->vmsd = &vmstate_macfb; - dc->props = macfb_nubus_properties; +device_class_set_props (dc, macfb_nubus_properties); }static TypeInfo macfb_sysbus_info = {
hw/display/milkymist-vgafb.c +1 -1
@@ -341,7 +341,7 @@ static void milkymist_vgafb_class_init(ObjectClass *klass, void *data) dc->reset = milkymist_vgafb_reset; dc->vmsd = &vmstate_milkymist_vgafb; - dc->props = milkymist_vgafb_properties; +device_class_set_props (dc, milkymist_vgafb_properties); dc->realize = milkymist_vgafb_realize; }
hw/display/qxl.c +1 -1
@@ -2478,7 +2478,7 @@ static void qxl_pci_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->reset = qxl_reset_handler; dc->vmsd = &qxl_vmstate; - dc->props = qxl_properties; +device_class_set_props (dc, qxl_properties); }static const TypeInfo qxl_pci_type_info = {
hw/display/ramfb-standalone.c +1 -1
@@ -52,7 +52,7 @@ static void ramfb_class_initfn(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->realize = ramfb_realizefn; - dc->props = ramfb_properties; +device_class_set_props (dc, ramfb_properties); dc->desc ="ram framebuffer standalone device" ; dc->user_creatable = true; }
hw/display/sm501.c +2 -2
@@ -1995,7 +1995,7 @@ static void sm501_sysbus_class_init(ObjectClass *klass, void *data) dc->realize = sm501_realize_sysbus;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->desc ="SM501 Multimedia Companion" ; - dc->props = sm501_sysbus_properties; +device_class_set_props (dc, sm501_sysbus_properties); dc->reset = sm501_reset_sysbus; dc->vmsd = &vmstate_sm501_sysbus; }
@@ -2085,7 +2085,7 @@ static void sm501_pci_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_DISPLAY_OTHER ;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); dc->desc ="SM501 Display Controller" ; - dc->props = sm501_pci_properties; +device_class_set_props (dc, sm501_pci_properties); dc->reset = sm501_reset_pci; dc->hotpluggable = false; dc->vmsd = &vmstate_sm501_pci;
hw/display/tcx.c +1 -1
@@ -893,7 +893,7 @@ static void tcx_class_init(ObjectClass *klass, void *data) dc->realize = tcx_realizefn; dc->reset = tcx_reset; dc->vmsd = &vmstate_tcx; - dc->props = tcx_properties; +device_class_set_props (dc, tcx_properties); }static const TypeInfo tcx_info = {
hw/display/vga-isa.c +1 -1
@@ -95,7 +95,7 @@ static void vga_isa_class_initfn(ObjectClass *klass, void *data) dc->realize = vga_isa_realizefn; dc->reset = vga_isa_reset; dc->vmsd = &vmstate_vga_common; - dc->props = vga_isa_properties; +device_class_set_props (dc, vga_isa_properties);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); }
hw/display/vga-pci.c +2 -2
@@ -383,7 +383,7 @@ static void vga_class_init(ObjectClass *klass, void *data) k->realize = pci_std_vga_realize; k->romfile ="vgabios-stdvga.bin" ; k->class_id =PCI_CLASS_DISPLAY_VGA ; - dc->props = vga_pci_properties; +device_class_set_props (dc, vga_pci_properties); dc->hotpluggable = false; }
@@ -395,7 +395,7 @@ static void secondary_class_init(ObjectClass *klass, void *data) k->realize = pci_secondary_vga_realize; k->exit = pci_secondary_vga_exit; k->class_id =PCI_CLASS_DISPLAY_OTHER ; - dc->props = secondary_pci_properties; +device_class_set_props (dc, secondary_pci_properties); dc->reset = pci_secondary_vga_reset; }
hw/display/vhost-user-gpu.c +1 -1
@@ -588,7 +588,7 @@ vhost_user_gpu_class_init(ObjectClass *klass, void *data) vdc->get_config = vhost_user_gpu_get_config; vdc->set_config = vhost_user_gpu_set_config; - dc->props = vhost_user_gpu_properties; +device_class_set_props (dc, vhost_user_gpu_properties); }static const TypeInfo vhost_user_gpu_info = {
hw/display/virtio-gpu-pci.c +1 -1
@@ -56,7 +56,7 @@ static void virtio_gpu_pci_base_class_init(ObjectClass *klass, void *data)PCIDeviceClass *pcidev_k =PCI_DEVICE_CLASS (klass);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); - dc->props = virtio_gpu_pci_base_properties; +device_class_set_props (dc, virtio_gpu_pci_base_properties); dc->hotpluggable = false; k->realize = virtio_gpu_pci_base_realize; pcidev_k->class_id =PCI_CLASS_DISPLAY_OTHER ;
hw/display/virtio-gpu.c +1 -1
@@ -1254,7 +1254,7 @@ static void virtio_gpu_class_init(ObjectClass *klass, void *data) vdc->set_config = virtio_gpu_set_config; dc->vmsd = &vmstate_virtio_gpu; - dc->props = virtio_gpu_properties; +device_class_set_props (dc, virtio_gpu_properties); }static const TypeInfo virtio_gpu_info = {
hw/display/virtio-vga.c +1 -1
@@ -184,7 +184,7 @@ static void virtio_vga_base_class_init(ObjectClass *klass, void *data)PCIDeviceClass *pcidev_k =PCI_DEVICE_CLASS (klass);set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); - dc->props = virtio_vga_base_properties; +device_class_set_props (dc, virtio_vga_base_properties); dc->vmsd = &vmstate_virtio_vga_base; dc->hotpluggable = false; device_class_set_parent_reset(dc, virtio_vga_base_reset,
hw/display/vmware_vga.c +1 -1
@@ -1336,7 +1336,7 @@ static void vmsvga_class_init(ObjectClass *klass, void *data) k->subsystem_id =SVGA_PCI_DEVICE_ID ; dc->reset = vmsvga_reset; dc->vmsd = &vmstate_vmware_vga; - dc->props = vga_vmware_properties; +device_class_set_props (dc, vga_vmware_properties); dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); }
hw/dma/i82374.c +1 -1
@@ -149,7 +149,7 @@ static void i82374_class_init(ObjectClass *klass, void *data) dc->realize = i82374_realize; dc->vmsd = &vmstate_i82374; - dc->props = i82374_properties; +device_class_set_props (dc, i82374_properties); }static const TypeInfo i82374_info = {
hw/dma/i8257.c +1 -1
@@ -595,7 +595,7 @@ static void i8257_class_init(ObjectClass *klass, void *data) dc->realize = i8257_realize; dc->reset = i8257_reset; dc->vmsd = &vmstate_i8257; - dc->props = i8257_properties; +device_class_set_props (dc, i8257_properties); idc->get_transfer_mode = i8257_dma_get_transfer_mode; idc->has_autoinitialization = i8257_dma_has_autoinitialization;
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; - dc->props = pl080_properties; +device_class_set_props (dc, pl080_properties); dc->reset = pl080_reset; }
hw/dma/pl330.c +1 -1
@@ -1656,7 +1656,7 @@ static void pl330_class_init(ObjectClass *klass, void *data) dc->realize = pl330_realize; dc->reset = pl330_reset; - dc->props = pl330_properties; +device_class_set_props (dc, pl330_properties); dc->vmsd = &vmstate_pl330; }
hw/dma/pxa2xx_dma.c +1 -1
@@ -566,7 +566,7 @@ static void pxa2xx_dma_class_init(ObjectClass *klass, void *data) dc->desc ="PXA2xx DMA controller" ; dc->vmsd = &vmstate_pxa2xx_dma; - dc->props = pxa2xx_dma_properties; +device_class_set_props (dc, pxa2xx_dma_properties); dc->realize = pxa2xx_dma_realize; }
hw/dma/xilinx_axidma.c +1 -1
@@ -599,7 +599,7 @@ static void axidma_class_init(ObjectClass *klass, void *data) dc->realize = xilinx_axidma_realize, dc->reset = xilinx_axidma_reset; - dc->props = axidma_properties; +device_class_set_props (dc, axidma_properties); }static StreamSlaveClass xilinx_axidma_data_stream_class = {
hw/dma/xlnx-zdma.c +1 -1
@@ -820,7 +820,7 @@ static void zdma_class_init(ObjectClass *klass, void *data) dc->reset = zdma_reset; dc->realize = zdma_realize; - dc->props = zdma_props; +device_class_set_props (dc, zdma_props); dc->vmsd = &vmstate_zdma; }
hw/gpio/imx_gpio.c +1 -1
@@ -335,7 +335,7 @@ static void imx_gpio_class_init(ObjectClass *klass, void *data) dc->realize = imx_gpio_realize; dc->reset = imx_gpio_reset; - dc->props = imx_gpio_properties; +device_class_set_props (dc, imx_gpio_properties); dc->vmsd = &vmstate_imx_gpio; dc->desc ="i.MX GPIO controller" ; }
hw/gpio/omap_gpio.c +2 -2
@@ -755,7 +755,7 @@ static void omap_gpio_class_init(ObjectClass *klass, void *data) dc->realize = omap_gpio_realize; dc->reset = omap_gpif_reset; - dc->props = omap_gpio_properties; +device_class_set_props (dc, omap_gpio_properties);/* Reason: pointer property "clk" */ dc->user_creatable = false; }
@@ -790,7 +790,7 @@ static void omap2_gpio_class_init(ObjectClass *klass, void *data) dc->realize = omap2_gpio_realize; dc->reset = omap2_gpif_reset; - dc->props = omap2_gpio_properties; +device_class_set_props (dc, omap2_gpio_properties);/* Reason: pointer properties "iclk", "fclk0", ..., "fclk5" */ dc->user_creatable = false; }
hw/i2c/aspeed_i2c.c +1 -1
@@ -832,7 +832,7 @@ static void aspeed_i2c_class_init(ObjectClass *klass, void *data) dc->vmsd = &aspeed_i2c_vmstate; dc->reset = aspeed_i2c_reset; - dc->props = aspeed_i2c_properties; +device_class_set_props (dc, aspeed_i2c_properties); dc->realize = aspeed_i2c_realize; dc->desc ="Aspeed I2C Controller" ; }
hw/i2c/core.c +1 -1
@@ -281,7 +281,7 @@ static void i2c_slave_class_init(ObjectClass *klass, void *data)DeviceClass *k =DEVICE_CLASS (klass);set_bit (DEVICE_CATEGORY_MISC , k->categories); k->bus_type =TYPE_I2C_BUS ; - k->props = i2c_props; +device_class_set_props (k, i2c_props); }static const TypeInfo i2c_slave_type_info = {
hw/i2c/omap_i2c.c +1 -1
@@ -520,7 +520,7 @@ static void omap_i2c_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = omap_i2c_properties; +device_class_set_props (dc, omap_i2c_properties); dc->reset = omap_i2c_reset;/* Reason: pointer properties "iclk", "fclk" */ dc->user_creatable = false;
hw/i386/intel_iommu.c +1 -1
@@ -3845,7 +3845,7 @@ static void vtd_class_init(ObjectClass *klass, void *data) dc->reset = vtd_reset; dc->vmsd = &vtd_vmstate; - dc->props = vtd_properties; +device_class_set_props (dc, vtd_properties); dc->hotpluggable = false; x86_class->realize = vtd_realize; x86_class->int_remap = vtd_int_remap;
hw/i386/kvm/clock.c +1 -1
@@ -317,7 +317,7 @@ static void kvmclock_class_init(ObjectClass *klass, void *data) dc->realize = kvmclock_realize; dc->vmsd = &kvmclock_vmsd; - dc->props = kvmclock_properties; +device_class_set_props (dc, kvmclock_properties); }static const TypeInfo kvmclock_info = {
hw/i386/kvm/i8254.c +1 -1
@@ -322,7 +322,7 @@ static void kvm_pit_class_init(ObjectClass *klass, void *data) k->set_channel_gate = kvm_pit_set_gate; k->get_channel_info = kvm_pit_get_channel_info; dc->reset = kvm_pit_reset; - dc->props = kvm_pit_properties; +device_class_set_props (dc, kvm_pit_properties); }static const TypeInfo kvm_pit_info = {
hw/i386/kvm/ioapic.c +1 -1
@@ -149,7 +149,7 @@ static void kvm_ioapic_class_init(ObjectClass *klass, void *data) k->pre_save = kvm_ioapic_get; k->post_load = kvm_ioapic_put; dc->reset = kvm_ioapic_reset; - dc->props = kvm_ioapic_properties; +device_class_set_props (dc, kvm_ioapic_properties); }static const TypeInfo kvm_ioapic_info = {
hw/i386/vmmouse.c +1 -1
@@ -286,7 +286,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data) dc->realize = vmmouse_realizefn; dc->reset = vmmouse_reset; dc->vmsd = &vmstate_vmmouse; - dc->props = vmmouse_properties; +device_class_set_props (dc, vmmouse_properties); }static const TypeInfo vmmouse_info = {
hw/i386/x86-iommu.c +1 -1
@@ -153,7 +153,7 @@ static void x86_iommu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = x86_iommu_realize; - dc->props = x86_iommu_properties; +device_class_set_props (dc, x86_iommu_properties); }bool x86_iommu_ir_supported (X86IOMMUState *s)
hw/i386/xen/xen_pvdevice.c +1 -1
@@ -131,7 +131,7 @@ static void xen_pv_class_init(ObjectClass *klass, void *data) k->realize = xen_pv_realize; k->class_id =PCI_CLASS_SYSTEM_OTHER ; dc->desc ="Xen PV Device" ; - dc->props = xen_pv_props; +device_class_set_props (dc, xen_pv_props); dc->vmsd = &vmstate_xen_pvdevice; }
hw/ide/ahci.c +1 -1
@@ -1795,7 +1795,7 @@ static void sysbus_ahci_class_init(ObjectClass *klass, void *data) dc->realize = sysbus_ahci_realize; dc->vmsd = &vmstate_sysbus_ahci; - dc->props = sysbus_ahci_properties; +device_class_set_props (dc, sysbus_ahci_properties); dc->reset = sysbus_ahci_reset;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/cmd646.c +1 -1
@@ -347,7 +347,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_STORAGE_IDE ; k->config_read = cmd646_pci_config_read; k->config_write = cmd646_pci_config_write; - dc->props = cmd646_ide_properties; +device_class_set_props (dc, cmd646_ide_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/isa.c +1 -1
@@ -117,7 +117,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; - dc->props = isa_ide_properties; +device_class_set_props (dc, isa_ide_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/macio.c +1 -1
@@ -474,7 +474,7 @@ static void macio_ide_class_init(ObjectClass *oc, void *data) dc->realize = macio_ide_realizefn; dc->reset = macio_ide_reset; - dc->props = macio_ide_properties; +device_class_set_props (dc, macio_ide_properties); dc->vmsd = &vmstate_pmac;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/ide/mmio.c +1 -1
@@ -154,7 +154,7 @@ static void mmio_ide_class_init(ObjectClass *oc, void *data) dc->realize = mmio_ide_realizefn; dc->reset = mmio_ide_reset; - dc->props = mmio_ide_properties; +device_class_set_props (dc, mmio_ide_properties); dc->vmsd = &vmstate_ide_mmio; }
hw/ide/qdev.c +4 -4
@@ -319,7 +319,7 @@ static void ide_hd_class_init(ObjectClass *klass, void *data) k->realize = ide_hd_realize; dc->fw_name ="drive" ; dc->desc ="virtual IDE disk" ; - dc->props = ide_hd_properties; +device_class_set_props (dc, ide_hd_properties); }static const TypeInfo ide_hd_info = {
@@ -342,7 +342,7 @@ static void ide_cd_class_init(ObjectClass *klass, void *data) k->realize = ide_cd_realize; dc->fw_name ="drive" ; dc->desc ="virtual IDE CD-ROM" ; - dc->props = ide_cd_properties; +device_class_set_props (dc, ide_cd_properties); }static const TypeInfo ide_cd_info = {
@@ -365,7 +365,7 @@ static void ide_drive_class_init(ObjectClass *klass, void *data) k->realize = ide_drive_realize; dc->fw_name ="drive" ; dc->desc ="virtual IDE disk or CD-ROM (legacy)" ; - dc->props = ide_drive_properties; +device_class_set_props (dc, ide_drive_properties); }static const TypeInfo ide_drive_info = {
@@ -381,7 +381,7 @@ static void ide_device_class_init(ObjectClass *klass, void *data) k->realize = ide_qdev_realize;set_bit (DEVICE_CATEGORY_STORAGE , k->categories); k->bus_type =TYPE_IDE_BUS ; - k->props = ide_props; +device_class_set_props (k, ide_props); }static const TypeInfo ide_device_type_info = {
hw/input/adb.c +1 -1
@@ -128,7 +128,7 @@ static void adb_device_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = adb_device_realizefn; - dc->props = adb_device_properties; +device_class_set_props (dc, adb_device_properties); dc->bus_type =TYPE_ADB_BUS ; }
hw/input/milkymist-softusb.c +1 -1
@@ -302,7 +302,7 @@ static void milkymist_softusb_class_init(ObjectClass *klass, void *data) dc->realize = milkymist_softusb_realize; dc->reset = milkymist_softusb_reset; dc->vmsd = &vmstate_milkymist_softusb; - dc->props = milkymist_softusb_properties; +device_class_set_props (dc, milkymist_softusb_properties); }static const TypeInfo milkymist_softusb_info = {
hw/input/virtio-input-hid.c +3 -3
@@ -222,7 +222,7 @@ static void virtio_input_hid_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);VirtIOInputClass *vic =VIRTIO_INPUT_CLASS (klass); - dc->props = virtio_input_hid_properties; +device_class_set_props (dc, virtio_input_hid_properties); vic->realize = virtio_input_hid_realize; vic->unrealize = virtio_input_hid_unrealize; vic->change_active = virtio_input_hid_change_active;
@@ -362,7 +362,7 @@ static void virtio_mouse_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = virtio_mouse_properties; +device_class_set_props (dc, virtio_mouse_properties); }static void virtio_mouse_init (Object *obj)
@@ -486,7 +486,7 @@ static void virtio_tablet_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = virtio_tablet_properties; +device_class_set_props (dc, virtio_tablet_properties); }static void virtio_tablet_init (Object *obj)
hw/input/virtio-input-host.c +1 -1
@@ -226,7 +226,7 @@ static void virtio_input_host_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_virtio_input_host; - dc->props = virtio_input_host_properties; +device_class_set_props (dc, virtio_input_host_properties); vic->realize = virtio_input_host_realize; vic->unrealize = virtio_input_host_unrealize; vic->handle_status = virtio_input_host_handle_status;
hw/input/virtio-input.c +1 -1
@@ -316,7 +316,7 @@ static void virtio_input_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass); - dc->props = virtio_input_properties; +device_class_set_props (dc, virtio_input_properties); dc->vmsd = &vmstate_virtio_input;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); vdc->realize = virtio_input_device_realize;
hw/intc/apic_common.c +1 -1
@@ -453,7 +453,7 @@ static void apic_common_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = apic_reset_common; - dc->props = apic_properties_common; +device_class_set_props (dc, apic_properties_common); dc->realize = apic_common_realize; dc->unrealize = apic_common_unrealize;/*
hw/intc/arm_gic_common.c +1 -1
@@ -367,7 +367,7 @@ static void arm_gic_common_class_init(ObjectClass *klass, void *data) dc->reset = arm_gic_common_reset; dc->realize = arm_gic_common_realize; - dc->props = arm_gic_common_properties; +device_class_set_props (dc, arm_gic_common_properties); dc->vmsd = &vmstate_gic; albifc->arm_linux_init = arm_gic_common_linux_init; }
hw/intc/arm_gicv2m.c +1 -1
@@ -179,7 +179,7 @@ static void gicv2m_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = gicv2m_properties; +device_class_set_props (dc, gicv2m_properties); dc->realize = gicv2m_realize; }
hw/intc/arm_gicv3_common.c +1 -1
@@ -507,7 +507,7 @@ static void arm_gicv3_common_class_init(ObjectClass *klass, void *data) dc->reset = arm_gicv3_common_reset; dc->realize = arm_gicv3_common_realize; - dc->props = arm_gicv3_common_properties; +device_class_set_props (dc, arm_gicv3_common_properties); dc->vmsd = &vmstate_gicv3; albifc->arm_linux_init = arm_gic_common_linux_init; }
hw/intc/arm_gicv3_its_kvm.c +1 -1
@@ -246,7 +246,7 @@ static void kvm_arm_its_class_init(ObjectClass *klass, void *data)KVMARMITSClass *ic =KVM_ARM_ITS_CLASS (klass); dc->realize = kvm_arm_its_realize; - dc->props = kvm_arm_its_props; +device_class_set_props (dc, kvm_arm_its_props);device_class_set_parent_reset (dc, kvm_arm_its_reset, &ic->parent_reset); icc->send_msi = kvm_its_send_msi; icc->pre_save = kvm_arm_its_pre_save;
hw/intc/armv7m_nvic.c +1 -1
@@ -2749,7 +2749,7 @@ static void armv7m_nvic_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_nvic; - dc->props = props_nvic; +device_class_set_props (dc, props_nvic); dc->reset = armv7m_nvic_reset; dc->realize = armv7m_nvic_realize; }
hw/intc/exynos4210_combiner.c +1 -1
@@ -442,7 +442,7 @@ static void exynos4210_combiner_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = exynos4210_combiner_reset; - dc->props = exynos4210_combiner_properties; +device_class_set_props (dc, exynos4210_combiner_properties); dc->vmsd = &vmstate_exynos4210_combiner; }
hw/intc/exynos4210_gic.c +2 -2
@@ -355,7 +355,7 @@ static void exynos4210_gic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = exynos4210_gic_properties; +device_class_set_props (dc, exynos4210_gic_properties); dc->realize = exynos4210_gic_realize; }
@@ -462,7 +462,7 @@ static void exynos4210_irq_gate_class_init(ObjectClass *klass, void *data) dc->reset = exynos4210_irq_gate_reset; dc->vmsd = &vmstate_exynos4210_irq_gate; - dc->props = exynos4210_irq_gate_properties; +device_class_set_props (dc, exynos4210_irq_gate_properties); dc->realize = exynos4210_irq_gate_realize; }
hw/intc/i8259_common.c +1 -1
@@ -184,7 +184,7 @@ static void pic_common_class_init(ObjectClass *klass, void *data)InterruptStatsProviderClass *ic =INTERRUPT_STATS_PROVIDER_CLASS (klass); dc->vmsd = &vmstate_pic_common; - dc->props = pic_properties_common; +device_class_set_props (dc, pic_properties_common); dc->realize = pic_common_realize;/* * Reason: unlike ordinary ISA devices, the PICs need additional
hw/intc/ioapic.c +1 -1
@@ -477,7 +477,7 @@ static void ioapic_class_init(ObjectClass *klass, void *data)*/ k->post_load = ioapic_update_kvm_routes; dc->reset = ioapic_reset_common; - dc->props = ioapic_properties; +device_class_set_props (dc, ioapic_properties); }static const TypeInfo ioapic_info = {
hw/intc/mips_gic.c +1 -1
@@ -448,7 +448,7 @@ static void mips_gic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = mips_gic_properties; +device_class_set_props (dc, mips_gic_properties); dc->realize = mips_gic_realize; }
hw/intc/omap_intc.c +2 -2
@@ -407,7 +407,7 @@ static void omap_intc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = omap_inth_reset; - dc->props = omap_intc_properties; +device_class_set_props (dc, omap_intc_properties);/* Reason: pointer property "clk" */ dc->user_creatable = false; dc->realize = omap_intc_realize;
@@ -660,7 +660,7 @@ static void omap2_intc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = omap_inth_reset; - dc->props = omap2_intc_properties; +device_class_set_props (dc, omap2_intc_properties);/* Reason: pointer property "iclk", "fclk" */ dc->user_creatable = false; dc->realize = omap2_intc_realize;
hw/intc/ompic.c +1 -1
@@ -161,7 +161,7 @@ static void or1k_ompic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = or1k_ompic_properties; +device_class_set_props (dc, or1k_ompic_properties); dc->realize = or1k_ompic_realize; dc->vmsd = &vmstate_or1k_ompic; }
hw/intc/openpic.c +1 -1
@@ -1628,7 +1628,7 @@ static void openpic_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = openpic_realize; - dc->props = openpic_properties; +device_class_set_props (dc, openpic_properties); dc->reset = 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)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = kvm_openpic_realize; - dc->props = kvm_openpic_properties; +device_class_set_props (dc, kvm_openpic_properties); dc->reset = kvm_openpic_reset;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/intc/pnv_xive.c +1 -1
@@ -1957,7 +1957,7 @@ static void pnv_xive_class_init(ObjectClass *klass, void *data) dc->desc ="PowerNV XIVE Interrupt Controller" ;device_class_set_parent_realize (dc, pnv_xive_realize, &pxc->parent_realize); dc->realize = pnv_xive_realize; - dc->props = pnv_xive_properties; +device_class_set_props (dc, pnv_xive_properties); xrc->get_eas = pnv_xive_get_eas; xrc->get_end = pnv_xive_get_end;
hw/intc/s390_flic.c +1 -1
@@ -427,7 +427,7 @@ static void s390_flic_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->props = s390_flic_common_properties; +device_class_set_props (dc, s390_flic_common_properties); dc->realize = s390_flic_common_realize; }
hw/intc/spapr_xive.c +1 -1
@@ -770,7 +770,7 @@ static void spapr_xive_class_init(ObjectClass *klass, void *data)SpaprXiveClass *sxc =SPAPR_XIVE_CLASS (klass); dc->desc ="sPAPR XIVE Interrupt Controller" ; - dc->props = spapr_xive_properties; +device_class_set_props (dc, spapr_xive_properties);device_class_set_parent_realize (dc, spapr_xive_realize, &sxc->parent_realize); dc->vmsd = &vmstate_spapr_xive;
hw/intc/xics.c +2 -2
@@ -358,7 +358,7 @@ static void icp_class_init(ObjectClass *klass, void *data) dc->realize = icp_realize; dc->unrealize = icp_unrealize; - dc->props = icp_properties; +device_class_set_props (dc, icp_properties);/* * Reason: part of XICS interrupt controller, needs to be wired up * by icp_create().
@@ -680,7 +680,7 @@ static void ics_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = ics_realize; - dc->props = ics_properties; +device_class_set_props (dc, ics_properties); dc->reset = ics_reset; dc->vmsd = &vmstate_ics;/*
hw/intc/xilinx_intc.c +1 -1
@@ -185,7 +185,7 @@ static void xilinx_intc_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = xilinx_intc_properties; +device_class_set_props (dc, xilinx_intc_properties); }static const TypeInfo xilinx_intc_info = {
hw/intc/xive.c +3 -3
@@ -740,7 +740,7 @@ static void xive_tctx_class_init(ObjectClass *klass, void *data) dc->desc ="XIVE Interrupt Thread Context" ; dc->realize = xive_tctx_realize; dc->vmsd = &vmstate_xive_tctx; - dc->props = xive_tctx_properties; +device_class_set_props (dc, xive_tctx_properties);/* * Reason: part of XIVE interrupt controller, needs to be wired up * by xive_tctx_create().
@@ -1192,7 +1192,7 @@ static void xive_source_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="XIVE Interrupt Source" ; - dc->props = xive_source_properties; +device_class_set_props (dc, xive_source_properties); dc->realize = xive_source_realize; dc->vmsd = &vmstate_xive_source;/*
@@ -1899,7 +1899,7 @@ static void xive_end_source_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="XIVE END Source" ; - dc->props = xive_end_source_properties; +device_class_set_props (dc, xive_end_source_properties); dc->realize = xive_end_source_realize;/* * Reason: part of XIVE interrupt controller, needs to be wired up,
hw/intc/xlnx-pmu-iomod-intc.c +1 -1
@@ -539,7 +539,7 @@ static void xlnx_pmu_io_intc_class_init(ObjectClass *klass, void *data) dc->reset = xlnx_pmu_io_intc_reset; dc->realize = xlnx_pmu_io_intc_realize; dc->vmsd = &vmstate_xlnx_pmu_io_intc; - dc->props = xlnx_pmu_io_intc_properties; +device_class_set_props (dc, xlnx_pmu_io_intc_properties); }static const TypeInfo xlnx_pmu_io_intc_info = {
hw/ipack/ipack.c +1 -1
@@ -88,7 +88,7 @@ static void ipack_device_class_init(ObjectClass *klass, void *data) k->bus_type =TYPE_IPACK_BUS ; k->realize = ipack_device_realize; k->unrealize = ipack_device_unrealize; - k->props = ipack_device_props; +device_class_set_props (k, ipack_device_props); }const VMStateDescription vmstate_ipack_device = {
hw/ipmi/ipmi.c +1 -1
@@ -118,7 +118,7 @@ static void bmc_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->props = ipmi_bmc_properties; +device_class_set_props (dc, ipmi_bmc_properties); }static TypeInfo ipmi_bmc_type_info = {
hw/ipmi/ipmi_bmc_extern.c +1 -1
@@ -528,7 +528,7 @@ static void ipmi_bmc_extern_class_init(ObjectClass *oc, void *data) bk->handle_reset = ipmi_bmc_extern_handle_reset; dc->hotpluggable = false; dc->realize = ipmi_bmc_extern_realize; - dc->props = ipmi_bmc_extern_properties; +device_class_set_props (dc, ipmi_bmc_extern_properties); }static const TypeInfo ipmi_bmc_extern_type = {
hw/ipmi/ipmi_bmc_sim.c +1 -1
@@ -1989,7 +1989,7 @@ static void ipmi_sim_class_init(ObjectClass *oc, void *data) dc->hotpluggable = false; dc->realize = ipmi_sim_realize; - dc->props = ipmi_sim_properties; +device_class_set_props (dc, ipmi_sim_properties); bk->handle_command = ipmi_sim_handle_command; }
hw/ipmi/isa_ipmi_bt.c +1 -1
@@ -147,7 +147,7 @@ static void isa_ipmi_bt_class_init(ObjectClass *oc, void *data)IPMIInterfaceClass *iic =IPMI_INTERFACE_CLASS (oc); dc->realize = isa_ipmi_bt_realize; - dc->props = ipmi_isa_properties; +device_class_set_props (dc, ipmi_isa_properties); iic->get_backend_data = isa_ipmi_bt_get_backend_data;ipmi_bt_class_init (iic);
hw/ipmi/isa_ipmi_kcs.c +1 -1
@@ -154,7 +154,7 @@ static void isa_ipmi_kcs_class_init(ObjectClass *oc, void *data)IPMIInterfaceClass *iic =IPMI_INTERFACE_CLASS (oc); dc->realize = ipmi_isa_realize; - dc->props = ipmi_isa_properties; +device_class_set_props (dc, ipmi_isa_properties); iic->get_backend_data = isa_ipmi_kcs_get_backend_data;ipmi_kcs_class_init (iic);
hw/isa/lpc_ich9.c +1 -1
@@ -784,7 +784,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data) dc->reset = ich9_lpc_reset; k->realize = ich9_lpc_realize; dc->vmsd = &vmstate_ich9_lpc; - dc->props = ich9_lpc_properties; +device_class_set_props (dc, ich9_lpc_properties); k->config_write = ich9_lpc_config_write; dc->desc ="ICH9 LPC bridge" ; k->vendor_id =PCI_VENDOR_ID_INTEL ;
hw/isa/pc87312.c +1 -1
@@ -342,7 +342,7 @@ static void pc87312_class_init(ObjectClass *klass, void *data) dc->realize = pc87312_realize; dc->reset = pc87312_reset; dc->vmsd = &vmstate_pc87312; - dc->props = pc87312_properties; +device_class_set_props (dc, pc87312_properties); sc->parallel = (ISASuperIOFuncs ){ .count =1 ,
hw/isa/vt82c686.c +1 -1
@@ -417,7 +417,7 @@ static void via_pm_class_init(ObjectClass *klass, void *data) dc->desc ="PM" ; dc->vmsd = &vmstate_acpi;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); - dc->props = via_pm_properties; +device_class_set_props (dc, via_pm_properties); }static const TypeInfo via_pm_info = {
hw/mem/nvdimm.c +1 -1
@@ -202,7 +202,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data) ddc->realize = nvdimm_realize; mdc->get_memory_region = nvdimm_md_get_memory_region; - dc->props = nvdimm_properties; +device_class_set_props (dc, nvdimm_properties); nvc->read_label_data = nvdimm_read_label_data; nvc->write_label_data = nvdimm_write_label_data;
hw/mem/pc-dimm.c +1 -1
@@ -271,7 +271,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data) dc->realize = pc_dimm_realize; dc->unrealize = pc_dimm_unrealize; - dc->props = pc_dimm_properties; +device_class_set_props (dc, pc_dimm_properties); dc->desc ="DIMM memory module" ; ddc->get_vmstate_memory_region = pc_dimm_get_memory_region;
hw/mips/cps.c +1 -1
@@ -178,7 +178,7 @@ static void mips_cps_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = mips_cps_realize; - dc->props = mips_cps_properties; +device_class_set_props (dc, mips_cps_properties); }static const TypeInfo mips_cps_info = {
hw/misc/a9scu.c +1 -1
@@ -135,7 +135,7 @@ static void a9_scu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = a9_scu_properties; +device_class_set_props (dc, a9_scu_properties); dc->vmsd = &vmstate_a9_scu; dc->reset = a9_scu_reset; }
hw/misc/applesmc.c +1 -1
@@ -353,7 +353,7 @@ static void qdev_applesmc_class_init(ObjectClass *klass, void *data) dc->realize = applesmc_isa_realize; dc->reset = qdev_applesmc_isa_reset; - dc->props = applesmc_isa_properties; +device_class_set_props (dc, applesmc_isa_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/misc/arm11scu.c +1 -1
@@ -85,7 +85,7 @@ static void arm11_scu_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = arm11_scu_realize; - dc->props = arm11_scu_properties; +device_class_set_props (dc, arm11_scu_properties); }static const TypeInfo arm11_scu_type_info = {
hw/misc/arm_l2x0.c +1 -1
@@ -182,7 +182,7 @@ static void l2x0_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_l2x0; - dc->props = l2x0_properties; +device_class_set_props (dc, l2x0_properties); dc->reset = l2x0_priv_reset; }
hw/misc/arm_sysctl.c +1 -1
@@ -642,7 +642,7 @@ static void arm_sysctl_class_init(ObjectClass *klass, void *data) dc->realize = arm_sysctl_realize; dc->reset = arm_sysctl_reset; dc->vmsd = &vmstate_arm_sysctl; - dc->props = arm_sysctl_properties; +device_class_set_props (dc, arm_sysctl_properties); }static const TypeInfo arm_sysctl_info = {
hw/misc/armsse-cpuid.c +1 -1
@@ -116,7 +116,7 @@ static void armsse_cpuid_class_init(ObjectClass *klass, void *data)* does not need a reset function or VMState. */ - dc->props = armsse_cpuid_props; +device_class_set_props (dc, armsse_cpuid_props); }static const TypeInfo armsse_cpuid_info = {
hw/misc/aspeed_scu.c +1 -1
@@ -447,7 +447,7 @@ static void aspeed_scu_class_init(ObjectClass *klass, void *data) dc->reset = aspeed_scu_reset; dc->desc ="ASPEED System Control Unit" ; dc->vmsd = &vmstate_aspeed_scu; - dc->props = aspeed_scu_properties; +device_class_set_props (dc, aspeed_scu_properties); }static const TypeInfo aspeed_scu_info = {
hw/misc/aspeed_sdmc.c +1 -1
@@ -261,7 +261,7 @@ static void aspeed_sdmc_class_init(ObjectClass *klass, void *data) dc->reset = aspeed_sdmc_reset; dc->desc ="ASPEED SDRAM Memory Controller" ; dc->vmsd = &vmstate_aspeed_sdmc; - dc->props = aspeed_sdmc_properties; +device_class_set_props (dc, aspeed_sdmc_properties); }static const TypeInfo aspeed_sdmc_info = {
hw/misc/bcm2835_property.c +1 -1
@@ -426,7 +426,7 @@ static void bcm2835_property_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = bcm2835_property_props; +device_class_set_props (dc, bcm2835_property_props); dc->realize = bcm2835_property_realize; dc->vmsd = &vmstate_bcm2835_property; }
hw/misc/debugexit.c +1 -1
@@ -65,7 +65,7 @@ static void debug_exit_class_initfn(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = debug_exit_realizefn; - dc->props = debug_exit_properties; +device_class_set_props (dc, debug_exit_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/misc/eccmemctl.c +1 -1
@@ -336,7 +336,7 @@ static void ecc_class_init(ObjectClass *klass, void *data) dc->realize = ecc_realize; dc->reset = ecc_reset; dc->vmsd = &vmstate_ecc; - dc->props = ecc_properties; +device_class_set_props (dc, ecc_properties); }static const TypeInfo ecc_info = {
hw/misc/iotkit-sysctl.c +1 -1
@@ -508,7 +508,7 @@ static void iotkit_sysctl_class_init(ObjectClass *klass, void *data) dc->vmsd = &iotkit_sysctl_vmstate; dc->reset = iotkit_sysctl_reset; - dc->props = iotkit_sysctl_props; +device_class_set_props (dc, iotkit_sysctl_props); dc->realize = iotkit_sysctl_realize; }
hw/misc/iotkit-sysinfo.c +1 -1
@@ -121,7 +121,7 @@ static void iotkit_sysinfo_class_init(ObjectClass *klass, void *data)* does not need a reset function or VMState. */ - dc->props = iotkit_sysinfo_props; +device_class_set_props (dc, iotkit_sysinfo_props); }static const TypeInfo iotkit_sysinfo_info = {
hw/misc/ivshmem.c +2 -2
@@ -1055,7 +1055,7 @@ static void ivshmem_plain_class_init(ObjectClass *klass, void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = ivshmem_plain_realize; - dc->props = ivshmem_plain_properties; +device_class_set_props (dc, ivshmem_plain_properties); dc->vmsd = &ivshmem_plain_vmsd; }
@@ -1115,7 +1115,7 @@ static void ivshmem_doorbell_class_init(ObjectClass *klass, void *data)PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); k->realize = ivshmem_doorbell_realize; - dc->props = ivshmem_doorbell_properties; +device_class_set_props (dc, ivshmem_doorbell_properties); dc->vmsd = &ivshmem_doorbell_vmsd; }
hw/misc/mac_via.c +1 -1
@@ -1021,7 +1021,7 @@ static void mac_via_class_init(ObjectClass *oc, void *data) dc->realize = mac_via_realize; dc->reset = mac_via_reset; dc->vmsd = &vmstate_mac_via; - dc->props = mac_via_properties; +device_class_set_props (dc, mac_via_properties); }static TypeInfo mac_via_info = {
hw/misc/macio/cuda.c +1 -1
@@ -571,7 +571,7 @@ static void cuda_class_init(ObjectClass *oc, void *data) dc->realize = cuda_realize; dc->reset = cuda_reset; dc->vmsd = &vmstate_cuda; - dc->props = cuda_properties; +device_class_set_props (dc, cuda_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); }
hw/misc/macio/macio.c +2 -2
@@ -466,7 +466,7 @@ static void macio_newworld_class_init(ObjectClass *oc, void *data) pdc->realize = macio_newworld_realize; pdc->device_id =PCI_DEVICE_ID_APPLE_UNI_N_KEYL ; dc->vmsd = &vmstate_macio_newworld; - dc->props = macio_newworld_properties; +device_class_set_props (dc, macio_newworld_properties); }static Property macio_properties[] = {
@@ -481,7 +481,7 @@ static void macio_class_init(ObjectClass *klass, void *data) k->vendor_id =PCI_VENDOR_ID_APPLE ; k->class_id =PCI_CLASS_OTHERS <<8 ; - dc->props = macio_properties; +device_class_set_props (dc, macio_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);/* Reason: Uses serial_hds in macio_instance_init */ dc->user_creatable = false;
hw/misc/macio/pmu.c +1 -1
@@ -795,7 +795,7 @@ static void pmu_class_init(ObjectClass *oc, void *data) dc->realize = pmu_realize; dc->reset = pmu_reset; dc->vmsd = &vmstate_pmu; - dc->props = pmu_properties; +device_class_set_props (dc, pmu_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); }
hw/misc/mips_cmgcr.c +1 -1
@@ -233,7 +233,7 @@ static void mips_gcr_realize(DeviceState *dev, Error **errp)static void mips_gcr_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = mips_gcr_properties; +device_class_set_props (dc, mips_gcr_properties); dc->vmsd = &vmstate_mips_gcr; dc->reset = mips_gcr_reset; dc->realize = mips_gcr_realize;
hw/misc/mips_cpc.c +1 -1
@@ -175,7 +175,7 @@ static void mips_cpc_class_init(ObjectClass *klass, void *data) dc->realize = mips_cpc_realize; dc->reset = mips_cpc_reset; dc->vmsd = &vmstate_mips_cpc; - dc->props = mips_cpc_properties; +device_class_set_props (dc, mips_cpc_properties); }static const TypeInfo mips_cpc_info = {
hw/misc/mips_itu.c +1 -1
@@ -561,7 +561,7 @@ static void mips_itu_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = mips_itu_properties; +device_class_set_props (dc, mips_itu_properties); dc->realize = mips_itu_realize; dc->reset = mips_itu_reset; }
hw/misc/mos6522.c +1 -1
@@ -502,7 +502,7 @@ static void mos6522_class_init(ObjectClass *oc, void *data) dc->reset = mos6522_reset; dc->vmsd = &vmstate_mos6522; - dc->props = mos6522_properties; +device_class_set_props (dc, mos6522_properties); mdc->parent_reset = dc->reset; mdc->set_sr_int = mos6522_set_sr_int; mdc->portB_write = mos6522_portB_write;
hw/misc/mps2-fpgaio.c +1 -1
@@ -300,7 +300,7 @@ static void mps2_fpgaio_class_init(ObjectClass *klass, void *data) dc->vmsd = &mps2_fpgaio_vmstate; dc->reset = mps2_fpgaio_reset; - dc->props = mps2_fpgaio_properties; +device_class_set_props (dc, mps2_fpgaio_properties); }static const TypeInfo mps2_fpgaio_info = {
hw/misc/mps2-scc.c +1 -1
@@ -293,7 +293,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; - dc->props = mps2_scc_properties; +device_class_set_props (dc, mps2_scc_properties); }static const TypeInfo mps2_scc_info = {
hw/misc/msf2-sysreg.c +1 -1
@@ -143,7 +143,7 @@ static void msf2_sysreg_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_msf2_sysreg; dc->reset = msf2_sysreg_reset; - dc->props = msf2_sysreg_properties; +device_class_set_props (dc, msf2_sysreg_properties); dc->realize = msf2_sysreg_realize; }
hw/misc/nrf51_rng.c +1 -1
@@ -245,7 +245,7 @@ static void nrf51_rng_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = nrf51_rng_properties; +device_class_set_props (dc, nrf51_rng_properties); dc->vmsd = &vmstate_rng; dc->reset = nrf51_rng_reset; }
hw/misc/pci-testdev.c +1 -1
@@ -339,7 +339,7 @@ static void pci_testdev_class_init(ObjectClass *klass, void *data) dc->desc ="PCI Test Device" ;set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->reset = qdev_pci_testdev_reset; - dc->props = pci_testdev_properties; +device_class_set_props (dc, pci_testdev_properties); }static const TypeInfo pci_testdev_info = {
hw/misc/pvpanic.c +1 -1
@@ -118,7 +118,7 @@ static void pvpanic_isa_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = pvpanic_isa_realizefn; - dc->props = pvpanic_isa_properties; +device_class_set_props (dc, pvpanic_isa_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/misc/tz-mpc.c +1 -1
@@ -596,7 +596,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; - dc->props = tz_mpc_properties; +device_class_set_props (dc, tz_mpc_properties); }static const TypeInfo tz_mpc_info = {
hw/misc/tz-msc.c +1 -1
@@ -293,7 +293,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; - dc->props = tz_msc_properties; +device_class_set_props (dc, tz_msc_properties); }static const TypeInfo tz_msc_info = {
hw/misc/tz-ppc.c +1 -1
@@ -319,7 +319,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; - dc->props = tz_ppc_properties; +device_class_set_props (dc, tz_ppc_properties); }static const TypeInfo tz_ppc_info = {
hw/misc/unimp.c +1 -1
@@ -79,7 +79,7 @@ static void unimp_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = unimp_realize; - dc->props = unimp_properties; +device_class_set_props (dc, unimp_properties); }static const TypeInfo unimp_info = {
hw/net/allwinner_emac.c +1 -1
@@ -519,7 +519,7 @@ static void aw_emac_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = aw_emac_realize; - dc->props = aw_emac_properties; +device_class_set_props (dc, aw_emac_properties); dc->reset = aw_emac_reset; dc->vmsd = &vmstate_aw_emac; }
hw/net/cadence_gem.c +1 -1
@@ -1627,7 +1627,7 @@ static void gem_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = gem_realize; - dc->props = gem_properties; +device_class_set_props (dc, gem_properties); dc->vmsd = &vmstate_cadence_gem; dc->reset = gem_reset; }
hw/net/dp8393x.c +1 -1
@@ -963,7 +963,7 @@ static void dp8393x_class_init(ObjectClass *klass, void *data) dc->realize = dp8393x_realize; dc->reset = dp8393x_reset; dc->vmsd = &vmstate_dp8393x; - dc->props = dp8393x_properties; +device_class_set_props (dc, dp8393x_properties); }static const TypeInfo dp8393x_info = {
hw/net/e1000.c +1 -1
@@ -1764,7 +1764,7 @@ static void e1000_class_init(ObjectClass *klass, void *data) dc->desc ="Intel Gigabit Ethernet" ; dc->reset = qdev_e1000_reset; dc->vmsd = &vmstate_e1000; - dc->props = e1000_properties; +device_class_set_props (dc, e1000_properties); }static void e1000_instance_init (Object *obj)
hw/net/e1000e.c +1 -1
@@ -684,7 +684,6 @@ static void e1000e_class_init(ObjectClass *class, void *data) dc->desc ="Intel 82574L GbE Controller" ; dc->reset = e1000e_qdev_reset; dc->vmsd = &e1000e_vmstate; - dc->props = e1000e_properties; e1000e_prop_disable_vnet = qdev_prop_uint8; e1000e_prop_disable_vnet.description ="Do not use virtio headers, "
@@ -697,6 +696,7 @@ static void e1000e_class_init(ObjectClass *class, void *data) e1000e_prop_subsys = qdev_prop_uint16; e1000e_prop_subsys.description ="PCI device Subsystem ID" ; +device_class_set_props (dc, e1000e_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/eepro100.c +1 -1
@@ -2060,7 +2060,7 @@ static void eepro100_class_init(ObjectClass *klass, void *data) info =eepro100_get_class_by_name (object_class_get_name (klass));set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); - dc->props = e100_properties; +device_class_set_props (dc, e100_properties); dc->desc = info->desc; k->vendor_id =PCI_VENDOR_ID_INTEL ; k->class_id =PCI_CLASS_NETWORK_ETHERNET ;
hw/net/etraxfs_eth.c +1 -1
@@ -639,7 +639,7 @@ static void etraxfs_eth_class_init(ObjectClass *klass, void *data) dc->realize = etraxfs_eth_realize; dc->reset = etraxfs_eth_reset; - dc->props = etraxfs_eth_properties; +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
@@ -423,7 +423,7 @@ static void etsec_class_init(ObjectClass *klass, void *data) dc->realize = etsec_realize; dc->reset = etsec_reset; - dc->props = etsec_properties; +device_class_set_props (dc, etsec_properties);/* Supported by ppce500 machine */ dc->user_creatable = true; }
hw/net/ftgmac100.c +2 -2
@@ -1075,7 +1075,7 @@ static void ftgmac100_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_ftgmac100; dc->reset = ftgmac100_reset; - dc->props = ftgmac100_properties; +device_class_set_props (dc, ftgmac100_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->realize = ftgmac100_realize; dc->desc ="Faraday FTGMAC100 Gigabit Ethernet emulation" ;
@@ -1237,7 +1237,7 @@ static void aspeed_mii_class_init(ObjectClass *klass, void *data) dc->reset = aspeed_mii_reset; dc->realize = aspeed_mii_realize; dc->desc ="Aspeed MII controller" ; - dc->props = aspeed_mii_properties; +device_class_set_props (dc, aspeed_mii_properties); }static const TypeInfo aspeed_mii_info = {
hw/net/imx_fec.c +1 -1
@@ -1338,7 +1338,7 @@ static void imx_eth_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_imx_eth; dc->reset = imx_eth_reset; - dc->props = imx_eth_properties; +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
@@ -1369,7 +1369,7 @@ static void lan9118_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = lan9118_reset; - dc->props = lan9118_properties; +device_class_set_props (dc, lan9118_properties); dc->vmsd = &vmstate_lan9118; dc->realize = lan9118_realize; }
hw/net/lance.c +1 -1
@@ -153,7 +153,7 @@ static void lance_class_init(ObjectClass *klass, void *data) dc->fw_name ="ethernet" ; dc->reset = lance_reset; dc->vmsd = &vmstate_lance; - dc->props = lance_properties; +device_class_set_props (dc, lance_properties); }static const TypeInfo lance_info = {
hw/net/mcf_fec.c +1 -1
@@ -670,7 +670,7 @@ static void mcf_fec_class_init(ObjectClass *oc, void *data) dc->realize = mcf_fec_realize; dc->desc ="MCF Fast Ethernet Controller network device" ; dc->reset = mcf_fec_reset; - dc->props = mcf_fec_properties; +device_class_set_props (dc, mcf_fec_properties); }static const TypeInfo mcf_fec_info = {
hw/net/milkymist-minimac2.c +1 -1
@@ -530,7 +530,7 @@ static void milkymist_minimac2_class_init(ObjectClass *klass, void *data) dc->realize = milkymist_minimac2_realize; dc->reset = milkymist_minimac2_reset; dc->vmsd = &vmstate_milkymist_minimac2; - dc->props = milkymist_minimac2_properties; +device_class_set_props (dc, milkymist_minimac2_properties); }static const TypeInfo milkymist_minimac2_info = {
hw/net/mipsnet.c +1 -1
@@ -278,7 +278,7 @@ static void mipsnet_class_init(ObjectClass *klass, void *data) dc->desc ="MIPS Simulator network device" ; dc->reset = mipsnet_sysbus_reset; dc->vmsd = &vmstate_mipsnet; - dc->props = mipsnet_properties; +device_class_set_props (dc, mipsnet_properties); }static const TypeInfo mipsnet_info = {
hw/net/ne2000-isa.c +1 -1
@@ -89,7 +89,7 @@ static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = isa_ne2000_realizefn; - dc->props = ne2000_isa_properties; +device_class_set_props (dc, ne2000_isa_properties); dc->vmsd = &vmstate_isa_ne2000;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/ne2000-pci.c +1 -1
@@ -112,7 +112,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_REALTEK_8029 ; k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->vmsd = &vmstate_pci_ne2000; - dc->props = ne2000_properties; +device_class_set_props (dc, ne2000_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/opencores_eth.c +1 -1
@@ -755,7 +755,7 @@ static void open_eth_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->desc ="Opencores 10/100 Mbit Ethernet" ; dc->reset = qdev_open_eth_reset; - dc->props = open_eth_properties; +device_class_set_props (dc, open_eth_properties); }static const TypeInfo open_eth_info = {
hw/net/pcnet-pci.c +1 -1
@@ -272,7 +272,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->reset = pci_reset; dc->vmsd = &vmstate_pci_pcnet; - dc->props = pcnet_properties; +device_class_set_props (dc, pcnet_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/rocker/rocker.c +1 -1
@@ -1519,7 +1519,7 @@ static void rocker_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); dc->desc ="Rocker Switch" ; dc->reset = rocker_reset; - dc->props = rocker_properties; +device_class_set_props (dc, rocker_properties); dc->vmsd = &rocker_vmsd; }
hw/net/rtl8139.c +1 -1
@@ -3435,7 +3435,7 @@ static void rtl8139_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->reset = rtl8139_reset; dc->vmsd = &vmstate_rtl8139; - dc->props = rtl8139_properties; +device_class_set_props (dc, rtl8139_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/smc91c111.c +1 -1
@@ -798,7 +798,7 @@ static void smc91c111_class_init(ObjectClass *klass, void *data) dc->realize = smc91c111_realize; dc->reset = smc91c111_reset; dc->vmsd = &vmstate_smc91c111; - dc->props = smc91c111_properties; +device_class_set_props (dc, smc91c111_properties); }static const TypeInfo smc91c111_info = {
hw/net/spapr_llan.c +1 -1
@@ -856,7 +856,7 @@ static void spapr_vlan_class_init(ObjectClass *klass, void *data) k->dt_compatible ="IBM,l-lan" ; k->signal_mask =0x1 ;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); - dc->props = spapr_vlan_properties; +device_class_set_props (dc, spapr_vlan_properties); k->rtce_window_size =0x10000000 ; dc->vmsd = &vmstate_spapr_llan; }
hw/net/stellaris_enet.c +1 -1
@@ -507,7 +507,7 @@ static void stellaris_enet_class_init(ObjectClass *klass, void *data) dc->realize = stellaris_enet_realize; dc->reset = stellaris_enet_reset; - dc->props = stellaris_enet_properties; +device_class_set_props (dc, stellaris_enet_properties); dc->vmsd = &vmstate_stellaris_enet; }
hw/net/sungem.c +1 -1
@@ -1429,7 +1429,7 @@ static void sungem_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->vmsd = &vmstate_sungem; dc->reset = sungem_reset; - dc->props = sungem_properties; +device_class_set_props (dc, sungem_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/sunhme.c +1 -1
@@ -958,7 +958,7 @@ static void sunhme_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->vmsd = &vmstate_hme; dc->reset = sunhme_reset; - dc->props = sunhme_properties; +device_class_set_props (dc, sunhme_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/tulip.c +1 -1
@@ -1004,7 +1004,7 @@ static void tulip_class_init(ObjectClass *klass, void *data) k->subsystem_id =0x104f ; k->class_id =PCI_CLASS_NETWORK_ETHERNET ; dc->vmsd = &vmstate_pci_tulip; - dc->props = tulip_properties; +device_class_set_props (dc, tulip_properties); dc->reset = tulip_qdev_reset;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/virtio-net.c +1 -1
@@ -3236,7 +3236,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass); - dc->props = virtio_net_properties; +device_class_set_props (dc, virtio_net_properties); dc->vmsd = &vmstate_virtio_net;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); vdc->realize = virtio_net_device_realize;
hw/net/vmxnet3.c +1 -1
@@ -2506,7 +2506,7 @@ static void vmxnet3_class_init(ObjectClass *class, void *data) dc->desc ="VMWare Paravirtualized Ethernet v3" ; dc->reset = vmxnet3_qdev_reset; dc->vmsd = &vmstate_vmxnet3; - dc->props = vmxnet3_properties; +device_class_set_props (dc, vmxnet3_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/net/xgmac.c +1 -1
@@ -414,7 +414,7 @@ static void xgmac_enet_class_init(ObjectClass *klass, void *data) dc->realize = xgmac_enet_realize; dc->vmsd = &vmstate_xgmac; - dc->props = xgmac_properties; +device_class_set_props (dc, xgmac_properties); }static const TypeInfo xgmac_enet_info = {
hw/net/xilinx_axienet.c +1 -1
@@ -1025,7 +1025,7 @@ static void xilinx_enet_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = xilinx_enet_realize; - dc->props = xilinx_enet_properties; +device_class_set_props (dc, xilinx_enet_properties); dc->reset = xilinx_axienet_reset; }
hw/net/xilinx_ethlite.c +1 -1
@@ -262,7 +262,7 @@ static void xilinx_ethlite_class_init(ObjectClass *klass, void *data) dc->realize = xilinx_ethlite_realize; dc->reset = xilinx_ethlite_reset; - dc->props = xilinx_ethlite_properties; +device_class_set_props (dc, xilinx_ethlite_properties); }static const TypeInfo xilinx_ethlite_info = {
hw/nvram/ds1225y.c +1 -1
@@ -153,7 +153,7 @@ static void nvram_sysbus_class_init(ObjectClass *klass, void *data) dc->realize = nvram_sysbus_realize; dc->vmsd = &vmstate_nvram; - dc->props = nvram_sysbus_properties; +device_class_set_props (dc, nvram_sysbus_properties); }static const TypeInfo nvram_sysbus_info = {
hw/nvram/eeprom_at24c.c +1 -1
@@ -182,7 +182,7 @@ void at24c_eeprom_class_init(ObjectClass *klass, void *data) k->recv = &at24c_eeprom_recv; k->send = &at24c_eeprom_send; - dc->props = at24c_eeprom_props; +device_class_set_props (dc, at24c_eeprom_props); dc->reset = at24c_eeprom_reset; }
hw/nvram/fw_cfg.c +2 -2
@@ -1171,7 +1171,7 @@ static void fw_cfg_io_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = fw_cfg_io_realize; - dc->props = fw_cfg_io_properties; +device_class_set_props (dc, fw_cfg_io_properties); }static const TypeInfo fw_cfg_io_info = {
@@ -1234,7 +1234,7 @@ static void fw_cfg_mem_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = fw_cfg_mem_realize; - dc->props = fw_cfg_mem_properties; +device_class_set_props (dc, fw_cfg_mem_properties); }static const TypeInfo fw_cfg_mem_info = {
hw/nvram/mac_nvram.c +1 -1
@@ -128,7 +128,7 @@ static void macio_nvram_class_init(ObjectClass *oc, void *data) dc->unrealize = macio_nvram_unrealizefn; dc->reset = macio_nvram_reset; dc->vmsd = &vmstate_macio_nvram; - dc->props = macio_nvram_properties; +device_class_set_props (dc, macio_nvram_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/nvram/nrf51_nvm.c +1 -1
@@ -369,7 +369,7 @@ static void nrf51_nvm_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = nrf51_nvm_properties; +device_class_set_props (dc, nrf51_nvm_properties); dc->vmsd = &vmstate_nvm; dc->realize = nrf51_nvm_realize; dc->reset = nrf51_nvm_reset;
hw/nvram/spapr_nvram.c +1 -1
@@ -269,7 +269,7 @@ static void spapr_nvram_class_init(ObjectClass *klass, void *data) k->dt_type ="nvram" ; k->dt_compatible ="qemu,spapr-nvram" ;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->props = spapr_nvram_properties; +device_class_set_props (dc, spapr_nvram_properties); dc->vmsd = &vmstate_spapr_nvram;/* Reason: Internal device only, uses spapr_rtas_register() in realize() */ dc->user_creatable = false;
hw/pci-bridge/gen_pcie_root_port.c +1 -1
@@ -147,7 +147,7 @@ static void gen_rp_dev_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_REDHAT_PCIE_RP ; dc->desc ="PCI Express Root Port" ; dc->vmsd = &vmstate_rp_dev; - dc->props = gen_rp_props; +device_class_set_props (dc, gen_rp_props);device_class_set_parent_realize (dc, gen_rp_realize, &rpc->parent_realize);
hw/pci-bridge/pci_bridge_dev.c +1 -1
@@ -258,7 +258,7 @@ static void pci_bridge_dev_class_init(ObjectClass *klass, void *data) k->is_bridge = true; dc->desc ="Standard PCI Bridge" ; dc->reset = qdev_pci_bridge_dev_reset; - dc->props = pci_bridge_dev_properties; +device_class_set_props (dc, pci_bridge_dev_properties); dc->vmsd = &pci_bridge_dev_vmstate;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); hc->plug = pci_bridge_dev_plug_cb;
hw/pci-bridge/pci_expander_bridge.c +2 -2
@@ -309,7 +309,7 @@ static void pxb_dev_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_BRIDGE_HOST ; dc->desc ="PCI Expander Bridge" ; - dc->props = pxb_dev_properties; +device_class_set_props (dc, pxb_dev_properties); dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); }
@@ -347,7 +347,7 @@ static void pxb_pcie_dev_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_BRIDGE_HOST ; dc->desc ="PCI Express Expander Bridge" ; - dc->props = pxb_dev_properties; +device_class_set_props (dc, pxb_dev_properties); dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); }
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->exit = pcie_pci_bridge_exit; k->config_write = pcie_pci_bridge_write_config; dc->vmsd = &pcie_pci_bridge_dev_vmstate; - dc->props = pcie_pci_bridge_dev_properties; +device_class_set_props (dc, pcie_pci_bridge_dev_properties); dc->reset = &pcie_pci_bridge_reset;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); hc->plug = pci_bridge_dev_plug_cb;
hw/pci-bridge/pcie_root_port.c +1 -1
@@ -174,7 +174,7 @@ static void rp_class_init(ObjectClass *klass, void *data) k->exit = rp_exit;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->reset = rp_reset; - dc->props = rp_props; +device_class_set_props (dc, rp_props); }static const TypeInfo rp_info = {
hw/pci-bridge/xio3130_downstream.c +1 -1
@@ -169,7 +169,7 @@ static void xio3130_downstream_class_init(ObjectClass *klass, void *data) dc->desc ="TI X3130 Downstream Port of PCI Express Switch" ; dc->reset = xio3130_downstream_reset; dc->vmsd = &vmstate_xio3130_downstream; - dc->props = xio3130_downstream_props; +device_class_set_props (dc, xio3130_downstream_props); }static const TypeInfo xio3130_downstream_info = {
hw/pci-host/grackle.c +1 -1
@@ -168,7 +168,7 @@ static void grackle_class_init(ObjectClass *klass, void *data)SysBusDeviceClass *sbc =SYS_BUS_DEVICE_CLASS (klass); dc->realize = grackle_realize; - dc->props = grackle_properties; +device_class_set_props (dc, grackle_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->fw_name ="pci" ; sbc->explicit_ofw_unit_address = grackle_ofw_unit_address;
hw/pci-host/i440fx.c +1 -1
@@ -396,7 +396,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data) hc->root_bus_path = i440fx_pcihost_root_bus_path; dc->realize = i440fx_pcihost_realize; dc->fw_name ="pci" ; - dc->props = i440fx_props; +device_class_set_props (dc, i440fx_props);/* Reason: needs to be wired up by pc_init1 */ dc->user_creatable = false; }
hw/pci-host/ppce500.c +1 -1
@@ -531,7 +531,7 @@ static void e500_pcihost_class_init(ObjectClass *klass, void *data) dc->realize = e500_pcihost_realize;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); - dc->props = pcihost_properties; +device_class_set_props (dc, pcihost_properties); dc->vmsd = &vmstate_ppce500_pci; }
hw/pci-host/prep.c +1 -1
@@ -415,7 +415,7 @@ static void raven_pcihost_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->realize = raven_pcihost_realizefn; - dc->props = raven_pcihost_properties; +device_class_set_props (dc, raven_pcihost_properties); dc->fw_name ="pci" ; }
hw/pci-host/q35.c +2 -2
@@ -202,7 +202,7 @@ static void q35_host_class_init(ObjectClass *klass, void *data) hc->root_bus_path = q35_host_root_bus_path; dc->realize = q35_host_realize; - dc->props = q35_host_props; +device_class_set_props (dc, q35_host_props);/* Reason: needs to be wired up by pc_q35_init */ dc->user_creatable = false;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);
@@ -612,7 +612,7 @@ static void mch_class_init(ObjectClass *klass, void *data) k->realize = mch_realize; k->config_write = mch_write_config; dc->reset = mch_reset; - dc->props = mch_props; +device_class_set_props (dc, mch_props);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->desc ="Host bridge" ; dc->vmsd = &vmstate_mch;
hw/pci-host/sabre.c +1 -1
@@ -521,7 +521,7 @@ static void sabre_class_init(ObjectClass *klass, void *data) dc->realize = sabre_realize; dc->reset = sabre_reset; - dc->props = sabre_properties; +device_class_set_props (dc, sabre_properties);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->fw_name ="pci" ; sbc->explicit_ofw_unit_address = sabre_ofw_unit_address;
hw/pci-host/uninorth.c +1 -1
@@ -476,7 +476,7 @@ static void pci_unin_main_class_init(ObjectClass *klass, void *data)SysBusDeviceClass *sbc =SYS_BUS_DEVICE_CLASS (klass); dc->realize = pci_unin_main_realize; - dc->props = pci_unin_main_pci_host_props; +device_class_set_props (dc, pci_unin_main_pci_host_props);set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->fw_name ="pci" ; sbc->explicit_ofw_unit_address = pci_unin_main_ofw_unit_address;
hw/pci-host/versatile.c +1 -1
@@ -509,7 +509,7 @@ static void pci_vpb_class_init(ObjectClass *klass, void *data) dc->realize = pci_vpb_realize; dc->reset = pci_vpb_reset; dc->vmsd = &pci_vpb_vmstate; - dc->props = pci_vpb_properties; +device_class_set_props (dc, pci_vpb_properties); }static const TypeInfo pci_vpb_info = {
hw/pci-host/xilinx-pcie.c +1 -1
@@ -177,7 +177,7 @@ static void xilinx_pcie_host_class_init(ObjectClass *klass, void *data) dc->realize = xilinx_pcie_host_realize;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->fw_name ="pci" ; - dc->props = xilinx_pcie_host_props; +device_class_set_props (dc, xilinx_pcie_host_props); }static const TypeInfo xilinx_pcie_host_info = {
hw/pci/pci.c +1 -1
@@ -2624,7 +2624,7 @@ static void pci_device_class_init(ObjectClass *klass, void *data) k->realize = pci_qdev_realize; k->unrealize = pci_qdev_unrealize; k->bus_type =TYPE_PCI_BUS ; - k->props = pci_props; +device_class_set_props (k, pci_props); }static void pci_device_class_base_init (ObjectClass *klass,void *data)
hw/pci/pcie_port.c +2 -2
@@ -133,7 +133,7 @@ static void pcie_port_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc); - dc->props = pcie_port_props; +device_class_set_props (dc, pcie_port_props); }static const TypeInfo pcie_port_type_info = {
@@ -155,7 +155,7 @@ static void pcie_slot_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);HotplugHandlerClass *hc =HOTPLUG_HANDLER_CLASS (oc); - dc->props = pcie_slot_props; +device_class_set_props (dc, pcie_slot_props); hc->pre_plug = pcie_cap_slot_pre_plug_cb; hc->plug = pcie_cap_slot_plug_cb; hc->unplug = pcie_cap_slot_unplug_cb;
hw/ppc/pnv.c +1 -1
@@ -1614,7 +1614,7 @@ static void pnv_chip_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_CPU , dc->categories); dc->realize = pnv_chip_realize; - dc->props = pnv_chip_properties; +device_class_set_props (dc, pnv_chip_properties); dc->desc ="PowerNV Chip" ; }
hw/ppc/pnv_core.c +2 -2
@@ -323,7 +323,7 @@ static void pnv_core_class_init(ObjectClass *oc, void *data) dc->realize = pnv_core_realize; dc->unrealize = pnv_core_unrealize; - dc->props = pnv_core_properties; +device_class_set_props (dc, pnv_core_properties); }#define DEFINE_PNV_CORE_TYPE (family, cpu_model) \
@@ -421,7 +421,7 @@ static void pnv_quad_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc); dc->realize = pnv_quad_realize; - dc->props = pnv_quad_properties; +device_class_set_props (dc, pnv_quad_properties); }static const TypeInfo pnv_quad_info = {
hw/ppc/pnv_homer.c +1 -1
@@ -359,7 +359,7 @@ static void pnv_homer_class_init(ObjectClass *klass, void *data) dc->realize = pnv_homer_realize; dc->desc ="PowerNV HOMER Memory" ; - dc->props = pnv_homer_properties; +device_class_set_props (dc, pnv_homer_properties); }static const TypeInfo pnv_homer_type_info = {
hw/ppc/pnv_lpc.c +1 -1
@@ -761,7 +761,7 @@ static void pnv_lpc_class_init(ObjectClass *klass, void *data) dc->realize = pnv_lpc_realize; dc->desc ="PowerNV LPC Controller" ; - dc->props = pnv_lpc_properties; +device_class_set_props (dc, pnv_lpc_properties); }static const TypeInfo pnv_lpc_info = {
hw/ppc/pnv_occ.c +1 -1
@@ -279,7 +279,7 @@ static void pnv_occ_class_init(ObjectClass *klass, void *data) dc->realize = pnv_occ_realize; dc->desc ="PowerNV OCC Controller" ; - dc->props = pnv_occ_properties; +device_class_set_props (dc, pnv_occ_properties); }static const TypeInfo pnv_occ_type_info = {
hw/ppc/pnv_pnor.c +1 -1
@@ -121,7 +121,7 @@ static void pnv_pnor_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = pnv_pnor_realize; - dc->props = pnv_pnor_properties; +device_class_set_props (dc, pnv_pnor_properties); }static const TypeInfo pnv_pnor_info = {
hw/ppc/pnv_psi.c +1 -1
@@ -937,7 +937,7 @@ static void pnv_psi_class_init(ObjectClass *klass, void *data) xdc->dt_xscom = pnv_psi_dt_xscom; dc->desc ="PowerNV PSI Controller" ; - dc->props = pnv_psi_properties; +device_class_set_props (dc, pnv_psi_properties); dc->reset = pnv_psi_reset; }
hw/ppc/ppc440_uc.c +1 -1
@@ -1296,7 +1296,7 @@ static void ppc460ex_pcie_class_init(ObjectClass *klass, void *data)set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); dc->realize = ppc460ex_pcie_realize; - dc->props = ppc460ex_pcie_props; +device_class_set_props (dc, ppc460ex_pcie_props); dc->hotpluggable = false; }
hw/ppc/prep_systemio.c +1 -1
@@ -289,7 +289,7 @@ static void prep_systemio_class_initfn(ObjectClass *klass, void *data) dc->realize = prep_systemio_realize; dc->vmsd = &vmstate_prep_systemio; - dc->props = prep_systemio_properties; +device_class_set_props (dc, prep_systemio_properties); }static TypeInfo prep_systemio800_info = {
hw/ppc/rs6000_mc.c +1 -1
@@ -222,7 +222,7 @@ static void rs6000mc_class_initfn(ObjectClass *klass, void *data) dc->realize = rs6000mc_realize; dc->vmsd = &vmstate_rs6000mc; - dc->props = rs6000mc_properties; +device_class_set_props (dc, rs6000mc_properties); }static const TypeInfo rs6000mc_info = {
hw/ppc/spapr_cpu_core.c +1 -1
@@ -383,7 +383,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; - dc->props = spapr_cpu_core_properties; +device_class_set_props (dc, spapr_cpu_core_properties); scc->cpu_type = data; }
hw/ppc/spapr_pci.c +1 -1
@@ -2217,7 +2217,7 @@ static void spapr_phb_class_init(ObjectClass *klass, void *data) hc->root_bus_path = spapr_phb_root_bus_path; dc->realize = spapr_phb_realize; dc->unrealize = spapr_phb_unrealize; - dc->props = spapr_phb_properties; +device_class_set_props (dc, spapr_phb_properties); dc->reset = spapr_phb_reset; dc->vmsd = &vmstate_spapr_pci;/* Supported by TYPE_SPAPR_MACHINE */
hw/ppc/spapr_rng.c +1 -1
@@ -146,7 +146,7 @@ static void spapr_rng_class_init(ObjectClass *oc, void *data) dc->realize = spapr_rng_realize;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->props = spapr_rng_properties; +device_class_set_props (dc, spapr_rng_properties); dc->hotpluggable = false; }
hw/ppc/spapr_tpm_proxy.c +1 -1
@@ -159,7 +159,7 @@ static void spapr_tpm_proxy_class_init(ObjectClass *k, void *data) dk->realize = spapr_tpm_proxy_realize; dk->unrealize = spapr_tpm_proxy_unrealize; dk->user_creatable = true; - dk->props = spapr_tpm_proxy_properties; +device_class_set_props (dk, spapr_tpm_proxy_properties); }static const TypeInfo spapr_tpm_proxy_info = {
hw/rdma/vmw/pvrdma_main.c +1 -1
@@ -690,7 +690,7 @@ static void pvrdma_class_init(ObjectClass *klass, void *data) k->class_id =PCI_CLASS_NETWORK_OTHER ; dc->desc ="RDMA Device" ; - dc->props = pvrdma_dev_properties; +device_class_set_props (dc, pvrdma_dev_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); ir->print_statistics = pvrdma_print_statistics;
hw/riscv/riscv_hart.c +1 -1
@@ -74,7 +74,7 @@ static void riscv_harts_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = riscv_harts_props; +device_class_set_props (dc, riscv_harts_props); dc->realize = riscv_harts_realize; }
hw/riscv/sifive_clint.c +1 -1
@@ -205,7 +205,7 @@ static void sifive_clint_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = sifive_clint_realize; - dc->props = sifive_clint_properties; +device_class_set_props (dc, sifive_clint_properties); }static const TypeInfo sifive_clint_info = {
hw/riscv/sifive_plic.c +1 -1
@@ -466,7 +466,7 @@ static void sifive_plic_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = sifive_plic_properties; +device_class_set_props (dc, sifive_plic_properties); dc->realize = sifive_plic_realize; }
hw/riscv/sifive_u_otp.c +1 -1
@@ -171,7 +171,7 @@ static void sifive_u_otp_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = sifive_u_otp_properties; +device_class_set_props (dc, sifive_u_otp_properties); dc->realize = sifive_u_otp_realize; dc->reset = sifive_u_otp_reset; }
hw/rtc/m48t59-isa.c +1 -1
@@ -137,7 +137,7 @@ static void m48txx_isa_class_init(ObjectClass *klass, void *data) dc->realize = m48t59_isa_realize; dc->reset = m48t59_reset_isa; - dc->props = m48t59_isa_properties; +device_class_set_props (dc, m48t59_isa_properties); nc->read = m48txx_isa_read; nc->write = m48txx_isa_write; nc->toggle_lock = m48txx_isa_toggle_lock;
hw/rtc/m48t59.c +1 -1
@@ -667,7 +667,7 @@ static void m48txx_sysbus_class_init(ObjectClass *klass, void *data) dc->realize = m48t59_realize; dc->reset = m48t59_reset_sysbus; - dc->props = m48t59_sysbus_properties; +device_class_set_props (dc, m48t59_sysbus_properties); dc->vmsd = &vmstate_m48t59; nc->read = m48txx_sysbus_read; nc->write = m48txx_sysbus_write;
hw/rtc/mc146818rtc.c +1 -1
@@ -1015,7 +1015,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data) dc->realize = rtc_realizefn; dc->reset = rtc_resetdev; dc->vmsd = &vmstate_rtc; - dc->props = mc146818rtc_properties; +device_class_set_props (dc, mc146818rtc_properties); }static const TypeInfo mc146818rtc_info = {
hw/rtc/pl031.c +1 -1
@@ -321,7 +321,7 @@ static void pl031_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &vmstate_pl031; - dc->props = pl031_properties; +device_class_set_props (dc, pl031_properties); }static const TypeInfo pl031_info = {
hw/s390x/3270-ccw.c +1 -1
@@ -155,7 +155,7 @@ static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = emulated_ccw_3270_properties; +device_class_set_props (dc, emulated_ccw_3270_properties); dc->bus_type =TYPE_VIRTUAL_CSS_BUS ; dc->realize = emulated_ccw_3270_realize; dc->hotpluggable = false;
hw/s390x/ccw-device.c +1 -1
@@ -57,7 +57,7 @@ static void ccw_device_class_init(ObjectClass *klass, void *data) k->realize = ccw_device_realize; k->refill_ids = ccw_device_refill_ids; - dc->props = ccw_device_properties; +device_class_set_props (dc, ccw_device_properties); dc->reset = ccw_device_reset; }
hw/s390x/css-bridge.c +1 -1
@@ -139,7 +139,7 @@ static void virtual_css_bridge_class_init(ObjectClass *klass, void *data) hc->unplug = ccw_device_unplug;set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); - dc->props = virtual_css_bridge_properties; +device_class_set_props (dc, virtual_css_bridge_properties);object_class_property_add_bool (klass,"cssid-unrestricted" , prop_get_true,NULL ,NULL ); object_class_property_set_description(klass, "cssid-unrestricted",
hw/s390x/ipl.c +1 -1
@@ -666,7 +666,7 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = s390_ipl_realize; - dc->props = s390_ipl_properties; +device_class_set_props (dc, s390_ipl_properties); dc->reset = s390_ipl_reset; dc->vmsd = &vmstate_ipl;set_bit (DEVICE_CATEGORY_MISC , dc->categories);
hw/s390x/s390-pci-bus.c +1 -1
@@ -1314,7 +1314,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data) dc->reset = s390_pci_device_reset; dc->bus_type =TYPE_S390_PCI_BUS ; dc->realize = s390_pci_device_realize; - dc->props = s390_pci_device_properties; +device_class_set_props (dc, s390_pci_device_properties); dc->vmsd = &s390_pci_device_vmstate; }
hw/s390x/vhost-vsock-ccw.c +1 -1
@@ -35,7 +35,7 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data) k->realize = vhost_vsock_ccw_realize;set_bit (DEVICE_CATEGORY_MISC , dc->categories); - dc->props = vhost_vsock_ccw_properties; +device_class_set_props (dc, vhost_vsock_ccw_properties); }static void vhost_vsock_ccw_instance_init (Object *obj)
hw/s390x/virtio-ccw-9p.c +1 -1
@@ -47,7 +47,7 @@ static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_9p_realize; - dc->props = virtio_ccw_9p_properties; +device_class_set_props (dc, virtio_ccw_9p_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/s390x/virtio-ccw-balloon.c +1 -1
@@ -52,7 +52,7 @@ static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_balloon_realize; - dc->props = virtio_ccw_balloon_properties; +device_class_set_props (dc, virtio_ccw_balloon_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/s390x/virtio-ccw-blk.c +1 -1
@@ -49,7 +49,7 @@ static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_blk_realize; - dc->props = virtio_ccw_blk_properties; +device_class_set_props (dc, virtio_ccw_blk_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/s390x/virtio-ccw-crypto.c +1 -1
@@ -57,7 +57,7 @@ static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_crypto_realize; - dc->props = virtio_ccw_crypto_properties; +device_class_set_props (dc, virtio_ccw_crypto_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/s390x/virtio-ccw-gpu.c +1 -1
@@ -48,7 +48,7 @@ static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_gpu_realize; - dc->props = virtio_ccw_gpu_properties; +device_class_set_props (dc, virtio_ccw_gpu_properties); dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories); }
hw/s390x/virtio-ccw-input.c +1 -1
@@ -38,7 +38,7 @@ static void virtio_ccw_input_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_input_realize; - dc->props = virtio_ccw_input_properties; +device_class_set_props (dc, virtio_ccw_input_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/s390x/virtio-ccw-net.c +1 -1
@@ -52,7 +52,7 @@ static void virtio_ccw_net_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_net_realize; - dc->props = virtio_ccw_net_properties; +device_class_set_props (dc, virtio_ccw_net_properties);set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
hw/s390x/virtio-ccw-rng.c +1 -1
@@ -56,7 +56,7 @@ static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_rng_realize; - dc->props = virtio_ccw_rng_properties; +device_class_set_props (dc, virtio_ccw_rng_properties);set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
hw/s390x/virtio-ccw-scsi.c +2 -2
@@ -59,7 +59,7 @@ static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_scsi_realize; - dc->props = virtio_ccw_scsi_properties; +device_class_set_props (dc, virtio_ccw_scsi_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
@@ -102,7 +102,7 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = vhost_ccw_scsi_realize; - dc->props = vhost_ccw_scsi_properties; +device_class_set_props (dc, vhost_ccw_scsi_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
hw/s390x/virtio-ccw-serial.c +1 -1
@@ -60,7 +60,7 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_serial_realize; - dc->props = virtio_ccw_serial_properties; +device_class_set_props (dc, virtio_ccw_serial_properties);set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
hw/scsi/megasas.c +1 -1
@@ -2511,7 +2511,7 @@ static void megasas_class_init(ObjectClass *oc, void *data) e->osts = info->osts; e->product_name = info->product_name; e->product_version = info->product_version; - dc->props = info->props; +device_class_set_props (dc, info->props); dc->reset = megasas_scsi_reset; dc->vmsd = info->vmsd;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories);
hw/scsi/mptsas.c +1 -1
@@ -1431,7 +1431,7 @@ static void mptsas1068_class_init(ObjectClass *oc, void *data) pc->subsystem_vendor_id =PCI_VENDOR_ID_LSI_LOGIC ; pc->subsystem_id =0x8000 ; pc->class_id =PCI_CLASS_STORAGE_SCSI ; - dc->props = mptsas_properties; +device_class_set_props (dc, mptsas_properties); dc->reset = mptsas_reset; dc->vmsd = &vmstate_mptsas; dc->desc ="LSI SAS 1068" ;
hw/scsi/scsi-bus.c +1 -1
@@ -1728,7 +1728,7 @@ static void scsi_device_class_init(ObjectClass *klass, void *data) k->bus_type =TYPE_SCSI_BUS ; k->realize = scsi_qdev_realize; k->unrealize = scsi_qdev_unrealize; - k->props = scsi_props; +device_class_set_props (k, scsi_props); }static void scsi_dev_instance_init (Object *obj)
hw/scsi/scsi-disk.c +4 -4
@@ -3036,7 +3036,7 @@ static void scsi_hd_class_initfn(ObjectClass *klass, void *data) sc->alloc_req = scsi_new_request; sc->unit_attention_reported = scsi_disk_unit_attention_reported; dc->desc ="virtual SCSI disk" ; - dc->props = scsi_hd_properties; +device_class_set_props (dc, scsi_hd_properties); dc->vmsd = &vmstate_scsi_disk_state; }
@@ -3067,7 +3067,7 @@ static void scsi_cd_class_initfn(ObjectClass *klass, void *data) sc->alloc_req = scsi_new_request; sc->unit_attention_reported = scsi_disk_unit_attention_reported; dc->desc ="virtual SCSI CD-ROM" ; - dc->props = scsi_cd_properties; +device_class_set_props (dc, scsi_cd_properties); dc->vmsd = &vmstate_scsi_disk_state; }
@@ -3106,7 +3106,7 @@ static void scsi_block_class_initfn(ObjectClass *klass, void *data) sdc->update_sense = scsi_block_update_sense; sdc->need_fua_emulation = scsi_block_no_fua; dc->desc ="SCSI block device passthrough" ; - dc->props = scsi_block_properties; +device_class_set_props (dc, scsi_block_properties); dc->vmsd = &vmstate_scsi_disk_state; }
@@ -3146,7 +3146,7 @@ static void scsi_disk_class_initfn(ObjectClass *klass, void *data) dc->fw_name ="disk" ; dc->desc ="virtual SCSI disk or CD-ROM (legacy)" ; dc->reset = scsi_disk_reset; - dc->props = scsi_disk_properties; +device_class_set_props (dc, scsi_disk_properties); dc->vmsd = &vmstate_scsi_disk_state; }
hw/scsi/scsi-generic.c +1 -1
@@ -768,7 +768,7 @@ static void scsi_generic_class_initfn(ObjectClass *klass, void *data) dc->fw_name ="disk" ; dc->desc ="pass through generic scsi device (/dev/sg*)" ; dc->reset = scsi_generic_reset; - dc->props = scsi_generic_properties; +device_class_set_props (dc, scsi_generic_properties); dc->vmsd = &vmstate_scsi_device; }
hw/scsi/spapr_vscsi.c +1 -1
@@ -1267,7 +1267,7 @@ static void spapr_vscsi_class_init(ObjectClass *klass, void *data) k->dt_compatible ="IBM,v-scsi" ; k->signal_mask =0x00000001 ;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); - dc->props = spapr_vscsi_properties; +device_class_set_props (dc, spapr_vscsi_properties); k->rtce_window_size =0x10000000 ; dc->vmsd = &vmstate_spapr_vscsi; }
hw/scsi/vhost-scsi.c +1 -1
@@ -293,7 +293,7 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass);FWPathProviderClass *fwc =FW_PATH_PROVIDER_CLASS (klass); - dc->props = vhost_scsi_properties; +device_class_set_props (dc, vhost_scsi_properties); dc->vmsd = &vmstate_virtio_vhost_scsi;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); vdc->realize = vhost_scsi_realize;
hw/scsi/vhost-user-scsi.c +1 -1
@@ -197,7 +197,7 @@ static void vhost_user_scsi_class_init(ObjectClass *klass, void *data)VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass);FWPathProviderClass *fwc =FW_PATH_PROVIDER_CLASS (klass); - dc->props = vhost_user_scsi_properties; +device_class_set_props (dc, vhost_user_scsi_properties); dc->vmsd = &vmstate_vhost_scsi;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); vdc->realize = vhost_user_scsi_realize;
hw/scsi/virtio-scsi.c +1 -1
@@ -1006,7 +1006,7 @@ static void virtio_scsi_class_init(ObjectClass *klass, void *data)VirtioDeviceClass *vdc =VIRTIO_DEVICE_CLASS (klass);HotplugHandlerClass *hc =HOTPLUG_HANDLER_CLASS (klass); - dc->props = virtio_scsi_properties; +device_class_set_props (dc, virtio_scsi_properties); dc->vmsd = &vmstate_virtio_scsi;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); vdc->realize = virtio_scsi_device_realize;
hw/scsi/vmw_pvscsi.c +1 -1
@@ -1292,7 +1292,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data) &pvs_k->parent_dc_realize); dc->reset = pvscsi_reset; dc->vmsd = &vmstate_pvscsi; - dc->props = pvscsi_properties; +device_class_set_props (dc, pvscsi_properties);set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); hc->unplug = pvscsi_hot_unplug; hc->plug = pvscsi_hotplug;
hw/sd/sd.c +1 -1
@@ -2118,7 +2118,7 @@ static void sd_class_init(ObjectClass *klass, void *data)SDCardClass *sc =SD_CARD_CLASS (klass); dc->realize = sd_realize; - dc->props = sd_properties; +device_class_set_props (dc, sd_properties); dc->vmsd = &sd_vmstate; dc->reset = sd_reset; dc->bus_type =TYPE_SD_BUS ;
hw/sd/sdhci-pci.c +1 -1
@@ -64,7 +64,7 @@ static void sdhci_pci_class_init(ObjectClass *klass, void *data) k->vendor_id =PCI_VENDOR_ID_REDHAT ; k->device_id =PCI_DEVICE_ID_REDHAT_SDHCI ; k->class_id =PCI_CLASS_SYSTEM_SDHCI ; - dc->props = sdhci_pci_properties; +device_class_set_props (dc, sdhci_pci_properties);sdhci_common_class_init (klass, data); }
hw/sd/sdhci.c +1 -1
@@ -1499,7 +1499,7 @@ static void sdhci_sysbus_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = sdhci_sysbus_properties; +device_class_set_props (dc, sdhci_sysbus_properties); dc->realize = sdhci_sysbus_realize; dc->unrealize = sdhci_sysbus_unrealize;
hw/sparc/sun4m.c +2 -2
@@ -761,7 +761,7 @@ static void prom_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = prom_properties; +device_class_set_props (dc, prom_properties); dc->realize = prom_realize; }
@@ -827,7 +827,7 @@ static void ram_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = ram_realize; - dc->props = ram_properties; +device_class_set_props (dc, ram_properties); }static const TypeInfo ram_info = {
hw/sparc/sun4m_iommu.c +1 -1
@@ -379,7 +379,7 @@ static void iommu_class_init(ObjectClass *klass, void *data) dc->reset = iommu_reset; dc->vmsd = &vmstate_iommu; - dc->props = iommu_properties; +device_class_set_props (dc, iommu_properties); }static const TypeInfo iommu_info = {
hw/sparc64/sun4u.c +3 -3
@@ -389,7 +389,7 @@ static void ebus_class_init(ObjectClass *klass, void *data) k->device_id =PCI_DEVICE_ID_SUN_EBUS ; k->revision =0x01 ; k->class_id =PCI_CLASS_BRIDGE_OTHER ; - dc->props = ebus_properties; +device_class_set_props (dc, ebus_properties); }static const TypeInfo ebus_info = {
@@ -479,7 +479,7 @@ static void prom_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = prom_properties; +device_class_set_props (dc, prom_properties); dc->realize = prom_realize; }
@@ -540,7 +540,7 @@ static void ram_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = ram_realize; - dc->props = ram_properties; +device_class_set_props (dc, ram_properties); }static const TypeInfo ram_info = {
hw/ssi/aspeed_smc.c +1 -1
@@ -1401,7 +1401,7 @@ static void aspeed_smc_class_init(ObjectClass *klass, void *data) dc->realize = aspeed_smc_realize; dc->reset = aspeed_smc_reset; - dc->props = aspeed_smc_properties; +device_class_set_props (dc, aspeed_smc_properties); dc->vmsd = &vmstate_aspeed_smc; mc->ctrl = data; }
hw/ssi/xilinx_spi.c +1 -1
@@ -372,7 +372,7 @@ static void xilinx_spi_class_init(ObjectClass *klass, void *data) dc->realize = xilinx_spi_realize; dc->reset = xlx_spi_reset; - dc->props = xilinx_spi_properties; +device_class_set_props (dc, xilinx_spi_properties); dc->vmsd = &vmstate_xilinx_spi; }
hw/ssi/xilinx_spips.c +2 -2
@@ -1455,7 +1455,7 @@ static void xilinx_spips_class_init(ObjectClass *klass, void *data) dc->realize = xilinx_spips_realize; dc->reset = xilinx_spips_reset; - dc->props = xilinx_spips_properties; +device_class_set_props (dc, xilinx_spips_properties); dc->vmsd = &vmstate_xilinx_spips; xsc->reg_ops = &spips_ops;
@@ -1471,7 +1471,7 @@ static void xlnx_zynqmp_qspips_class_init(ObjectClass *klass, void * data) dc->realize = xlnx_zynqmp_qspips_realize; dc->reset = xlnx_zynqmp_qspips_reset; dc->vmsd = &vmstate_xlnx_zynqmp_qspips; - dc->props = xilinx_zynqmp_qspips_properties; +device_class_set_props (dc, xilinx_zynqmp_qspips_properties); xsc->reg_ops = &xlnx_zynqmp_qspips_ops; xsc->rx_fifo_size =RXFF_A_Q ; xsc->tx_fifo_size =TXFF_A_Q ;
hw/timer/a9gtimer.c +1 -1
@@ -359,7 +359,7 @@ static void a9_gtimer_class_init(ObjectClass *klass, void *data) dc->realize = a9_gtimer_realize; dc->vmsd = &vmstate_a9_gtimer; dc->reset = a9_gtimer_reset; - dc->props = a9_gtimer_properties; +device_class_set_props (dc, a9_gtimer_properties); }static const TypeInfo a9_gtimer_info = {
hw/timer/allwinner-a10-pit.c +1 -1
@@ -284,7 +284,7 @@ static void a10_pit_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = a10_pit_reset; - dc->props = a10_pit_properties; +device_class_set_props (dc, a10_pit_properties); dc->desc ="allwinner a10 timer" ; dc->vmsd = &vmstate_a10_pit; }
hw/timer/altera_timer.c +1 -1
@@ -224,7 +224,7 @@ static void altera_timer_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = altera_timer_realize; - dc->props = altera_timer_properties; +device_class_set_props (dc, altera_timer_properties); dc->reset = altera_timer_reset; }
hw/timer/arm_mptimer.c +1 -1
@@ -312,7 +312,7 @@ static void arm_mptimer_class_init(ObjectClass *klass, void *data) dc->realize = arm_mptimer_realize; dc->vmsd = &vmstate_arm_mptimer; dc->reset = arm_mptimer_reset; - dc->props = arm_mptimer_properties; +device_class_set_props (dc, arm_mptimer_properties); }static const TypeInfo arm_mptimer_info = {
hw/timer/arm_timer.c +1 -1
@@ -397,7 +397,7 @@ static void sp804_class_init(ObjectClass *klass, void *data)DeviceClass *k =DEVICE_CLASS (klass); k->realize = sp804_realize; - k->props = sp804_properties; +device_class_set_props (k, sp804_properties); k->vmsd = &vmstate_sp804; }
hw/timer/aspeed_timer.c +1 -1
@@ -685,7 +685,7 @@ static void timer_class_init(ObjectClass *klass, void *data) dc->reset = aspeed_timer_reset; dc->desc ="ASPEED Timer" ; dc->vmsd = &vmstate_aspeed_timer_state; - dc->props = aspeed_timer_properties; +device_class_set_props (dc, aspeed_timer_properties); }static const TypeInfo aspeed_timer_info = {
hw/timer/cmsdk-apb-dualtimer.c +1 -1
@@ -510,7 +510,7 @@ static void cmsdk_apb_dualtimer_class_init(ObjectClass *klass, void *data) dc->realize = cmsdk_apb_dualtimer_realize; dc->vmsd = &cmsdk_apb_dualtimer_vmstate; dc->reset = cmsdk_apb_dualtimer_reset; - dc->props = cmsdk_apb_dualtimer_properties; +device_class_set_props (dc, cmsdk_apb_dualtimer_properties); }static const TypeInfo cmsdk_apb_dualtimer_info = {
hw/timer/cmsdk-apb-timer.c +1 -1
@@ -260,7 +260,7 @@ static void cmsdk_apb_timer_class_init(ObjectClass *klass, void *data) dc->realize = cmsdk_apb_timer_realize; dc->vmsd = &cmsdk_apb_timer_vmstate; dc->reset = cmsdk_apb_timer_reset; - dc->props = cmsdk_apb_timer_properties; +device_class_set_props (dc, cmsdk_apb_timer_properties); }static const TypeInfo cmsdk_apb_timer_info = {
hw/timer/grlib_gptimer.c +1 -1
@@ -415,7 +415,7 @@ static void grlib_gptimer_class_init(ObjectClass *klass, void *data) dc->realize = grlib_gptimer_realize; dc->reset = grlib_gptimer_reset; - dc->props = grlib_gptimer_properties; +device_class_set_props (dc, grlib_gptimer_properties); }static const TypeInfo grlib_gptimer_info = {
hw/timer/hpet.c +1 -1
@@ -800,7 +800,7 @@ static void hpet_device_class_init(ObjectClass *klass, void *data) dc->realize = hpet_realize; dc->reset = hpet_reset; dc->vmsd = &vmstate_hpet; - dc->props = hpet_device_properties; +device_class_set_props (dc, hpet_device_properties); }static const TypeInfo hpet_device_info = {
hw/timer/i8254.c +1 -1
@@ -364,7 +364,7 @@ static void pit_class_initfn(ObjectClass *klass, void *data) k->get_channel_info = pit_get_channel_info_common; k->post_load = pit_post_load; dc->reset = pit_reset; - dc->props = pit_properties; +device_class_set_props (dc, pit_properties); }static const TypeInfo pit_info = {
hw/timer/lm32_timer.c +1 -1
@@ -230,7 +230,7 @@ static void lm32_timer_class_init(ObjectClass *klass, void *data) dc->realize = lm32_timer_realize; dc->reset = timer_reset; dc->vmsd = &vmstate_lm32_timer; - dc->props = lm32_timer_properties; +device_class_set_props (dc, lm32_timer_properties); }static const TypeInfo lm32_timer_info = {
hw/timer/milkymist-sysctl.c +1 -1
@@ -343,7 +343,7 @@ static void milkymist_sysctl_class_init(ObjectClass *klass, void *data) dc->realize = milkymist_sysctl_realize; dc->reset = milkymist_sysctl_reset; dc->vmsd = &vmstate_milkymist_sysctl; - dc->props = milkymist_sysctl_properties; +device_class_set_props (dc, milkymist_sysctl_properties); }static const TypeInfo milkymist_sysctl_info = {
hw/timer/mss-timer.c +1 -1
@@ -278,7 +278,7 @@ static void mss_timer_class_init(ObjectClass *klass, void *data) {DeviceClass *dc =DEVICE_CLASS (klass); - dc->props = mss_timer_properties; +device_class_set_props (dc, mss_timer_properties); dc->vmsd = &vmstate_mss_timer; }
hw/timer/pxa2xx_timer.c +2 -2
@@ -562,7 +562,7 @@ static void pxa25x_timer_dev_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="PXA25x timer" ; - dc->props = pxa25x_timer_dev_properties; +device_class_set_props (dc, pxa25x_timer_dev_properties); }static const TypeInfo pxa25x_timer_dev_info = {
@@ -584,7 +584,7 @@ static void pxa27x_timer_dev_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="PXA27x timer" ; - dc->props = pxa27x_timer_dev_properties; +device_class_set_props (dc, pxa27x_timer_dev_properties); }static const TypeInfo pxa27x_timer_dev_info = {
hw/timer/slavio_timer.c +1 -1
@@ -427,7 +427,7 @@ static void slavio_timer_class_init(ObjectClass *klass, void *data) dc->reset = slavio_timer_reset; dc->vmsd = &vmstate_slavio_timer; - dc->props = slavio_timer_properties; +device_class_set_props (dc, slavio_timer_properties); }static const TypeInfo slavio_timer_info = {
hw/timer/stm32f2xx_timer.c +1 -1
@@ -323,7 +323,7 @@ static void stm32f2xx_timer_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->reset = stm32f2xx_timer_reset; - dc->props = stm32f2xx_timer_properties; +device_class_set_props (dc, stm32f2xx_timer_properties); dc->vmsd = &vmstate_stm32f2xx_timer; }
hw/timer/xilinx_timer.c +1 -1
@@ -253,7 +253,7 @@ static void xilinx_timer_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->realize = xilinx_timer_realize; - dc->props = xilinx_timer_properties; +device_class_set_props (dc, xilinx_timer_properties); }static const TypeInfo xilinx_timer_info = {
hw/tpm/tpm_crb.c +1 -1
@@ -313,7 +313,7 @@ static void tpm_crb_class_init(ObjectClass *klass, void *data)TPMIfClass *tc =TPM_IF_CLASS (klass); dc->realize = tpm_crb_realize; - dc->props = tpm_crb_properties; +device_class_set_props (dc, tpm_crb_properties); dc->vmsd = &vmstate_tpm_crb; dc->user_creatable = true;
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.