Skip to contentSkip to conversation

Rust, qdev, target/i386 changes for 2024-12-19

GIT PULL Paolo Bonzini 5 participants 55 messages Dec 19, 2024 – Jan 7, 2025

Subsystems (13)
lore
Share & tools
lore
#0 lore raw

The following changes since commit 8032c78e556cd0baec111740a6c636863f9bd7c8:

Merge tag 'firmware-20241216-pull-request' of https://gitlab.com/kraxel/qemu into staging (2024-12-16 14:20:33 -0500)

are available in the Git repository at:

https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 9f832641fa069a88eb41008694cfa5b62d29bc3a:

rust: pl011: simplify handling of the FIFO enabled bit in LCR (2024-12-18 17:52:36 +0100)

----------------------------------------------------------------
* qdev: second part of Property cleanups
* rust: second part of QOM rework
* rust: callbacks wrapper
* rust: pl011 bugfixes
* kvm: cleanup errors in kvm_convert_memory()

----------------------------------------------------------------
Maciej S. Szmigiero (1):
target/i386: Reset TSCs of parked vCPUs too on VM reset

Paolo Bonzini (16):
rust: qom: put class_init together from multiple ClassInitImpl<>
rust: qom: add possibility of overriding unparent
rust: rename qemu-api modules to follow C code a bit more
rust: re-export C types from qemu-api submodules
rust: tests: allow writing more than one test
rust: qom: add casting functionality
rust: qom: add initial subset of methods on Object
rust: qemu-api: add a module to wrap functions and zero-sized closures
kvm: consistently return 0/-errno from kvm_convert_memory
rust: pl011: fix declaration of LineControl bits
rust: pl011: match break logic of C version
rust: pl011: always use reset() method on registers
rust: pl011: fix break errors and definition of Data struct
rust: pl011: extend registers to 32 bits
rust: pl011: fix migration stream
rust: pl011: simplify handling of the FIFO enabled bit in LCR

Richard Henderson (24):
migration: Constify migration_properties
hw/ide: Constify sysbus_ahci_properties
target/ppc: Remove empty property list
target/s390x: Use s390x_cpu_properties for system mode only hw/pci-host/astro: Remove empty Property list
hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM hw/tricore: Remove empty Property lists
hw/s390x: Remove empty Property lists
hw/xen: Remove empty Property lists
hw/sparc: Remove empty Property lists
hw/virtio: Remove empty Property lists
include/hw/qdev-core: Detect most empty Property lists at compile time hw/core: Introduce device_class_set_props_n
migration: Use device_class_set_props_n
hw/scsi/megasas: Use device_class_set_props_n
hw/arm/armsse: Use device_class_set_props_n
rust/qemu-api: Use device_class_set_props_n
hw/core: Replace device_class_set_props with a macro target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST include/hw/qdev-properties: Shrink struct Property hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr hw/core/qdev-properties: Constify Property argument to PropertyInfo.print Constify all opaque Property pointers

 docs/devel/migration/compatibility.rst         |   1 -
 docs/devel/virtio-backends.rst                 |   1 -
 configs/targets/i386-softmmu.mak               |   1 +
 configs/targets/x86_64-softmmu.mak             |   1 +
 include/hw/qdev-core.h                         |  35 +-
 include/hw/qdev-properties.h                   |  15 +-
 include/sysemu/kvm.h                           |   8 +
 migration/options.h                            |   3 +-
 accel/kvm/kvm-all.c                            |  19 +-
 backends/tpm/tpm_util.c                        |   4 +-
 cpu-target.c                                   |   1 -
 hw/9pfs/virtio-9p-device.c                     |   1 -
 hw/acpi/erst.c                                 |   1 -
 hw/acpi/generic_event_device.c                 |   1 -
 hw/acpi/piix4.c                                |   1 -
 hw/acpi/vmgenid.c                              |   1 -
 hw/adc/aspeed_adc.c                            |   1 -
 hw/adc/npcm7xx_adc.c                           |   1 -
 hw/arm/armsse.c                                |   9 +-
 hw/arm/armv7m.c                                |   2 -
 hw/arm/aspeed_soc_common.c                     |   1 -
 hw/arm/fsl-imx25.c                             |   1 -
 hw/arm/fsl-imx6.c                              |   1 -
 hw/arm/fsl-imx6ul.c                            |   1 -
 hw/arm/fsl-imx7.c                              |   1 -
 hw/arm/integratorcp.c                          |   1 -
 hw/arm/msf2-soc.c                              |   1 -
 hw/arm/npcm7xx.c                               |   1 -
 hw/arm/nrf51_soc.c                             |   1 -
 hw/arm/smmu-common.c                           |   1 -
 hw/arm/smmuv3.c                                |   1 -
 hw/arm/stellaris.c                             |   1 -
 hw/arm/strongarm.c                             |   1 -
 hw/arm/xlnx-versal.c                           |   1 -
 hw/arm/xlnx-zynqmp.c                           |   1 -
 hw/audio/ac97.c                                |   1 -
 hw/audio/adlib.c                               |   1 -
 hw/audio/asc.c                                 |   1 -
 hw/audio/cs4231a.c                             |   1 -
 hw/audio/es1370.c                              |   1 -
 hw/audio/gus.c                                 |   1 -
 hw/audio/hda-codec.c                           |   1 -
 hw/audio/intel-hda.c                           |   2 -
 hw/audio/pcspk.c                               |   1 -
 hw/audio/pl041.c                               |   1 -
 hw/audio/sb16.c                                |   1 -
 hw/audio/via-ac97.c                            |   1 -
 hw/audio/virtio-snd-pci.c                      |   1 -
 hw/audio/virtio-snd.c                          |   1 -
 hw/audio/wm8750.c                              |   1 -
 hw/avr/atmega.c                                |   1 -
 hw/block/fdc-isa.c                             |   1 -
 hw/block/fdc-sysbus.c                          |   2 -
 hw/block/fdc.c                                 |   1 -
 hw/block/m25p80.c                              |   1 -
 hw/block/nand.c                                |   1 -
 hw/block/pflash_cfi01.c                        |   1 -
 hw/block/pflash_cfi02.c                        |   1 -
 hw/block/swim.c                                |   1 -
 hw/block/vhost-user-blk.c                      |   1 -
 hw/block/virtio-blk.c                          |   1 -
 hw/block/xen-block.c                           |   5 +-
 hw/char/avr_usart.c                            |   1 -
 hw/char/bcm2835_aux.c                          |   1 -
 hw/char/cadence_uart.c                         |   1 -
 hw/char/cmsdk-apb-uart.c                       |   1 -
 hw/char/debugcon.c                             |   1 -
 hw/char/digic-uart.c                           |   1 -
 hw/char/escc.c                                 |   1 -
 hw/char/exynos4210_uart.c                      |   1 -
 hw/char/goldfish_tty.c                         |   1 -
 hw/char/grlib_apbuart.c                        |   1 -
 hw/char/ibex_uart.c                            |   1 -
 hw/char/imx_serial.c                           |   1 -
 hw/char/ipoctal232.c                           |   1 -
 hw/char/mcf_uart.c                             |   1 -
 hw/char/nrf51_uart.c                           |   1 -
 hw/char/parallel.c                             |   1 -
 hw/char/pl011.c                                |   1 -
 hw/char/renesas_sci.c                          |   1 -
 hw/char/sclpconsole-lm.c                       |   1 -
 hw/char/sclpconsole.c                          |   1 -
 hw/char/serial-isa.c                           |   1 -
 hw/char/serial-mm.c                            |   1 -
 hw/char/serial-pci-multi.c                     |   2 -
 hw/char/serial-pci.c                           |   1 -
 hw/char/serial.c                               |   1 -
 hw/char/sh_serial.c                            |   1 -
 hw/char/shakti_uart.c                          |   1 -
 hw/char/sifive_uart.c                          |   1 -
 hw/char/spapr_vty.c                            |   1 -
 hw/char/stm32f2xx_usart.c                      |   1 -
 hw/char/stm32l4x5_usart.c                      |   1 -
 hw/char/terminal3270.c                         |   1 -
 hw/char/virtio-console.c                       |   1 -
 hw/char/virtio-serial-bus.c                    |   2 -
 hw/char/xen_console.c                          |   1 -
 hw/char/xilinx_uartlite.c                      |   1 -
 hw/core/generic-loader.c                       |   1 -
 hw/core/guest-loader.c                         |   1 -
 hw/core/or-irq.c                               |   1 -
 hw/core/platform-bus.c                         |   1 -
 hw/core/qdev-properties-system.c               |  50 +--
 hw/core/qdev-properties.c                      | 107 ++---
 hw/core/qdev.c                                 |   1 +
 hw/core/split-irq.c                            |   1 -
 hw/cpu/a15mpcore.c                             |   1 -
 hw/cpu/a9mpcore.c                              |   1 -
 hw/cpu/arm11mpcore.c                           |   1 -
 hw/cpu/cluster.c                               |   1 -
 hw/cpu/realview_mpcore.c                       |   1 -
 hw/cxl/switch-mailbox-cci.c                    |   1 -
 hw/display/artist.c                            |   1 -
 hw/display/ati.c                               |   1 -
 hw/display/bcm2835_fb.c                        |   1 -
 hw/display/bochs-display.c                     |   1 -
 hw/display/cg3.c                               |   1 -
 hw/display/cirrus_vga.c                        |   1 -
 hw/display/cirrus_vga_isa.c                    |   1 -
 hw/display/exynos4210_fimd.c                   |   1 -
 hw/display/g364fb.c                            |   1 -
 hw/display/i2c-ddc.c                           |   1 -
 hw/display/macfb.c                             |   2 -
 hw/display/pl110.c                             |   1 -
 hw/display/qxl.c                               |   1 -
 hw/display/ramfb-standalone.c                  |   1 -
 hw/display/sm501.c                             |   2 -
 hw/display/tcx.c                               |   1 -
 hw/display/vga-isa.c                           |   1 -
 hw/display/vga-mmio.c                          |   1 -
 hw/display/vga-pci.c                           |   2 -
 hw/display/vhost-user-gpu.c                    |   1 -
 hw/display/virtio-gpu-gl.c                     |   1 -
 hw/display/virtio-gpu-pci.c                    |   1 -
 hw/display/virtio-gpu-rutabaga.c               |   1 -
 hw/display/virtio-gpu.c                        |   1 -
 hw/display/virtio-vga.c                        |   1 -
 hw/display/vmware_vga.c                        |   1 -
 hw/display/xlnx_dp.c                           |   1 -
 hw/dma/i82374.c                                |   1 -
 hw/dma/i8257.c                                 |   1 -
 hw/dma/pl080.c                                 |   1 -
 hw/dma/pl330.c                                 |   2 -
 hw/dma/xilinx_axidma.c                         |   1 -
 hw/dma/xlnx-zdma.c                             |   1 -
 hw/dma/xlnx_csu_dma.c                          |   1 -
 hw/gpio/imx_gpio.c                             |   1 -
 hw/gpio/npcm7xx_gpio.c                         |   1 -
 hw/gpio/omap_gpio.c                            |   1 -
 hw/gpio/pca9552.c                              |   1 -
 hw/gpio/pca9554.c                              |   1 -
 hw/gpio/pl061.c                                |   1 -
 hw/gpio/sifive_gpio.c                          |   1 -
 hw/gpio/stm32l4x5_gpio.c                       |   1 -
 hw/hyperv/hv-balloon.c                         |   2 -
 hw/hyperv/syndbg.c                             |   1 -
 hw/hyperv/vmbus.c                              |   2 -
 hw/i2c/aspeed_i2c.c                            |   2 -
 hw/i2c/core.c                                  |   1 -
 hw/i2c/i2c_mux_pca954x.c                       |   1 -
 hw/i2c/omap_i2c.c                              |   1 -
 hw/i386/amd_iommu.c                            |   1 -
 hw/i386/intel_iommu.c                          |   1 -
 hw/i386/kvm/clock.c                            |   1 -
 hw/i386/kvm/i8254.c                            |   1 -
 hw/i386/kvm/ioapic.c                           |   1 -
 hw/i386/sgx-epc.c                              |   1 -
 hw/i386/vmmouse.c                              |   1 -
 hw/i386/vmport.c                               |   2 -
 hw/i386/x86-iommu.c                            |   1 -
 hw/i386/xen/xen_pvdevice.c                     |   1 -
 hw/ide/ahci-sysbus.c                           |   3 +-
 hw/ide/cf.c                                    |   1 -
 hw/ide/cmd646.c                                |   1 -
 hw/ide/ide-dev.c                               |   3 -
 hw/ide/isa.c                                   |   1 -
 hw/ide/macio.c                                 |   1 -
 hw/ide/mmio.c                                  |   1 -
 hw/input/pckbd.c                               |   2 -
 hw/input/stellaris_gamepad.c                   |   1 -
 hw/input/virtio-input-hid.c                    |   3 -
 hw/input/virtio-input-host.c                   |   1 -
 hw/input/virtio-input.c                        |   1 -
 hw/intc/apic_common.c                          |   1 -
 hw/intc/arm_gic_common.c                       |   1 -
 hw/intc/arm_gicv2m.c                           |   1 -
 hw/intc/arm_gicv3_common.c                     |   1 -
 hw/intc/arm_gicv3_its.c                        |   1 -
 hw/intc/arm_gicv3_its_kvm.c                    |   1 -
 hw/intc/armv7m_nvic.c                          |   1 -
 hw/intc/exynos4210_combiner.c                  |   1 -
 hw/intc/exynos4210_gic.c                       |   1 -
 hw/intc/goldfish_pic.c                         |   1 -
 hw/intc/grlib_irqmp.c                          |   1 -
 hw/intc/i8259_common.c                         |   1 -
 hw/intc/ioapic.c                               |   1 -
 hw/intc/loongarch_extioi.c                     |   1 -
 hw/intc/loongarch_pch_msi.c                    |   1 -
 hw/intc/loongarch_pch_pic.c                    |   1 -
 hw/intc/loongson_ipi_common.c                  |   1 -
 hw/intc/m68k_irqc.c                            |   1 -
 hw/intc/mips_gic.c                             |   1 -
 hw/intc/omap_intc.c                            |   1 -
 hw/intc/ompic.c                                |   1 -
 hw/intc/openpic.c                              |   1 -
 hw/intc/openpic_kvm.c                          |   1 -
 hw/intc/pnv_xive.c                             |   1 -
 hw/intc/pnv_xive2.c                            |   1 -
 hw/intc/ppc-uic.c                              |   1 -
 hw/intc/riscv_aclint.c                         |   2 -
 hw/intc/riscv_aplic.c                          |   1 -
 hw/intc/riscv_imsic.c                          |   1 -
 hw/intc/rx_icu.c                               |   1 -
 hw/intc/s390_flic.c                            |   2 -
 hw/intc/sifive_plic.c                          |   1 -
 hw/intc/spapr_xive.c                           |   1 -
 hw/intc/xics.c                                 |   2 -
 hw/intc/xilinx_intc.c                          |   1 -
 hw/intc/xive.c                                 |   4 -
 hw/intc/xive2.c                                |   2 -
 hw/intc/xlnx-pmu-iomod-intc.c                  |   1 -
 hw/ipack/ipack.c                               |   1 -
 hw/ipmi/ipmi.c                                 |   1 -
 hw/ipmi/ipmi_bmc_extern.c                      |   1 -
 hw/ipmi/ipmi_bmc_sim.c                         |   1 -
 hw/ipmi/isa_ipmi_bt.c                          |   1 -
 hw/ipmi/isa_ipmi_kcs.c                         |   1 -
 hw/isa/lpc_ich9.c                              |   1 -
 hw/isa/pc87312.c                               |   1 -
 hw/isa/piix.c                                  |   1 -
 hw/m68k/mcf5206.c                              |   1 -
 hw/m68k/mcf_intc.c                             |   1 -
 hw/m68k/next-cube.c                            |   1 -
 hw/m68k/q800-glue.c                            |   1 -
 hw/mem/cxl_type3.c                             |   1 -
 hw/mem/nvdimm.c                                |   1 -
 hw/mem/pc-dimm.c                               |   1 -
 hw/mem/sparse-mem.c                            |   1 -
 hw/mips/cps.c                                  |   1 -
 hw/misc/a9scu.c                                |   1 -
 hw/misc/allwinner-h3-dramc.c                   |   1 -
 hw/misc/allwinner-r40-dramc.c                  |   1 -
 hw/misc/allwinner-sid.c                        |   1 -
 hw/misc/applesmc.c                             |   1 -
 hw/misc/arm11scu.c                             |   1 -
 hw/misc/arm_l2x0.c                             |   1 -
 hw/misc/arm_sysctl.c                           |   1 -
 hw/misc/armsse-cpuid.c                         |   1 -
 hw/misc/aspeed_hace.c                          |   1 -
 hw/misc/aspeed_i3c.c                           |   1 -
 hw/misc/aspeed_lpc.c                           |   1 -
 hw/misc/aspeed_sbc.c                           |   1 -
 hw/misc/aspeed_scu.c                           |   1 -
 hw/misc/aspeed_sdmc.c                          |   1 -
 hw/misc/bcm2835_cprman.c                       |   1 -
 hw/misc/bcm2835_property.c                     |   1 -
 hw/misc/debugexit.c                            |   1 -
 hw/misc/eccmemctl.c                            |   1 -
 hw/misc/empty_slot.c                           |   1 -
 hw/misc/iotkit-secctl.c                        |   1 -
 hw/misc/iotkit-sysctl.c                        |   1 -
 hw/misc/iotkit-sysinfo.c                       |   1 -
 hw/misc/ivshmem.c                              |   2 -
 hw/misc/led.c                                  |   1 -
 hw/misc/mac_via.c                              |   1 -
 hw/misc/macio/cuda.c                           |   1 -
 hw/misc/macio/macio.c                          |   2 -
 hw/misc/macio/pmu.c                            |   1 -
 hw/misc/mips_cmgcr.c                           |   1 -
 hw/misc/mips_cpc.c                             |   1 -
 hw/misc/mips_itu.c                             |   1 -
 hw/misc/mos6522.c                              |   1 -
 hw/misc/mps2-fpgaio.c                          |   1 -
 hw/misc/mps2-scc.c                             |   1 -
 hw/misc/msf2-sysreg.c                          |   1 -
 hw/misc/npcm7xx_gcr.c                          |   1 -
 hw/misc/nrf51_rng.c                            |   1 -
 hw/misc/pci-testdev.c                          |   1 -
 hw/misc/pvpanic-isa.c                          |   1 -
 hw/misc/pvpanic-pci.c                          |   1 -
 hw/misc/sifive_e_aon.c                         |   1 -
 hw/misc/sifive_u_otp.c                         |   1 -
 hw/misc/stm32l4x5_rcc.c                        |   1 -
 hw/misc/tz-mpc.c                               |   1 -
 hw/misc/tz-msc.c                               |   1 -
 hw/misc/tz-ppc.c                               |   1 -
 hw/misc/unimp.c                                |   1 -
 hw/misc/xlnx-versal-cframe-reg.c               |   2 -
 hw/misc/xlnx-versal-cfu.c                      |   2 -
 hw/misc/xlnx-versal-trng.c                     |   4 +-
 hw/misc/xlnx-versal-xramc.c                    |   1 -
 hw/misc/zynq_slcr.c                            |   1 -
 hw/net/allwinner-sun8i-emac.c                  |   1 -
 hw/net/allwinner_emac.c                        |   1 -
 hw/net/cadence_gem.c                           |   1 -
 hw/net/can/xlnx-versal-canfd.c                 |   1 -
 hw/net/can/xlnx-zynqmp-can.c                   |   1 -
 hw/net/dp8393x.c                               |   1 -
 hw/net/e1000.c                                 |   1 -
 hw/net/e1000e.c                                |   1 -
 hw/net/eepro100.c                              |   1 -
 hw/net/fsl_etsec/etsec.c                       |   1 -
 hw/net/ftgmac100.c                             |   2 -
 hw/net/igb.c                                   |   1 -
 hw/net/imx_fec.c                               |   1 -
 hw/net/lan9118.c                               |   1 -
 hw/net/lance.c                                 |   1 -
 hw/net/lasi_i82596.c                           |   1 -
 hw/net/mcf_fec.c                               |   1 -
 hw/net/mipsnet.c                               |   1 -
 hw/net/msf2-emac.c                             |   1 -
 hw/net/mv88w8618_eth.c                         |   1 -
 hw/net/ne2000-isa.c                            |   1 -
 hw/net/ne2000-pci.c                            |   1 -
 hw/net/npcm7xx_emc.c                           |   1 -
 hw/net/npcm_gmac.c                             |   1 -
 hw/net/opencores_eth.c                         |   1 -
 hw/net/pcnet-pci.c                             |   1 -
 hw/net/rocker/rocker.c                         |   1 -
 hw/net/rtl8139.c                               |   1 -
 hw/net/smc91c111.c                             |   1 -
 hw/net/spapr_llan.c                            |   1 -
 hw/net/stellaris_enet.c                        |   1 -
 hw/net/sungem.c                                |   1 -
 hw/net/sunhme.c                                |   1 -
 hw/net/tulip.c                                 |   1 -
 hw/net/virtio-net.c                            |   1 -
 hw/net/vmxnet3.c                               |   1 -
 hw/net/xen_nic.c                               |   1 -
 hw/net/xgmac.c                                 |   1 -
 hw/net/xilinx_axienet.c                        |   1 -
 hw/net/xilinx_ethlite.c                        |   1 -
 hw/nubus/nubus-bridge.c                        |   1 -
 hw/nubus/nubus-device.c                        |   1 -
 hw/nvme/ctrl.c                                 |   1 -
 hw/nvme/nguid.c                                |   4 +-
 hw/nvme/ns.c                                   |   1 -
 hw/nvme/subsys.c                               |   1 -
 hw/nvram/ds1225y.c                             |   1 -
 hw/nvram/eeprom_at24c.c                        |   1 -
 hw/nvram/fw_cfg.c                              |   3 -
 hw/nvram/mac_nvram.c                           |   1 -
 hw/nvram/nrf51_nvm.c                           |   1 -
 hw/nvram/spapr_nvram.c                         |   1 -
 hw/nvram/xlnx-bbram.c                          |   1 -
 hw/nvram/xlnx-efuse.c                          |   1 -
 hw/nvram/xlnx-versal-efuse-cache.c             |   2 -
 hw/nvram/xlnx-versal-efuse-ctrl.c              |   2 -
 hw/nvram/xlnx-zynqmp-efuse.c                   |   2 -
 hw/pci-bridge/cxl_downstream.c                 |   1 -
 hw/pci-bridge/cxl_root_port.c                  |   1 -
 hw/pci-bridge/cxl_upstream.c                   |   1 -
 hw/pci-bridge/gen_pcie_root_port.c             |   1 -
 hw/pci-bridge/pci_bridge_dev.c                 |   1 -
 hw/pci-bridge/pci_expander_bridge.c            |   2 -
 hw/pci-bridge/pcie_pci_bridge.c                |   1 -
 hw/pci-bridge/pcie_root_port.c                 |   1 -
 hw/pci-bridge/xio3130_downstream.c             |   1 -
 hw/pci-host/astro.c                            |   5 -
 hw/pci-host/dino.c                             |   1 -
 hw/pci-host/gpex.c                             |   1 -
 hw/pci-host/grackle.c                          |   1 -
 hw/pci-host/gt64120.c                          |   1 -
 hw/pci-host/i440fx.c                           |   1 -
 hw/pci-host/mv64361.c                          |   1 -
 hw/pci-host/pnv_phb.c                          |   4 -
 hw/pci-host/pnv_phb3.c                         |   1 -
 hw/pci-host/pnv_phb4.c                         |   1 -
 hw/pci-host/pnv_phb4_pec.c                     |   1 -
 hw/pci-host/ppce500.c                          |   1 -
 hw/pci-host/q35.c                              |   2 -
 hw/pci-host/raven.c                            |   1 -
 hw/pci-host/sabre.c                            |   1 -
 hw/pci-host/uninorth.c                         |   1 -
 hw/pci-host/versatile.c                        |   1 -
 hw/pci-host/xilinx-pcie.c                      |   1 -
 hw/pci/pci.c                                   |   1 -
 hw/pci/pci_bridge.c                            |   1 -
 hw/pci/pci_host.c                              |   1 -
 hw/pci/pcie_port.c                             |   2 -
 hw/ppc/pnv.c                                   |   1 -
 hw/ppc/pnv_adu.c                               |   1 -
 hw/ppc/pnv_chiptod.c                           |   1 -
 hw/ppc/pnv_core.c                              |   2 -
 hw/ppc/pnv_homer.c                             |   1 -
 hw/ppc/pnv_i2c.c                               |   1 -
 hw/ppc/pnv_lpc.c                               |   1 -
 hw/ppc/pnv_pnor.c                              |   1 -
 hw/ppc/pnv_psi.c                               |   1 -
 hw/ppc/ppc405_uc.c                             |   1 -
 hw/ppc/ppc440_uc.c                             |   1 -
 hw/ppc/ppc4xx_devs.c                           |   2 -
 hw/ppc/ppc4xx_sdram.c                          |   2 -
 hw/ppc/prep_systemio.c                         |   1 -
 hw/ppc/rs6000_mc.c                             |   1 -
 hw/ppc/spapr_cpu_core.c                        |   1 -
 hw/ppc/spapr_nvdimm.c                          |  10 +-
 hw/ppc/spapr_pci.c                             |   1 -
 hw/ppc/spapr_rng.c                             |   1 -
 hw/ppc/spapr_tpm_proxy.c                       |   1 -
 hw/remote/proxy.c                              |   1 -
 hw/riscv/opentitan.c                           |   1 -
 hw/riscv/riscv-iommu-pci.c                     |   1 -
 hw/riscv/riscv-iommu.c                         |   1 -
 hw/riscv/riscv_hart.c                          |   1 -
 hw/riscv/sifive_u.c                            |   1 -
 hw/rtc/allwinner-rtc.c                         |   1 -
 hw/rtc/goldfish_rtc.c                          |   1 -
 hw/rtc/m48t59-isa.c                            |   1 -
 hw/rtc/m48t59.c                                |   1 -
 hw/rtc/mc146818rtc.c                           |   1 -
 hw/rtc/pl031.c                                 |   1 -
 hw/rx/rx62n.c                                  |   1 -
 hw/s390x/3270-ccw.c                            |   5 -
 hw/s390x/ccw-device.c                          |   1 -
 hw/s390x/css-bridge.c                          |   1 -
 hw/s390x/css.c                                 |   4 +-
 hw/s390x/ipl.c                                 |   1 -
 hw/s390x/s390-pci-bus.c                        |   5 +-
 hw/s390x/s390-skeys.c                          |   1 -
 hw/s390x/s390-stattrib.c                       |   1 -
 hw/s390x/vhost-scsi-ccw.c                      |   1 -
 hw/s390x/vhost-user-fs-ccw.c                   |   1 -
 hw/s390x/vhost-vsock-ccw.c                     |   1 -
 hw/s390x/virtio-ccw-9p.c                       |   1 -
 hw/s390x/virtio-ccw-balloon.c                  |   1 -
 hw/s390x/virtio-ccw-blk.c                      |   1 -
 hw/s390x/virtio-ccw-crypto.c                   |   1 -
 hw/s390x/virtio-ccw-gpu.c                      |   1 -
 hw/s390x/virtio-ccw-input.c                    |   1 -
 hw/s390x/virtio-ccw-net.c                      |   1 -
 hw/s390x/virtio-ccw-rng.c                      |   1 -
 hw/s390x/virtio-ccw-scsi.c                     |   1 -
 hw/s390x/virtio-ccw-serial.c                   |   1 -
 hw/scsi/megasas.c                              |   7 +-
 hw/scsi/mptsas.c                               |   1 -
 hw/scsi/scsi-bus.c                             |   1 -
 hw/scsi/scsi-disk.c                            |   3 -
 hw/scsi/scsi-generic.c                         |   1 -
 hw/scsi/spapr_vscsi.c                          |   1 -
 hw/scsi/vhost-scsi.c                           |   1 -
 hw/scsi/vhost-user-scsi.c                      |   1 -
 hw/scsi/virtio-scsi.c                          |   1 -
 hw/scsi/vmw_pvscsi.c                           |   1 -
 hw/sd/allwinner-sdhost.c                       |   1 -
 hw/sd/aspeed_sdhci.c                           |   1 -
 hw/sd/sd.c                                     |   3 -
 hw/sd/sdhci-pci.c                              |   1 -
 hw/sd/sdhci.c                                  |   1 -
 hw/sparc/sun4m.c                               |   5 -
 hw/sparc/sun4m_iommu.c                         |   1 -
 hw/sparc64/sun4u.c                             |   7 -
 hw/ssi/aspeed_smc.c                            |   2 -
 hw/ssi/ibex_spi_host.c                         |   1 -
 hw/ssi/npcm7xx_fiu.c                           |   1 -
 hw/ssi/pnv_spi.c                               |   1 -
 hw/ssi/sifive_spi.c                            |   1 -
 hw/ssi/ssi.c                                   |   1 -
 hw/ssi/xilinx_spi.c                            |   1 -
 hw/ssi/xilinx_spips.c                          |   2 -
 hw/ssi/xlnx-versal-ospi.c                      |   1 -
 hw/timer/a9gtimer.c                            |   1 -
 hw/timer/allwinner-a10-pit.c                   |   1 -
 hw/timer/arm_mptimer.c                         |   1 -
 hw/timer/arm_timer.c                           |   1 -
 hw/timer/aspeed_timer.c                        |   1 -
 hw/timer/avr_timer16.c                         |   1 -
 hw/timer/grlib_gptimer.c                       |   1 -
 hw/timer/hpet.c                                |   1 -
 hw/timer/i8254_common.c                        |   1 -
 hw/timer/ibex_timer.c                          |   1 -
 hw/timer/mss-timer.c                           |   1 -
 hw/timer/nrf51_timer.c                         |   1 -
 hw/timer/pxa2xx_timer.c                        |   1 -
 hw/timer/renesas_cmt.c                         |   1 -
 hw/timer/renesas_tmr.c                         |   1 -
 hw/timer/sifive_pwm.c                          |   1 -
 hw/timer/slavio_timer.c                        |   1 -
 hw/timer/sse-timer.c                           |   1 -
 hw/timer/stm32f2xx_timer.c                     |   1 -
 hw/timer/xilinx_timer.c                        |   1 -
 hw/tpm/tpm_crb.c                               |   1 -
 hw/tpm/tpm_spapr.c                             |   1 -
 hw/tpm/tpm_tis_i2c.c                           |   1 -
 hw/tpm/tpm_tis_isa.c                           |   1 -
 hw/tpm/tpm_tis_sysbus.c                        |   1 -
 hw/tricore/tc27x_soc.c                         |   5 -
 hw/tricore/tricore_testdevice.c                |   5 -
 hw/ufs/lu.c                                    |   1 -
 hw/ufs/ufs.c                                   |   1 -
 hw/usb/bus.c                                   |   1 -
 hw/usb/canokey.c                               |   1 -
 hw/usb/ccid-card-emulated.c                    |   1 -
 hw/usb/ccid-card-passthru.c                    |   1 -
 hw/usb/dev-audio.c                             |   1 -
 hw/usb/dev-hid.c                               |   3 -
 hw/usb/dev-hub.c                               |   1 -
 hw/usb/dev-mtp.c                               |   1 -
 hw/usb/dev-network.c                           |   1 -
 hw/usb/dev-serial.c                            |   2 -
 hw/usb/dev-smartcard-reader.c                  |   2 -
 hw/usb/dev-storage-classic.c                   |   1 -
 hw/usb/dev-uas.c                               |   1 -
 hw/usb/hcd-dwc2.c                              |   1 -
 hw/usb/hcd-dwc3.c                              |   1 -
 hw/usb/hcd-ehci-pci.c                          |   1 -
 hw/usb/hcd-ehci-sysbus.c                       |   1 -
 hw/usb/hcd-ohci-pci.c                          |   1 -
 hw/usb/hcd-ohci-sysbus.c                       |   1 -
 hw/usb/hcd-uhci.c                              |   2 -
 hw/usb/hcd-xhci-nec.c                          |   1 -
 hw/usb/hcd-xhci-sysbus.c                       |   1 -
 hw/usb/hcd-xhci.c                              |   1 -
 hw/usb/host-libusb.c                           |   1 -
 hw/usb/redirect.c                              |   1 -
 hw/usb/u2f-emulated.c                          |   1 -
 hw/usb/u2f-passthru.c                          |   1 -
 hw/vfio/ap.c                                   |   1 -
 hw/vfio/ccw.c                                  |   1 -
 hw/vfio/pci-quirks.c                           |   4 +-
 hw/vfio/pci.c                                  |   2 -
 hw/vfio/platform.c                             |   1 -
 hw/virtio/vdpa-dev-pci.c                       |   5 -
 hw/virtio/vdpa-dev.c                           |   1 -
 hw/virtio/vhost-scsi-pci.c                     |   1 -
 hw/virtio/vhost-user-blk-pci.c                 |   1 -
 hw/virtio/vhost-user-device.c                  |   1 -
 hw/virtio/vhost-user-fs-pci.c                  |   1 -
 hw/virtio/vhost-user-fs.c                      |   1 -
 hw/virtio/vhost-user-gpio.c                    |   1 -
 hw/virtio/vhost-user-i2c.c                     |   1 -
 hw/virtio/vhost-user-input.c                   |   1 -
 hw/virtio/vhost-user-rng-pci.c                 |   1 -
 hw/virtio/vhost-user-rng.c                     |   1 -
 hw/virtio/vhost-user-scmi.c                    |   1 -
 hw/virtio/vhost-user-scsi-pci.c                |   1 -
 hw/virtio/vhost-user-snd-pci.c                 |   5 -
 hw/virtio/vhost-user-snd.c                     |   1 -
 hw/virtio/vhost-user-vsock-pci.c               |   1 -
 hw/virtio/vhost-user-vsock.c                   |   1 -
 hw/virtio/vhost-vsock-common.c                 |   1 -
 hw/virtio/vhost-vsock-pci.c                    |   1 -
 hw/virtio/vhost-vsock.c                        |   1 -
 hw/virtio/virtio-9p-pci.c                      |   1 -
 hw/virtio/virtio-balloon.c                     |   1 -
 hw/virtio/virtio-blk-pci.c                     |   1 -
 hw/virtio/virtio-crypto-pci.c                  |   1 -
 hw/virtio/virtio-crypto.c                      |   1 -
 hw/virtio/virtio-input-pci.c                   |   1 -
 hw/virtio/virtio-iommu-pci.c                   |   1 -
 hw/virtio/virtio-iommu.c                       |   1 -
 hw/virtio/virtio-mem.c                         |   1 -
 hw/virtio/virtio-mmio.c                        |   1 -
 hw/virtio/virtio-net-pci.c                     |   1 -
 hw/virtio/virtio-nsm.c                         |   1 -
 hw/virtio/virtio-pci.c                         |   2 -
 hw/virtio/virtio-pmem.c                        |   1 -
 hw/virtio/virtio-rng-pci.c                     |   1 -
 hw/virtio/virtio-rng.c                         |   1 -
 hw/virtio/virtio-scsi-pci.c                    |   1 -
 hw/virtio/virtio-serial-pci.c                  |   1 -
 hw/virtio/virtio.c                             |   1 -
 hw/watchdog/sbsa_gwdt.c                        |   1 -
 hw/watchdog/wdt_aspeed.c                       |   1 -
 hw/watchdog/wdt_imx2.c                         |   1 -
 hw/xen/xen-bus.c                               |   1 -
 hw/xen/xen-legacy-backend.c                    |  17 -
 hw/xen/xen_pt.c                                |   1 -
 migration/migration.c                          |   3 +-
 migration/options.c                            |   4 +-
 system/qdev-monitor.c                          |  15 +-
 target/arm/cpu.c                               |   1 -
 target/avr/cpu.c                               |   1 -
 target/hexagon/cpu.c                           |   1 -
 target/i386/cpu.c                              |   2 -
 target/i386/kvm/kvm.c                          |  15 +
 target/microblaze/cpu.c                        |   1 -
 target/mips/cpu.c                              |   1 -
 target/ppc/cpu_init.c                          |   6 -
 target/riscv/cpu.c                             |  13 +-
 target/s390x/cpu.c                             |   7 +-
 target/sparc/cpu.c                             |   1 -
 tests/unit/test-qdev-global-props.c            |   1 -
 rust/Cargo.toml                                |   1 +
 rust/hw/char/pl011/src/device.rs               | 154 ++++---
 rust/hw/char/pl011/src/device_class.rs         |  10 +-
 rust/hw/char/pl011/src/lib.rs                  | 161 +++----
 rust/qemu-api-macros/src/lib.rs                |   2 +-
 rust/qemu-api/meson.build                      |   6 +-
 rust/qemu-api/src/callbacks.rs                 | 144 ++++++
 rust/qemu-api/src/definitions.rs               | 168 -------
 rust/qemu-api/src/lib.rs                       |   6 +-
 rust/qemu-api/src/module.rs                    |  43 ++
 rust/qemu-api/src/prelude.rs                   |  10 +-
 rust/qemu-api/src/{device_class.rs => qdev.rs} |  67 ++-
 rust/qemu-api/src/qom.rs                       | 584 +++++++++++++++++++++++++
 rust/qemu-api/src/sysbus.rs                    |  20 +-
 rust/qemu-api/src/vmstate.rs                   |  31 +-
 rust/qemu-api/tests/tests.rs                   | 215 ++++++---
 599 files changed, 1383 insertions(+), 1264 deletions(-)
 create mode 100644 rust/qemu-api/src/callbacks.rs
 delete mode 100644 rust/qemu-api/src/definitions.rs
 create mode 100644 rust/qemu-api/src/module.rs
 rename rust/qemu-api/src/{device_class.rs => qdev.rs} (72%)
 create mode 100644 rust/qemu-api/src/qom.rs
Signature · 1 line
2.47.1
#1 lore raw

[PULL 17/41] rust/qemu-api: Use device_class_set_props_n

From: Richard Henderson <[email protected]>

This means we can update declare_properties to drop the zero terminator at the end of the array as well.

---
 rust/qemu-api/src/device_class.rs | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
rust/qemu-api/src/device_class.rs +6 -5
index 03d03feee83..c98f0b2c7da 100644
@@ -7,7 +7,6 @@
 use crate::{
     bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Property, VMStateDescription},
     prelude::*,
-    zeroable::Zeroable,
 };
 
 /// Trait providing the contents of [`DeviceClass`].
@@ -31,7 +30,7 @@ pub trait DeviceImpl {
     /// device.  Not a `const` because referencing statics in constants
     /// is unstable until Rust 1.83.0.
     fn properties() -> &'static [Property] {
-        &[Zeroable::ZERO; 1]
+        &[]
     }
 
     /// A `VMStateDescription` providing the migration format for the device
@@ -87,7 +86,10 @@ fn vmsd() -> Option<&'static VMStateDescription> {
         if let Some(vmsd) = <T as DeviceImpl>::vmsd() {
             dc.vmsd = vmsd;
         }
-        bindings::device_class_set_props(dc, <T as DeviceImpl>::properties().as_ptr());
+        let prop = <T as DeviceImpl>::properties();
+        if !prop.is_empty() {
+            bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
+        }
     }
 }
 
@@ -134,7 +136,7 @@ macro_rules! define_property {
 macro_rules! declare_properties {
     ($ident:ident, $($prop:expr),*$(,)*) => {
         pub static $ident: [$crate::bindings::Property; {
-            let mut len = 1;
+            let mut len = 0;
             $({
                 _ = stringify!($prop);
                 len += 1;
@@ -142,7 +144,6 @@ macro_rules! declare_properties {
             len
         }] = [
             $($prop),*,
-            $crate::zeroable::Zeroable::ZERO,
         ];
     };
 }
Signature · 1 line
2.47.1
#2 lore raw

[PULL 02/41] hw/ide: Constify sysbus_ahci_properties

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 hw/ide/ahci-sysbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ide/ahci-sysbus.c +1 -1
index d43db0923f1..2432039290b 100644
@@ -62,7 +62,7 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp)
     ahci_realize(&s->ahci, dev, &address_space_memory);
 }
 
-static Property sysbus_ahci_properties[] = {
+static const Property sysbus_ahci_properties[] = {
     DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
Signature · 1 line
2.47.1
#3 lore raw

[PULL 19/41] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

These are not arrays of Property and had no business using DEFINE_PROP_END_OF_LIST. Use plain { } instead.

---
 target/riscv/cpu.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
target/riscv/cpu.c +6 -7
index 4329015076d..a5aa3a8670a 100644
@@ -213,7 +213,7 @@ const RISCVIsaExtData isa_edata_arr[] = {
     ISA_EXT_DATA_ENTRY(xtheadsync, PRIV_VERSION_1_11_0, ext_xtheadsync),
     ISA_EXT_DATA_ENTRY(xventanacondops, PRIV_VERSION_1_12_0, ext_XVentanaCondOps),
 
-    DEFINE_PROP_END_OF_LIST(),
+    { },
 };
 
 bool isa_ext_is_enabled(RISCVCPU *cpu, uint32_t ext_offset)
@@ -1575,7 +1575,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = {
     MULTI_EXT_CFG_BOOL("zvksc", ext_zvksc, false),
     MULTI_EXT_CFG_BOOL("zvksg", ext_zvksg, false),
 
-    DEFINE_PROP_END_OF_LIST(),
+    { },
 };
 
 const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[] = {
@@ -1592,12 +1592,12 @@ const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[] = {
     MULTI_EXT_CFG_BOOL("xtheadsync", ext_xtheadsync, false),
     MULTI_EXT_CFG_BOOL("xventanacondops", ext_XVentanaCondOps, false),
 
-    DEFINE_PROP_END_OF_LIST(),
+    { },
 };
 
 /* These are experimental so mark with 'x-' */
 const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[] = {
-    DEFINE_PROP_END_OF_LIST(),
+    { },
 };
 
 /*
@@ -1610,7 +1610,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[] = {
 const RISCVCPUMultiExtConfig riscv_cpu_named_features[] = {
     MULTI_EXT_CFG_BOOL("zic64b", ext_zic64b, true),
 
-    DEFINE_PROP_END_OF_LIST(),
+    { },
 };
 
 /* Deprecated entries marked for future removal */
@@ -1627,7 +1627,7 @@ const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[] = {
     MULTI_EXT_CFG_BOOL("Zve64f", ext_zve64f, false),
     MULTI_EXT_CFG_BOOL("Zve64d", ext_zve64d, false),
 
-    DEFINE_PROP_END_OF_LIST(),
+    { },
 };
 
 static void cpu_set_prop_err(RISCVCPU *cpu, const char *propname,
@@ -2699,7 +2699,6 @@ static const Property riscv_cpu_properties[] = {
      * it with -x and default to 'false'.
      */
     DEFINE_PROP_BOOL("x-misa-w", RISCVCPU, cfg.misa_w, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 #if defined(TARGET_RISCV64)
Signature · 1 line
2.47.1
#4 lore raw

[PULL 23/41] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

There is exactly one instance of this method: print_pci_devfn.

---
 include/hw/qdev-properties.h     | 2 +-
 hw/core/qdev-properties-system.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/hw/qdev-properties.h +1 -1
index 447767688b6..bf27375a3cc 100644
@@ -34,7 +34,7 @@ struct PropertyInfo {
     const char *description;
     const QEnumLookup *enum_table;
     bool realized_set_allowed; /* allow setting property on realized device */
-    int (*print)(Object *obj, Property *prop, char *dest, size_t len);
+    int (*print)(Object *obj, const Property *prop, char *dest, size_t len);
     void (*set_default_value)(ObjectProperty *op, const Property *prop);
     ObjectProperty *(*create)(ObjectClass *oc, const char *name,
                               const Property *prop);
hw/core/qdev-properties-system.c +1 -1
index 22ea1ed3583..1034e9b5809 100644
@@ -869,7 +869,7 @@ out:
     visit_end_alternate(v, (void **) &alt);
 }
 
-static int print_pci_devfn(Object *obj, Property *prop, char *dest,
+static int print_pci_devfn(Object *obj, const Property *prop, char *dest,
                            size_t len)
 {
     int32_t *ptr = object_field_prop_ptr(obj, prop);
Signature · 1 line
2.47.1
#5 lore raw

[PULL 07/41] hw/tricore: Remove empty Property lists

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 hw/tricore/tc27x_soc.c          | 5 -----
 hw/tricore/tricore_testdevice.c | 5 -----
 2 files changed, 10 deletions(-)
hw/tricore/tc27x_soc.c +0 -5
index ecd92717b50..81bb16d89b6 100644
@@ -201,16 +201,11 @@ static void tc27x_soc_init(Object *obj)
     object_initialize_child(obj, "tc27x", &s->cpu, sc->cpu_type);
 }
 
-static Property tc27x_soc_properties[] = {
-    DEFINE_PROP_END_OF_LIST(),
-};
-
 static void tc27x_soc_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = tc27x_soc_realize;
-    device_class_set_props(dc, tc27x_soc_properties);
 }
 
 static void tc277d_soc_class_init(ObjectClass *oc, void *data)
hw/tricore/tricore_testdevice.c +0 -5
index ae95c495654..e60866d76fa 100644
@@ -58,15 +58,10 @@ static void tricore_testdevice_init(Object *obj)
                           "tricore_testdevice", 0x4);
 }
 
-static Property tricore_testdevice_properties[] = {
-    DEFINE_PROP_END_OF_LIST()
-};
-
 static void tricore_testdevice_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    device_class_set_props(dc, tricore_testdevice_properties);
     device_class_set_legacy_reset(dc, tricore_testdevice_reset);
 }
 
Signature · 1 line
2.47.1
#6 lore raw

[PULL 27/41] rust: rename qemu-api modules to follow C code a bit more

In reply to Paolo Bonzini

A full match would mean calling them qom::object and hw::core::qdev. For now, keep the names shorter but still a bit easier to find.

---
 rust/hw/char/pl011/src/device.rs              |  4 +-
 rust/qemu-api-macros/src/lib.rs               |  2 +-
 rust/qemu-api/meson.build                     |  5 +-
 rust/qemu-api/src/lib.rs                      |  5 +-
 rust/qemu-api/src/module.rs                   | 43 +++++++++++
 rust/qemu-api/src/prelude.rs                  |  2 +-
 .../qemu-api/src/{device_class.rs => qdev.rs} |  4 +-
 rust/qemu-api/src/{definitions.rs => qom.rs}  | 76 ++++++++-----------
 rust/qemu-api/src/sysbus.rs                   |  2 +-
 rust/qemu-api/tests/tests.rs                  |  4 +-
 10 files changed, 91 insertions(+), 56 deletions(-)
 create mode 100644 rust/qemu-api/src/module.rs
 rename rust/qemu-api/src/{device_class.rs => qdev.rs} (97%)
 rename rust/qemu-api/src/{definitions.rs => qom.rs} (84%)
rust/hw/char/pl011/src/device.rs +2 -2
index d9e9f35f456..3fed8b4ad25 100644
@@ -11,10 +11,10 @@
 use qemu_api::{
     bindings::{self, *},
     c_str,
-    definitions::ObjectImpl,
-    device_class::DeviceImpl,
     irq::InterruptSource,
     prelude::*,
+    qdev::DeviceImpl,
+    qom::ObjectImpl,
 };
 
 use crate::{
rust/qemu-api-macros/src/lib.rs +1 -1
index cf99ac04b8f..74a8bc7503e 100644
@@ -40,7 +40,7 @@ pub fn derive_object(input: TokenStream) -> TokenStream {
     let expanded = quote! {
         ::qemu_api::module_init! {
             MODULE_INIT_QOM => unsafe {
-                ::qemu_api::bindings::type_register_static(&<#name as ::qemu_api::definitions::ObjectImpl>::TYPE_INFO);
+                ::qemu_api::bindings::type_register_static(&<#name as ::qemu_api::qom::ObjectImpl>::TYPE_INFO);
             }
         }
     };
rust/qemu-api/meson.build +3 -2
index adcee661150..7ff408ad68e 100644
@@ -19,11 +19,12 @@ _qemu_api_rs = static_library(
       'src/bitops.rs',
       'src/cell.rs',
       'src/c_str.rs',
-      'src/definitions.rs',
-      'src/device_class.rs',
       'src/irq.rs',
+      'src/module.rs',
       'src/offset_of.rs',
       'src/prelude.rs',
+      'src/qdev.rs',
+      'src/qom.rs',
       'src/sysbus.rs',
       'src/vmstate.rs',
       'src/zeroable.rs',
rust/qemu-api/src/lib.rs +3 -2
index 9e007e16354..124bece0449 100644
@@ -15,10 +15,11 @@
 pub mod bitops;
 pub mod c_str;
 pub mod cell;
-pub mod definitions;
-pub mod device_class;
 pub mod irq;
+pub mod module;
 pub mod offset_of;
+pub mod qdev;
+pub mod qom;
 pub mod sysbus;
 pub mod vmstate;
 pub mod zeroable;
rust/qemu-api/src/module.rs new file +43 -0

43 lines not on this page · raw message

rust/qemu-api/src/prelude.rs +1 -1
index 1b8677b2d9a..5cc41f081f9 100644
@@ -7,4 +7,4 @@
 pub use crate::cell::BqlCell;
 pub use crate::cell::BqlRefCell;
 
-pub use crate::definitions::ObjectType;
+pub use crate::qom::ObjectType;
rust/qemu-api/src/qdev.rs renamed from rust/qemu-api/src/device_class.rs +3 -1
similarity index 97%
rename from rust/qemu-api/src/device_class.rs
rename to rust/qemu-api/src/qdev.rs
index a9965d1f123..ad4c12d097e 100644
@@ -2,12 +2,14 @@
 // Author(s): Manos Pitsidianakis <[email protected]>
 // SPDX-License-Identifier: GPL-2.0-or-later
 
+//! Bindings to create devices and access device functionality from Rust.
+
 use std::ffi::CStr;
 
 use crate::{
     bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Property, VMStateDescription},
-    definitions::ClassInitImpl,
     prelude::*,
+    qom::ClassInitImpl,
 };
 
 /// Trait providing the contents of [`DeviceClass`].
rust/qemu-api/src/qom.rs renamed from rust/qemu-api/src/definitions.rs +32 -44

100 lines not on this page · raw message

rust/qemu-api/src/sysbus.rs +1 -1
index 5d15b317405..fa69cadd7c1 100644
@@ -9,9 +9,9 @@
 use crate::{
     bindings::{self, DeviceClass},
     cell::bql_locked,
-    definitions::ClassInitImpl,
     irq::InterruptSource,
     prelude::*,
+    qom::ClassInitImpl,
 };
 
 unsafe impl ObjectType for SysBusDevice {
rust/qemu-api/tests/tests.rs +2 -2
index ed3a555e76d..78f7da474b2 100644
@@ -5,8 +5,8 @@
 use std::ffi::CStr;
 
 use qemu_api::{
-    bindings::*, c_str, declare_properties, define_property, definitions::ObjectImpl,
-    device_class::DeviceImpl, impl_device_class, prelude::*, zeroable::Zeroable,
+    bindings::*, c_str, declare_properties, define_property, prelude::*, qdev::DeviceImpl,
+    qom::ObjectImpl, zeroable::Zeroable,
 };
 
 #[test]
Signature · 1 line
2.47.1
#7 lore raw

[PULL 30/41] rust: qom: add casting functionality

In reply to Paolo Bonzini

Add traits that let client cast typecast safely between object types. In particular, an upcast is compile-time guaranteed to succeed, and a YOLO C-style downcast must be marked as unsafe.

The traits are based on an IsA<> trait that declares what is a subclass of what, which is an idea taken from glib-rs
(https://docs.rs/glib/latest/glib/object/trait.IsA.html).
The four primitives are also taken from there
(https://docs.rs/glib/latest/glib/object/trait.Cast.html). However, the implementation of casting itself is a bit different and uses the Deref trait.

This removes some pointer arithmetic from the pl011 device; it is also a prerequisite for the definition of methods, so that they can be invoked on all subclass structs. This will use the IsA<> trait to detect the structs that support the methods.

glib also has a "monadic" casting trait which could be implemented on Option (as in https://docs.rs/glib/latest/glib/object/trait.CastNone.html)
and perhaps even Result. For now I'm leaving it out, as the patch is already big enough and the benefit seems debatable.

---
 rust/Cargo.toml                  |   1 +
 rust/hw/char/pl011/src/device.rs |  12 +-
 rust/qemu-api/src/prelude.rs     |   7 +
 rust/qemu-api/src/qdev.rs        |   1 +
 rust/qemu-api/src/qom.rs         | 283 ++++++++++++++++++++++++++++++-
 rust/qemu-api/src/sysbus.rs      |   7 +-
 rust/qemu-api/tests/tests.rs     |  70 +++++++-
 7 files changed, 368 insertions(+), 13 deletions(-)
rust/Cargo.toml +1 -0
index 6ec19b67297..5b6b6ca4382 100644
@@ -38,6 +38,7 @@ should_implement_trait = "deny"
 unused_self = "allow"
 
 # default-allow lints
+as_ptr_cast_mut = "deny"
 as_underscore = "deny"
 assertions_on_result_states = "deny"
 bool_to_int_with_if = "deny"
rust/hw/char/pl011/src/device.rs +8 -4
index 3fed8b4ad25..e85d13c5a2b 100644
@@ -106,6 +106,8 @@ pub struct PL011State {
     device_id: DeviceId,
 }
 
+qom_isa!(PL011State : SysBusDevice, DeviceState, Object);
+
 unsafe impl ObjectType for PL011State {
     type Class = <SysBusDevice as ObjectType>::Class;
     const TYPE_NAME: &'static CStr = crate::TYPE_PL011;
@@ -140,8 +142,6 @@ impl PL011State {
     unsafe fn init(&mut self) {
         const CLK_NAME: &CStr = c_str!("clk");
 
-        let sbd = unsafe { &mut *(addr_of_mut!(*self).cast::<SysBusDevice>()) };
-
         // SAFETY:
         //
         // self and self.iomem are guaranteed to be valid at this point since callers
@@ -155,15 +155,16 @@ unsafe fn init(&mut self) {
                 Self::TYPE_NAME.as_ptr(),
                 0x1000,
             );
+
+            let sbd: &mut SysBusDevice = self.upcast_mut();
             sysbus_init_mmio(sbd, addr_of_mut!(self.iomem));
         }
 
         for irq in self.interrupts.iter() {
+            let sbd: &SysBusDevice = self.upcast();
             sbd.init_irq(irq);
         }
 
-        let dev = addr_of_mut!(*self).cast::<DeviceState>();
-
         // SAFETY:
         //
         // self.clock is not initialized at this point; but since `NonNull<_>` is Copy,
@@ -172,6 +173,7 @@ unsafe fn init(&mut self) {
         // calls this function to initialize the fields; therefore no code is
         // able to access an invalid self.clock value.
         unsafe {
+            let dev: &mut DeviceState = self.upcast_mut();
             self.clock = NonNull::new(qdev_init_clock_in(
                 dev,
                 CLK_NAME.as_ptr(),
@@ -632,6 +634,8 @@ unsafe fn init(&mut self) {
     }
 }
 
+qom_isa!(PL011Luminary : PL011State, SysBusDevice, DeviceState, Object);
+
 unsafe impl ObjectType for PL011Luminary {
     type Class = <PL011State as ObjectType>::Class;
     const TYPE_NAME: &'static CStr = crate::TYPE_PL011_LUMINARY;
rust/qemu-api/src/prelude.rs +7 -0
index 5cc41f081f9..a0a71fcd6bc 100644
@@ -7,4 +7,11 @@
 pub use crate::cell::BqlCell;
 pub use crate::cell::BqlRefCell;
 
+pub use crate::qom::IsA;
+pub use crate::qom::Object;
+pub use crate::qom::ObjectCast;
+pub use crate::qom::ObjectCastMut;
+pub use crate::qom::ObjectDeref;
 pub use crate::qom::ObjectType;
+
+pub use crate::qom_isa;
rust/qemu-api/src/qdev.rs +1 -0
index 07a502a8371..686054e737a 100644
@@ -144,3 +144,4 @@ unsafe impl ObjectType for DeviceState {
     const TYPE_NAME: &'static CStr =
         unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_DEVICE) };
 }
+qom_isa!(DeviceState: Object);
rust/qemu-api/src/qom.rs +276 -7

310 lines not on this page · raw message

rust/qemu-api/src/sysbus.rs +6 -1
index 9abc687a261..8193734bde4 100644
@@ -7,7 +7,11 @@
 pub use bindings::{SysBusDevice, SysBusDeviceClass};
 
 use crate::{
-    bindings, cell::bql_locked, irq::InterruptSource, prelude::*, qdev::DeviceClass,
+    bindings,
+    cell::bql_locked,
+    irq::InterruptSource,
+    prelude::*,
+    qdev::{DeviceClass, DeviceState},
     qom::ClassInitImpl,
 };
 
@@ -16,6 +20,7 @@ unsafe impl ObjectType for SysBusDevice {
     const TYPE_NAME: &'static CStr =
         unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_SYS_BUS_DEVICE) };
 }
+qom_isa!(SysBusDevice: DeviceState, Object);
 
 // TODO: add SysBusDeviceImpl
 impl<T> ClassInitImpl<SysBusDeviceClass> for T
rust/qemu-api/tests/tests.rs +69 -1

85 lines not on this page · raw message

Signature · 1 line
2.47.1
#8 lore raw

[PULL 14/41] migration: Use device_class_set_props_n

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

Export the migration_properties array size from options.c; use that to feed device_class_set_props_n. We must remove DEFINE_PROP_END_OF_LIST so the count is correct.

---
 migration/options.h   | 1 +
 migration/migration.c | 3 ++-
 migration/options.c   | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
migration/options.h +1 -0
index a360f93a44f..762be4e641a 100644
@@ -21,6 +21,7 @@
 /* migration properties */
 
 extern const Property migration_properties[];
+extern const size_t migration_properties_count;
 
 /* capabilities */
 
migration/migration.c +2 -1
index 6b3b85d31e5..d23d392685e 100644
@@ -3822,7 +3822,8 @@ static void migration_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->user_creatable = false;
-    (device_class_set_props)(dc, migration_properties);
+    device_class_set_props_n(dc, migration_properties,
+                             migration_properties_count);
 }
 
 static void migration_instance_finalize(Object *obj)
migration/options.c +1 -1
index 24cc8471aa0..70ff56535a2 100644
@@ -196,8 +196,8 @@ const Property migration_properties[] = {
                         MIGRATION_CAPABILITY_SWITCHOVER_ACK),
     DEFINE_PROP_MIG_CAP("x-dirty-limit", MIGRATION_CAPABILITY_DIRTY_LIMIT),
     DEFINE_PROP_MIG_CAP("mapped-ram", MIGRATION_CAPABILITY_MAPPED_RAM),
-    DEFINE_PROP_END_OF_LIST(),
 };
+const size_t migration_properties_count = ARRAY_SIZE(migration_properties);
 
 bool migrate_auto_converge(void)
 {
Signature · 1 line
2.47.1
#9 lore raw

[PULL 28/41] rust: re-export C types from qemu-api submodules

In reply to Paolo Bonzini

Long term we do not want device code to use "bindings" at all, so make it possible to get the relevant types from the other modules of qemu-api.

---
 rust/qemu-api/src/qdev.rs    |  7 +++++--
 rust/qemu-api/src/qom.rs     | 12 +++++++-----
 rust/qemu-api/src/sysbus.rs  |  5 +----
 rust/qemu-api/src/vmstate.rs |  9 +++++----
 rust/qemu-api/tests/tests.rs |  9 +++++++--
 5 files changed, 25 insertions(+), 17 deletions(-)
rust/qemu-api/src/qdev.rs +5 -2
index ad4c12d097e..07a502a8371 100644
@@ -6,10 +6,13 @@
 
 use std::ffi::CStr;
 
+pub use bindings::{DeviceClass, DeviceState, Property};
+
 use crate::{
-    bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Property, VMStateDescription},
+    bindings::{self, Error},
     prelude::*,
-    qom::ClassInitImpl,
+    qom::{ClassInitImpl, ObjectClass},
+    vmstate::VMStateDescription,
 };
 
 /// Trait providing the contents of [`DeviceClass`].
rust/qemu-api/src/qom.rs +7 -5
index 2222d1a5ab9..a663647ffe5 100644
@@ -33,7 +33,9 @@
 
 use std::{ffi::CStr, os::raw::c_void};
 
-use crate::bindings::{self, Object, ObjectClass, TypeInfo};
+pub use bindings::{Object, ObjectClass};
+
+use crate::bindings::{self, TypeInfo};
 
 unsafe extern "C" fn rust_instance_init<T: ObjectImpl>(obj: *mut Object) {
     // SAFETY: obj is an instance of T, since rust_instance_init<T>
@@ -164,9 +166,9 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl<Self::Class> {
 ///
 /// Each struct will implement this trait with `T` equal to each
 /// superclass.  For example, a device should implement at least
-/// `ClassInitImpl<`[`DeviceClass`](crate::bindings::DeviceClass)`>` and
-/// `ClassInitImpl<`[`ObjectClass`](crate::bindings::ObjectClass)`>`.
-/// Such implementations are made in one of two ways.
+/// `ClassInitImpl<`[`DeviceClass`](crate::qdev::DeviceClass)`>` and
+/// `ClassInitImpl<`[`ObjectClass`]`>`.  Such implementations are made
+/// in one of two ways.
 ///
 /// For most superclasses, `ClassInitImpl` is provided by the `qemu-api`
 /// crate itself.  The Rust implementation of methods will come from a
@@ -221,7 +223,7 @@ pub trait ClassInitImpl<T> {
     ///
     /// The virtual method implementations usually come from another
     /// trait, for example [`DeviceImpl`](crate::qdev::DeviceImpl)
-    /// when `T` is [`DeviceClass`](crate::bindings::DeviceClass).
+    /// when `T` is [`DeviceClass`](crate::qdev::DeviceClass).
     ///
     /// On entry, `klass`'s parent class is initialized, while the other fields
     /// are all zero; it is therefore assumed that all fields in `T` can be
rust/qemu-api/src/sysbus.rs +1 -4
index fa69cadd7c1..9abc687a261 100644
@@ -7,10 +7,7 @@
 pub use bindings::{SysBusDevice, SysBusDeviceClass};
 
 use crate::{
-    bindings::{self, DeviceClass},
-    cell::bql_locked,
-    irq::InterruptSource,
-    prelude::*,
+    bindings, cell::bql_locked, irq::InterruptSource, prelude::*, qdev::DeviceClass,
     qom::ClassInitImpl,
 };
 
rust/qemu-api/src/vmstate.rs +5 -4
index bedcf1e8f39..25c68b703ea 100644
@@ -10,6 +10,8 @@
 //! [`vmstate_fields`](crate::vmstate_fields) are meant to be used when
 //! declaring a device model state struct.
 
+pub use crate::bindings::VMStateDescription;
+
 #[doc(alias = "VMSTATE_UNUSED_BUFFER")]
 #[macro_export]
 macro_rules! vmstate_unused_buffer {
@@ -328,7 +330,7 @@ macro_rules! vmstate_fields {
 }
 
 /// A transparent wrapper type for the `subsections` field of
-/// [`VMStateDescription`](crate::bindings::VMStateDescription).
+/// [`VMStateDescription`].
 ///
 /// This is necessary to be able to declare subsection descriptions as statics,
 /// because the only way to implement `Sync` for a foreign type (and `*const`
@@ -342,9 +344,8 @@ macro_rules! vmstate_fields {
 
 unsafe impl Sync for VMStateSubsectionsWrapper {}
 
-/// Helper macro to declare a list of subsections
-/// ([`VMStateDescription`](`crate::bindings::VMStateDescription`)) into a
-/// static and return a pointer to the array of pointers it created.
+/// Helper macro to declare a list of subsections ([`VMStateDescription`])
+/// into a static and return a pointer to the array of pointers it created.
 #[macro_export]
 macro_rules! vmstate_subsections {
     ($($subsection:expr),*$(,)*) => {{
rust/qemu-api/tests/tests.rs +7 -2
index 78f7da474b2..68557fb85c7 100644
@@ -5,8 +5,13 @@
 use std::ffi::CStr;
 
 use qemu_api::{
-    bindings::*, c_str, declare_properties, define_property, prelude::*, qdev::DeviceImpl,
-    qom::ObjectImpl, zeroable::Zeroable,
+    bindings::*,
+    c_str, declare_properties, define_property,
+    prelude::*,
+    qdev::{DeviceImpl, DeviceState, Property},
+    qom::ObjectImpl,
+    vmstate::VMStateDescription,
+    zeroable::Zeroable,
 };
 
 #[test]
Signature · 1 line
2.47.1
#10 lore raw

[PULL 24/41] Constify all opaque Property pointers

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

s/ Property [*]/ const Property */

Basically all of these only feed object_field_prop_ptr, which now takes a const pointer itself.

---
 backends/tpm/tpm_util.c          |  4 +-
 hw/block/xen-block.c             |  4 +-
 hw/core/qdev-properties-system.c | 48 ++++++++++----------
 hw/core/qdev-properties.c        | 78 ++++++++++++++++----------------
 hw/misc/xlnx-versal-trng.c       |  2 +-
 hw/nvme/nguid.c                  |  4 +-
 hw/s390x/css.c                   |  4 +-
 hw/s390x/s390-pci-bus.c          |  4 +-
 hw/vfio/pci-quirks.c             |  4 +-
 9 files changed, 76 insertions(+), 76 deletions(-)
backends/tpm/tpm_util.c +2 -2
index cf138551df1..485982b17b6 100644
@@ -46,7 +46,7 @@ static void get_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
 static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
                     Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     TPMBackend *s, **be = object_field_prop_ptr(obj, prop);
     char *str;
 
@@ -66,7 +66,7 @@ static void set_tpm(Object *obj, Visitor *v, const char *name, void *opaque,
 
 static void release_tpm(Object *obj, const char *name, void *opaque)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     TPMBackend **be = object_field_prop_ptr(obj, prop);
 
     if (*be) {
hw/block/xen-block.c +2 -2
index 56a67136604..ec3413f116a 100644
@@ -485,7 +485,7 @@ static char *disk_to_vbd_name(unsigned int disk)
 static void xen_block_get_vdev(Object *obj, Visitor *v, const char *name,
                                void *opaque, Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     XenBlockVdev *vdev = object_field_prop_ptr(obj, prop);
     char *str;
 
@@ -545,7 +545,7 @@ static int vbd_name_to_disk(const char *name, const char **endp,
 static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
                                void *opaque, Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     XenBlockVdev *vdev = object_field_prop_ptr(obj, prop);
     char *str, *p;
     const char *end;
hw/core/qdev-properties-system.c +24 -24

192 lines not on this page · raw message

hw/core/qdev-properties.c +39 -39

310 lines not on this page · raw message

hw/misc/xlnx-versal-trng.c +1 -1
index 0419f648b7a..dbd9b58a4ec 100644
@@ -641,7 +641,7 @@ static void trng_prop_fault_event_set(Object *obj, Visitor *v,
                                       const char *name, void *opaque,
                                       Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     uint32_t *events = object_field_prop_ptr(obj, prop);
 
     if (!visit_type_uint32(v, name, events, errp)) {
hw/nvme/nguid.c +2 -2
index 829832bd9f4..be63cb75e16 100644
@@ -149,7 +149,7 @@ static void nvme_nguid_stringify(const NvmeNGUID *nguid, char *out)
 static void get_nguid(Object *obj, Visitor *v, const char *name, void *opaque,
                       Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     NvmeNGUID *nguid = object_field_prop_ptr(obj, prop);
     char buffer[NGUID_STR_LEN];
     char *p = buffer;
@@ -162,7 +162,7 @@ static void get_nguid(Object *obj, Visitor *v, const char *name, void *opaque,
 static void set_nguid(Object *obj, Visitor *v, const char *name, void *opaque,
                       Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     NvmeNGUID *nguid = object_field_prop_ptr(obj, prop);
     char *str;
 
hw/s390x/css.c +2 -2
index b2d5327dbf4..4e27b2961b8 100644
@@ -2463,7 +2463,7 @@ void css_reset(void)
 static void get_css_devid(Object *obj, Visitor *v, const char *name,
                           void *opaque, Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     CssDevId *dev_id = object_field_prop_ptr(obj, prop);
     char buffer[] = "xx.x.xxxx";
     char *p = buffer;
@@ -2492,7 +2492,7 @@ static void get_css_devid(Object *obj, Visitor *v, const char *name,
 static void set_css_devid(Object *obj, Visitor *v, const char *name,
                           void *opaque, Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     CssDevId *dev_id = object_field_prop_ptr(obj, prop);
     char *str;
     int num, n1, n2;
hw/s390x/s390-pci-bus.c +2 -2
index 5fbbf41a3db..94b1a5f6398 100644
@@ -1453,7 +1453,7 @@ static void s390_pci_device_reset(DeviceState *dev)
 static void s390_pci_get_fid(Object *obj, Visitor *v, const char *name,
                          void *opaque, Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     uint32_t *ptr = object_field_prop_ptr(obj, prop);
 
     visit_type_uint32(v, name, ptr, errp);
@@ -1463,7 +1463,7 @@ static void s390_pci_set_fid(Object *obj, Visitor *v, const char *name,
                          void *opaque, Error **errp)
 {
     S390PCIBusDevice *zpci = S390_PCI_DEVICE(obj);
-    Property *prop = opaque;
+    const Property *prop = opaque;
     uint32_t *ptr = object_field_prop_ptr(obj, prop);
 
     if (!visit_type_uint32(v, name, ptr, errp)) {
hw/vfio/pci-quirks.c +2 -2
index d37f722cce0..c8e60475d51 100644
@@ -1499,7 +1499,7 @@ static void get_nv_gpudirect_clique_id(Object *obj, Visitor *v,
                                        const char *name, void *opaque,
                                        Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     uint8_t *ptr = object_field_prop_ptr(obj, prop);
 
     visit_type_uint8(v, name, ptr, errp);
@@ -1509,7 +1509,7 @@ static void set_nv_gpudirect_clique_id(Object *obj, Visitor *v,
                                        const char *name, void *opaque,
                                        Error **errp)
 {
-    Property *prop = opaque;
+    const Property *prop = opaque;
     uint8_t value, *ptr = object_field_prop_ptr(obj, prop);
 
     if (!visit_type_uint8(v, name, &value, errp)) {
Signature · 1 line
2.47.1
#11 lore raw

[PULL 31/41] rust: qom: add initial subset of methods on Object

In reply to Paolo Bonzini

Add an example of implementing instance methods and converting the result back to a Rust type. In this case the returned types are a string (actually a Cow<str>; but that's transparent as long as it derefs to &str) and a QOM class.

---
 rust/qemu-api/src/prelude.rs |  1 +
 rust/qemu-api/src/qom.rs     | 56 ++++++++++++++++++++++++++++++++++--
 rust/qemu-api/tests/tests.rs | 12 ++++++++
 3 files changed, 66 insertions(+), 3 deletions(-)
rust/qemu-api/src/prelude.rs +1 -0
index a0a71fcd6bc..6f32deeb2ed 100644
@@ -12,6 +12,7 @@
 pub use crate::qom::ObjectCast;
 pub use crate::qom::ObjectCastMut;
 pub use crate::qom::ObjectDeref;
+pub use crate::qom::ObjectMethods;
 pub use crate::qom::ObjectType;
 
 pub use crate::qom_isa;
rust/qemu-api/src/qom.rs +53 -3

83 lines not on this page · raw message

rust/qemu-api/tests/tests.rs +12 -0
index 5d9f13b15d4..41ea4026b83 100644
@@ -94,6 +94,18 @@ fn test_object_new() {
     }
 }
 
+#[test]
+/// Try invoking a method on an object.
+fn test_typename() {
+    init_qom();
+    let p: *mut DummyState = unsafe { object_new(DummyState::TYPE_NAME.as_ptr()).cast() };
+    let p_ref: &DummyState = unsafe { &*p };
+    assert_eq!(p_ref.typename(), "dummy");
+    unsafe {
+        object_unref(p_ref.as_object_mut_ptr().cast::<c_void>());
+    }
+}
+
 // a note on all "cast" tests: usually, especially for downcasts the desired
 // class would be placed on the right, for example:
 //
Signature · 1 line
2.47.1
#12 lore raw

[PULL 16/41] hw/arm/armsse: Use device_class_set_props_n

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

We must remove DEFINE_PROP_END_OF_LIST so the count is correct.

---
 hw/arm/armsse.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
hw/arm/armsse.c +5 -4
index 1cd6b4a4b2b..ffd732f8068 100644
@@ -72,6 +72,7 @@ struct ARMSSEInfo {
     bool has_cpu_pwrctrl;
     bool has_sse_counter;
     bool has_tcms;
+    uint8_t props_count;
     const Property *props;
     const ARMSSEDeviceInfo *devinfo;
     const bool *irq_is_common;
@@ -87,7 +88,6 @@ static const Property iotkit_properties[] = {
     DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true),
     DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8),
     DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const Property sse200_properties[] = {
@@ -104,7 +104,6 @@ static const Property sse200_properties[] = {
     DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8),
     DEFINE_PROP_UINT32("CPU1_MPU_NS", ARMSSE, cpu_mpu_ns[1], 8),
     DEFINE_PROP_UINT32("CPU1_MPU_S", ARMSSE, cpu_mpu_s[1], 8),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const Property sse300_properties[] = {
@@ -117,7 +116,6 @@ static const Property sse300_properties[] = {
     DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true),
     DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8),
     DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const ARMSSEDeviceInfo iotkit_devices[] = {
@@ -528,6 +526,7 @@ static const ARMSSEInfo armsse_variants[] = {
         .has_sse_counter = false,
         .has_tcms = false,
         .props = iotkit_properties,
+        .props_count = ARRAY_SIZE(iotkit_properties),
         .devinfo = iotkit_devices,
         .irq_is_common = sse200_irq_is_common,
     },
@@ -549,6 +548,7 @@ static const ARMSSEInfo armsse_variants[] = {
         .has_sse_counter = false,
         .has_tcms = false,
         .props = sse200_properties,
+        .props_count = ARRAY_SIZE(sse200_properties),
         .devinfo = sse200_devices,
         .irq_is_common = sse200_irq_is_common,
     },
@@ -570,6 +570,7 @@ static const ARMSSEInfo armsse_variants[] = {
         .has_sse_counter = true,
         .has_tcms = true,
         .props = sse300_properties,
+        .props_count = ARRAY_SIZE(sse300_properties),
         .devinfo = sse300_devices,
         .irq_is_common = sse300_irq_is_common,
     },
@@ -1699,7 +1700,7 @@ static void armsse_class_init(ObjectClass *klass, void *data)
 
     dc->realize = armsse_realize;
     dc->vmsd = &armsse_vmstate;
-    device_class_set_props(dc, info->props);
+    device_class_set_props_n(dc, info->props, info->props_count);
     device_class_set_legacy_reset(dc, armsse_reset);
     iic->check = armsse_idau_check;
     asc->info = info;
Signature · 1 line
2.47.1
#13 lore raw

[PULL 15/41] hw/scsi/megasas: Use device_class_set_props_n

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

We must remove DEFINE_PROP_END_OF_LIST so the count is correct.

---
 hw/scsi/megasas.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
hw/scsi/megasas.c +4 -3
index 8323cd18e3a..7f012c218b4 100644
@@ -2459,7 +2459,6 @@ static const Property megasas_properties_gen1[] = {
     DEFINE_PROP_ON_OFF_AUTO("msix", MegasasState, msix, ON_OFF_AUTO_AUTO),
     DEFINE_PROP_BIT("use_jbod", MegasasState, flags,
                     MEGASAS_FLAG_USE_JBOD, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const Property megasas_properties_gen2[] = {
@@ -2473,7 +2472,6 @@ static const Property megasas_properties_gen2[] = {
     DEFINE_PROP_ON_OFF_AUTO("msix", MegasasState, msix, ON_OFF_AUTO_AUTO),
     DEFINE_PROP_BIT("use_jbod", MegasasState, flags,
                     MEGASAS_FLAG_USE_JBOD, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 typedef struct MegasasInfo {
@@ -2488,6 +2486,7 @@ typedef struct MegasasInfo {
     int osts;
     const VMStateDescription *vmsd;
     const Property *props;
+    size_t props_count;
     InterfaceInfo *interfaces;
 } MegasasInfo;
 
@@ -2504,6 +2503,7 @@ static struct MegasasInfo megasas_devices[] = {
         .osts = MFI_1078_RM | 1,
         .vmsd = &vmstate_megasas_gen1,
         .props = megasas_properties_gen1,
+        .props_count = ARRAY_SIZE(megasas_properties_gen1),
         .interfaces = (InterfaceInfo[]) {
             { INTERFACE_CONVENTIONAL_PCI_DEVICE },
             { },
@@ -2520,6 +2520,7 @@ static struct MegasasInfo megasas_devices[] = {
         .osts = MFI_GEN2_RM,
         .vmsd = &vmstate_megasas_gen2,
         .props = megasas_properties_gen2,
+        .props_count = ARRAY_SIZE(megasas_properties_gen2),
         .interfaces = (InterfaceInfo[]) {
             { INTERFACE_PCIE_DEVICE },
             { }
@@ -2546,7 +2547,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;
-    device_class_set_props(dc, info->props);
+    device_class_set_props_n(dc, info->props, info->props_count);
     device_class_set_legacy_reset(dc, megasas_scsi_reset);
     dc->vmsd = info->vmsd;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
Signature · 1 line
2.47.1
#14 lore raw

[PULL 01/41] migration: Constify migration_properties

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 migration/options.h | 2 +-
 migration/options.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
migration/options.h +1 -1
index 79084eed0dd..a360f93a44f 100644
@@ -20,7 +20,7 @@
 
 /* migration properties */
 
-extern Property migration_properties[];
+extern const Property migration_properties[];
 
 /* capabilities */
 
migration/options.c +1 -1
index ad8d6989a80..24cc8471aa0 100644
@@ -85,7 +85,7 @@
 #define DEFAULT_MIGRATE_VCPU_DIRTY_LIMIT_PERIOD     1000    /* milliseconds */
 #define DEFAULT_MIGRATE_VCPU_DIRTY_LIMIT            1       /* MB/s */
 
-Property migration_properties[] = {
+const Property migration_properties[] = {
     DEFINE_PROP_BOOL("store-global-state", MigrationState,
                      store_global_state, true),
     DEFINE_PROP_BOOL("send-configuration", MigrationState,
Signature · 1 line
2.47.1
#15 lore raw

[PULL 18/41] hw/core: Replace device_class_set_props with a macro

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

Use ARRAY_SIZE to implement as device_class_set_props_n. Remove any DEFINE_PROP_END_OF_LIST terminator from the count.

---
 include/hw/qdev-core.h    | 21 +++++++++++++--------
 hw/core/qdev-properties.c | 16 ----------------
 2 files changed, 13 insertions(+), 24 deletions(-)
include/hw/qdev-core.h +13 -8
index cd0ddf84ca5..5dc46402585 100644
@@ -941,20 +941,25 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);
 /**
  * device_class_set_props(): add a set of properties to an device
  * @dc: the parent DeviceClass all devices inherit
- * @props: an array of properties, terminate by DEFINE_PROP_END_OF_LIST()
+ * @props: an array of properties
  *
  * This will add a set of properties to the object. It will fault if
  * you attempt to add an existing property defined by a parent class.
  * To modify an inherited property you need to use????
+ *
+ * Validate that @props has at least one Property plus the terminator.
+ * Validate that @props is an array, not a pointer, via ARRAY_SIZE.
+ * Validate that the array is terminated at compile-time (with -O2),
+ * which requires the array to be const.
  */
-void device_class_set_props(DeviceClass *dc, const Property *props);
-
-/* Validate at least one Property, plus the terminator. */
-#define device_class_set_props(DC, PROPS) \
+#define device_class_set_props(dc, props) \
     do {                                                                \
-        QEMU_BUILD_BUG_ON(sizeof(PROPS) != sizeof(const Property *) &&  \
-                          sizeof(PROPS) < 2 * sizeof(Property));        \
-        (device_class_set_props)(DC, PROPS);                            \
+        QEMU_BUILD_BUG_ON(sizeof(props) < 2 * sizeof(Property));        \
+        size_t props_count_ = ARRAY_SIZE(props) - 1;                    \
+        if ((props)[props_count_].name != NULL) {                       \
+            qemu_build_not_reached();                                   \
+        }                                                               \
+        device_class_set_props_n((dc), (props), props_count_);          \
     } while (0)
 
 /**
hw/core/qdev-properties.c +0 -16
index 31e3072b559..a3d49e20202 100644
@@ -1058,22 +1058,6 @@ static void qdev_class_add_legacy_property(DeviceClass *dc, const Property *prop
         NULL, NULL, (Property *)prop);
 }
 
-void (device_class_set_props)(DeviceClass *dc, const Property *props)
-{
-    const Property *prop;
-    size_t n;
-
-    dc->props_ = props;
-    for (prop = props, n = 0; prop && prop->name; prop++, n++) {
-        qdev_class_add_legacy_property(dc, prop);
-        qdev_class_add_property(dc, prop->name, prop);
-    }
-
-    /* We used a hole in DeviceClass because that's still a lot. */
-    assert(n <= UINT16_MAX);
-    dc->props_count_ = n;
-}
-
 void device_class_set_props_n(DeviceClass *dc, const Property *props, size_t n)
 {
     /* We used a hole in DeviceClass because that's still a lot. */
Signature · 1 line
2.47.1
#16 lore raw

[PULL 13/41] hw/core: Introduce device_class_set_props_n

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

Record the size of the array in DeviceClass.props_count_. Iterate with known count in qdev_prop_walk.

---
 include/hw/qdev-core.h    | 18 ++++++++++++++++++
 hw/core/qdev-properties.c | 39 +++++++++++++++++++++++++++++----------
 hw/core/qdev.c            |  1 +
 system/qdev-monitor.c     | 15 +++++++--------
 4 files changed, 55 insertions(+), 18 deletions(-)
include/hw/qdev-core.h +18 -0
index b2859d1e39e..cd0ddf84ca5 100644
@@ -138,6 +138,12 @@ struct DeviceClass {
      */
     const Property *props_;
 
+    /**
+     * @props_count_: number of elements in @props_; should only be
+     * assigned by using device_class_set_props().
+     */
+    uint16_t props_count_;
+
     /**
      * @user_creatable: Can user instantiate with -device / device_add?
      *
@@ -951,6 +957,18 @@ void device_class_set_props(DeviceClass *dc, const Property *props);
         (device_class_set_props)(DC, PROPS);                            \
     } while (0)
 
+/**
+ * device_class_set_props_n(): add a set of properties to an device
+ * @dc: the parent DeviceClass all devices inherit
+ * @props: an array of properties, not terminated by DEFINE_PROP_END_OF_LIST.
+ * @n: ARRAY_SIZE(@props)
+ *
+ * This will add a set of properties to the object. It will fault if
+ * you attempt to add an existing property defined by a parent class.
+ * To modify an inherited property you need to use????
+ */
+void device_class_set_props_n(DeviceClass *dc, const Property *props, size_t n);
+
 /**
  * device_class_set_parent_realize() - set up for chaining realize fns
  * @dc: The device class
hw/core/qdev-properties.c +29 -10
index de618a964a9..31e3072b559 100644
@@ -749,16 +749,13 @@ const PropertyInfo qdev_prop_array = {
 
 /* --- public helpers --- */
 
-static const Property *qdev_prop_walk(const Property *props, const char *name)
+static const Property *qdev_prop_walk(DeviceClass *cls, const char *name)
 {
-    if (!props) {
-        return NULL;
-    }
-    while (props->name) {
-        if (strcmp(props->name, name) == 0) {
-            return props;
+    for (int i = 0, n = cls->props_count_; i < n; ++i) {
+        const Property *prop = &cls->props_[i];
+        if (strcmp(prop->name, name) == 0) {
+            return prop;
         }
-        props++;
     }
     return NULL;
 }
@@ -771,7 +768,7 @@ static const Property *qdev_prop_find(DeviceState *dev, const char *name)
     /* device properties */
     class = object_get_class(OBJECT(dev));
     do {
-        prop = qdev_prop_walk(DEVICE_CLASS(class)->props_, name);
+        prop = qdev_prop_walk(DEVICE_CLASS(class), name);
         if (prop) {
             return prop;
         }
@@ -1064,9 +1061,31 @@ static void qdev_class_add_legacy_property(DeviceClass *dc, const Property *prop
 void (device_class_set_props)(DeviceClass *dc, const Property *props)
 {
     const Property *prop;
+    size_t n;
 
     dc->props_ = props;
-    for (prop = props; prop && prop->name; prop++) {
+    for (prop = props, n = 0; prop && prop->name; prop++, n++) {
+        qdev_class_add_legacy_property(dc, prop);
+        qdev_class_add_property(dc, prop->name, prop);
+    }
+
+    /* We used a hole in DeviceClass because that's still a lot. */
+    assert(n <= UINT16_MAX);
+    dc->props_count_ = n;
+}
+
+void device_class_set_props_n(DeviceClass *dc, const Property *props, size_t n)
+{
+    /* We used a hole in DeviceClass because that's still a lot. */
+    assert(n <= UINT16_MAX);
+    assert(n != 0);
+
+    dc->props_ = props;
+    dc->props_count_ = n;
+
+    for (size_t i = 0; i < n; ++i) {
+        const Property *prop = &props[i];
+        assert(prop->name);
         qdev_class_add_legacy_property(dc, prop);
         qdev_class_add_property(dc, prop->name, prop);
     }
hw/core/qdev.c +1 -0
index 5f13111b77c..57c1d9df3a7 100644
@@ -703,6 +703,7 @@ static void device_class_base_init(ObjectClass *class, void *data)
      * so do not propagate them to the subclasses.
      */
     klass->props_ = NULL;
+    klass->props_count_ = 0;
 }
 
 static void device_unparent(Object *obj)
system/qdev-monitor.c +7 -8
index 03ae6106497..6831fffd9d5 100644
@@ -752,19 +752,18 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp)
 
 #define qdev_printf(fmt, ...) monitor_printf(mon, "%*s" fmt, indent, "", ## __VA_ARGS__)
 
-static void qdev_print_props(Monitor *mon, DeviceState *dev, const Property *props,
+static void qdev_print_props(Monitor *mon, DeviceState *dev, DeviceClass *dc,
                              int indent)
 {
-    if (!props)
-        return;
-    for (; props->name; props++) {
+    for (int i = 0, n = dc->props_count_; i < n; ++i) {
+        const Property *prop = &dc->props_[i];
         char *value;
-        char *legacy_name = g_strdup_printf("legacy-%s", props->name);
+        char *legacy_name = g_strdup_printf("legacy-%s", prop->name);
 
         if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) {
             value = object_property_get_str(OBJECT(dev), legacy_name, NULL);
         } else {
-            value = object_property_print(OBJECT(dev), props->name, true,
+            value = object_property_print(OBJECT(dev), prop->name, true,
                                           NULL);
         }
         g_free(legacy_name);
@@ -772,7 +771,7 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, const Property *pro
         if (!value) {
             continue;
         }
-        qdev_printf("%s = %s\n", props->name,
+        qdev_printf("%s = %s\n", prop->name,
                     *value ? value : "<null>");
         g_free(value);
     }
@@ -812,7 +811,7 @@ static void qdev_print(Monitor *mon, DeviceState *dev, int indent)
     }
     class = object_get_class(OBJECT(dev));
     do {
-        qdev_print_props(mon, dev, DEVICE_CLASS(class)->props_, indent);
+        qdev_print_props(mon, dev, DEVICE_CLASS(class), indent);
         class = object_class_get_parent(class);
     } while (class != object_class_by_name(TYPE_DEVICE));
     bus_print_dev(dev->parent_bus, mon, dev, indent);
Signature · 1 line
2.47.1
#17 lore raw

[PULL 26/41] rust: qom: add possibility of overriding unparent

In reply to Paolo Bonzini

Add a blanket definition of ClassInitImpl<ObjectClass> that thunks ObjectImpl::UNPARENT and overrides it in ObjectClass if it is not None.

ClassInitImpl<DeviceClass> can now call its superclass's ClassInitImpl, so that the C and Rust hierarchies match more closely.

This is mostly done as an example of implementing the metaclass hierarchy under ClassInitImpl.

---
 rust/qemu-api/src/definitions.rs  | 44 ++++++++++++++++++++++++++++---
 rust/qemu-api/src/device_class.rs |  6 +++--
 2 files changed, 45 insertions(+), 5 deletions(-)
rust/qemu-api/src/definitions.rs +41 -3
index 13f8f6fd2a9..a2481c1fe70 100644
@@ -6,7 +6,7 @@
 
 use std::{ffi::CStr, os::raw::c_void};
 
-use crate::bindings::{Object, ObjectClass, TypeInfo};
+use crate::bindings::{self, Object, ObjectClass, TypeInfo};
 
 unsafe extern "C" fn rust_instance_init<T: ObjectImpl>(obj: *mut Object) {
     // SAFETY: obj is an instance of T, since rust_instance_init<T>
@@ -121,6 +121,9 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl<Self::Class> {
         class_data: core::ptr::null_mut(),
         interfaces: core::ptr::null_mut(),
     };
+
+    // methods on ObjectClass
+    const UNPARENT: Option<fn(&Self)> = None;
 }
 
 /// Internal trait used to automatically fill in a class struct.
@@ -134,7 +137,8 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl<Self::Class> {
 ///
 /// Each struct will implement this trait with `T` equal to each
 /// superclass.  For example, a device should implement at least
-/// `ClassInitImpl<`[`DeviceClass`](crate::bindings::DeviceClass)`>`.
+/// `ClassInitImpl<`[`DeviceClass`](crate::bindings::DeviceClass)`>` and
+/// `ClassInitImpl<`[`ObjectClass`](crate::bindings::ObjectClass)`>`.
 /// Such implementations are made in one of two ways.
 ///
 /// For most superclasses, `ClassInitImpl` is provided by the `qemu-api`
@@ -147,9 +151,13 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl<Self::Class> {
 /// ```ignore
 /// impl<T> ClassInitImpl<DeviceClass> for T
 /// where
-///     T: DeviceImpl,
+///     T: ClassInitImpl<ObjectClass> + DeviceImpl,
 /// ```
 ///
+/// The bound on `ClassInitImpl<ObjectClass>` is needed so that,
+/// after initializing the `DeviceClass` part of the class struct,
+/// the parent [`ObjectClass`] is initialized as well.
+///
 /// The other case is when manual implementation of the trait is needed.
 /// This covers the following cases:
 ///
@@ -235,3 +243,33 @@ extern "C" fn ctor_fn() {
         }
     };
 }
+
+/// # Safety
+///
+/// We expect the FFI user of this function to pass a valid pointer that
+/// can be downcasted to type `T`. We also expect the device is
+/// readable/writeable from one thread at any time.
+unsafe extern "C" fn rust_unparent_fn<T: ObjectImpl>(dev: *mut Object) {
+    unsafe {
+        assert!(!dev.is_null());
+        let state = core::ptr::NonNull::new_unchecked(dev.cast::<T>());
+        T::UNPARENT.unwrap()(state.as_ref());
+    }
+}
+
+impl<T> ClassInitImpl<ObjectClass> for T
+where
+    T: ObjectImpl,
+{
+    fn class_init(oc: &mut ObjectClass) {
+        if <T as ObjectImpl>::UNPARENT.is_some() {
+            oc.unparent = Some(rust_unparent_fn::<T>);
+        }
+    }
+}
+
+unsafe impl ObjectType for Object {
+    type Class = ObjectClass;
+    const TYPE_NAME: &'static CStr =
+        unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_OBJECT) };
+}
rust/qemu-api/src/device_class.rs +4 -2
index dcec5488291..a9965d1f123 100644
@@ -5,7 +5,7 @@
 use std::ffi::CStr;
 
 use crate::{
-    bindings::{self, DeviceClass, DeviceState, Error, Property, VMStateDescription},
+    bindings::{self, DeviceClass, DeviceState, Error, ObjectClass, Property, VMStateDescription},
     definitions::ClassInitImpl,
     prelude::*,
 };
@@ -68,7 +68,7 @@ fn vmsd() -> Option<&'static VMStateDescription> {
 
 impl<T> ClassInitImpl<DeviceClass> for T
 where
-    T: DeviceImpl,
+    T: ClassInitImpl<ObjectClass> + DeviceImpl,
 {
     fn class_init(dc: &mut DeviceClass) {
         if <T as DeviceImpl>::REALIZE.is_some() {
@@ -88,6 +88,8 @@ fn class_init(dc: &mut DeviceClass) {
                 bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
             }
         }
+
+        <T as ClassInitImpl<ObjectClass>>::class_init(&mut dc.parent_class);
     }
 }
 
Signature · 1 line
2.47.1
#18 lore raw

[PULL 29/41] rust: tests: allow writing more than one test

In reply to Paolo Bonzini
---
 rust/qemu-api/tests/tests.rs | 115 ++++++++++++++++++++---------------
 1 file changed, 67 insertions(+), 48 deletions(-)
rust/qemu-api/tests/tests.rs +67 -48
index 68557fb85c7..953cb15975b 100644
@@ -2,7 +2,7 @@
 // Author(s): Manos Pitsidianakis <[email protected]>
 // SPDX-License-Identifier: GPL-2.0-or-later
 
-use std::ffi::CStr;
+use std::{cell::Cell, ffi::CStr, sync::Mutex};
 
 use qemu_api::{
     bindings::*,
@@ -14,55 +14,74 @@
     zeroable::Zeroable,
 };
 
+// Test that macros can compile.
+pub static VMSTATE: VMStateDescription = VMStateDescription {
+    name: c_str!("name").as_ptr(),
+    unmigratable: true,
+    ..Zeroable::ZERO
+};
+
+#[derive(qemu_api_macros::offsets)]
+#[repr(C)]
+#[derive(qemu_api_macros::Object)]
+pub struct DummyState {
+    parent: DeviceState,
+    migrate_clock: bool,
+}
+
+declare_properties! {
+    DUMMY_PROPERTIES,
+        define_property!(
+            c_str!("migrate-clk"),
+            DummyState,
+            migrate_clock,
+            unsafe { &qdev_prop_bool },
+            bool
+        ),
+}
+
+unsafe impl ObjectType for DummyState {
+    type Class = <DeviceState as ObjectType>::Class;
+    const TYPE_NAME: &'static CStr = c_str!("dummy");
+}
+
+impl ObjectImpl for DummyState {
+    type ParentType = DeviceState;
+    const ABSTRACT: bool = false;
+}
+
+impl DeviceImpl for DummyState {
+    fn properties() -> &'static [Property] {
+        &DUMMY_PROPERTIES
+    }
+    fn vmsd() -> Option<&'static VMStateDescription> {
+        Some(&VMSTATE)
+    }
+}
+
+fn init_qom() {
+    // Tests can run in parallel; currently they do not need the
+    // Big QEMU Lock, so use an independent mutex (LazyLock is
+    // not available until Rust 1.80.0) to serialize calls to
+    // `type_register()`.  If the tests start needing the BQL,
+    // bql_lock()/bql_unlock() can be wrapped in a similar way
+    // to `Mutex<>` and this can be changed to use a BqlCell.
+    static ONCE: Mutex<Cell<bool>> = Mutex::new(Cell::new(false));
+
+    let g = ONCE.lock().unwrap();
+    if !g.get() {
+        unsafe {
+            module_call_init(module_init_type::MODULE_INIT_QOM);
+        }
+        g.set(true);
+    }
+}
+
 #[test]
-fn test_device_decl_macros() {
-    // Test that macros can compile.
-    pub static VMSTATE: VMStateDescription = VMStateDescription {
-        name: c_str!("name").as_ptr(),
-        unmigratable: true,
-        ..Zeroable::ZERO
-    };
-
-    #[derive(qemu_api_macros::offsets)]
-    #[repr(C)]
-    #[derive(qemu_api_macros::Object)]
-    pub struct DummyState {
-        pub _parent: DeviceState,
-        pub migrate_clock: bool,
-    }
-
-    declare_properties! {
-        DUMMY_PROPERTIES,
-            define_property!(
-                c_str!("migrate-clk"),
-                DummyState,
-                migrate_clock,
-                unsafe { &qdev_prop_bool },
-                bool
-            ),
-    }
-
-    unsafe impl ObjectType for DummyState {
-        type Class = <DeviceState as ObjectType>::Class;
-        const TYPE_NAME: &'static CStr = c_str!("dummy");
-    }
-
-    impl ObjectImpl for DummyState {
-        type ParentType = DeviceState;
-        const ABSTRACT: bool = false;
-    }
-
-    impl DeviceImpl for DummyState {
-        fn properties() -> &'static [Property] {
-            &DUMMY_PROPERTIES
-        }
-        fn vmsd() -> Option<&'static VMStateDescription> {
-            Some(&VMSTATE)
-        }
-    }
-
+/// Create and immediately drop an instance.
+fn test_object_new() {
+    init_qom();
     unsafe {
-        module_call_init(module_init_type::MODULE_INIT_QOM);
         object_unref(object_new(DummyState::TYPE_NAME.as_ptr()).cast());
     }
 }
Signature · 1 line
2.47.1
#19 lore raw

[PULL 11/41] hw/virtio: Remove empty Property lists

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 hw/virtio/vdpa-dev-pci.c       | 5 -----
 hw/virtio/vhost-user-snd-pci.c | 5 -----
 2 files changed, 10 deletions(-)
hw/virtio/vdpa-dev-pci.c +0 -5
index 5446e6b393e..787926801a1 100644
@@ -48,10 +48,6 @@ static void vhost_vdpa_device_pci_instance_init(Object *obj)
                               "bootindex");
 }
 
-static Property vhost_vdpa_device_pci_properties[] = {
-    DEFINE_PROP_END_OF_LIST(),
-};
-
 static int vhost_vdpa_device_pci_post_init(VhostVdpaDevice *v, Error **errp)
 {
     VhostVdpaDevicePCI *dev = container_of(v, VhostVdpaDevicePCI, vdev);
@@ -80,7 +76,6 @@ static void vhost_vdpa_device_pci_class_init(ObjectClass *klass, void *data)
     VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
 
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    device_class_set_props(dc, vhost_vdpa_device_pci_properties);
     k->realize = vhost_vdpa_device_pci_realize;
 }
 
hw/virtio/vhost-user-snd-pci.c +0 -5
index d61cfdae631..0cb86b7d85d 100644
@@ -23,10 +23,6 @@ typedef struct VHostUserSoundPCI VHostUserSoundPCI;
 DECLARE_INSTANCE_CHECKER(VHostUserSoundPCI, VHOST_USER_SND_PCI,
                          TYPE_VHOST_USER_SND_PCI)
 
-static Property vhost_user_snd_pci_properties[] = {
-    DEFINE_PROP_END_OF_LIST(),
-};
-
 static void vhost_user_snd_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
 {
     VHostUserSoundPCI *dev = VHOST_USER_SND_PCI(vpci_dev);
@@ -44,7 +40,6 @@ static void vhost_user_snd_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
     k->realize = vhost_user_snd_pci_realize;
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
-    device_class_set_props(dc, vhost_user_snd_pci_properties);
     pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     pcidev_k->device_id = 0; /* Set by virtio-pci based on virtio id */
     pcidev_k->revision = 0x00;
Signature · 1 line
2.47.1
#20 lore raw

[PULL 08/41] hw/s390x: Remove empty Property lists

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 hw/s390x/3270-ccw.c | 5 -----
 1 file changed, 5 deletions(-)
hw/s390x/3270-ccw.c +0 -5
index 69e6783ade5..3a8930dfd15 100644
@@ -150,15 +150,10 @@ out_err:
     g_free(sch);
 }
 
-static Property emulated_ccw_3270_properties[] = {
-    DEFINE_PROP_END_OF_LIST(),
-};
-
 static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    device_class_set_props(dc, emulated_ccw_3270_properties);
     dc->realize = emulated_ccw_3270_realize;
     dc->hotpluggable = false;
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
Signature · 1 line
2.47.1
#21 lore raw

[PULL 32/41] rust: qemu-api: add a module to wrap functions and zero-sized closures

In reply to Paolo Bonzini

One recurring issue when writing Rust bindings is how to convert a Rust function ("fn" or "impl Fn") to a C function, and how to pass around "self" to a C function that only takes a void*.

An easy solution would be to store on the heap a pair consisting of a pointer to the Rust function and the pointer to "self", but it is possible to do better. If an "Fn" has zero size (that is, if it is a zero-capture closures or a function pointer---which in turn includes all methods), it is possible to build a generic Rust function that calls it even if you only have the type; you don't need either the pointer to the function itself (because the address of the code is part of the type) or any closure data (because it has size zero).

Introduce a wrapper that provides the functionality of calling the function given only its type.

---
 rust/qemu-api/meson.build      |   1 +
 rust/qemu-api/src/callbacks.rs | 144 +++++++++++++++++++++++++++++++++
 rust/qemu-api/src/lib.rs       |   1 +
 3 files changed, 146 insertions(+)
 create mode 100644 rust/qemu-api/src/callbacks.rs
rust/qemu-api/meson.build +1 -0
index 7ff408ad68e..8c82c5e96c2 100644
@@ -17,6 +17,7 @@ _qemu_api_rs = static_library(
       'src/lib.rs',
       'src/bindings.rs',
       'src/bitops.rs',
+      'src/callbacks.rs',
       'src/cell.rs',
       'src/c_str.rs',
       'src/irq.rs',
rust/qemu-api/src/callbacks.rs new file +144 -0

144 lines not on this page · raw message

rust/qemu-api/src/lib.rs +1 -0
index 124bece0449..4b43e02c0f9 100644
@@ -14,6 +14,7 @@
 
 pub mod bitops;
 pub mod c_str;
+pub mod callbacks;
 pub mod cell;
 pub mod irq;
 pub mod module;
Signature · 1 line
2.47.1
#22 lore raw

[PULL 37/41] rust: pl011: always use reset() method on registers

In reply to Paolo Bonzini

For CR, the ugly-ish "0.into()" idiom is already hidden within the reset method. Do not repeat it.

For FR, standardize on reset() being equivalent to "*self = Self::default()" and let reset_fifo toggle only the bits that are related to FIFOs. This commit also reproduces C commit 02b1f7f6192 ("hw/char/pl011: Split RX/TX path of pl011_reset_fifo()", 2024-09-13).

---
 rust/hw/char/pl011/src/device.rs | 23 ++++++++++++++++-------
 rust/hw/char/pl011/src/lib.rs    | 13 +++++--------
 2 files changed, 21 insertions(+), 15 deletions(-)
rust/hw/char/pl011/src/device.rs +16 -7
index 960ee38ed69..f2ee8763d8f 100644
@@ -262,7 +262,7 @@ pub fn write(&mut self, offset: hwaddr, value: u64) {
                 self.update();
             }
             Ok(RSR) => {
-                self.receive_status_error_clear = 0.into();
+                self.receive_status_error_clear.reset();
             }
             Ok(FR) => {
                 // flag writes are ignored
@@ -283,7 +283,8 @@ pub fn write(&mut self, offset: hwaddr, value: u64) {
                 if bool::from(self.line_control.fifos_enabled())
                     ^ bool::from(new_val.fifos_enabled())
                 {
-                    self.reset_fifo();
+                    self.reset_rx_fifo();
+                    self.reset_tx_fifo();
                 }
                 if self.line_control.send_break() ^ new_val.send_break() {
                     let mut break_enable: c_int = new_val.send_break().into();
@@ -442,16 +443,24 @@ pub fn reset(&mut self) {
         self.read_trigger = 1;
         self.ifl = 0x12;
         self.control.reset();
-        self.flags = 0.into();
-        self.reset_fifo();
+        self.flags.reset();
+        self.reset_rx_fifo();
+        self.reset_tx_fifo();
     }
 
-    pub fn reset_fifo(&mut self) {
+    pub fn reset_rx_fifo(&mut self) {
         self.read_count = 0;
         self.read_pos = 0;
 
-        /* Reset FIFO flags */
-        self.flags.reset();
+        // Reset FIFO flags
+        self.flags.set_receive_fifo_full(false);
+        self.flags.set_receive_fifo_empty(true);
+    }
+
+    pub fn reset_tx_fifo(&mut self) {
+        // Reset FIFO flags
+        self.flags.set_transmit_fifo_full(false);
+        self.flags.set_transmit_fifo_empty(true);
     }
 
     pub fn can_receive(&self) -> bool {
rust/hw/char/pl011/src/lib.rs +5 -8
index d5089f78854..e3eacb0e6b9 100644
@@ -230,7 +230,7 @@ pub struct ReceiveStatusErrorClear {
     impl ReceiveStatusErrorClear {
         pub fn reset(&mut self) {
             // All the bits are cleared to 0 on reset.
-            *self = 0.into();
+            *self = Self::default();
         }
     }
 
@@ -297,19 +297,16 @@ pub struct Flags {
 
     impl Flags {
         pub fn reset(&mut self) {
-            // After reset TXFF, RXFF, and BUSY are 0, and TXFE and RXFE are 1
-            self.set_receive_fifo_full(false);
-            self.set_transmit_fifo_full(false);
-            self.set_busy(false);
-            self.set_receive_fifo_empty(true);
-            self.set_transmit_fifo_empty(true);
+            *self = Self::default();
         }
     }
 
     impl Default for Flags {
         fn default() -> Self {
             let mut ret: Self = 0.into();
-            ret.reset();
+            // After reset TXFF, RXFF, and BUSY are 0, and TXFE and RXFE are 1
+            ret.set_receive_fifo_empty(true);
+            ret.set_transmit_fifo_empty(true);
             ret
         }
     }
Signature · 1 line
2.47.1
#23 lore raw

[PULL 33/41] kvm: consistently return 0/-errno from kvm_convert_memory

In reply to Paolo Bonzini

In case of incorrect parameters, kvm_convert_memory() was returning -1 instead of -EINVAL. The guest won't notice because it will move anyway to RUN_STATE_INTERNAL_ERROR, but fix this for consistency and clarity.

---
 accel/kvm/kvm-all.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
accel/kvm/kvm-all.c +4 -4
index 801cff16a5a..77d811ca70c 100644
@@ -2999,17 +2999,17 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private)
     MemoryRegion *mr;
     RAMBlock *rb;
     void *addr;
-    int ret = -1;
+    int ret = -EINVAL;
 
     trace_kvm_convert_memory(start, size, to_private ? "shared_to_private" : "private_to_shared");
 
     if (!QEMU_PTR_IS_ALIGNED(start, qemu_real_host_page_size()) ||
         !QEMU_PTR_IS_ALIGNED(size, qemu_real_host_page_size())) {
-        return -1;
+        return ret;
     }
 
     if (!size) {
-        return -1;
+        return ret;
     }
 
     section = memory_region_find(get_system_memory(), start, size);
@@ -3027,7 +3027,7 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private)
         if (!to_private) {
             return 0;
         }
-        return -1;
+        return ret;
     }
 
     if (!memory_region_has_guest_memfd(mr)) {
Signature · 1 line
2.47.1
#24 lore raw

[PULL 10/41] hw/sparc: Remove empty Property lists

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 hw/sparc/sun4m.c   | 5 -----
 hw/sparc64/sun4u.c | 5 -----
 2 files changed, 10 deletions(-)
hw/sparc/sun4m.c +0 -5
index d52e6a7213f..7ec346533e2 100644
@@ -732,15 +732,10 @@ static void prom_realize(DeviceState *ds, Error **errp)
     sysbus_init_mmio(dev, &s->prom);
 }
 
-static Property prom_properties[] = {
-    {/* end of property list */},
-};
-
 static void prom_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    device_class_set_props(dc, prom_properties);
     dc->realize = prom_realize;
 }
 
hw/sparc64/sun4u.c +0 -5
index 7088ac273ea..05b8c7369e2 100644
@@ -471,15 +471,10 @@ static void prom_realize(DeviceState *ds, Error **errp)
     sysbus_init_mmio(dev, &s->prom);
 }
 
-static Property prom_properties[] = {
-    {/* end of property list */},
-};
-
 static void prom_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    device_class_set_props(dc, prom_properties);
     dc->realize = prom_realize;
 }
 
Signature · 1 line
2.47.1
#25 lore raw

[PULL 03/41] target/ppc: Remove empty property list

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 target/ppc/cpu_init.c | 6 ------
 1 file changed, 6 deletions(-)
target/ppc/cpu_init.c +0 -6
index 1253dbf622c..5e95790deff 100644
@@ -7414,11 +7414,6 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info)
 #endif
 }
 
-static Property ppc_cpu_properties[] = {
-    /* add default property here */
-    DEFINE_PROP_END_OF_LIST(),
-};
-
 #ifndef CONFIG_USER_ONLY
 #include "hw/core/sysemu-cpu-ops.h"
 
@@ -7468,7 +7463,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
     device_class_set_parent_unrealize(dc, ppc_cpu_unrealize,
                                       &pcc->parent_unrealize);
     pcc->pvr_match = ppc_pvr_match_default;
-    device_class_set_props(dc, ppc_cpu_properties);
 
     resettable_class_set_parent_phases(rc, NULL, ppc_cpu_reset_hold, NULL,
                                        &pcc->parent_phases);
Signature · 1 line
2.47.1
#26 lore raw

[PULL 40/41] rust: pl011: fix migration stream

In reply to Paolo Bonzini

The Rust vmstate macros lack the type-safety of their C equivalents (so safe, much abstraction), and therefore they were predictably wrong.

The registers have already been changed to 32-bits in the previous patch, but read_pos/read_count/read_trigger also have to be u32 instead of usize. The easiest way to do so is to let the FIFO use u32 indices instead of usize.

My plan for making VMStateField typesafe is to have a trait to retrieve a basic VMStateField; for example something like vmstate_uint32 would become an implementation of the VMState trait on u32. Then you'd write something like "vmstate_of!(Type, field).with_version_id(2)". That is, vmstate_of retrieves the basic VMStateField and fills in the offset, and then more changes can be applied on top.

---
 rust/hw/char/pl011/src/device.rs       | 38 ++++++++++++++++++++++----
 rust/hw/char/pl011/src/device_class.rs | 10 +++----
 rust/qemu-api/src/vmstate.rs           | 22 ---------------
 3 files changed, 37 insertions(+), 33 deletions(-)
rust/hw/char/pl011/src/device.rs +32 -6
index 090e5d64504..4d620b442ed 100644
@@ -31,7 +31,7 @@
 const FBRD_MASK: u32 = 0x3f;
 
 /// QEMU sourced constant.
-pub const PL011_FIFO_DEPTH: usize = 16_usize;
+pub const PL011_FIFO_DEPTH: u32 = 16;
 
 #[derive(Clone, Copy, Debug)]
 enum DeviceId {
@@ -56,6 +56,32 @@ impl DeviceId {
     const PL011_ID_LUMINARY: [c_uchar; 8] = [0x11, 0x00, 0x18, 0x01, 0x0d, 0xf0, 0x05, 0xb1];
 }
 
+// FIFOs use 32-bit indices instead of usize, for compatibility with
+// the migration stream produced by the C version of this device.
+#[repr(transparent)]
+#[derive(Debug, Default)]
+pub struct Fifo([registers::Data; PL011_FIFO_DEPTH as usize]);
+
+impl Fifo {
+    const fn len(&self) -> u32 {
+        self.0.len() as u32
+    }
+}
+
+impl std::ops::IndexMut<u32> for Fifo {
+    fn index_mut(&mut self, idx: u32) -> &mut Self::Output {
+        &mut self.0[idx as usize]
+    }
+}
+
+impl std::ops::Index<u32> for Fifo {
+    type Output = registers::Data;
+
+    fn index(&self, idx: u32) -> &Self::Output {
+        &self.0[idx as usize]
+    }
+}
+
 #[repr(C)]
 #[derive(Debug, qemu_api_macros::Object, qemu_api_macros::offsets)]
 /// PL011 Device Model in QEMU
@@ -73,14 +99,14 @@ pub struct PL011State {
     pub dmacr: u32,
     pub int_enabled: u32,
     pub int_level: u32,
-    pub read_fifo: [registers::Data; PL011_FIFO_DEPTH],
+    pub read_fifo: Fifo,
     pub ilpr: u32,
     pub ibrd: u32,
     pub fbrd: u32,
     pub ifl: u32,
-    pub read_pos: usize,
-    pub read_count: usize,
-    pub read_trigger: usize,
+    pub read_pos: u32,
+    pub read_count: u32,
+    pub read_trigger: u32,
     #[doc(alias = "chr")]
     pub char_backend: CharBackend,
     /// QEMU interrupts
@@ -480,7 +506,7 @@ pub fn loopback_enabled(&self) -> bool {
     }
 
     #[inline]
-    pub fn fifo_depth(&self) -> usize {
+    pub fn fifo_depth(&self) -> u32 {
         // Note: FIFO depth is expected to be power-of-2
         if self.fifo_enabled() {
             return PL011_FIFO_DEPTH;
rust/hw/char/pl011/src/device_class.rs +5 -5
index 975c3d42be7..7f3ca895071 100644
@@ -6,8 +6,8 @@
 use std::os::raw::{c_int, c_void};
 
 use qemu_api::{
-    bindings::*, c_str, vmstate_clock, vmstate_fields, vmstate_int32, vmstate_subsections,
-    vmstate_uint32, vmstate_uint32_array, vmstate_unused, zeroable::Zeroable,
+    bindings::*, c_str, vmstate_clock, vmstate_fields, vmstate_subsections, vmstate_uint32,
+    vmstate_uint32_array, vmstate_unused, zeroable::Zeroable,
 };
 
 use crate::device::{PL011State, PL011_FIFO_DEPTH};
@@ -64,9 +64,9 @@ extern "C" fn pl011_post_load(opaque: *mut c_void, version_id: c_int) -> c_int {
         vmstate_uint32!(ibrd, PL011State),
         vmstate_uint32!(fbrd, PL011State),
         vmstate_uint32!(ifl, PL011State),
-        vmstate_int32!(read_pos, PL011State),
-        vmstate_int32!(read_count, PL011State),
-        vmstate_int32!(read_trigger, PL011State),
+        vmstate_uint32!(read_pos, PL011State),
+        vmstate_uint32!(read_count, PL011State),
+        vmstate_uint32!(read_trigger, PL011State),
     },
     subsections: vmstate_subsections! {
         VMSTATE_PL011_CLOCK
rust/qemu-api/src/vmstate.rs +0 -22
index 25c68b703ea..63c897abcdf 100644
@@ -106,28 +106,6 @@ macro_rules! vmstate_uint32 {
     }};
 }
 
-#[doc(alias = "VMSTATE_INT32_V")]
-#[macro_export]
-macro_rules! vmstate_int32_v {
-    ($field_name:ident, $struct_name:ty, $version_id:expr) => {{
-        $crate::vmstate_single!(
-            $field_name,
-            $struct_name,
-            $version_id,
-            ::core::ptr::addr_of!($crate::bindings::vmstate_info_int32),
-            ::core::mem::size_of::<i32>()
-        )
-    }};
-}
-
-#[doc(alias = "VMSTATE_INT32")]
-#[macro_export]
-macro_rules! vmstate_int32 {
-    ($field_name:ident, $struct_name:ty) => {{
-        $crate::vmstate_int32_v!($field_name, $struct_name, 0)
-    }};
-}
-
 #[doc(alias = "VMSTATE_ARRAY")]
 #[macro_export]
 macro_rules! vmstate_array {
Signature · 1 line
2.47.1
#27 lore raw

[PULL 38/41] rust: pl011: fix break errors and definition of Data struct

In reply to Paolo Bonzini

The Data struct is wrong, and does not show how bits 8-15 of DR are the receive status. Fix it, and use it to fix break errors ("c >> 8" in the C code does not translate to "c.to_be_bytes()[3]").

---
 rust/hw/char/pl011/src/device.rs | 15 ++++++------
 rust/hw/char/pl011/src/lib.rs    | 41 ++++++++++++++++++++++----------
 2 files changed, 36 insertions(+), 20 deletions(-)
rust/hw/char/pl011/src/device.rs +7 -8
index f2ee8763d8f..5e3a9c6f581 100644
@@ -30,8 +30,6 @@
 /// Fractional Baud Rate Divider, `UARTFBRD`
 const FBRD_MASK: u32 = 0x3f;
 
-const DATA_BREAK: u32 = 1 << 10;
-
 /// QEMU sourced constant.
 pub const PL011_FIFO_DEPTH: usize = 16_usize;
 
@@ -75,7 +73,7 @@ pub struct PL011State {
     pub dmacr: u32,
     pub int_enabled: u32,
     pub int_level: u32,
-    pub read_fifo: [u32; PL011_FIFO_DEPTH],
+    pub read_fifo: [registers::Data; PL011_FIFO_DEPTH],
     pub ilpr: u32,
     pub ibrd: u32,
     pub fbrd: u32,
@@ -210,10 +208,11 @@ pub fn read(&mut self, offset: hwaddr, _size: c_uint) -> std::ops::ControlFlow<u
                     self.int_level &= !registers::INT_RX;
                 }
                 // Update error bits.
-                self.receive_status_error_clear = c.to_be_bytes()[3].into();
+                self.receive_status_error_clear.set_from_data(c);
                 self.update();
                 // Must call qemu_chr_fe_accept_input, so return Continue:
-                return std::ops::ControlFlow::Continue(c.into());
+                let c = u32::from(c);
+                return std::ops::ControlFlow::Continue(u64::from(c));
             }
             Ok(RSR) => u8::from(self.receive_status_error_clear).into(),
             Ok(FR) => u16::from(self.flags).into(),
@@ -406,7 +405,7 @@ fn loopback_mdmctrl(&mut self) {
 
     fn loopback_break(&mut self, enable: bool) {
         if enable {
-            self.loopback_tx(DATA_BREAK);
+            self.loopback_tx(registers::Data::BREAK.into());
         }
     }
 
@@ -470,7 +469,7 @@ pub fn can_receive(&self) -> bool {
 
     pub fn event(&mut self, event: QEMUChrEvent) {
         if event == bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.loopback_enabled() {
-            self.put_fifo(DATA_BREAK);
+            self.put_fifo(registers::Data::BREAK.into());
         }
     }
 
@@ -497,7 +496,7 @@ pub fn put_fifo(&mut self, value: c_uint) {
         let depth = self.fifo_depth();
         assert!(depth > 0);
         let slot = (self.read_pos + self.read_count) & (depth - 1);
-        self.read_fifo[slot] = value;
+        self.read_fifo[slot] = registers::Data::from(value);
         self.read_count += 1;
         self.flags.set_receive_fifo_empty(false);
         if self.read_count == depth {
rust/hw/char/pl011/src/lib.rs +29 -12

65 lines not on this page · raw message

Signature · 1 line
2.47.1
#28 lore raw

[PULL 41/41] rust: pl011: simplify handling of the FIFO enabled bit in LCR

In reply to Paolo Bonzini

Use ==/!= instead of going through bool and xor.

---
 rust/hw/char/pl011/src/device.rs | 6 ++----
 rust/hw/char/pl011/src/lib.rs    | 6 ------
 2 files changed, 2 insertions(+), 10 deletions(-)
rust/hw/char/pl011/src/device.rs +2 -4
index 4d620b442ed..18cc122951d 100644
@@ -302,9 +302,7 @@ pub fn write(&mut self, offset: hwaddr, value: u64) {
             Ok(LCR_H) => {
                 let new_val: registers::LineControl = value.into();
                 // Reset the FIFO state on FIFO enable or disable
-                if bool::from(self.line_control.fifos_enabled())
-                    ^ bool::from(new_val.fifos_enabled())
-                {
+                if self.line_control.fifos_enabled() != new_val.fifos_enabled() {
                     self.reset_rx_fifo();
                     self.reset_tx_fifo();
                 }
@@ -497,7 +495,7 @@ pub fn event(&mut self, event: QEMUChrEvent) {
 
     #[inline]
     pub fn fifo_enabled(&self) -> bool {
-        matches!(self.line_control.fifos_enabled(), registers::Mode::FIFO)
+        self.line_control.fifos_enabled() == registers::Mode::FIFO
     }
 
     #[inline]
rust/hw/char/pl011/src/lib.rs +0 -6
index 0747e130cae..69064d6929b 100644
@@ -419,12 +419,6 @@ pub enum Mode {
         FIFO = 1,
     }
 
-    impl From<Mode> for bool {
-        fn from(val: Mode) -> Self {
-            matches!(val, Mode::FIFO)
-        }
-    }
-
     #[bitsize(2)]
     #[derive(Clone, Copy, Debug, Eq, FromBits, PartialEq)]
     /// `WLEN` Word length, field of [Line Control register](LineControl).
Signature · 1 line
2.47.1
#29 lore raw

[PULL 20/41] include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

Now that all of the Property arrays are counted, we can remove the terminator object from each array. Update the assertions in device_class_set_props to match.

With struct Property being 88 bytes, this was a rather large form of terminator. Saves 30k from qemu-system-aarch64.

---
 docs/devel/migration/compatibility.rst |  1 -
 docs/devel/virtio-backends.rst         |  1 -
 include/hw/qdev-core.h                 | 14 +++++++-------
 include/hw/qdev-properties.h           |  3 ---
 cpu-target.c                           |  1 -
 hw/9pfs/virtio-9p-device.c             |  1 -
 hw/acpi/erst.c                         |  1 -
 hw/acpi/generic_event_device.c         |  1 -
 hw/acpi/piix4.c                        |  1 -
 hw/acpi/vmgenid.c                      |  1 -
 hw/adc/aspeed_adc.c                    |  1 -
 hw/adc/npcm7xx_adc.c                   |  1 -
 hw/arm/armv7m.c                        |  2 --
 hw/arm/aspeed_soc_common.c             |  1 -
 hw/arm/fsl-imx25.c                     |  1 -
 hw/arm/fsl-imx6.c                      |  1 -
 hw/arm/fsl-imx6ul.c                    |  1 -
 hw/arm/fsl-imx7.c                      |  1 -
 hw/arm/integratorcp.c                  |  1 -
 hw/arm/msf2-soc.c                      |  1 -
 hw/arm/npcm7xx.c                       |  1 -
 hw/arm/nrf51_soc.c                     |  1 -
 hw/arm/smmu-common.c                   |  1 -
 hw/arm/smmuv3.c                        |  1 -
 hw/arm/stellaris.c                     |  1 -
 hw/arm/strongarm.c                     |  1 -
 hw/arm/xlnx-versal.c                   |  1 -
 hw/arm/xlnx-zynqmp.c                   |  1 -
 hw/audio/ac97.c                        |  1 -
 hw/audio/adlib.c                       |  1 -
 hw/audio/asc.c                         |  1 -
 hw/audio/cs4231a.c                     |  1 -
 hw/audio/es1370.c                      |  1 -
 hw/audio/gus.c                         |  1 -
 hw/audio/hda-codec.c                   |  1 -
 hw/audio/intel-hda.c                   |  2 --
 hw/audio/pcspk.c                       |  1 -
 hw/audio/pl041.c                       |  1 -
 hw/audio/sb16.c                        |  1 -
 hw/audio/via-ac97.c                    |  1 -
 hw/audio/virtio-snd-pci.c              |  1 -
 hw/audio/virtio-snd.c                  |  1 -
 hw/audio/wm8750.c                      |  1 -
 hw/avr/atmega.c                        |  1 -
 hw/block/fdc-isa.c                     |  1 -
 hw/block/fdc-sysbus.c                  |  2 --
 hw/block/fdc.c                         |  1 -
 hw/block/m25p80.c                      |  1 -
 hw/block/nand.c                        |  1 -
 hw/block/pflash_cfi01.c                |  1 -
 hw/block/pflash_cfi02.c                |  1 -
 hw/block/swim.c                        |  1 -
 hw/block/vhost-user-blk.c              |  1 -
 hw/block/virtio-blk.c                  |  1 -
 hw/block/xen-block.c                   |  1 -
 hw/char/avr_usart.c                    |  1 -
 hw/char/bcm2835_aux.c                  |  1 -
 hw/char/cadence_uart.c                 |  1 -
 hw/char/cmsdk-apb-uart.c               |  1 -
 hw/char/debugcon.c                     |  1 -
 hw/char/digic-uart.c                   |  1 -
 hw/char/escc.c                         |  1 -
 hw/char/exynos4210_uart.c              |  1 -
 hw/char/goldfish_tty.c                 |  1 -
 hw/char/grlib_apbuart.c                |  1 -
 hw/char/ibex_uart.c                    |  1 -
 hw/char/imx_serial.c                   |  1 -
 hw/char/ipoctal232.c                   |  1 -
 hw/char/mcf_uart.c                     |  1 -
 hw/char/nrf51_uart.c                   |  1 -
 hw/char/parallel.c                     |  1 -
 hw/char/pl011.c                        |  1 -
 hw/char/renesas_sci.c                  |  1 -
 hw/char/sclpconsole-lm.c               |  1 -
 hw/char/sclpconsole.c                  |  1 -
 hw/char/serial-isa.c                   |  1 -
 hw/char/serial-mm.c                    |  1 -
 hw/char/serial-pci-multi.c             |  2 --
 hw/char/serial-pci.c                   |  1 -
 hw/char/serial.c                       |  1 -
 hw/char/sh_serial.c                    |  1 -
 hw/char/shakti_uart.c                  |  1 -
 hw/char/sifive_uart.c                  |  1 -
 hw/char/spapr_vty.c                    |  1 -
 hw/char/stm32f2xx_usart.c              |  1 -
 hw/char/stm32l4x5_usart.c              |  1 -
 hw/char/terminal3270.c                 |  1 -
 hw/char/virtio-console.c               |  1 -
 hw/char/virtio-serial-bus.c            |  2 --
 hw/char/xen_console.c                  |  1 -
 hw/char/xilinx_uartlite.c              |  1 -
 hw/core/generic-loader.c               |  1 -
 hw/core/guest-loader.c                 |  1 -
 hw/core/or-irq.c                       |  1 -
 hw/core/platform-bus.c                 |  1 -
 hw/core/split-irq.c                    |  1 -
 hw/cpu/a15mpcore.c                     |  1 -
 hw/cpu/a9mpcore.c                      |  1 -
 hw/cpu/arm11mpcore.c                   |  1 -
 hw/cpu/cluster.c                       |  1 -
 hw/cpu/realview_mpcore.c               |  1 -
 hw/cxl/switch-mailbox-cci.c            |  1 -
 hw/display/artist.c                    |  1 -
 hw/display/ati.c                       |  1 -
 hw/display/bcm2835_fb.c                |  1 -
 hw/display/bochs-display.c             |  1 -
 hw/display/cg3.c                       |  1 -
 hw/display/cirrus_vga.c                |  1 -
 hw/display/cirrus_vga_isa.c            |  1 -
 hw/display/exynos4210_fimd.c           |  1 -
 hw/display/g364fb.c                    |  1 -
 hw/display/i2c-ddc.c                   |  1 -
 hw/display/macfb.c                     |  2 --
 hw/display/pl110.c                     |  1 -
 hw/display/qxl.c                       |  1 -
 hw/display/ramfb-standalone.c          |  1 -
 hw/display/sm501.c                     |  2 --
 hw/display/tcx.c                       |  1 -
 hw/display/vga-isa.c                   |  1 -
 hw/display/vga-mmio.c                  |  1 -
 hw/display/vga-pci.c                   |  2 --
 hw/display/vhost-user-gpu.c            |  1 -
 hw/display/virtio-gpu-gl.c             |  1 -
 hw/display/virtio-gpu-pci.c            |  1 -
 hw/display/virtio-gpu-rutabaga.c       |  1 -
 hw/display/virtio-gpu.c                |  1 -
 hw/display/virtio-vga.c                |  1 -
 hw/display/vmware_vga.c                |  1 -
 hw/display/xlnx_dp.c                   |  1 -
 hw/dma/i82374.c                        |  1 -
 hw/dma/i8257.c                         |  1 -
 hw/dma/pl080.c                         |  1 -
 hw/dma/pl330.c                         |  2 --
 hw/dma/xilinx_axidma.c                 |  1 -
 hw/dma/xlnx-zdma.c                     |  1 -
 hw/dma/xlnx_csu_dma.c                  |  1 -
 hw/gpio/imx_gpio.c                     |  1 -
 hw/gpio/npcm7xx_gpio.c                 |  1 -
 hw/gpio/omap_gpio.c                    |  1 -
 hw/gpio/pca9552.c                      |  1 -
 hw/gpio/pca9554.c                      |  1 -
 hw/gpio/pl061.c                        |  1 -
 hw/gpio/sifive_gpio.c                  |  1 -
 hw/gpio/stm32l4x5_gpio.c               |  1 -
 hw/hyperv/hv-balloon.c                 |  2 --
 hw/hyperv/syndbg.c                     |  1 -
 hw/hyperv/vmbus.c                      |  2 --
 hw/i2c/aspeed_i2c.c                    |  2 --
 hw/i2c/core.c                          |  1 -
 hw/i2c/i2c_mux_pca954x.c               |  1 -
 hw/i2c/omap_i2c.c                      |  1 -
 hw/i386/amd_iommu.c                    |  1 -
 hw/i386/intel_iommu.c                  |  1 -
 hw/i386/kvm/clock.c                    |  1 -
 hw/i386/kvm/i8254.c                    |  1 -
 hw/i386/kvm/ioapic.c                   |  1 -
 hw/i386/sgx-epc.c                      |  1 -
 hw/i386/vmmouse.c                      |  1 -
 hw/i386/vmport.c                       |  2 --
 hw/i386/x86-iommu.c                    |  1 -
 hw/i386/xen/xen_pvdevice.c             |  1 -
 hw/ide/ahci-sysbus.c                   |  1 -
 hw/ide/cf.c                            |  1 -
 hw/ide/cmd646.c                        |  1 -
 hw/ide/ide-dev.c                       |  3 ---
 hw/ide/isa.c                           |  1 -
 hw/ide/macio.c                         |  1 -
 hw/ide/mmio.c                          |  1 -
 hw/input/pckbd.c                       |  2 --
 hw/input/stellaris_gamepad.c           |  1 -
 hw/input/virtio-input-hid.c            |  3 ---
 hw/input/virtio-input-host.c           |  1 -
 hw/input/virtio-input.c                |  1 -
 hw/intc/apic_common.c                  |  1 -
 hw/intc/arm_gic_common.c               |  1 -
 hw/intc/arm_gicv2m.c                   |  1 -
 hw/intc/arm_gicv3_common.c             |  1 -
 hw/intc/arm_gicv3_its.c                |  1 -
 hw/intc/arm_gicv3_its_kvm.c            |  1 -
 hw/intc/armv7m_nvic.c                  |  1 -
 hw/intc/exynos4210_combiner.c          |  1 -
 hw/intc/exynos4210_gic.c               |  1 -
 hw/intc/goldfish_pic.c                 |  1 -
 hw/intc/grlib_irqmp.c                  |  1 -
 hw/intc/i8259_common.c                 |  1 -
 hw/intc/ioapic.c                       |  1 -
 hw/intc/loongarch_extioi.c             |  1 -
 hw/intc/loongarch_pch_msi.c            |  1 -
 hw/intc/loongarch_pch_pic.c            |  1 -
 hw/intc/loongson_ipi_common.c          |  1 -
 hw/intc/m68k_irqc.c                    |  1 -
 hw/intc/mips_gic.c                     |  1 -
 hw/intc/omap_intc.c                    |  1 -
 hw/intc/ompic.c                        |  1 -
 hw/intc/openpic.c                      |  1 -
 hw/intc/openpic_kvm.c                  |  1 -
 hw/intc/pnv_xive.c                     |  1 -
 hw/intc/pnv_xive2.c                    |  1 -
 hw/intc/ppc-uic.c                      |  1 -
 hw/intc/riscv_aclint.c                 |  2 --
 hw/intc/riscv_aplic.c                  |  1 -
 hw/intc/riscv_imsic.c                  |  1 -
 hw/intc/rx_icu.c                       |  1 -
 hw/intc/s390_flic.c                    |  2 --
 hw/intc/sifive_plic.c                  |  1 -
 hw/intc/spapr_xive.c                   |  1 -
 hw/intc/xics.c                         |  2 --
 hw/intc/xilinx_intc.c                  |  1 -
 hw/intc/xive.c                         |  4 ----
 hw/intc/xive2.c                        |  2 --
 hw/intc/xlnx-pmu-iomod-intc.c          |  1 -
 hw/ipack/ipack.c                       |  1 -
 hw/ipmi/ipmi.c                         |  1 -
 hw/ipmi/ipmi_bmc_extern.c              |  1 -
 hw/ipmi/ipmi_bmc_sim.c                 |  1 -
 hw/ipmi/isa_ipmi_bt.c                  |  1 -
 hw/ipmi/isa_ipmi_kcs.c                 |  1 -
 hw/isa/lpc_ich9.c                      |  1 -
 hw/isa/pc87312.c                       |  1 -
 hw/isa/piix.c                          |  1 -
 hw/m68k/mcf5206.c                      |  1 -
 hw/m68k/mcf_intc.c                     |  1 -
 hw/m68k/next-cube.c                    |  1 -
 hw/m68k/q800-glue.c                    |  1 -
 hw/mem/cxl_type3.c                     |  1 -
 hw/mem/nvdimm.c                        |  1 -
 hw/mem/pc-dimm.c                       |  1 -
 hw/mem/sparse-mem.c                    |  1 -
 hw/mips/cps.c                          |  1 -
 hw/misc/a9scu.c                        |  1 -
 hw/misc/allwinner-h3-dramc.c           |  1 -
 hw/misc/allwinner-r40-dramc.c          |  1 -
 hw/misc/allwinner-sid.c                |  1 -
 hw/misc/applesmc.c                     |  1 -
 hw/misc/arm11scu.c                     |  1 -
 hw/misc/arm_l2x0.c                     |  1 -
 hw/misc/arm_sysctl.c                   |  1 -
 hw/misc/armsse-cpuid.c                 |  1 -
 hw/misc/aspeed_hace.c                  |  1 -
 hw/misc/aspeed_i3c.c                   |  1 -
 hw/misc/aspeed_lpc.c                   |  1 -
 hw/misc/aspeed_sbc.c                   |  1 -
 hw/misc/aspeed_scu.c                   |  1 -
 hw/misc/aspeed_sdmc.c                  |  1 -
 hw/misc/bcm2835_cprman.c               |  1 -
 hw/misc/bcm2835_property.c             |  1 -
 hw/misc/debugexit.c                    |  1 -
 hw/misc/eccmemctl.c                    |  1 -
 hw/misc/empty_slot.c                   |  1 -
 hw/misc/iotkit-secctl.c                |  1 -
 hw/misc/iotkit-sysctl.c                |  1 -
 hw/misc/iotkit-sysinfo.c               |  1 -
 hw/misc/ivshmem.c                      |  2 --
 hw/misc/led.c                          |  1 -
 hw/misc/mac_via.c                      |  1 -
 hw/misc/macio/cuda.c                   |  1 -
 hw/misc/macio/macio.c                  |  2 --
 hw/misc/macio/pmu.c                    |  1 -
 hw/misc/mips_cmgcr.c                   |  1 -
 hw/misc/mips_cpc.c                     |  1 -
 hw/misc/mips_itu.c                     |  1 -
 hw/misc/mos6522.c                      |  1 -
 hw/misc/mps2-fpgaio.c                  |  1 -
 hw/misc/mps2-scc.c                     |  1 -
 hw/misc/msf2-sysreg.c                  |  1 -
 hw/misc/npcm7xx_gcr.c                  |  1 -
 hw/misc/nrf51_rng.c                    |  1 -
 hw/misc/pci-testdev.c                  |  1 -
 hw/misc/pvpanic-isa.c                  |  1 -
 hw/misc/pvpanic-pci.c                  |  1 -
 hw/misc/sifive_e_aon.c                 |  1 -
 hw/misc/sifive_u_otp.c                 |  1 -
 hw/misc/stm32l4x5_rcc.c                |  1 -
 hw/misc/tz-mpc.c                       |  1 -
 hw/misc/tz-msc.c                       |  1 -
 hw/misc/tz-ppc.c                       |  1 -
 hw/misc/unimp.c                        |  1 -
 hw/misc/xlnx-versal-cframe-reg.c       |  2 --
 hw/misc/xlnx-versal-cfu.c              |  2 --
 hw/misc/xlnx-versal-trng.c             |  2 --
 hw/misc/xlnx-versal-xramc.c            |  1 -
 hw/misc/zynq_slcr.c                    |  1 -
 hw/net/allwinner-sun8i-emac.c          |  1 -
 hw/net/allwinner_emac.c                |  1 -
 hw/net/cadence_gem.c                   |  1 -
 hw/net/can/xlnx-versal-canfd.c         |  1 -
 hw/net/can/xlnx-zynqmp-can.c           |  1 -
 hw/net/dp8393x.c                       |  1 -
 hw/net/e1000.c                         |  1 -
 hw/net/e1000e.c                        |  1 -
 hw/net/eepro100.c                      |  1 -
 hw/net/fsl_etsec/etsec.c               |  1 -
 hw/net/ftgmac100.c                     |  2 --
 hw/net/igb.c                           |  1 -
 hw/net/imx_fec.c                       |  1 -
 hw/net/lan9118.c                       |  1 -
 hw/net/lance.c                         |  1 -
 hw/net/lasi_i82596.c                   |  1 -
 hw/net/mcf_fec.c                       |  1 -
 hw/net/mipsnet.c                       |  1 -
 hw/net/msf2-emac.c                     |  1 -
 hw/net/mv88w8618_eth.c                 |  1 -
 hw/net/ne2000-isa.c                    |  1 -
 hw/net/ne2000-pci.c                    |  1 -
 hw/net/npcm7xx_emc.c                   |  1 -
 hw/net/npcm_gmac.c                     |  1 -
 hw/net/opencores_eth.c                 |  1 -
 hw/net/pcnet-pci.c                     |  1 -
 hw/net/rocker/rocker.c                 |  1 -
 hw/net/rtl8139.c                       |  1 -
 hw/net/smc91c111.c                     |  1 -
 hw/net/spapr_llan.c                    |  1 -
 hw/net/stellaris_enet.c                |  1 -
 hw/net/sungem.c                        |  1 -
 hw/net/sunhme.c                        |  1 -
 hw/net/tulip.c                         |  1 -
 hw/net/virtio-net.c                    |  1 -
 hw/net/vmxnet3.c                       |  1 -
 hw/net/xen_nic.c                       |  1 -
 hw/net/xgmac.c                         |  1 -
 hw/net/xilinx_axienet.c                |  1 -
 hw/net/xilinx_ethlite.c                |  1 -
 hw/nubus/nubus-bridge.c                |  1 -
 hw/nubus/nubus-device.c                |  1 -
 hw/nvme/ctrl.c                         |  1 -
 hw/nvme/ns.c                           |  1 -
 hw/nvme/subsys.c                       |  1 -
 hw/nvram/ds1225y.c                     |  1 -
 hw/nvram/eeprom_at24c.c                |  1 -
 hw/nvram/fw_cfg.c                      |  3 ---
 hw/nvram/mac_nvram.c                   |  1 -
 hw/nvram/nrf51_nvm.c                   |  1 -
 hw/nvram/spapr_nvram.c                 |  1 -
 hw/nvram/xlnx-bbram.c                  |  1 -
 hw/nvram/xlnx-efuse.c                  |  1 -
 hw/nvram/xlnx-versal-efuse-cache.c     |  2 --
 hw/nvram/xlnx-versal-efuse-ctrl.c      |  2 --
 hw/nvram/xlnx-zynqmp-efuse.c           |  2 --
 hw/pci-bridge/cxl_downstream.c         |  1 -
 hw/pci-bridge/cxl_root_port.c          |  1 -
 hw/pci-bridge/cxl_upstream.c           |  1 -
 hw/pci-bridge/gen_pcie_root_port.c     |  1 -
 hw/pci-bridge/pci_bridge_dev.c         |  1 -
 hw/pci-bridge/pci_expander_bridge.c    |  2 --
 hw/pci-bridge/pcie_pci_bridge.c        |  1 -
 hw/pci-bridge/pcie_root_port.c         |  1 -
 hw/pci-bridge/xio3130_downstream.c     |  1 -
 hw/pci-host/dino.c                     |  1 -
 hw/pci-host/gpex.c                     |  1 -
 hw/pci-host/grackle.c                  |  1 -
 hw/pci-host/gt64120.c                  |  1 -
 hw/pci-host/i440fx.c                   |  1 -
 hw/pci-host/mv64361.c                  |  1 -
 hw/pci-host/pnv_phb.c                  |  4 ----
 hw/pci-host/pnv_phb3.c                 |  1 -
 hw/pci-host/pnv_phb4.c                 |  1 -
 hw/pci-host/pnv_phb4_pec.c             |  1 -
 hw/pci-host/ppce500.c                  |  1 -
 hw/pci-host/q35.c                      |  2 --
 hw/pci-host/raven.c                    |  1 -
 hw/pci-host/sabre.c                    |  1 -
 hw/pci-host/uninorth.c                 |  1 -
 hw/pci-host/versatile.c                |  1 -
 hw/pci-host/xilinx-pcie.c              |  1 -
 hw/pci/pci.c                           |  1 -
 hw/pci/pci_bridge.c                    |  1 -
 hw/pci/pci_host.c                      |  1 -
 hw/pci/pcie_port.c                     |  2 --
 hw/ppc/pnv.c                           |  1 -
 hw/ppc/pnv_adu.c                       |  1 -
 hw/ppc/pnv_chiptod.c                   |  1 -
 hw/ppc/pnv_core.c                      |  2 --
 hw/ppc/pnv_homer.c                     |  1 -
 hw/ppc/pnv_i2c.c                       |  1 -
 hw/ppc/pnv_lpc.c                       |  1 -
 hw/ppc/pnv_pnor.c                      |  1 -
 hw/ppc/pnv_psi.c                       |  1 -
 hw/ppc/ppc405_uc.c                     |  1 -
 hw/ppc/ppc440_uc.c                     |  1 -
 hw/ppc/ppc4xx_devs.c                   |  2 --
 hw/ppc/ppc4xx_sdram.c                  |  2 --
 hw/ppc/prep_systemio.c                 |  1 -
 hw/ppc/rs6000_mc.c                     |  1 -
 hw/ppc/spapr_cpu_core.c                |  1 -
 hw/ppc/spapr_nvdimm.c                  |  1 -
 hw/ppc/spapr_pci.c                     |  1 -
 hw/ppc/spapr_rng.c                     |  1 -
 hw/ppc/spapr_tpm_proxy.c               |  1 -
 hw/remote/proxy.c                      |  1 -
 hw/riscv/opentitan.c                   |  1 -
 hw/riscv/riscv-iommu-pci.c             |  1 -
 hw/riscv/riscv-iommu.c                 |  1 -
 hw/riscv/riscv_hart.c                  |  1 -
 hw/riscv/sifive_u.c                    |  1 -
 hw/rtc/allwinner-rtc.c                 |  1 -
 hw/rtc/goldfish_rtc.c                  |  1 -
 hw/rtc/m48t59-isa.c                    |  1 -
 hw/rtc/m48t59.c                        |  1 -
 hw/rtc/mc146818rtc.c                   |  1 -
 hw/rtc/pl031.c                         |  1 -
 hw/rx/rx62n.c                          |  1 -
 hw/s390x/ccw-device.c                  |  1 -
 hw/s390x/css-bridge.c                  |  1 -
 hw/s390x/ipl.c                         |  1 -
 hw/s390x/s390-pci-bus.c                |  1 -
 hw/s390x/s390-skeys.c                  |  1 -
 hw/s390x/s390-stattrib.c               |  1 -
 hw/s390x/vhost-scsi-ccw.c              |  1 -
 hw/s390x/vhost-user-fs-ccw.c           |  1 -
 hw/s390x/vhost-vsock-ccw.c             |  1 -
 hw/s390x/virtio-ccw-9p.c               |  1 -
 hw/s390x/virtio-ccw-balloon.c          |  1 -
 hw/s390x/virtio-ccw-blk.c              |  1 -
 hw/s390x/virtio-ccw-crypto.c           |  1 -
 hw/s390x/virtio-ccw-gpu.c              |  1 -
 hw/s390x/virtio-ccw-input.c            |  1 -
 hw/s390x/virtio-ccw-net.c              |  1 -
 hw/s390x/virtio-ccw-rng.c              |  1 -
 hw/s390x/virtio-ccw-scsi.c             |  1 -
 hw/s390x/virtio-ccw-serial.c           |  1 -
 hw/scsi/mptsas.c                       |  1 -
 hw/scsi/scsi-bus.c                     |  1 -
 hw/scsi/scsi-disk.c                    |  3 ---
 hw/scsi/scsi-generic.c                 |  1 -
 hw/scsi/spapr_vscsi.c                  |  1 -
 hw/scsi/vhost-scsi.c                   |  1 -
 hw/scsi/vhost-user-scsi.c              |  1 -
 hw/scsi/virtio-scsi.c                  |  1 -
 hw/scsi/vmw_pvscsi.c                   |  1 -
 hw/sd/allwinner-sdhost.c               |  1 -
 hw/sd/aspeed_sdhci.c                   |  1 -
 hw/sd/sd.c                             |  3 ---
 hw/sd/sdhci-pci.c                      |  1 -
 hw/sd/sdhci.c                          |  1 -
 hw/sparc/sun4m_iommu.c                 |  1 -
 hw/sparc64/sun4u.c                     |  2 --
 hw/ssi/aspeed_smc.c                    |  2 --
 hw/ssi/ibex_spi_host.c                 |  1 -
 hw/ssi/npcm7xx_fiu.c                   |  1 -
 hw/ssi/pnv_spi.c                       |  1 -
 hw/ssi/sifive_spi.c                    |  1 -
 hw/ssi/ssi.c                           |  1 -
 hw/ssi/xilinx_spi.c                    |  1 -
 hw/ssi/xilinx_spips.c                  |  2 --
 hw/ssi/xlnx-versal-ospi.c              |  1 -
 hw/timer/a9gtimer.c                    |  1 -
 hw/timer/allwinner-a10-pit.c           |  1 -
 hw/timer/arm_mptimer.c                 |  1 -
 hw/timer/arm_timer.c                   |  1 -
 hw/timer/aspeed_timer.c                |  1 -
 hw/timer/avr_timer16.c                 |  1 -
 hw/timer/grlib_gptimer.c               |  1 -
 hw/timer/hpet.c                        |  1 -
 hw/timer/i8254_common.c                |  1 -
 hw/timer/ibex_timer.c                  |  1 -
 hw/timer/mss-timer.c                   |  1 -
 hw/timer/nrf51_timer.c                 |  1 -
 hw/timer/pxa2xx_timer.c                |  1 -
 hw/timer/renesas_cmt.c                 |  1 -
 hw/timer/renesas_tmr.c                 |  1 -
 hw/timer/sifive_pwm.c                  |  1 -
 hw/timer/slavio_timer.c                |  1 -
 hw/timer/sse-timer.c                   |  1 -
 hw/timer/stm32f2xx_timer.c             |  1 -
 hw/timer/xilinx_timer.c                |  1 -
 hw/tpm/tpm_crb.c                       |  1 -
 hw/tpm/tpm_spapr.c                     |  1 -
 hw/tpm/tpm_tis_i2c.c                   |  1 -
 hw/tpm/tpm_tis_isa.c                   |  1 -
 hw/tpm/tpm_tis_sysbus.c                |  1 -
 hw/ufs/lu.c                            |  1 -
 hw/ufs/ufs.c                           |  1 -
 hw/usb/bus.c                           |  1 -
 hw/usb/canokey.c                       |  1 -
 hw/usb/ccid-card-emulated.c            |  1 -
 hw/usb/ccid-card-passthru.c            |  1 -
 hw/usb/dev-audio.c                     |  1 -
 hw/usb/dev-hid.c                       |  3 ---
 hw/usb/dev-hub.c                       |  1 -
 hw/usb/dev-mtp.c                       |  1 -
 hw/usb/dev-network.c                   |  1 -
 hw/usb/dev-serial.c                    |  2 --
 hw/usb/dev-smartcard-reader.c          |  2 --
 hw/usb/dev-storage-classic.c           |  1 -
 hw/usb/dev-uas.c                       |  1 -
 hw/usb/hcd-dwc2.c                      |  1 -
 hw/usb/hcd-dwc3.c                      |  1 -
 hw/usb/hcd-ehci-pci.c                  |  1 -
 hw/usb/hcd-ehci-sysbus.c               |  1 -
 hw/usb/hcd-ohci-pci.c                  |  1 -
 hw/usb/hcd-ohci-sysbus.c               |  1 -
 hw/usb/hcd-uhci.c                      |  2 --
 hw/usb/hcd-xhci-nec.c                  |  1 -
 hw/usb/hcd-xhci-sysbus.c               |  1 -
 hw/usb/hcd-xhci.c                      |  1 -
 hw/usb/host-libusb.c                   |  1 -
 hw/usb/redirect.c                      |  1 -
 hw/usb/u2f-emulated.c                  |  1 -
 hw/usb/u2f-passthru.c                  |  1 -
 hw/vfio/ap.c                           |  1 -
 hw/vfio/ccw.c                          |  1 -
 hw/vfio/pci.c                          |  2 --
 hw/vfio/platform.c                     |  1 -
 hw/virtio/vdpa-dev.c                   |  1 -
 hw/virtio/vhost-scsi-pci.c             |  1 -
 hw/virtio/vhost-user-blk-pci.c         |  1 -
 hw/virtio/vhost-user-device.c          |  1 -
 hw/virtio/vhost-user-fs-pci.c          |  1 -
 hw/virtio/vhost-user-fs.c              |  1 -
 hw/virtio/vhost-user-gpio.c            |  1 -
 hw/virtio/vhost-user-i2c.c             |  1 -
 hw/virtio/vhost-user-input.c           |  1 -
 hw/virtio/vhost-user-rng-pci.c         |  1 -
 hw/virtio/vhost-user-rng.c             |  1 -
 hw/virtio/vhost-user-scmi.c            |  1 -
 hw/virtio/vhost-user-scsi-pci.c        |  1 -
 hw/virtio/vhost-user-snd.c             |  1 -
 hw/virtio/vhost-user-vsock-pci.c       |  1 -
 hw/virtio/vhost-user-vsock.c           |  1 -
 hw/virtio/vhost-vsock-common.c         |  1 -
 hw/virtio/vhost-vsock-pci.c            |  1 -
 hw/virtio/vhost-vsock.c                |  1 -
 hw/virtio/virtio-9p-pci.c              |  1 -
 hw/virtio/virtio-balloon.c             |  1 -
 hw/virtio/virtio-blk-pci.c             |  1 -
 hw/virtio/virtio-crypto-pci.c          |  1 -
 hw/virtio/virtio-crypto.c              |  1 -
 hw/virtio/virtio-input-pci.c           |  1 -
 hw/virtio/virtio-iommu-pci.c           |  1 -
 hw/virtio/virtio-iommu.c               |  1 -
 hw/virtio/virtio-mem.c                 |  1 -
 hw/virtio/virtio-mmio.c                |  1 -
 hw/virtio/virtio-net-pci.c             |  1 -
 hw/virtio/virtio-nsm.c                 |  1 -
 hw/virtio/virtio-pci.c                 |  2 --
 hw/virtio/virtio-pmem.c                |  1 -
 hw/virtio/virtio-rng-pci.c             |  1 -
 hw/virtio/virtio-rng.c                 |  1 -
 hw/virtio/virtio-scsi-pci.c            |  1 -
 hw/virtio/virtio-serial-pci.c          |  1 -
 hw/virtio/virtio.c                     |  1 -
 hw/watchdog/sbsa_gwdt.c                |  1 -
 hw/watchdog/wdt_aspeed.c               |  1 -
 hw/watchdog/wdt_imx2.c                 |  1 -
 hw/xen/xen-bus.c                       |  1 -
 hw/xen/xen_pt.c                        |  1 -
 target/arm/cpu.c                       |  1 -
 target/avr/cpu.c                       |  1 -
 target/hexagon/cpu.c                   |  1 -
 target/i386/cpu.c                      |  2 --
 target/microblaze/cpu.c                |  1 -
 target/mips/cpu.c                      |  1 -
 target/s390x/cpu.c                     |  1 -
 target/sparc/cpu.c                     |  1 -
 tests/unit/test-qdev-global-props.c    |  1 -
 555 files changed, 7 insertions(+), 623 deletions(-)
docs/devel/migration/compatibility.rst +0 -1
index c787f537386..ecb887e3184 100644
@@ -401,7 +401,6 @@ the old behaviour or the new behaviour::
          DEFINE_PROP_UINT32("acpi-index",  PCIDevice, acpi_index, 0),
     +    DEFINE_PROP_BIT("x-pcie-err-unc-mask", PCIDevice, cap_present,
     +                    QEMU_PCIE_ERR_UNC_MASK_BITNR, true),
-         DEFINE_PROP_END_OF_LIST()
      };
 
 Notice that we enable the feature for new machine types.
docs/devel/virtio-backends.rst +0 -1
index a6f9df4845a..679d7544b8e 100644
@@ -107,7 +107,6 @@ manually instantiated:
                       VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
       DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
                          DEV_NVECTORS_UNSPECIFIED),
-      DEFINE_PROP_END_OF_LIST(),
   };
 
   static void virtio_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
include/hw/qdev-core.h +7 -7
index 5dc46402585..e6ef80b7fd0 100644
@@ -947,16 +947,16 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);
  * you attempt to add an existing property defined by a parent class.
  * To modify an inherited property you need to use????
  *
- * Validate that @props has at least one Property plus the terminator.
+ * Validate that @props has at least one Property.
  * Validate that @props is an array, not a pointer, via ARRAY_SIZE.
- * Validate that the array is terminated at compile-time (with -O2),
- * which requires the array to be const.
+ * Validate that the array does not have a legacy terminator at compile-time;
+ * requires -O2 and the array to be const.
  */
 #define device_class_set_props(dc, props) \
     do {                                                                \
-        QEMU_BUILD_BUG_ON(sizeof(props) < 2 * sizeof(Property));        \
-        size_t props_count_ = ARRAY_SIZE(props) - 1;                    \
-        if ((props)[props_count_].name != NULL) {                       \
+        QEMU_BUILD_BUG_ON(sizeof(props) == 0);                          \
+        size_t props_count_ = ARRAY_SIZE(props);                        \
+        if ((props)[props_count_ - 1].name == NULL) {                   \
             qemu_build_not_reached();                                   \
         }                                                               \
         device_class_set_props_n((dc), (props), props_count_);          \
@@ -965,7 +965,7 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);
 /**
  * device_class_set_props_n(): add a set of properties to an device
  * @dc: the parent DeviceClass all devices inherit
- * @props: an array of properties, not terminated by DEFINE_PROP_END_OF_LIST.
+ * @props: an array of properties
  * @n: ARRAY_SIZE(@props)
  *
  * This will add a set of properties to the object. It will fault if
include/hw/qdev-properties.h +0 -3
index 26ebd230685..ef3fd7b4ae2 100644
@@ -171,9 +171,6 @@ extern const PropertyInfo qdev_prop_link;
 #define DEFINE_PROP_SIZE32(_n, _s, _f, _d)                       \
     DEFINE_PROP_UNSIGNED(_n, _s, _f, _d, qdev_prop_size32, uint32_t)
 
-#define DEFINE_PROP_END_OF_LIST()               \
-    {}
-
 /*
  * Set properties between creation and realization.
  *
cpu-target.c +0 -1
index 2ae07a779ea..6af34098b9e 100644
@@ -201,7 +201,6 @@ static const Property cpu_common_props[] = {
     DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION,
                      MemoryRegion *),
 #endif
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 #ifndef CONFIG_USER_ONLY
hw/9pfs/virtio-9p-device.c +0 -1
index b764e4cd3db..ef0d845109d 100644
@@ -246,7 +246,6 @@ static const VMStateDescription vmstate_virtio_9p = {
 static const Property virtio_9p_properties[] = {
     DEFINE_PROP_STRING("mount_tag", V9fsVirtioState, state.fsconf.tag),
     DEFINE_PROP_STRING("fsdev", V9fsVirtioState, state.fsconf.fsdev_id),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_9p_class_init(ObjectClass *klass, void *data)
hw/acpi/erst.c +0 -1
index 5ef5ddccb68..dfa0f371767 100644
@@ -1016,7 +1016,6 @@ static const Property erst_properties[] = {
                      TYPE_MEMORY_BACKEND, HostMemoryBackend *),
     DEFINE_PROP_UINT32(ACPI_ERST_RECORD_SIZE_PROP, ERSTDeviceState,
                      default_record_size, ERST_RECORD_SIZE),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void erst_class_init(ObjectClass *klass, void *data)
hw/acpi/generic_event_device.c +0 -1
index 8c4706f8cff..cfb14299b68 100644
@@ -318,7 +318,6 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
 
 static const Property acpi_ged_properties[] = {
     DEFINE_PROP_UINT32("ged-event", AcpiGedState, ged_event_bitmap, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_memhp_state = {
hw/acpi/piix4.c +0 -1
index 2bfaf5a38d3..cc755b36ebc 100644
@@ -617,7 +617,6 @@ static const Property piix4_pm_properties[] = {
     DEFINE_PROP_BOOL("smm-enabled", PIIX4PMState, smm_enabled, false),
     DEFINE_PROP_BOOL("x-not-migrate-acpi-index", PIIX4PMState,
                       not_migrate_acpi_index, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void piix4_pm_class_init(ObjectClass *klass, void *data)
hw/acpi/vmgenid.c +0 -1
index 9c2ca85cc7c..af3ec859891 100644
@@ -216,7 +216,6 @@ static void vmgenid_realize(DeviceState *dev, Error **errp)
 
 static const Property vmgenid_device_properties[] = {
     DEFINE_PROP_UUID(VMGENID_GUID, VmGenIdState, guid),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vmgenid_device_class_init(ObjectClass *klass, void *data)
hw/adc/aspeed_adc.c +0 -1
index f94c6f2be3a..1cc554f1793 100644
@@ -289,7 +289,6 @@ static const VMStateDescription vmstate_aspeed_adc_engine = {
 static const Property aspeed_adc_engine_properties[] = {
     DEFINE_PROP_UINT32("engine-id", AspeedADCEngineState, engine_id, 0),
     DEFINE_PROP_UINT32("nr-channels", AspeedADCEngineState, nr_channels, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_adc_engine_class_init(ObjectClass *klass, void *data)
hw/adc/npcm7xx_adc.c +0 -1
index 1781ff4c0b0..0a83d28605e 100644
@@ -269,7 +269,6 @@ static const VMStateDescription vmstate_npcm7xx_adc = {
 
 static const Property npcm7xx_timer_properties[] = {
     DEFINE_PROP_UINT32("iref", NPCM7xxADCState, iref, NPCM7XX_ADC_DEFAULT_IREF),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void npcm7xx_adc_class_init(ObjectClass *klass, void *data)
hw/arm/armv7m.c +0 -2
index e20f719c9bd..1134606fc24 100644
@@ -552,7 +552,6 @@ static const Property armv7m_properties[] = {
     DEFINE_PROP_BOOL("dsp", ARMv7MState, dsp, true),
     DEFINE_PROP_UINT32("mpu-ns-regions", ARMv7MState, mpu_ns_regions, UINT_MAX),
     DEFINE_PROP_UINT32("mpu-s-regions", ARMv7MState, mpu_s_regions, UINT_MAX),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_armv7m = {
@@ -635,7 +634,6 @@ static const Property bitband_properties[] = {
     DEFINE_PROP_UINT32("base", BitBandState, base, 0),
     DEFINE_PROP_LINK("source-memory", BitBandState, source_memory,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void bitband_class_init(ObjectClass *klass, void *data)
hw/arm/aspeed_soc_common.c +0 -1
index 4221cacd51a..1ddcb26c1ed 100644
@@ -144,7 +144,6 @@ static const Property aspeed_soc_properties[] = {
                      MemoryRegion *),
     DEFINE_PROP_LINK("memory", AspeedSoCState, memory, TYPE_MEMORY_REGION,
                      MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_soc_class_init(ObjectClass *oc, void *data)
hw/arm/fsl-imx25.c +0 -1
index 48763b03feb..ef1242d0a0e 100644
@@ -311,7 +311,6 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
 
 static const Property fsl_imx25_properties[] = {
     DEFINE_PROP_UINT32("fec-phy-num", FslIMX25State, phy_num, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void fsl_imx25_class_init(ObjectClass *oc, void *data)
hw/arm/fsl-imx6.c +0 -1
index 236d15bc9cb..fed2dbb46d3 100644
@@ -483,7 +483,6 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
 
 static const Property fsl_imx6_properties[] = {
     DEFINE_PROP_UINT32("fec-phy-num", FslIMX6State, phy_num, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void fsl_imx6_class_init(ObjectClass *oc, void *data)
hw/arm/fsl-imx6ul.c +0 -1
index 1e0bbbb5d77..6995746f642 100644
@@ -725,7 +725,6 @@ static const Property fsl_imx6ul_properties[] = {
                      true),
     DEFINE_PROP_BOOL("fec2-phy-connected", FslIMX6ULState, phy_connected[1],
                      true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void fsl_imx6ul_class_init(ObjectClass *oc, void *data)
hw/arm/fsl-imx7.c +0 -1
index 0310c15b0cf..55b3b3d3c25 100644
@@ -743,7 +743,6 @@ static const Property fsl_imx7_properties[] = {
                      true),
     DEFINE_PROP_BOOL("fec2-phy-connected", FslIMX7State, phy_connected[1],
                      true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void fsl_imx7_class_init(ObjectClass *oc, void *data)
hw/arm/integratorcp.c +0 -1
index ee6c7e0c0d9..64025bac64c 100644
@@ -696,7 +696,6 @@ DEFINE_MACHINE("integratorcp", integratorcp_machine_init)
 
 static const Property core_properties[] = {
     DEFINE_PROP_UINT32("memsz", IntegratorCMState, memsz, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void core_class_init(ObjectClass *klass, void *data)
hw/arm/msf2-soc.c +0 -1
index 5d7c3f2e5a0..224530f4da8 100644
@@ -234,7 +234,6 @@ static const Property m2sxxx_soc_properties[] = {
     /* default divisors in Libero GUI */
     DEFINE_PROP_UINT8("apb0div", MSF2State, apb0div, 2),
     DEFINE_PROP_UINT8("apb1div", MSF2State, apb1div, 2),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void m2sxxx_soc_class_init(ObjectClass *klass, void *data)
hw/arm/npcm7xx.c +0 -1
index 2960b63b596..780936493ef 100644
@@ -813,7 +813,6 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp)
 static const Property npcm7xx_properties[] = {
     DEFINE_PROP_LINK("dram-mr", NPCM7xxState, dram, TYPE_MEMORY_REGION,
                      MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void npcm7xx_class_init(ObjectClass *oc, void *data)
hw/arm/nrf51_soc.c +0 -1
index 43fac8a8db2..37dd4cf5f40 100644
@@ -214,7 +214,6 @@ static const Property nrf51_soc_properties[] = {
     DEFINE_PROP_UINT32("sram-size", NRF51State, sram_size, NRF51822_SRAM_SIZE),
     DEFINE_PROP_UINT32("flash-size", NRF51State, flash_size,
                        NRF51822_FLASH_SIZE),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nrf51_soc_class_init(ObjectClass *klass, void *data)
hw/arm/smmu-common.c +0 -1
index 6baa9d0fc31..dd74c2e5583 100644
@@ -938,7 +938,6 @@ static const Property smmu_dev_properties[] = {
     DEFINE_PROP_UINT8("bus_num", SMMUState, bus_num, 0),
     DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus,
                      TYPE_PCI_BUS, PCIBus *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void smmu_base_class_init(ObjectClass *klass, void *data)
hw/arm/smmuv3.c +0 -1
index 026838f9ace..c0cf5df0f6e 100644
@@ -1985,7 +1985,6 @@ static const Property smmuv3_properties[] = {
      * Defaults to stage 1
      */
     DEFINE_PROP_STRING("stage", SMMUv3State, stage),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void smmuv3_instance_init(Object *obj)
hw/arm/stellaris.c +0 -1
index 7fc13d96c9b..ea04b2837ff 100644
@@ -448,7 +448,6 @@ static const Property stellaris_sys_properties[] = {
     DEFINE_PROP_UINT32("dc2", ssys_state, dc2, 0),
     DEFINE_PROP_UINT32("dc3", ssys_state, dc3, 0),
     DEFINE_PROP_UINT32("dc4", ssys_state, dc4, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void stellaris_sys_instance_init(Object *obj)
hw/arm/strongarm.c +0 -1
index 4c4ff21e804..f56781519ff 100644
@@ -1334,7 +1334,6 @@ static const VMStateDescription vmstate_strongarm_uart_regs = {
 
 static const Property strongarm_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", StrongARMUARTState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void strongarm_uart_class_init(ObjectClass *klass, void *data)
hw/arm/xlnx-versal.c +0 -1
index 3adbe7b1fbf..3760d101fd6 100644
@@ -975,7 +975,6 @@ static const Property versal_properties[] = {
                       TYPE_CAN_BUS, CanBusState *),
     DEFINE_PROP_LINK("canbus1", Versal, lpd.iou.canbus[1],
                       TYPE_CAN_BUS, CanBusState *),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void versal_class_init(ObjectClass *klass, void *data)
hw/arm/xlnx-zynqmp.c +0 -1
index 1082c62c30f..6bb4629a5c9 100644
@@ -867,7 +867,6 @@ static const Property xlnx_zynqmp_props[] = {
                      CanBusState *),
     DEFINE_PROP_LINK("canbus1", XlnxZynqMPState, canbus[1], TYPE_CAN_BUS,
                      CanBusState *),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
hw/audio/ac97.c +0 -1
index 8033bbbaed4..35533c6bad0 100644
@@ -1326,7 +1326,6 @@ static void ac97_exit(PCIDevice *dev)
 
 static const Property ac97_properties[] = {
     DEFINE_AUDIO_PROPERTIES(AC97LinkState, card),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ac97_class_init(ObjectClass *klass, void *data)
hw/audio/adlib.c +0 -1
index c1d8faecb49..8c9767b5372 100644
@@ -301,7 +301,6 @@ static const Property adlib_properties[] = {
     DEFINE_AUDIO_PROPERTIES(AdlibState, card),
     DEFINE_PROP_UINT32 ("iobase",  AdlibState, port, 0x220),
     DEFINE_PROP_UINT32 ("freq",    AdlibState, freq,  44100),
-    DEFINE_PROP_END_OF_LIST (),
 };
 
 static void adlib_class_initfn (ObjectClass *klass, void *data)
hw/audio/asc.c +0 -1
index 452039418d0..cc205bf063e 100644
@@ -698,7 +698,6 @@ static void asc_init(Object *obj)
 static const Property asc_properties[] = {
     DEFINE_AUDIO_PROPERTIES(ASCState, card),
     DEFINE_PROP_UINT8("asctype", ASCState, type, ASC_TYPE_ASC),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void asc_class_init(ObjectClass *oc, void *data)
hw/audio/cs4231a.c +0 -1
index abc38720a36..5a9be80ba3b 100644
@@ -694,7 +694,6 @@ static const Property cs4231a_properties[] = {
     DEFINE_PROP_UINT32 ("iobase",  CSState, port, 0x534),
     DEFINE_PROP_UINT32 ("irq",     CSState, irq,  9),
     DEFINE_PROP_UINT32 ("dma",     CSState, dma,  3),
-    DEFINE_PROP_END_OF_LIST (),
 };
 
 static void cs4231a_class_initfn (ObjectClass *klass, void *data)
hw/audio/es1370.c +0 -1
index 6170425a5a1..b5756b97d5e 100644
@@ -870,7 +870,6 @@ static void es1370_exit(PCIDevice *dev)
 
 static const Property es1370_properties[] = {
     DEFINE_AUDIO_PROPERTIES(ES1370State, card),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void es1370_class_init (ObjectClass *klass, void *data)
hw/audio/gus.c +0 -1
index dd5a5a34414..e718c1183e8 100644
@@ -296,7 +296,6 @@ static const Property gus_properties[] = {
     DEFINE_PROP_UINT32 ("iobase",  GUSState, port,        0x240),
     DEFINE_PROP_UINT32 ("irq",     GUSState, emu.gusirq,  7),
     DEFINE_PROP_UINT32 ("dma",     GUSState, emu.gusdma,  3),
-    DEFINE_PROP_END_OF_LIST (),
 };
 
 static void gus_class_initfn (ObjectClass *klass, void *data)
hw/audio/hda-codec.c +0 -1
index 8bd8f62c485..6f3a8f691bf 100644
@@ -862,7 +862,6 @@ static const Property hda_audio_properties[] = {
     DEFINE_PROP_UINT32("debug", HDAAudioState, debug,   0),
     DEFINE_PROP_BOOL("mixer", HDAAudioState, mixer,  true),
     DEFINE_PROP_BOOL("use-timer", HDAAudioState, use_timer,  true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void hda_audio_init_output(HDACodecDevice *hda, Error **errp)
hw/audio/intel-hda.c +0 -2
index 3e4a7552287..ec24dfd77aa 100644
@@ -39,7 +39,6 @@
 
 static const Property hda_props[] = {
     DEFINE_PROP_UINT32("cad", HDACodecDevice, cad, -1),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const TypeInfo hda_codec_bus_info = {
@@ -1219,7 +1218,6 @@ static const Property intel_hda_properties[] = {
     DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0),
     DEFINE_PROP_ON_OFF_AUTO("msi", IntelHDAState, msi, ON_OFF_AUTO_AUTO),
     DEFINE_PROP_BOOL("old_msi_addr", IntelHDAState, old_msi_addr, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void intel_hda_class_init(ObjectClass *klass, void *data)
hw/audio/pcspk.c +0 -1
index 7a6b9f52d3f..17be1855474 100644
@@ -219,7 +219,6 @@ static const Property pcspk_properties[] = {
     DEFINE_AUDIO_PROPERTIES(PCSpkState, card),
     DEFINE_PROP_UINT32("iobase", PCSpkState, iobase,  0x61),
     DEFINE_PROP_BOOL("migrate", PCSpkState, migrate,  true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pcspk_class_initfn(ObjectClass *klass, void *data)
hw/audio/pl041.c +0 -1
index 6c66a240cb9..f771d725fa6 100644
@@ -630,7 +630,6 @@ static const Property pl041_device_properties[] = {
     /* Non-compact FIFO depth property */
     DEFINE_PROP_UINT32("nc_fifo_depth", PL041State, fifo_depth,
                        DEFAULT_FIFO_DEPTH),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pl041_device_class_init(ObjectClass *klass, void *data)
hw/audio/sb16.c +0 -1
index 143b9e71e12..0c661b4947b 100644
@@ -1447,7 +1447,6 @@ static const Property sb16_properties[] = {
     DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5),
     DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1),
     DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5),
-    DEFINE_PROP_END_OF_LIST (),
 };
 
 static void sb16_class_initfn (ObjectClass *klass, void *data)
hw/audio/via-ac97.c +0 -1
index e43ddf37f3c..4e115e011e8 100644
@@ -461,7 +461,6 @@ static void via_ac97_exit(PCIDevice *dev)
 
 static const Property via_ac97_properties[] = {
     DEFINE_AUDIO_PROPERTIES(ViaAC97State, card),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void via_ac97_class_init(ObjectClass *klass, void *data)
hw/audio/virtio-snd-pci.c +0 -1
index b762d7e81ee..74d93f4e9c9 100644
@@ -31,7 +31,6 @@ static const Property virtio_snd_pci_properties[] = {
     DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
                     VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
     DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_snd_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
hw/audio/virtio-snd.c +0 -1
index e2b112e0593..7e8ab74ceb4 100644
@@ -85,7 +85,6 @@ static const Property virtio_snd_properties[] = {
                        VIRTIO_SOUND_STREAM_DEFAULT),
     DEFINE_PROP_UINT32("chmaps", VirtIOSound, snd_conf.chmaps,
                        VIRTIO_SOUND_CHMAP_DEFAULT),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void
hw/audio/wm8750.c +0 -1
index 19e7755060c..8d381dbc658 100644
@@ -708,7 +708,6 @@ void wm8750_set_bclk_in(void *opaque, int new_hz)
 
 static const Property wm8750_properties[] = {
     DEFINE_AUDIO_PROPERTIES(WM8750State, card),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void wm8750_class_init(ObjectClass *klass, void *data)
hw/avr/atmega.c +0 -1
index ce630ec572f..981f34219f4 100644
@@ -358,7 +358,6 @@ static void atmega_realize(DeviceState *dev, Error **errp)
 static const Property atmega_props[] = {
     DEFINE_PROP_UINT64("xtal-frequency-hz", AtmegaMcuState,
                        xtal_freq_hz, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void atmega_class_init(ObjectClass *oc, void *data)
hw/block/fdc-isa.c +0 -1
index 2b9f667fe44..e71be8ab2cd 100644
@@ -296,7 +296,6 @@ static const Property isa_fdc_properties[] = {
     DEFINE_PROP_SIGNED("fallback", FDCtrlISABus, state.fallback,
                         FLOPPY_DRIVE_TYPE_288, qdev_prop_fdc_drive_type,
                         FloppyDriveType),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void isabus_fdc_class_init(ObjectClass *klass, void *data)
hw/block/fdc-sysbus.c +0 -2
index f17e04b138b..381b492aec9 100644
@@ -206,7 +206,6 @@ static const Property sysbus_fdc_properties[] = {
     DEFINE_PROP_SIGNED("fallback", FDCtrlSysBus, state.fallback,
                         FLOPPY_DRIVE_TYPE_144, qdev_prop_fdc_drive_type,
                         FloppyDriveType),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sysbus_fdc_class_init(ObjectClass *klass, void *data)
@@ -230,7 +229,6 @@ static const Property sun4m_fdc_properties[] = {
     DEFINE_PROP_SIGNED("fallback", FDCtrlSysBus, state.fallback,
                         FLOPPY_DRIVE_TYPE_144, qdev_prop_fdc_drive_type,
                         FloppyDriveType),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sun4m_fdc_class_init(ObjectClass *klass, void *data)
hw/block/fdc.c +0 -1
index 57d68448063..d81b7a2a73b 100644
@@ -460,7 +460,6 @@ static const Property floppy_drive_properties[] = {
     DEFINE_PROP_SIGNED("drive-type", FloppyDrive, type,
                         FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
                         FloppyDriveType),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void floppy_drive_realize(DeviceState *qdev, Error **errp)
hw/block/m25p80.c +0 -1
index ca97365926b..8b5f148796d 100644
@@ -1729,7 +1729,6 @@ static const Property m25p80_properties[] = {
     DEFINE_PROP_UINT8("spansion-cr3nv", Flash, spansion_cr3nv, 0x2),
     DEFINE_PROP_UINT8("spansion-cr4nv", Flash, spansion_cr4nv, 0x10),
     DEFINE_PROP_DRIVE("drive", Flash, blk),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static int m25p80_pre_load(void *opaque)
hw/block/nand.c +0 -1
index b6e6bfac236..35a91a870bf 100644
@@ -449,7 +449,6 @@ static const Property nand_properties[] = {
     DEFINE_PROP_UINT8("manufacturer_id", NANDFlashState, manf_id, 0),
     DEFINE_PROP_UINT8("chip_id", NANDFlashState, chip_id, 0),
     DEFINE_PROP_DRIVE("drive", NANDFlashState, blk),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nand_class_init(ObjectClass *klass, void *data)
hw/block/pflash_cfi01.c +0 -1
index 20f4fc67a03..06db20da606 100644
@@ -932,7 +932,6 @@ static const Property pflash_cfi01_properties[] = {
     DEFINE_PROP_STRING("name", PFlashCFI01, name),
     DEFINE_PROP_BOOL("old-multiple-chip-handling", PFlashCFI01,
                      old_multiple_chip_handling, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pflash_cfi01_class_init(ObjectClass *klass, void *data)
hw/block/pflash_cfi02.c +0 -1
index c82002d665e..559fac8ce8c 100644
@@ -959,7 +959,6 @@ static const Property pflash_cfi02_properties[] = {
     DEFINE_PROP_UINT16("unlock-addr0", PFlashCFI02, unlock_addr0, 0),
     DEFINE_PROP_UINT16("unlock-addr1", PFlashCFI02, unlock_addr1, 0),
     DEFINE_PROP_STRING("name", PFlashCFI02, name),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pflash_cfi02_unrealize(DeviceState *dev)
hw/block/swim.c +0 -1
index c336d83bdc1..4a7f8d13f7f 100644
@@ -169,7 +169,6 @@ static const BlockDevOps swim_block_ops = {
 static const Property swim_drive_properties[] = {
     DEFINE_PROP_INT32("unit", SWIMDrive, unit, -1),
     DEFINE_BLOCK_PROPERTIES(SWIMDrive, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void swim_drive_realize(DeviceState *qdev, Error **errp)
hw/block/vhost-user-blk.c +0 -1
index f3ac0071080..d13c597d7eb 100644
@@ -581,7 +581,6 @@ static const Property vhost_user_blk_properties[] = {
                       VIRTIO_BLK_F_DISCARD, true),
     DEFINE_PROP_BIT64("write-zeroes", VHostUserBlk, parent_obj.host_features,
                       VIRTIO_BLK_F_WRITE_ZEROES, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vhost_user_blk_class_init(ObjectClass *klass, void *data)
hw/block/virtio-blk.c +0 -1
index 9ca60fbc070..5bcb77ed200 100644
@@ -2014,7 +2014,6 @@ static const Property virtio_blk_properties[] = {
                        conf.max_write_zeroes_sectors, BDRV_REQUEST_MAX_SECTORS),
     DEFINE_PROP_BOOL("x-enable-wce-if-config-wce", VirtIOBlock,
                      conf.x_enable_wce_if_config_wce, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_blk_class_init(ObjectClass *klass, void *data)
hw/block/xen-block.c +0 -1
index 0c0817f4987..56a67136604 100644
@@ -674,7 +674,6 @@ static const Property xen_block_props[] = {
                        props.max_ring_page_order, 4),
     DEFINE_PROP_LINK("iothread", XenBlockDevice, props.iothread,
                      TYPE_IOTHREAD, IOThread *),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void xen_block_class_init(ObjectClass *class, void *data)
hw/char/avr_usart.c +0 -1
index 3421576e459..e8012cae3ad 100644
@@ -261,7 +261,6 @@ static const MemoryRegionOps avr_usart_ops = {
 
 static const Property avr_usart_properties[] = {
     DEFINE_PROP_CHR("chardev", AVRUsartState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void avr_usart_pr(void *opaque, int irq, int level)
hw/char/bcm2835_aux.c +0 -1
index 30285c97b0f..73ad5934067 100644
@@ -292,7 +292,6 @@ static void bcm2835_aux_realize(DeviceState *dev, Error **errp)
 
 static const Property bcm2835_aux_props[] = {
     DEFINE_PROP_CHR("chardev", BCM2835AuxState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void bcm2835_aux_class_init(ObjectClass *oc, void *data)
hw/char/cadence_uart.c +0 -1
index 2e778f7a9cd..ebd846a083b 100644
@@ -619,7 +619,6 @@ static const VMStateDescription vmstate_cadence_uart = {
 
 static const Property cadence_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", CadenceUARTState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cadence_uart_class_init(ObjectClass *klass, void *data)
hw/char/cmsdk-apb-uart.c +0 -1
index e37e14e0f2d..0506500215f 100644
@@ -380,7 +380,6 @@ static const VMStateDescription cmsdk_apb_uart_vmstate = {
 static const Property cmsdk_apb_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", CMSDKAPBUART, chr),
     DEFINE_PROP_UINT32("pclk-frq", CMSDKAPBUART, pclk_frq, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cmsdk_apb_uart_class_init(ObjectClass *klass, void *data)
hw/char/debugcon.c +0 -1
index c0f16e9bd64..1bc3bf85fea 100644
@@ -118,7 +118,6 @@ static const Property debugcon_isa_properties[] = {
     DEFINE_PROP_UINT32("iobase", ISADebugconState, iobase, 0xe9),
     DEFINE_PROP_CHR("chardev",  ISADebugconState, state.chr),
     DEFINE_PROP_UINT32("readback", ISADebugconState, state.readback, 0xe9),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void debugcon_isa_class_initfn(ObjectClass *klass, void *data)
hw/char/digic-uart.c +0 -1
index 03beba11adb..b0b0714e0f7 100644
@@ -174,7 +174,6 @@ static const VMStateDescription vmstate_digic_uart = {
 
 static const Property digic_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", DigicUartState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void digic_uart_class_init(ObjectClass *klass, void *data)
hw/char/escc.c +0 -1
index 08bc65ef2cc..a5fdd8f6986 100644
@@ -1099,7 +1099,6 @@ static const Property escc_properties[] = {
     DEFINE_PROP_CHR("chrB", ESCCState, chn[0].chr),
     DEFINE_PROP_CHR("chrA", ESCCState, chn[1].chr),
     DEFINE_PROP_STRING("chnA-sunkbd-layout", ESCCState, chn[1].sunkbd_layout),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void escc_class_init(ObjectClass *klass, void *data)
hw/char/exynos4210_uart.c +0 -1
index c2836ff8fd8..a1a9a12cafe 100644
@@ -709,7 +709,6 @@ static const Property exynos4210_uart_properties[] = {
     DEFINE_PROP_UINT32("channel", Exynos4210UartState, channel, 0),
     DEFINE_PROP_UINT32("rx-size", Exynos4210UartState, rx.size, 16),
     DEFINE_PROP_UINT32("tx-size", Exynos4210UartState, tx.size, 16),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void exynos4210_uart_class_init(ObjectClass *klass, void *data)
hw/char/goldfish_tty.c +0 -1
index 68e261236ec..701eb988933 100644
@@ -243,7 +243,6 @@ static const VMStateDescription vmstate_goldfish_tty = {
 
 static const Property goldfish_tty_properties[] = {
     DEFINE_PROP_CHR("chardev", GoldfishTTYState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void goldfish_tty_instance_init(Object *obj)
hw/char/grlib_apbuart.c +0 -1
index caae88d77d5..db6bcdad41b 100644
@@ -279,7 +279,6 @@ static void grlib_apbuart_reset(DeviceState *d)
 
 static const Property grlib_apbuart_properties[] = {
     DEFINE_PROP_CHR("chrdev", UART, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void grlib_apbuart_class_init(ObjectClass *klass, void *data)
hw/char/ibex_uart.c +0 -1
index b1bdb2ad152..392375ad551 100644
@@ -510,7 +510,6 @@ static const VMStateDescription vmstate_ibex_uart = {
 
 static const Property ibex_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", IbexUartState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ibex_uart_init(Object *obj)
hw/char/imx_serial.c +0 -1
index 6376f2cadc3..12705a1337f 100644
@@ -440,7 +440,6 @@ static void imx_serial_init(Object *obj)
 
 static const Property imx_serial_properties[] = {
     DEFINE_PROP_CHR("chardev", IMXSerialState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void imx_serial_class_init(ObjectClass *klass, void *data)
hw/char/ipoctal232.c +0 -1
index fb8cb6c2b71..d1e5f6dad2e 100644
@@ -567,7 +567,6 @@ static const Property ipoctal_properties[] = {
     DEFINE_PROP_CHR("chardev5", IPOctalState, ch[5].dev),
     DEFINE_PROP_CHR("chardev6", IPOctalState, ch[6].dev),
     DEFINE_PROP_CHR("chardev7", IPOctalState, ch[7].dev),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ipoctal_class_init(ObjectClass *klass, void *data)
hw/char/mcf_uart.c +0 -1
index c044536d5d1..980a12fcb7d 100644
@@ -314,7 +314,6 @@ static void mcf_uart_realize(DeviceState *dev, Error **errp)
 
 static const Property mcf_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", mcf_uart_state, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mcf_uart_class_init(ObjectClass *oc, void *data)
hw/char/nrf51_uart.c +0 -1
index b164c70f52c..82a61ee95f2 100644
@@ -306,7 +306,6 @@ static const VMStateDescription nrf51_uart_vmstate = {
 
 static const Property nrf51_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", NRF51UARTState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nrf51_uart_class_init(ObjectClass *klass, void *data)
hw/char/parallel.c +0 -1
index 15191698f5f..df31ce47220 100644
@@ -608,7 +608,6 @@ static const Property parallel_isa_properties[] = {
     DEFINE_PROP_UINT32("iobase", ISAParallelState, iobase,  -1),
     DEFINE_PROP_UINT32("irq",   ISAParallelState, isairq,  7),
     DEFINE_PROP_CHR("chardev",  ISAParallelState, state.chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void parallel_isa_class_initfn(ObjectClass *klass, void *data)
hw/char/pl011.c +0 -1
index 5fbee5e6c5b..06ce851044d 100644
@@ -606,7 +606,6 @@ static const VMStateDescription vmstate_pl011 = {
 static const Property pl011_properties[] = {
     DEFINE_PROP_CHR("chardev", PL011State, chr),
     DEFINE_PROP_BOOL("migrate-clk", PL011State, migrate_clk, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pl011_init(Object *obj)
hw/char/renesas_sci.c +0 -1
index 516b48648b9..ea944949320 100644
@@ -322,7 +322,6 @@ static const VMStateDescription vmstate_rsci = {
 static const Property rsci_properties[] = {
     DEFINE_PROP_UINT64("input-freq", RSCIState, input_freq, 0),
     DEFINE_PROP_CHR("chardev", RSCIState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void rsci_class_init(ObjectClass *klass, void *data)
hw/char/sclpconsole-lm.c +0 -1
index 536b2834717..ddb9a726d5a 100644
@@ -337,7 +337,6 @@ static const Property console_properties[] = {
     DEFINE_PROP_CHR("chardev", SCLPConsoleLM, chr),
     DEFINE_PROP_UINT32("write_errors", SCLPConsoleLM, write_errors, 0),
     DEFINE_PROP_BOOL("echo", SCLPConsoleLM, echo, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void console_class_init(ObjectClass *klass, void *data)
hw/char/sclpconsole.c +0 -1
index a90b892d1dd..01233b933d8 100644
@@ -253,7 +253,6 @@ static void console_reset(DeviceState *dev)
 
 static const Property console_properties[] = {
     DEFINE_PROP_CHR("chardev", SCLPConsole, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void console_class_init(ObjectClass *klass, void *data)
hw/char/serial-isa.c +0 -1
index 2cf50eb0bbb..f44959c769c 100644
@@ -117,7 +117,6 @@ static const Property serial_isa_properties[] = {
     DEFINE_PROP_UINT32("index",  ISASerialState, index,   -1),
     DEFINE_PROP_UINT32("iobase",  ISASerialState, iobase,  -1),
     DEFINE_PROP_UINT32("irq",    ISASerialState, isairq,  -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void serial_isa_class_initfn(ObjectClass *klass, void *data)
hw/char/serial-mm.c +0 -1
index 8f51f1d3b8e..6338e7c0ba8 100644
@@ -132,7 +132,6 @@ static const Property serial_mm_properties[] = {
      */
     DEFINE_PROP_UINT8("regshift", SerialMM, regshift, 0),
     DEFINE_PROP_UINT8("endianness", SerialMM, endianness, DEVICE_NATIVE_ENDIAN),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void serial_mm_class_init(ObjectClass *oc, void *data)
hw/char/serial-pci-multi.c +0 -2
index c2f20d8e74e..7578e863cfe 100644
@@ -136,7 +136,6 @@ static const Property multi_2x_serial_pci_properties[] = {
     DEFINE_PROP_CHR("chardev1",  PCIMultiSerialState, state[0].chr),
     DEFINE_PROP_CHR("chardev2",  PCIMultiSerialState, state[1].chr),
     DEFINE_PROP_UINT8("prog_if",  PCIMultiSerialState, prog_if, 0x02),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const Property multi_4x_serial_pci_properties[] = {
@@ -145,7 +144,6 @@ static const Property multi_4x_serial_pci_properties[] = {
     DEFINE_PROP_CHR("chardev3",  PCIMultiSerialState, state[2].chr),
     DEFINE_PROP_CHR("chardev4",  PCIMultiSerialState, state[3].chr),
     DEFINE_PROP_UINT8("prog_if",  PCIMultiSerialState, prog_if, 0x02),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data)
hw/char/serial-pci.c +0 -1
index 2f487a3a799..6659cef5d4b 100644
@@ -83,7 +83,6 @@ static const VMStateDescription vmstate_pci_serial = {
 
 static const Property serial_pci_properties[] = {
     DEFINE_PROP_UINT8("prog_if",  PCISerialState, prog_if, 0x02),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void serial_pci_class_initfn(ObjectClass *klass, void *data)
hw/char/serial.c +0 -1
index 85dba02ace4..81b346a5ab7 100644
@@ -968,7 +968,6 @@ static const Property serial_properties[] = {
     DEFINE_PROP_CHR("chardev", SerialState, chr),
     DEFINE_PROP_UINT32("baudbase", SerialState, baudbase, 115200),
     DEFINE_PROP_BOOL("wakeup", SerialState, wakeup, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void serial_class_init(ObjectClass *klass, void* data)
hw/char/sh_serial.c +0 -1
index 2ab7197aee7..247aeb071ac 100644
@@ -450,7 +450,6 @@ static void sh_serial_init(Object *obj)
 static const Property sh_serial_properties[] = {
     DEFINE_PROP_CHR("chardev", SHSerialState, chr),
     DEFINE_PROP_UINT8("features", SHSerialState, feat, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void sh_serial_class_init(ObjectClass *oc, void *data)
hw/char/shakti_uart.c +0 -1
index 6e56754ca6a..09975d9d349 100644
@@ -159,7 +159,6 @@ static void shakti_uart_instance_init(Object *obj)
 
 static const Property shakti_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", ShaktiUartState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void shakti_uart_class_init(ObjectClass *klass, void *data)
hw/char/sifive_uart.c +0 -1
index 97e4be37c07..4bc5767284b 100644
@@ -253,7 +253,6 @@ static int sifive_uart_be_change(void *opaque)
 
 static const Property sifive_uart_properties[] = {
     DEFINE_PROP_CHR("chardev", SiFiveUARTState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sifive_uart_init(Object *obj)
hw/char/spapr_vty.c +0 -1
index cd91dad7090..6451d010ac7 100644
@@ -166,7 +166,6 @@ void spapr_vty_create(SpaprVioBus *bus, Chardev *chardev)
 static const Property spapr_vty_properties[] = {
     DEFINE_SPAPR_PROPERTIES(SpaprVioVty, sdev),
     DEFINE_PROP_CHR("chardev", SpaprVioVty, chardev),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_spapr_vty = {
hw/char/stm32f2xx_usart.c +0 -1
index 4a3c30eddba..ebcc510f4ea 100644
@@ -201,7 +201,6 @@ static const MemoryRegionOps stm32f2xx_usart_ops = {
 
 static const Property stm32f2xx_usart_properties[] = {
     DEFINE_PROP_CHR("chardev", STM32F2XXUsartState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void stm32f2xx_usart_init(Object *obj)
hw/char/stm32l4x5_usart.c +0 -1
index 360e79cc3f4..bcc310bd97b 100644
@@ -536,7 +536,6 @@ static const MemoryRegionOps stm32l4x5_usart_base_ops = {
 
 static const Property stm32l4x5_usart_base_properties[] = {
     DEFINE_PROP_CHR("chardev", Stm32l4x5UsartBaseState, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void stm32l4x5_usart_base_init(Object *obj)
hw/char/terminal3270.c +0 -1
index c2aafda0ce5..04ee26dcbd3 100644
@@ -285,7 +285,6 @@ static int write_payload_3270(EmulatedCcw3270Device *dev, uint8_t cmd)
 
 static const Property terminal_properties[] = {
     DEFINE_PROP_CHR("chardev", Terminal3270, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription terminal3270_vmstate = {
hw/char/virtio-console.c +0 -1
index f58292e2bb3..aa6d611a475 100644
@@ -276,7 +276,6 @@ static const TypeInfo virtconsole_info = {
 
 static const Property virtserialport_properties[] = {
     DEFINE_PROP_CHR("chardev", VirtConsole, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtserialport_class_init(ObjectClass *klass, void *data)
hw/char/virtio-serial-bus.c +0 -2
index 1e631bcb2b3..b6d2743a9c6 100644
@@ -838,7 +838,6 @@ static void virtser_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent);
 static const Property virtser_props[] = {
     DEFINE_PROP_UINT32("nr", VirtIOSerialPort, id, VIRTIO_CONSOLE_BAD_ID),
     DEFINE_PROP_STRING("name", VirtIOSerialPort, name),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void virtser_bus_class_init(ObjectClass *klass, void *data)
@@ -1158,7 +1157,6 @@ static const Property virtio_serial_properties[] = {
                                                   31),
     DEFINE_PROP_BIT64("emergency-write", VirtIOSerial, host_features,
                       VIRTIO_CONSOLE_F_EMERG_WRITE, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_serial_class_init(ObjectClass *klass, void *data)
hw/char/xen_console.c +0 -1
index c20c1b4b84e..96e7d5940d2 100644
@@ -490,7 +490,6 @@ static char *xen_console_get_frontend_path(XenDevice *xendev, Error **errp)
 static const Property xen_console_properties[] = {
     DEFINE_PROP_CHR("chardev", XenConsole, chr),
     DEFINE_PROP_INT32("idx", XenConsole, dev, -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xen_console_class_init(ObjectClass *class, void *data)
hw/char/xilinx_uartlite.c +0 -1
index ad772262178..56955e0d74a 100644
@@ -178,7 +178,6 @@ static const MemoryRegionOps uart_ops = {
 
 static const Property xilinx_uartlite_properties[] = {
     DEFINE_PROP_CHR("chardev", XilinxUARTLite, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void uart_rx(void *opaque, const uint8_t *buf, int size)
hw/core/generic-loader.c +0 -1
index c1cddecf604..67f20089950 100644
@@ -187,7 +187,6 @@ static const Property generic_loader_props[] = {
     DEFINE_PROP_UINT32("cpu-num", GenericLoaderState, cpu_num, CPU_NONE),
     DEFINE_PROP_BOOL("force-raw", GenericLoaderState, force_raw, false),
     DEFINE_PROP_STRING("file", GenericLoaderState, file),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void generic_loader_class_init(ObjectClass *klass, void *data)
hw/core/guest-loader.c +0 -1
index 74af00cee70..57315e5cef7 100644
@@ -116,7 +116,6 @@ static const Property guest_loader_props[] = {
     DEFINE_PROP_STRING("kernel", GuestLoaderState, kernel),
     DEFINE_PROP_STRING("bootargs", GuestLoaderState, args),
     DEFINE_PROP_STRING("initrd", GuestLoaderState, initrd),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void guest_loader_class_init(ObjectClass *klass, void *data)
hw/core/or-irq.c +0 -1
index fc52796f543..4d0d3cabf1e 100644
@@ -117,7 +117,6 @@ static const VMStateDescription vmstate_or_irq = {
 
 static const Property or_irq_properties[] = {
     DEFINE_PROP_UINT16("num-lines", OrIRQState, num_lines, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void or_irq_class_init(ObjectClass *klass, void *data)
hw/core/platform-bus.c +0 -1
index a29c9c6e594..1d00c4d36d0 100644
@@ -207,7 +207,6 @@ static void platform_bus_realize(DeviceState *dev, Error **errp)
 static const Property platform_bus_properties[] = {
     DEFINE_PROP_UINT32("num_irqs", PlatformBusDevice, num_irqs, 0),
     DEFINE_PROP_UINT32("mmio_size", PlatformBusDevice, mmio_size, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void platform_bus_class_init(ObjectClass *klass, void *data)
hw/core/split-irq.c +0 -1
index 40fc7e2e773..fc12274811b 100644
@@ -61,7 +61,6 @@ static void split_irq_realize(DeviceState *dev, Error **errp)
 
 static const Property split_irq_properties[] = {
     DEFINE_PROP_UINT16("num-lines", SplitIRQ, num_lines, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void split_irq_class_init(ObjectClass *klass, void *data)
hw/cpu/a15mpcore.c +0 -1
index 5346b8b6c6e..bad44836f7e 100644
@@ -153,7 +153,6 @@ static const Property a15mp_priv_properties[] = {
      * Other boards may differ and should set this property appropriately.
      */
     DEFINE_PROP_UINT32("num-irq", A15MPPrivState, num_irq, 160),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void a15mp_priv_class_init(ObjectClass *klass, void *data)
hw/cpu/a9mpcore.c +0 -1
index c3fdfb92e11..9671585b5f9 100644
@@ -167,7 +167,6 @@ static const Property a9mp_priv_properties[] = {
      * Other boards may differ and should set this property appropriately.
      */
     DEFINE_PROP_UINT32("num-irq", A9MPPrivState, num_irq, 96),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void a9mp_priv_class_init(ObjectClass *klass, void *data)
hw/cpu/arm11mpcore.c +0 -1
index 193fc182ab6..94861a06d94 100644
@@ -142,7 +142,6 @@ static const Property mpcore_priv_properties[] = {
      * has more IRQ lines than the kernel expects.
      */
     DEFINE_PROP_UINT32("num-irq", ARM11MPCorePriveState, num_irq, 64),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mpcore_priv_class_init(ObjectClass *klass, void *data)
hw/cpu/cluster.c +0 -1
index 8e43621b5c7..9da5221f88b 100644
@@ -27,7 +27,6 @@
 
 static const Property cpu_cluster_properties[] = {
     DEFINE_PROP_UINT32("cluster-id", CPUClusterState, cluster_id, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 typedef struct CallbackData {
hw/cpu/realview_mpcore.c +0 -1
index 9a0ff1df864..4268735e3a5 100644
@@ -110,7 +110,6 @@ static void mpcore_rirq_init(Object *obj)
 
 static const Property mpcore_rirq_properties[] = {
     DEFINE_PROP_UINT32("num-cpu", mpcore_rirq_state, num_cpu, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mpcore_rirq_class_init(ObjectClass *klass, void *data)
hw/cxl/switch-mailbox-cci.c +0 -1
index 3fde0f8aaee..65cdac6cc13 100644
@@ -68,7 +68,6 @@ static void cswmbcci_exit(PCIDevice *pci_dev)
 static const Property cxl_switch_cci_props[] = {
     DEFINE_PROP_LINK("target", CSWMBCCIDev,
                      target, TYPE_CXL_USP, PCIDevice *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cswmbcci_class_init(ObjectClass *oc, void *data)
hw/display/artist.c +0 -1
index 49deed328d9..8b719b11edb 100644
@@ -1478,7 +1478,6 @@ static const Property artist_properties[] = {
     DEFINE_PROP_UINT16("width",        ARTISTState, width, 1280),
     DEFINE_PROP_UINT16("height",       ARTISTState, height, 1024),
     DEFINE_PROP_UINT16("depth",        ARTISTState, depth, 8),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void artist_reset(DeviceState *qdev)
hw/display/ati.c +0 -1
index e24e092bbc5..864fa4fc2ce 100644
@@ -1047,7 +1047,6 @@ static const Property ati_vga_properties[] = {
     DEFINE_PROP_BOOL("guest_hwcursor", ATIVGAState, cursor_guest_mode, false),
     /* this is a debug option, prefer PROP_UINT over PROP_BIT for simplicity */
     DEFINE_PROP_UINT8("x-pixman", ATIVGAState, use_pixman, DEFAULT_X_PIXMAN),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void ati_vga_class_init(ObjectClass *klass, void *data)
hw/display/bcm2835_fb.c +0 -1
index 2539fcc8ab8..a5bded5156a 100644
@@ -440,7 +440,6 @@ static const Property bcm2835_fb_props[] = {
                        initial_config.pixo, 1), /* 1=RGB, 0=BGR */
     DEFINE_PROP_UINT32("alpha", BCM2835FBState,
                        initial_config.alpha, 2), /* alpha ignored */
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void bcm2835_fb_class_init(ObjectClass *klass, void *data)
hw/display/bochs-display.c +0 -1
index 9a3263aa016..086f7a0f06c 100644
@@ -349,7 +349,6 @@ static const Property bochs_display_properties[] = {
     DEFINE_PROP_SIZE("vgamem", BochsDisplayState, vgamem, 16 * MiB),
     DEFINE_PROP_BOOL("edid", BochsDisplayState, enable_edid, true),
     DEFINE_EDID_PROPERTIES(BochsDisplayState, edid_info),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void bochs_display_class_init(ObjectClass *klass, void *data)
hw/display/cg3.c +0 -1
index 75b3312c245..3f971d875f8 100644
@@ -366,7 +366,6 @@ static const Property cg3_properties[] = {
     DEFINE_PROP_UINT16("width",        CG3State, width,     -1),
     DEFINE_PROP_UINT16("height",       CG3State, height,    -1),
     DEFINE_PROP_UINT16("depth",        CG3State, depth,     -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cg3_class_init(ObjectClass *klass, void *data)
hw/display/cirrus_vga.c +0 -1
index 198ed9ed9be..47ca6a77541 100644
@@ -2989,7 +2989,6 @@ static const Property pci_vga_cirrus_properties[] = {
                      cirrus_vga.enable_blitter, true),
     DEFINE_PROP_BOOL("global-vmstate", struct PCICirrusVGAState,
                      cirrus_vga.vga.global_vmstate, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cirrus_vga_class_init(ObjectClass *klass, void *data)
hw/display/cirrus_vga_isa.c +0 -1
index d0d134470fa..60b7fd20f1e 100644
@@ -74,7 +74,6 @@ static const Property isa_cirrus_vga_properties[] = {
                        cirrus_vga.vga.vram_size_mb, 4),
     DEFINE_PROP_BOOL("blitter", struct ISACirrusVGAState,
                      cirrus_vga.enable_blitter, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
hw/display/exynos4210_fimd.c +0 -1
index 4f097a172c3..04c864a3084 100644
@@ -1928,7 +1928,6 @@ static const GraphicHwOps exynos4210_fimd_ops = {
 static const Property exynos4210_fimd_properties[] = {
     DEFINE_PROP_LINK("framebuffer-memory", Exynos4210fimdState, fbmem,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void exynos4210_fimd_init(Object *obj)
hw/display/g364fb.c +0 -1
index a7533c69082..30b5ea67f26 100644
@@ -514,7 +514,6 @@ static void g364fb_sysbus_reset(DeviceState *d)
 
 static const Property g364fb_sysbus_properties[] = {
     DEFINE_PROP_UINT32("vram_size", G364SysBusState, g364.vram_size, 8 * MiB),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_g364fb_sysbus = {
hw/display/i2c-ddc.c +0 -1
index a2d1f2b044b..d8ab9eee405 100644
@@ -97,7 +97,6 @@ static const VMStateDescription vmstate_i2c_ddc = {
 
 static const Property i2c_ddc_properties[] = {
     DEFINE_EDID_PROPERTIES(I2CDDCState, edid_info),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void i2c_ddc_class_init(ObjectClass *oc, void *data)
hw/display/macfb.c +0 -2
index 977901bfdd0..e83fc863be5 100644
@@ -764,7 +764,6 @@ static const Property macfb_sysbus_properties[] = {
     DEFINE_PROP_UINT8("depth", MacfbSysBusState, macfb.depth, 8),
     DEFINE_PROP_UINT8("display", MacfbSysBusState, macfb.type,
                       MACFB_DISPLAY_VGA),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_macfb_sysbus = {
@@ -783,7 +782,6 @@ static const Property macfb_nubus_properties[] = {
     DEFINE_PROP_UINT8("depth", MacfbNubusState, macfb.depth, 8),
     DEFINE_PROP_UINT8("display", MacfbNubusState, macfb.type,
                       MACFB_DISPLAY_VGA),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_macfb_nubus = {
hw/display/pl110.c +0 -1
index eca00b42794..4d4f477b943 100644
@@ -538,7 +538,6 @@ static const GraphicHwOps pl110_gfx_ops = {
 static const Property pl110_properties[] = {
     DEFINE_PROP_LINK("framebuffer-memory", PL110State, fbmem,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pl110_realize(DeviceState *dev, Error **errp)
hw/display/qxl.c +0 -1
index 949949d374b..f3b1be7ebfa 100644
@@ -2475,7 +2475,6 @@ static const Property qxl_properties[] = {
         DEFINE_PROP_UINT32("xres", PCIQXLDevice, xres, 0),
         DEFINE_PROP_UINT32("yres", PCIQXLDevice, yres, 0),
         DEFINE_PROP_BOOL("global-vmstate", PCIQXLDevice, vga.global_vmstate, false),
-        DEFINE_PROP_END_OF_LIST(),
 };
 
 static void qxl_pci_class_init(ObjectClass *klass, void *data)
hw/display/ramfb-standalone.c +0 -1
index e677f44be68..6c35028965d 100644
@@ -62,7 +62,6 @@ static const VMStateDescription ramfb_dev_vmstate = {
 
 static const Property ramfb_properties[] = {
     DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate,  true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ramfb_class_initfn(ObjectClass *klass, void *data)
hw/display/sm501.c +0 -2
index 446b648f1a4..09edcf86f8e 100644
@@ -2058,7 +2058,6 @@ static const Property sm501_sysbus_properties[] = {
     DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0),
     /* this a debug option, prefer PROP_UINT over PROP_BIT for simplicity */
     DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, DEFAULT_X_PIXMAN),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sm501_reset_sysbus(DeviceState *dev)
@@ -2146,7 +2145,6 @@ static void sm501_realize_pci(PCIDevice *dev, Error **errp)
 static const Property sm501_pci_properties[] = {
     DEFINE_PROP_UINT32("vram-size", SM501PCIState, vram_size, 64 * MiB),
     DEFINE_PROP_UINT8("x-pixman", SM501PCIState, state.use_pixman, DEFAULT_X_PIXMAN),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sm501_reset_pci(DeviceState *dev)
hw/display/tcx.c +0 -1
index 3eb0a91ff9c..2cfc1e8f01d 100644
@@ -884,7 +884,6 @@ static const Property tcx_properties[] = {
     DEFINE_PROP_UINT16("width",    TCXState, width,     -1),
     DEFINE_PROP_UINT16("height",   TCXState, height,    -1),
     DEFINE_PROP_UINT16("depth",    TCXState, depth,     -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void tcx_class_init(ObjectClass *klass, void *data)
hw/display/vga-isa.c +0 -1
index a6cbf771031..2920628f780 100644
@@ -90,7 +90,6 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
 
 static const Property vga_isa_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vga_isa_class_initfn(ObjectClass *klass, void *data)
hw/display/vga-mmio.c +0 -1
index b759efdde75..1e0c2dbf748 100644
@@ -114,7 +114,6 @@ static void vga_mmio_realizefn(DeviceState *dev, Error **errp)
 static const Property vga_mmio_properties[] = {
     DEFINE_PROP_UINT8("it_shift", VGAMmioState, it_shift, 0),
     DEFINE_PROP_UINT32("vgamem_mb", VGAMmioState, vga.vram_size_mb, 8),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vga_mmio_class_initfn(ObjectClass *klass, void *data)
hw/display/vga-pci.c +0 -2
index 3145c448f59..dd084c20b16 100644
@@ -339,7 +339,6 @@ static const Property vga_pci_properties[] = {
                     PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_EDID, true),
     DEFINE_EDID_PROPERTIES(PCIVGAState, edid_info),
     DEFINE_PROP_BOOL("global-vmstate", PCIVGAState, vga.global_vmstate, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const Property secondary_pci_properties[] = {
@@ -349,7 +348,6 @@ static const Property secondary_pci_properties[] = {
     DEFINE_PROP_BIT("edid",
                     PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_EDID, true),
     DEFINE_EDID_PROPERTIES(PCIVGAState, edid_info),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vga_pci_class_init(ObjectClass *klass, void *data)
hw/display/vhost-user-gpu.c +0 -1
index a36eddcb12f..12d5c37ee50 100644
@@ -647,7 +647,6 @@ static struct vhost_dev *vhost_user_gpu_get_vhost(VirtIODevice *vdev)
 
 static const Property vhost_user_gpu_properties[] = {
     VIRTIO_GPU_BASE_PROPERTIES(VhostUserGPU, parent_obj.conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void
hw/display/virtio-gpu-gl.c +0 -1
index 6f31149e1ee..c6609ddb1bf 100644
@@ -159,7 +159,6 @@ static const Property virtio_gpu_gl_properties[] = {
                     VIRTIO_GPU_FLAG_STATS_ENABLED, false),
     DEFINE_PROP_BIT("venus", VirtIOGPU, parent_obj.conf.flags,
                     VIRTIO_GPU_FLAG_VENUS_ENABLED, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_gpu_gl_device_unrealize(DeviceState *qdev)
hw/display/virtio-gpu-pci.c +0 -1
index 89d27c9d85c..6d789701a3c 100644
@@ -23,7 +23,6 @@
 
 static const Property virtio_gpu_pci_base_properties[] = {
     DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_gpu_pci_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
hw/display/virtio-gpu-rutabaga.c +0 -1
index f6486acddae..f6eb29472e8 100644
@@ -1108,7 +1108,6 @@ static const Property virtio_gpu_rutabaga_properties[] = {
     DEFINE_PROP_STRING("wayland-socket-path", VirtIOGPURutabaga,
                        wayland_socket_path),
     DEFINE_PROP_STRING("wsi", VirtIOGPURutabaga, wsi),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_gpu_rutabaga_class_init(ObjectClass *klass, void *data)
hw/display/virtio-gpu.c +0 -1
index 82741d19e56..c2a74a8d990 100644
@@ -1682,7 +1682,6 @@ static const Property virtio_gpu_properties[] = {
                     VIRTIO_GPU_FLAG_BLOB_ENABLED, false),
     DEFINE_PROP_SIZE("hostmem", VirtIOGPU, parent_obj.conf.hostmem, 0),
     DEFINE_PROP_UINT8("x-scanout-vmstate-version", VirtIOGPU, scanout_vmstate_version, 2),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_gpu_class_init(ObjectClass *klass, void *data)
hw/display/virtio-vga.c +0 -1
index 532e4c62d57..fefbdb61e17 100644
@@ -211,7 +211,6 @@ static void virtio_vga_set_big_endian_fb(Object *obj, bool value, Error **errp)
 
 static const Property virtio_vga_base_properties[] = {
     DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_vga_base_class_init(ObjectClass *klass, void *data)
hw/display/vmware_vga.c +0 -1
index f49bbf393a1..2dd661e3c13 100644
@@ -1337,7 +1337,6 @@ static const Property vga_vmware_properties[] = {
                        chip.vga.vram_size_mb, 16),
     DEFINE_PROP_BOOL("global-vmstate", struct pci_vmsvga_state_s,
                      chip.vga.global_vmstate, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vmsvga_class_init(ObjectClass *klass, void *data)
hw/display/xlnx_dp.c +0 -1
index 7838f28bcad..1272da0133a 100644
@@ -1389,7 +1389,6 @@ static void xlnx_dp_reset(DeviceState *dev)
 
 static const Property xlnx_dp_device_properties[] = {
     DEFINE_AUDIO_PROPERTIES(XlnxDPState, aud_card),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xlnx_dp_class_init(ObjectClass *oc, void *data)
hw/dma/i82374.c +0 -1
index 032afedde20..9652d47adcd 100644
@@ -141,7 +141,6 @@ static void i82374_realize(DeviceState *dev, Error **errp)
 
 static const Property i82374_properties[] = {
     DEFINE_PROP_UINT32("iobase", I82374State, iobase, 0x400),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void i82374_class_init(ObjectClass *klass, void *data)
hw/dma/i8257.c +0 -1
index 8b041773930..74c38d2ee84 100644
@@ -590,7 +590,6 @@ static const Property i8257_properties[] = {
     DEFINE_PROP_INT32("page-base", I8257State, page_base, 0x80),
     DEFINE_PROP_INT32("pageh-base", I8257State, pageh_base, 0x480),
     DEFINE_PROP_INT32("dshift", I8257State, dshift, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void i8257_class_init(ObjectClass *klass, void *data)
hw/dma/pl080.c +0 -1
index 3f392822ed0..8a9b073b249 100644
@@ -411,7 +411,6 @@ static void pl081_init(Object *obj)
 static const Property pl080_properties[] = {
     DEFINE_PROP_LINK("downstream", PL080State, downstream,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pl080_class_init(ObjectClass *oc, void *data)
hw/dma/pl330.c +0 -2
index d5a0a1caa20..ffef9ebb6fb 100644
@@ -1669,8 +1669,6 @@ static const Property pl330_properties[] = {
 
     DEFINE_PROP_LINK("memory", PL330State, mem_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pl330_class_init(ObjectClass *klass, void *data)
hw/dma/xilinx_axidma.c +0 -1
index f09452d0b52..4bae52a3017 100644
@@ -619,7 +619,6 @@ static const Property axidma_properties[] = {
                      tx_control_dev, TYPE_STREAM_SINK, StreamSink *),
     DEFINE_PROP_LINK("dma", XilinxAXIDMA, dma_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void axidma_class_init(ObjectClass *klass, void *data)
hw/dma/xlnx-zdma.c +0 -1
index 1a63d5f3b28..bb27cb2e644 100644
@@ -814,7 +814,6 @@ static const Property zdma_props[] = {
     DEFINE_PROP_UINT32("bus-width", XlnxZDMA, cfg.bus_width, 64),
     DEFINE_PROP_LINK("dma", XlnxZDMA, dma_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void zdma_class_init(ObjectClass *klass, void *data)
hw/dma/xlnx_csu_dma.c +0 -1
index d78dc6444bd..f46485a42cb 100644
@@ -710,7 +710,6 @@ static const Property xlnx_csu_dma_properties[] = {
                      TYPE_STREAM_SINK, StreamSink *),
     DEFINE_PROP_LINK("dma", XlnxCSUDMA, dma_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xlnx_csu_dma_class_init(ObjectClass *klass, void *data)
hw/gpio/imx_gpio.c +0 -1
index 919d53701f9..898f80f8c83 100644
@@ -294,7 +294,6 @@ static const Property imx_gpio_properties[] = {
     DEFINE_PROP_BOOL("has-edge-sel", IMXGPIOState, has_edge_sel, true),
     DEFINE_PROP_BOOL("has-upper-pin-irq", IMXGPIOState, has_upper_pin_irq,
                      false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void imx_gpio_reset(DeviceState *dev)
hw/gpio/npcm7xx_gpio.c +0 -1
index db6792b2ad9..23e67424c9f 100644
@@ -395,7 +395,6 @@ static const Property npcm7xx_gpio_properties[] = {
     DEFINE_PROP_UINT32("reset-osrc", NPCM7xxGPIOState, reset_osrc, 0),
     /* Bit n set => pin n has high drive strength by default. */
     DEFINE_PROP_UINT32("reset-odsc", NPCM7xxGPIOState, reset_odsc, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void npcm7xx_gpio_class_init(ObjectClass *klass, void *data)
hw/gpio/omap_gpio.c +0 -1
index 03ee9e47c68..8a9f14ba152 100644
@@ -227,7 +227,6 @@ void omap_gpio_set_clk(Omap1GpioState *gpio, omap_clk clk)
 
 static const Property omap_gpio_properties[] = {
     DEFINE_PROP_INT32("mpu_model", Omap1GpioState, mpu_model, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void omap_gpio_class_init(ObjectClass *klass, void *data)
hw/gpio/pca9552.c +0 -1
index 427419d218f..1ac0cf6c464 100644
@@ -430,7 +430,6 @@ static void pca955x_realize(DeviceState *dev, Error **errp)
 
 static const Property pca955x_properties[] = {
     DEFINE_PROP_STRING("description", PCA955xState, description),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pca955x_class_init(ObjectClass *klass, void *data)
hw/gpio/pca9554.c +0 -1
index e8b0458aac4..fe03bb4b5e2 100644
@@ -293,7 +293,6 @@ static void pca9554_realize(DeviceState *dev, Error **errp)
 
 static const Property pca9554_properties[] = {
     DEFINE_PROP_STRING("description", PCA9554State, description),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pca9554_class_init(ObjectClass *klass, void *data)
hw/gpio/pl061.c +0 -1
index 9b8ca6de320..60ce4a7f628 100644
@@ -565,7 +565,6 @@ static void pl061_realize(DeviceState *dev, Error **errp)
 static const Property pl061_props[] = {
     DEFINE_PROP_UINT32("pullups", PL061State, pullups, 0xff),
     DEFINE_PROP_UINT32("pulldowns", PL061State, pulldowns, 0x0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pl061_class_init(ObjectClass *klass, void *data)
hw/gpio/sifive_gpio.c +0 -1
index 5603f0c2357..0d5206ae6b5 100644
@@ -351,7 +351,6 @@ static const VMStateDescription vmstate_sifive_gpio = {
 
 static const Property sifive_gpio_properties[] = {
     DEFINE_PROP_UINT32("ngpio", SIFIVEGPIOState, ngpio, SIFIVE_GPIO_PINS),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sifive_gpio_realize(DeviceState *dev, Error **errp)
hw/gpio/stm32l4x5_gpio.c +0 -1
index d1394f3f55d..f69fc1db4f5 100644
@@ -452,7 +452,6 @@ static const Property stm32l4x5_gpio_properties[] = {
     DEFINE_PROP_UINT32("mode-reset", Stm32l4x5GpioState, moder_reset, 0),
     DEFINE_PROP_UINT32("ospeed-reset", Stm32l4x5GpioState, ospeedr_reset, 0),
     DEFINE_PROP_UINT32("pupd-reset", Stm32l4x5GpioState, pupdr_reset, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void stm32l4x5_gpio_class_init(ObjectClass *klass, void *data)
hw/hyperv/hv-balloon.c +0 -2
index 74897b1604f..c0bf5284295 100644
@@ -1741,8 +1741,6 @@ static const Property hv_balloon_properties[] = {
     DEFINE_PROP_LINK(HV_BALLOON_MEMDEV_PROP, HvBalloon, hostmem,
                      TYPE_MEMORY_BACKEND, HostMemoryBackend *),
     DEFINE_PROP_UINT64(HV_BALLOON_ADDR_PROP, HvBalloon, addr, 0),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void hv_balloon_class_init(ObjectClass *klass, void *data)
hw/hyperv/syndbg.c +0 -1
index 0193addd424..d3e39170772 100644
@@ -370,7 +370,6 @@ static const Property hv_syndbg_properties[] = {
     DEFINE_PROP_STRING("host_ip", HvSynDbg, host_ip),
     DEFINE_PROP_UINT16("host_port", HvSynDbg, host_port, 50000),
     DEFINE_PROP_BOOL("use_hcalls", HvSynDbg, use_hcalls, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void hv_syndbg_class_init(ObjectClass *klass, void *data)
hw/hyperv/vmbus.c +0 -2
index 3d1f4d14e84..12a7dc43128 100644
@@ -2348,7 +2348,6 @@ static void vmbus_dev_unrealize(DeviceState *dev)
 
 static const Property vmbus_dev_props[] = {
     DEFINE_PROP_UUID("instanceid", VMBusDevice, instanceid),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 
@@ -2655,7 +2654,6 @@ static const VMStateDescription vmstate_vmbus_bridge = {
 
 static const Property vmbus_bridge_props[] = {
     DEFINE_PROP_UINT8("irq", VMBusBridge, irq, 7),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void vmbus_bridge_class_init(ObjectClass *klass, void *data)
hw/i2c/aspeed_i2c.c +0 -2
index 2ea68c3090d..a8fbb9f44a1 100644
@@ -1261,7 +1261,6 @@ static void aspeed_i2c_realize(DeviceState *dev, Error **errp)
 static const Property aspeed_i2c_properties[] = {
     DEFINE_PROP_LINK("dram", AspeedI2CState, dram_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_i2c_class_init(ObjectClass *klass, void *data)
@@ -1450,7 +1449,6 @@ static const Property aspeed_i2c_bus_properties[] = {
     DEFINE_PROP_UINT8("bus-id", AspeedI2CBus, id, 0),
     DEFINE_PROP_LINK("controller", AspeedI2CBus, controller, TYPE_ASPEED_I2C,
                      AspeedI2CState *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_i2c_bus_class_init(ObjectClass *klass, void *data)
hw/i2c/core.c +0 -1
index 4118d3db506..26bb18514a9 100644
@@ -20,7 +20,6 @@
 
 static const Property i2c_props[] = {
     DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const TypeInfo i2c_bus_info = {
hw/i2c/i2c_mux_pca954x.c +0 -1
index 80c570fd102..779cc4e66ed 100644
@@ -213,7 +213,6 @@ static void pca954x_init(Object *obj)
 
 static const Property pca954x_props[] = {
     DEFINE_PROP_STRING("name", Pca954xState, name),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pca954x_class_init(ObjectClass *klass, void *data)
hw/i2c/omap_i2c.c +0 -1
index 172df135f57..a641db23480 100644
@@ -513,7 +513,6 @@ void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk)
 
 static const Property omap_i2c_properties[] = {
     DEFINE_PROP_UINT8("revision", OMAPI2CState, revision, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void omap_i2c_class_init(ObjectClass *klass, void *data)
hw/i386/amd_iommu.c +0 -1
index ca3e62a2446..be522b5d7dc 100644
@@ -1670,7 +1670,6 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp)
 
 static const Property amdvi_properties[] = {
     DEFINE_PROP_BOOL("xtsup", AMDVIState, xtsup, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_amdvi_sysbus = {
hw/i386/intel_iommu.c +0 -1
index a5b268342fc..f81f34dafa2 100644
@@ -3418,7 +3418,6 @@ static const Property vtd_properties[] = {
     DEFINE_PROP_BOOL("dma-drain", IntelIOMMUState, dma_drain, true),
     DEFINE_PROP_BOOL("dma-translation", IntelIOMMUState, dma_translation, true),
     DEFINE_PROP_BOOL("stale-tm", IntelIOMMUState, stale_tm, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 /* Read IRTE entry with specific index */
hw/i386/kvm/clock.c +0 -1
index 71150ed2e0a..f7b49bd9f79 100644
@@ -308,7 +308,6 @@ static const VMStateDescription kvmclock_vmsd = {
 static const Property kvmclock_properties[] = {
     DEFINE_PROP_BOOL("x-mach-use-reliable-get-clock", KVMClockState,
                       mach_use_reliable_get_clock, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void kvmclock_class_init(ObjectClass *klass, void *data)
hw/i386/kvm/i8254.c +0 -1
index 2933d3f4581..da5eb600529 100644
@@ -290,7 +290,6 @@ static void kvm_pit_realizefn(DeviceState *dev, Error **errp)
 static const Property kvm_pit_properties[] = {
     DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", KVMPITState,
                                lost_tick_policy, LOST_TICK_POLICY_DELAY),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void kvm_pit_class_init(ObjectClass *klass, void *data)
hw/i386/kvm/ioapic.c +0 -1
index 217ff43b982..73b31df6ab9 100644
@@ -135,7 +135,6 @@ static void kvm_ioapic_realize(DeviceState *dev, Error **errp)
 
 static const Property kvm_ioapic_properties[] = {
     DEFINE_PROP_UINT32("gsi_base", KVMIOAPICState, kvm_gsi_base, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void kvm_ioapic_class_init(ObjectClass *klass, void *data)
hw/i386/sgx-epc.c +0 -1
index c232e825e02..875e1c5c33b 100644
@@ -24,7 +24,6 @@ static const Property sgx_epc_properties[] = {
     DEFINE_PROP_UINT32(SGX_EPC_NUMA_NODE_PROP, SGXEPCDevice, node, 0),
     DEFINE_PROP_LINK(SGX_EPC_MEMDEV_PROP, SGXEPCDevice, hostmem,
                      TYPE_MEMORY_BACKEND_EPC, HostMemoryBackendEpc *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sgx_epc_get_size(Object *obj, Visitor *v, const char *name,
hw/i386/vmmouse.c +0 -1
index da9c35c1ec2..3e07d125128 100644
@@ -319,7 +319,6 @@ static void vmmouse_realizefn(DeviceState *dev, Error **errp)
 
 static const Property vmmouse_properties[] = {
     DEFINE_PROP_LINK("i8042", VMMouseState, i8042, TYPE_I8042, ISAKBDState *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vmmouse_class_initfn(ObjectClass *klass, void *data)
hw/i386/vmport.c +0 -2
index cab6e720898..2096686b640 100644
@@ -284,8 +284,6 @@ static const Property vmport_properties[] = {
      * 5 - ACE 1.x (Deprecated)
      */
     DEFINE_PROP_UINT8("vmware-vmx-type", VMPortState, vmware_vmx_type, 2),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vmport_class_initfn(ObjectClass *klass, void *data)
hw/i386/x86-iommu.c +0 -1
index 155f6262ea1..e5ec60eae7e 100644
@@ -130,7 +130,6 @@ static const Property x86_iommu_properties[] = {
                             intr_supported, ON_OFF_AUTO_AUTO),
     DEFINE_PROP_BOOL("device-iotlb", X86IOMMUState, dt_supported, false),
     DEFINE_PROP_BOOL("pt", X86IOMMUState, pt_supported, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void x86_iommu_class_init(ObjectClass *klass, void *data)
hw/i386/xen/xen_pvdevice.c +0 -1
index e71483e6e33..9453da97bd9 100644
@@ -120,7 +120,6 @@ static const Property xen_pv_props[] = {
     DEFINE_PROP_UINT16("device-id", XenPVDevice, device_id, 0xffff),
     DEFINE_PROP_UINT8("revision", XenPVDevice, revision, 0x01),
     DEFINE_PROP_UINT32("size", XenPVDevice, size, 0x400000),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void xen_pv_class_init(ObjectClass *klass, void *data)
hw/ide/ahci-sysbus.c +0 -1
index 2432039290b..03a5bd42d07 100644
@@ -64,7 +64,6 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp)
 
 static const Property sysbus_ahci_properties[] = {
     DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sysbus_ahci_class_init(ObjectClass *klass, void *data)
hw/ide/cf.c +0 -1
index 190914f5133..cfb4394f80d 100644
@@ -29,7 +29,6 @@ static const Property ide_cf_properties[] = {
     DEFINE_BLOCK_CHS_PROPERTIES(IDEDrive, dev.conf),
     DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans",
                 IDEDrive, dev.chs_trans, BIOS_ATA_TRANSLATION_AUTO),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ide_cf_class_init(ObjectClass *klass, void *data)
hw/ide/cmd646.c +0 -1
index 942f6c470c8..bcc3f344fc0 100644
@@ -315,7 +315,6 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev)
 
 static const Property cmd646_ide_properties[] = {
     DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cmd646_ide_class_init(ObjectClass *klass, void *data)
hw/ide/ide-dev.c +0 -3
index cc92531f1ce..789056c5dc7 100644
@@ -32,7 +32,6 @@
 static const Property ide_props[] = {
     DEFINE_PROP_UINT32("unit", IDEDevice, unit, -1),
     DEFINE_PROP_BOOL("win2k-install-hack", IDEDevice, win2k_install_hack, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ide_qdev_realize(DeviceState *qdev, Error **errp)
@@ -197,7 +196,6 @@ static const Property ide_hd_properties[] = {
     DEFINE_PROP_BIOS_CHS_TRANS("bios-chs-trans",
                 IDEDrive, dev.chs_trans, BIOS_ATA_TRANSLATION_AUTO),
     DEFINE_PROP_UINT16("rotation_rate", IDEDrive, dev.rotation_rate, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ide_hd_class_init(ObjectClass *klass, void *data)
@@ -220,7 +218,6 @@ static const TypeInfo ide_hd_info = {
 
 static const Property ide_cd_properties[] = {
     DEFINE_IDE_DEV_PROPERTIES(),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ide_cd_class_init(ObjectClass *klass, void *data)
hw/ide/isa.c +0 -1
index a0a7e4837c2..9a3c2d522c1 100644
@@ -105,7 +105,6 @@ static const Property isa_ide_properties[] = {
     DEFINE_PROP_UINT32("iobase",  ISAIDEState, iobase,  0x1f0),
     DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6),
     DEFINE_PROP_UINT32("irq",     ISAIDEState, irqnum,  14),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void isa_ide_class_initfn(ObjectClass *klass, void *data)
hw/ide/macio.c +0 -1
index 25f8403e80f..ecaab77862f 100644
@@ -462,7 +462,6 @@ static void macio_ide_initfn(Object *obj)
 static const Property macio_ide_properties[] = {
     DEFINE_PROP_UINT32("channel", MACIOIDEState, channel, 0),
     DEFINE_PROP_UINT32("addr", MACIOIDEState, addr, -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void macio_ide_class_init(ObjectClass *oc, void *data)
hw/ide/mmio.c +0 -1
index 43ab66f3478..a1b0fd23de4 100644
@@ -143,7 +143,6 @@ static void mmio_ide_initfn(Object *obj)
 
 static const Property mmio_ide_properties[] = {
     DEFINE_PROP_UINT32("shift", MMIOIDEState, shift, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void mmio_ide_class_init(ObjectClass *oc, void *data)
hw/input/pckbd.c +0 -2
index 24a133fd252..16ac82e34d0 100644
@@ -738,7 +738,6 @@ static void i8042_mmio_init(Object *obj)
 static const Property i8042_mmio_properties[] = {
     DEFINE_PROP_UINT64("mask", MMIOKBDState, kbd.mask, UINT64_MAX),
     DEFINE_PROP_UINT32("size", MMIOKBDState, size, -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_kbd_mmio = {
@@ -938,7 +937,6 @@ static const Property i8042_properties[] = {
     DEFINE_PROP_BOOL("kbd-throttle", ISAKBDState, kbd_throttle, false),
     DEFINE_PROP_UINT8("kbd-irq", ISAKBDState, kbd_irq, 1),
     DEFINE_PROP_UINT8("mouse-irq", ISAKBDState, mouse_irq, 12),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void i8042_class_initfn(ObjectClass *klass, void *data)
hw/input/stellaris_gamepad.c +0 -1
index b1cc6931896..98382a0e153 100644
@@ -80,7 +80,6 @@ static void stellaris_gamepad_reset_enter(Object *obj, ResetType type)
 static const Property stellaris_gamepad_properties[] = {
     DEFINE_PROP_ARRAY("keycodes", StellarisGamepad, num_buttons,
                       keycodes, qdev_prop_uint32, uint32_t),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void stellaris_gamepad_class_init(ObjectClass *klass, void *data)
hw/input/virtio-input-hid.c +0 -3
index 73963855089..812faaef8fe 100644
@@ -240,7 +240,6 @@ static void virtio_input_hid_handle_status(VirtIOInput *vinput,
 static const Property virtio_input_hid_properties[] = {
     DEFINE_PROP_STRING("display", VirtIOInputHID, display),
     DEFINE_PROP_UINT32("head", VirtIOInputHID, head, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_input_hid_class_init(ObjectClass *klass, void *data)
@@ -382,7 +381,6 @@ static struct virtio_input_config virtio_mouse_config_v2[] = {
 
 static const Property virtio_mouse_properties[] = {
     DEFINE_PROP_BOOL("wheel-axis", VirtIOInputHID, wheel_axis, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_mouse_class_init(ObjectClass *klass, void *data)
@@ -507,7 +505,6 @@ static struct virtio_input_config virtio_tablet_config_v2[] = {
 
 static const Property virtio_tablet_properties[] = {
     DEFINE_PROP_BOOL("wheel-axis", VirtIOInputHID, wheel_axis, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_tablet_class_init(ObjectClass *klass, void *data)
hw/input/virtio-input-host.c +0 -1
index 2be2c633abc..8bfb17f3c43 100644
@@ -223,7 +223,6 @@ static const VMStateDescription vmstate_virtio_input_host = {
 
 static const Property virtio_input_host_properties[] = {
     DEFINE_PROP_STRING("evdev", VirtIOInputHost, evdev),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_input_host_class_init(ObjectClass *klass, void *data)
hw/input/virtio-input.c +0 -1
index edcd94dedb6..1394d99c6b4 100644
@@ -302,7 +302,6 @@ static const VMStateDescription vmstate_virtio_input = {
 
 static const Property virtio_input_properties[] = {
     DEFINE_PROP_STRING("serial", VirtIOInput, serial),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_input_class_init(ObjectClass *klass, void *data)
hw/intc/apic_common.c +0 -1
index 8be9f22de82..de8074d474f 100644
@@ -414,7 +414,6 @@ static const Property apic_properties_common[] = {
                     true),
     DEFINE_PROP_BOOL("legacy-instance-id", APICCommonState, legacy_instance_id,
                      false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void apic_common_get_id(Object *obj, Visitor *v, const char *name,
hw/intc/arm_gic_common.c +0 -1
index e961cd91565..50c516f2f2e 100644
@@ -360,7 +360,6 @@ static const Property arm_gic_common_properties[] = {
     /* True if the GIC should implement the virtualization extensions */
     DEFINE_PROP_BOOL("has-virtualization-extensions", GICState, virt_extn, 0),
     DEFINE_PROP_UINT32("num-priority-bits", GICState, n_prio_bits, 8),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void arm_gic_common_class_init(ObjectClass *klass, void *data)
hw/intc/arm_gicv2m.c +0 -1
index ffa830b433c..ae389fe5842 100644
@@ -173,7 +173,6 @@ static void gicv2m_init(Object *obj)
 static const Property gicv2m_properties[] = {
     DEFINE_PROP_UINT32("base-spi", ARMGICv2mState, base_spi, 0),
     DEFINE_PROP_UINT32("num-spi", ARMGICv2mState, num_spi, 64),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void gicv2m_class_init(ObjectClass *klass, void *data)
hw/intc/arm_gicv3_common.c +0 -1
index a8ec615a3fe..53e7a251b0e 100644
@@ -621,7 +621,6 @@ static const Property arm_gicv3_common_properties[] = {
                       redist_region_count, qdev_prop_uint32, uint32_t),
     DEFINE_PROP_LINK("sysmem", GICv3State, dma, TYPE_MEMORY_REGION,
                      MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void arm_gicv3_common_class_init(ObjectClass *klass, void *data)
hw/intc/arm_gicv3_its.c +0 -1
index f50b1814eaf..2388a96799f 100644
@@ -2005,7 +2005,6 @@ static void gicv3_its_post_load(GICv3ITSState *s)
 static const Property gicv3_its_props[] = {
     DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "arm-gicv3",
                      GICv3State *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void gicv3_its_class_init(ObjectClass *klass, void *data)
hw/intc/arm_gicv3_its_kvm.c +0 -1
index 68a6144add8..3d9150a5c29 100644
@@ -237,7 +237,6 @@ static void kvm_arm_its_reset_hold(Object *obj, ResetType type)
 static const Property kvm_arm_its_props[] = {
     DEFINE_PROP_LINK("parent-gicv3", GICv3ITSState, gicv3, "kvm-arm-gicv3",
                      GICv3State *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void kvm_arm_its_class_init(ObjectClass *klass, void *data)
hw/intc/armv7m_nvic.c +0 -1
index 6e2803b1234..a30f31833a9 100644
@@ -2577,7 +2577,6 @@ static const Property props_nvic[] = {
      * to use a reasonable default.
      */
     DEFINE_PROP_UINT8("num-prio-bits", NVICState, num_prio_bits, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void armv7m_nvic_reset(DeviceState *dev)
hw/intc/exynos4210_combiner.c +0 -1
index 221dfa912a3..6ddbcd4c6df 100644
@@ -327,7 +327,6 @@ static void exynos4210_combiner_init(Object *obj)
 
 static const Property exynos4210_combiner_properties[] = {
     DEFINE_PROP_UINT32("external", Exynos4210CombinerState, external, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void exynos4210_combiner_class_init(ObjectClass *klass, void *data)
hw/intc/exynos4210_gic.c +0 -1
index e1b956d990c..01a53936d3a 100644
@@ -113,7 +113,6 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp)
 
 static const Property exynos4210_gic_properties[] = {
     DEFINE_PROP_UINT32("num-cpu", Exynos4210GicState, num_cpu, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void exynos4210_gic_class_init(ObjectClass *klass, void *data)
hw/intc/goldfish_pic.c +0 -1
index f5343c9d2f8..aa5162c18fd 100644
@@ -183,7 +183,6 @@ static void goldfish_pic_instance_init(Object *obj)
 
 static const Property goldfish_pic_properties[] = {
     DEFINE_PROP_UINT8("index", GoldfishPICState, idx, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void goldfish_pic_class_init(ObjectClass *oc, void *data)
hw/intc/grlib_irqmp.c +0 -1
index bf53251ea25..95cdb411d2c 100644
@@ -378,7 +378,6 @@ static void grlib_irqmp_realize(DeviceState *dev, Error **errp)
 
 static const Property grlib_irqmp_properties[] = {
     DEFINE_PROP_UINT32("ncpus", IRQMP, ncpus, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void grlib_irqmp_class_init(ObjectClass *klass, void *data)
hw/intc/i8259_common.c +0 -1
index c3174f4fdc5..c77ff683bb8 100644
@@ -198,7 +198,6 @@ static const Property pic_properties_common[] = {
     DEFINE_PROP_UINT32("elcr_addr", PICCommonState, elcr_addr,  -1),
     DEFINE_PROP_UINT8("elcr_mask", PICCommonState, elcr_mask,  -1),
     DEFINE_PROP_BIT("master", PICCommonState, master,  0, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pic_common_class_init(ObjectClass *klass, void *data)
hw/intc/ioapic.c +0 -1
index 6d566165b02..bfc8cb7ece0 100644
@@ -478,7 +478,6 @@ static void ioapic_unrealize(DeviceState *dev)
 
 static const Property ioapic_properties[] = {
     DEFINE_PROP_UINT8("version", IOAPICCommonState, version, IOAPIC_VER_DEF),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ioapic_class_init(ObjectClass *klass, void *data)
hw/intc/loongarch_extioi.c +0 -1
index dd91f893612..be7d3997fd2 100644
@@ -427,7 +427,6 @@ static const Property extioi_properties[] = {
     DEFINE_PROP_UINT32("num-cpu", LoongArchExtIOI, num_cpu, 1),
     DEFINE_PROP_BIT("has-virtualization-extension", LoongArchExtIOI, features,
                     EXTIOI_HAS_VIRT_EXTENSION, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void loongarch_extioi_class_init(ObjectClass *klass, void *data)
hw/intc/loongarch_pch_msi.c +0 -1
index e2eca306606..66b5c1e660e 100644
@@ -86,7 +86,6 @@ static void loongarch_pch_msi_init(Object *obj)
 static const Property loongarch_msi_properties[] = {
     DEFINE_PROP_UINT32("msi_irq_base", LoongArchPCHMSI, irq_base, 0),
     DEFINE_PROP_UINT32("msi_irq_num",  LoongArchPCHMSI, irq_num, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void loongarch_pch_msi_class_init(ObjectClass *klass, void *data)
hw/intc/loongarch_pch_pic.c +0 -1
index 6a87b1aab73..dc93c90b3c7 100644
@@ -413,7 +413,6 @@ static void loongarch_pch_pic_init(Object *obj)
 
 static const Property loongarch_pch_pic_properties[] = {
     DEFINE_PROP_UINT32("pch_pic_irq_num",  LoongArchPCHPIC, irq_num, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_loongarch_pch_pic = {
hw/intc/loongson_ipi_common.c +0 -1
index d3f894a5bd3..9a081565f51 100644
@@ -317,7 +317,6 @@ static const VMStateDescription vmstate_loongson_ipi_common = {
 
 static const Property ipi_common_properties[] = {
     DEFINE_PROP_UINT32("num-cpu", LoongsonIPICommonState, num_cpu, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void loongson_ipi_common_class_init(ObjectClass *klass, void *data)
hw/intc/m68k_irqc.c +0 -1
index b5d10ab1f66..a82b80f5c6f 100644
@@ -88,7 +88,6 @@ static const VMStateDescription vmstate_m68k_irqc = {
 static const Property m68k_irqc_properties[] = {
     DEFINE_PROP_LINK("m68k-cpu", M68KIRQCState, cpu,
                      TYPE_M68K_CPU, ArchCPU *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void m68k_irqc_class_init(ObjectClass *oc, void *data)
hw/intc/mips_gic.c +0 -1
index 996db095c38..3f50eac38a1 100644
@@ -441,7 +441,6 @@ static void mips_gic_realize(DeviceState *dev, Error **errp)
 static const Property mips_gic_properties[] = {
     DEFINE_PROP_UINT32("num-vp", MIPSGICState, num_vps, 1),
     DEFINE_PROP_UINT32("num-irq", MIPSGICState, num_irq, 256),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mips_gic_class_init(ObjectClass *klass, void *data)
hw/intc/omap_intc.c +0 -1
index 28606f102b4..095a3d504f4 100644
@@ -377,7 +377,6 @@ void omap_intc_set_fclk(OMAPIntcState *intc, omap_clk clk)
 
 static const Property omap_intc_properties[] = {
     DEFINE_PROP_UINT32("size", OMAPIntcState, size, 0x100),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void omap_intc_class_init(ObjectClass *klass, void *data)
hw/intc/ompic.c +0 -1
index 8ee1bd64bd1..42af4567c66 100644
@@ -130,7 +130,6 @@ static void or1k_ompic_realize(DeviceState *dev, Error **errp)
 
 static const Property or1k_ompic_properties[] = {
     DEFINE_PROP_UINT32("num-cpus", OR1KOMPICState, num_cpus, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_or1k_ompic_cpu = {
hw/intc/openpic.c +0 -1
index 2257ae2ee78..78a82d0d30a 100644
@@ -1609,7 +1609,6 @@ static void openpic_realize(DeviceState *dev, Error **errp)
 static const Property openpic_properties[] = {
     DEFINE_PROP_UINT32("model", OpenPICState, model, OPENPIC_MODEL_FSL_MPIC_20),
     DEFINE_PROP_UINT32("nb_cpus", OpenPICState, nb_cpus, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void openpic_class_init(ObjectClass *oc, void *data)
hw/intc/openpic_kvm.c +0 -1
index 135fe8301af..3f5d7e58860 100644
@@ -265,7 +265,6 @@ int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs)
 static const Property kvm_openpic_properties[] = {
     DEFINE_PROP_UINT32("model", KVMOpenPICState, model,
                        OPENPIC_MODEL_FSL_MPIC_20),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void kvm_openpic_class_init(ObjectClass *oc, void *data)
hw/intc/pnv_xive.c +0 -1
index 581659839b2..fc5b5a97892 100644
@@ -2066,7 +2066,6 @@ static const Property pnv_xive_properties[] = {
     DEFINE_PROP_UINT64("tm-bar", PnvXive, tm_base, 0),
     /* The PnvChip id identifies the XIVE interrupt controller. */
     DEFINE_PROP_LINK("chip", PnvXive, chip, TYPE_PNV_CHIP, PnvChip *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_xive_class_init(ObjectClass *klass, void *data)
hw/intc/pnv_xive2.c +0 -1
index 5dd305453ae..ff36d4d03f9 100644
@@ -2366,7 +2366,6 @@ static const Property pnv_xive2_properties[] = {
     DEFINE_PROP_UINT64("config", PnvXive2, config,
                        PNV_XIVE2_CONFIGURATION),
     DEFINE_PROP_LINK("chip", PnvXive2, chip, TYPE_PNV_CHIP, PnvChip *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_xive2_instance_init(Object *obj)
hw/intc/ppc-uic.c +0 -1
index d683413a83e..7de4bf9885c 100644
@@ -262,7 +262,6 @@ static void ppc_uic_realize(DeviceState *dev, Error **errp)
 static const Property ppc_uic_properties[] = {
     DEFINE_PROP_UINT32("dcr-base", PPCUIC, dcr_base, 0xc0),
     DEFINE_PROP_BOOL("use-vectors", PPCUIC, use_vectors, true),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const VMStateDescription ppc_uic_vmstate = {
hw/intc/riscv_aclint.c +0 -2
index db195fb1ff1..db374a7c2d2 100644
@@ -274,7 +274,6 @@ static const Property riscv_aclint_mtimer_properties[] = {
         aperture_size, RISCV_ACLINT_DEFAULT_MTIMER_SIZE),
     DEFINE_PROP_UINT32("timebase-freq", RISCVAclintMTimerState,
         timebase_freq, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void riscv_aclint_mtimer_realize(DeviceState *dev, Error **errp)
@@ -466,7 +465,6 @@ static const Property riscv_aclint_swi_properties[] = {
     DEFINE_PROP_UINT32("hartid-base", RISCVAclintSwiState, hartid_base, 0),
     DEFINE_PROP_UINT32("num-harts", RISCVAclintSwiState, num_harts, 1),
     DEFINE_PROP_UINT32("sswi", RISCVAclintSwiState, sswi, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void riscv_aclint_swi_realize(DeviceState *dev, Error **errp)
hw/intc/riscv_aplic.c +0 -1
index 353eec81360..e160816d265 100644
@@ -912,7 +912,6 @@ static const Property riscv_aplic_properties[] = {
     DEFINE_PROP_UINT32("num-irqs", RISCVAPLICState, num_irqs, 0),
     DEFINE_PROP_BOOL("msimode", RISCVAPLICState, msimode, 0),
     DEFINE_PROP_BOOL("mmode", RISCVAPLICState, mmode, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_riscv_aplic = {
hw/intc/riscv_imsic.c +0 -1
index adc36151b4c..64b0da6d20a 100644
@@ -393,7 +393,6 @@ static const Property riscv_imsic_properties[] = {
     DEFINE_PROP_UINT32("hartid", RISCVIMSICState, hartid, 0),
     DEFINE_PROP_UINT32("num-pages", RISCVIMSICState, num_pages, 0),
     DEFINE_PROP_UINT32("num-irqs", RISCVIMSICState, num_irqs, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_riscv_imsic = {
hw/intc/rx_icu.c +0 -1
index dfe11ade200..ca13c5fb37b 100644
@@ -366,7 +366,6 @@ static const Property rxicu_properties[] = {
                       qdev_prop_uint8, uint8_t),
     DEFINE_PROP_ARRAY("trigger-level", RXICUState, nr_sense, init_sense,
                       qdev_prop_uint8, uint8_t),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void rxicu_class_init(ObjectClass *klass, void *data)
hw/intc/s390_flic.c +0 -2
index 2963bd5bd68..3f3fa939d37 100644
@@ -448,7 +448,6 @@ static void qemu_s390_flic_instance_init(Object *obj)
 static const Property qemu_s390_flic_properties[] = {
     DEFINE_PROP_BOOL("migrate-all-state", QEMUS390FLICState,
                      migrate_all_state, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void qemu_s390_flic_class_init(ObjectClass *oc, void *data)
@@ -476,7 +475,6 @@ static const Property s390_flic_common_properties[] = {
                        adapter_routes_max_batch, ADAPTER_ROUTES_MAX_GSI),
     DEFINE_PROP_BOOL("migration-enabled", S390FLICState,
                      migration_enabled, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void s390_flic_common_realize(DeviceState *dev, Error **errp)
hw/intc/sifive_plic.c +0 -1
index 49895be803d..52946fb7bd9 100644
@@ -444,7 +444,6 @@ static const Property sifive_plic_properties[] = {
     DEFINE_PROP_UINT32("context-base", SiFivePLICState, context_base, 0),
     DEFINE_PROP_UINT32("context-stride", SiFivePLICState, context_stride, 0),
     DEFINE_PROP_UINT32("aperture-size", SiFivePLICState, aperture_size, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sifive_plic_class_init(ObjectClass *klass, void *data)
hw/intc/spapr_xive.c +0 -1
index 09f643d633a..897029a65a2 100644
@@ -633,7 +633,6 @@ static const Property spapr_xive_properties[] = {
     DEFINE_PROP_UINT64("vc-base", SpaprXive, vc_base, SPAPR_XIVE_VC_BASE),
     DEFINE_PROP_UINT64("tm-base", SpaprXive, tm_base, SPAPR_XIVE_TM_BASE),
     DEFINE_PROP_UINT8("hv-prio", SpaprXive, hv_prio, 7),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static int spapr_xive_cpu_intc_create(SpaprInterruptController *intc,
hw/intc/xics.c +0 -2
index 81bbfdd84b2..8852b68f876 100644
@@ -348,7 +348,6 @@ static const Property icp_properties[] = {
     DEFINE_PROP_LINK(ICP_PROP_XICS, ICPState, xics, TYPE_XICS_FABRIC,
                      XICSFabric *),
     DEFINE_PROP_LINK(ICP_PROP_CPU, ICPState, cs, TYPE_CPU, CPUState *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void icp_class_init(ObjectClass *klass, void *data)
@@ -680,7 +679,6 @@ static const Property ics_properties[] = {
     DEFINE_PROP_UINT32("nr-irqs", ICSState, nr_irqs, 0),
     DEFINE_PROP_LINK(ICS_PROP_XICS, ICSState, xics, TYPE_XICS_FABRIC,
                      XICSFabric *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ics_class_init(ObjectClass *klass, void *data)
hw/intc/xilinx_intc.c +0 -1
index 3e860ab582a..d99cf567aeb 100644
@@ -178,7 +178,6 @@ static void xilinx_intc_init(Object *obj)
 
 static const Property xilinx_intc_properties[] = {
     DEFINE_PROP_UINT32("kind-of-intr", XpsIntc, c_kind_of_intr, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xilinx_intc_class_init(ObjectClass *klass, void *data)
hw/intc/xive.c +0 -4
index 308e5743bdb..3cf8780b8a2 100644
@@ -931,7 +931,6 @@ static const Property xive_tctx_properties[] = {
     DEFINE_PROP_LINK("cpu", XiveTCTX, cs, TYPE_CPU, CPUState *),
     DEFINE_PROP_LINK("presenter", XiveTCTX, xptr, TYPE_XIVE_PRESENTER,
                      XivePresenter *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xive_tctx_class_init(ObjectClass *klass, void *data)
@@ -1414,7 +1413,6 @@ static const Property xive_source_properties[] = {
     DEFINE_PROP_UINT8("reset-pq", XiveSource, reset_pq, XIVE_ESB_OFF),
     DEFINE_PROP_LINK("xive", XiveSource, xive, TYPE_XIVE_NOTIFIER,
                      XiveNotifier *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xive_source_class_init(ObjectClass *klass, void *data)
@@ -2005,7 +2003,6 @@ void xive_router_notify(XiveNotifier *xn, uint32_t lisn, bool pq_checked)
 static const Property xive_router_properties[] = {
     DEFINE_PROP_LINK("xive-fabric", XiveRouter, xfb,
                      TYPE_XIVE_FABRIC, XiveFabric *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xive_router_class_init(ObjectClass *klass, void *data)
@@ -2175,7 +2172,6 @@ static const Property xive_end_source_properties[] = {
     DEFINE_PROP_UINT32("shift", XiveENDSource, esb_shift, XIVE_ESB_64K),
     DEFINE_PROP_LINK("xive", XiveENDSource, xrtr, TYPE_XIVE_ROUTER,
                      XiveRouter *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xive_end_source_class_init(ObjectClass *klass, void *data)
hw/intc/xive2.c +0 -2
index 3233d3f14e0..07a90c900fc 100644
@@ -1031,7 +1031,6 @@ void xive2_router_notify(XiveNotifier *xn, uint32_t lisn, bool pq_checked)
 static const Property xive2_router_properties[] = {
     DEFINE_PROP_LINK("xive-fabric", Xive2Router, xfb,
                      TYPE_XIVE_FABRIC, XiveFabric *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xive2_router_class_init(ObjectClass *klass, void *data)
@@ -1247,7 +1246,6 @@ static const Property xive2_end_source_properties[] = {
     DEFINE_PROP_UINT32("shift", Xive2EndSource, esb_shift, XIVE_ESB_64K),
     DEFINE_PROP_LINK("xive", Xive2EndSource, xrtr, TYPE_XIVE2_ROUTER,
                      Xive2Router *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xive2_end_source_class_init(ObjectClass *klass, void *data)
hw/intc/xlnx-pmu-iomod-intc.c +0 -1
index 21b9c836581..ccdab244b3a 100644
@@ -478,7 +478,6 @@ static const Property xlnx_pmu_io_intc_properties[] = {
     DEFINE_PROP_UINT32("intc-intr-size", XlnxPMUIOIntc, cfg.intr_size, 0),
     DEFINE_PROP_UINT32("intc-level-edge", XlnxPMUIOIntc, cfg.level_edge, 0),
     DEFINE_PROP_UINT32("intc-positive", XlnxPMUIOIntc, cfg.positive, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xlnx_pmu_io_intc_realize(DeviceState *dev, Error **errp)
hw/ipack/ipack.c +0 -1
index 7ffc4ffe6fa..ed75f791832 100644
@@ -75,7 +75,6 @@ static void ipack_device_unrealize(DeviceState *dev)
 
 static const Property ipack_device_props[] = {
     DEFINE_PROP_INT32("slot", IPackDevice, slot, -1),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void ipack_device_class_init(ObjectClass *klass, void *data)
hw/ipmi/ipmi.c +0 -1
index 850b3bc4630..047bb90be9b 100644
@@ -110,7 +110,6 @@ void ipmi_bmc_find_and_link(Object *obj, Object **bmc)
 
 static const Property ipmi_bmc_properties[] = {
     DEFINE_PROP_UINT8("slave_addr",  IPMIBmc, slave_addr, 0x20),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void bmc_class_init(ObjectClass *oc, void *data)
hw/ipmi/ipmi_bmc_extern.c +0 -1
index cfec1da87c6..d015500254a 100644
@@ -517,7 +517,6 @@ static void ipmi_bmc_extern_finalize(Object *obj)
 
 static const Property ipmi_bmc_extern_properties[] = {
     DEFINE_PROP_CHR("chardev", IPMIBmcExtern, chr),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ipmi_bmc_extern_class_init(ObjectClass *oc, void *data)
hw/ipmi/ipmi_bmc_sim.c +0 -1
index 8a55893e89b..eb2eecd46ad 100644
@@ -2203,7 +2203,6 @@ static const Property ipmi_sim_properties[] = {
     DEFINE_PROP_UINT32("mfg_id", IPMIBmcSim, mfg_id, 0),
     DEFINE_PROP_UINT16("product_id", IPMIBmcSim, product_id, 0),
     DEFINE_PROP_UUID_NODEFAULT("guid", IPMIBmcSim, uuid),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ipmi_sim_class_init(ObjectClass *oc, void *data)
hw/ipmi/isa_ipmi_bt.c +0 -1
index 16062abb311..a1b66d5ee82 100644
@@ -138,7 +138,6 @@ static void *isa_ipmi_bt_get_backend_data(IPMIInterface *ii)
 static const Property ipmi_isa_properties[] = {
     DEFINE_PROP_UINT32("ioport", ISAIPMIBTDevice, bt.io_base,  0xe4),
     DEFINE_PROP_INT32("irq",   ISAIPMIBTDevice, isairq,  5),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void isa_ipmi_bt_class_init(ObjectClass *oc, void *data)
hw/ipmi/isa_ipmi_kcs.c +0 -1
index 7e7a37659ef..d9ebdd5371f 100644
@@ -145,7 +145,6 @@ static void *isa_ipmi_kcs_get_backend_data(IPMIInterface *ii)
 static const Property ipmi_isa_properties[] = {
     DEFINE_PROP_UINT32("ioport", ISAIPMIKCSDevice, kcs.io_base,  0xca2),
     DEFINE_PROP_INT32("irq",   ISAIPMIKCSDevice, isairq,  5),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void isa_ipmi_kcs_class_init(ObjectClass *oc, void *data)
hw/isa/lpc_ich9.c +0 -1
index 378244aa8fc..0f94378a1d6 100644
@@ -840,7 +840,6 @@ static const Property ich9_lpc_properties[] = {
                      pm.swsmi_timer_enabled, true),
     DEFINE_PROP_BOOL("x-smi-periodic-timer", ICH9LPCState,
                      pm.periodic_timer_enabled, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ich9_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
hw/isa/pc87312.c +0 -1
index 7bb2af817dc..5f5868442ab 100644
@@ -330,7 +330,6 @@ static const VMStateDescription vmstate_pc87312 = {
 static const Property pc87312_properties[] = {
     DEFINE_PROP_UINT16("iobase", PC87312State, iobase, 0x398),
     DEFINE_PROP_UINT8("config", PC87312State, config, 1),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pc87312_class_init(ObjectClass *klass, void *data)
hw/isa/piix.c +0 -1
index 8ec9c63b8a0..eabf2567318 100644
@@ -415,7 +415,6 @@ static const Property pci_piix_props[] = {
     DEFINE_PROP_BOOL("has-pit", PIIXState, has_pit, true),
     DEFINE_PROP_BOOL("has-usb", PIIXState, has_usb, true),
     DEFINE_PROP_BOOL("smm-enabled", PIIXState, smm_enabled, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pci_piix_class_init(ObjectClass *klass, void *data)
hw/m68k/mcf5206.c +0 -1
index 45e5f746009..395c49fea76 100644
@@ -603,7 +603,6 @@ static void mcf5206_mbar_realize(DeviceState *dev, Error **errp)
 static const Property mcf5206_mbar_properties[] = {
     DEFINE_PROP_LINK("m68k-cpu", m5206_mbar_state, cpu,
                      TYPE_M68K_CPU, M68kCPU *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mcf5206_mbar_class_init(ObjectClass *oc, void *data)
hw/m68k/mcf_intc.c +0 -1
index c24b0b715d6..008626f8130 100644
@@ -180,7 +180,6 @@ static void mcf_intc_instance_init(Object *obj)
 static const Property mcf_intc_properties[] = {
     DEFINE_PROP_LINK("m68k-cpu", mcf_intc_state, cpu,
                      TYPE_M68K_CPU, M68kCPU *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mcf_intc_class_init(ObjectClass *oc, void *data)
hw/m68k/next-cube.c +0 -1
index a37ce008740..e4fb5013de0 100644
@@ -916,7 +916,6 @@ static void next_pc_realize(DeviceState *dev, Error **errp)
  */
 static const Property next_pc_properties[] = {
     DEFINE_PROP_LINK("cpu", NeXTPC, cpu, TYPE_M68K_CPU, M68kCPU *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription next_rtc_vmstate = {
hw/m68k/q800-glue.c +0 -1
index 0d8cb8b1cb7..168665b3829 100644
@@ -205,7 +205,6 @@ static const VMStateDescription vmstate_glue = {
  */
 static const Property glue_properties[] = {
     DEFINE_PROP_LINK("cpu", GLUEState, cpu, TYPE_M68K_CPU, M68kCPU *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void glue_finalize(Object *obj)
hw/mem/cxl_type3.c +0 -1
index 12205c4d320..b553c7d6469 100644
@@ -1234,7 +1234,6 @@ static const Property ct3_props[] = {
                                 speed, PCIE_LINK_SPEED_32),
     DEFINE_PROP_PCIE_LINK_WIDTH("x-width", CXLType3Dev,
                                 width, PCIE_LINK_WIDTH_16),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static uint64_t get_lsa_size(CXLType3Dev *ct3d)
hw/mem/nvdimm.c +0 -1
index 10506d52e4c..51362cfe92b 100644
@@ -248,7 +248,6 @@ static void nvdimm_write_label_data(NVDIMMDevice *nvdimm, const void *buf,
 
 static const Property nvdimm_properties[] = {
     DEFINE_PROP_BOOL(NVDIMM_UNARMED_PROP, NVDIMMDevice, unarmed, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nvdimm_class_init(ObjectClass *oc, void *data)
hw/mem/pc-dimm.c +0 -1
index 49c5f9fd44a..dca3db7a36f 100644
@@ -157,7 +157,6 @@ static const Property pc_dimm_properties[] = {
                       PC_DIMM_UNASSIGNED_SLOT),
     DEFINE_PROP_LINK(PC_DIMM_MEMDEV_PROP, PCDIMMDevice, hostmem,
                      TYPE_MEMORY_BACKEND, HostMemoryBackend *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pc_dimm_get_size(Object *obj, Visitor *v, const char *name,
hw/mem/sparse-mem.c +0 -1
index 8d681adfc0b..375d7286848 100644
@@ -103,7 +103,6 @@ static const Property sparse_mem_properties[] = {
     DEFINE_PROP_UINT64("length", SparseMemState, length, UINT64_MAX),
     /* Max amount of actual memory that can be used to back the sparse memory */
     DEFINE_PROP_UINT64("maxsize", SparseMemState, maxsize, 10 * MiB),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 MemoryRegion *sparse_mem_init(uint64_t addr, uint64_t length)
hw/mips/cps.c +0 -1
index 1a2208666cc..f8c17f3f2b9 100644
@@ -171,7 +171,6 @@ static const Property mips_cps_properties[] = {
     DEFINE_PROP_UINT32("num-irq", MIPSCPSState, num_irq, 256),
     DEFINE_PROP_STRING("cpu-type", MIPSCPSState, cpu_type),
     DEFINE_PROP_BOOL("cpu-big-endian", MIPSCPSState, cpu_is_bigendian, false),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void mips_cps_class_init(ObjectClass *klass, void *data)
hw/misc/a9scu.c +0 -1
index e2d73edde88..088d4adb0d5 100644
@@ -125,7 +125,6 @@ static const VMStateDescription vmstate_a9_scu = {
 
 static const Property a9_scu_properties[] = {
     DEFINE_PROP_UINT32("num-cpu", A9SCUState, num_cpu, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void a9_scu_class_init(ObjectClass *klass, void *data)
hw/misc/allwinner-h3-dramc.c +0 -1
index 247bf62c43c..13bba26d0e4 100644
@@ -317,7 +317,6 @@ static void allwinner_h3_dramc_init(Object *obj)
 static const Property allwinner_h3_dramc_properties[] = {
     DEFINE_PROP_UINT64("ram-addr", AwH3DramCtlState, ram_addr, 0x0),
     DEFINE_PROP_UINT32("ram-size", AwH3DramCtlState, ram_size, 256 * MiB),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const VMStateDescription allwinner_h3_dramc_vmstate = {
hw/misc/allwinner-r40-dramc.c +0 -1
index a51284ff91f..97c3664e3a3 100644
@@ -467,7 +467,6 @@ static void allwinner_r40_dramc_init(Object *obj)
 static const Property allwinner_r40_dramc_properties[] = {
     DEFINE_PROP_UINT64("ram-addr", AwR40DramCtlState, ram_addr, 0x0),
     DEFINE_PROP_UINT32("ram-size", AwR40DramCtlState, ram_size, 256), /* MiB */
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const VMStateDescription allwinner_r40_dramc_vmstate = {
hw/misc/allwinner-sid.c +0 -1
index 3a09dca1119..042b747f30b 100644
@@ -129,7 +129,6 @@ static void allwinner_sid_init(Object *obj)
 
 static const Property allwinner_sid_properties[] = {
     DEFINE_PROP_UUID_NODEFAULT("identifier", AwSidState, identifier),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const VMStateDescription allwinner_sid_vmstate = {
hw/misc/applesmc.c +0 -1
index 9d0e273e336..97ea842d60c 100644
@@ -354,7 +354,6 @@ static const Property applesmc_isa_properties[] = {
     DEFINE_PROP_UINT32(APPLESMC_PROP_IO_BASE, AppleSMCState, iobase,
                        APPLESMC_DEFAULT_IOBASE),
     DEFINE_PROP_STRING("osk", AppleSMCState, osk),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void build_applesmc_aml(AcpiDevAmlIf *adev, Aml *scope)
hw/misc/arm11scu.c +0 -1
index 37feed9da73..02493cec31b 100644
@@ -77,7 +77,6 @@ static void arm11_scu_init(Object *obj)
 
 static const Property arm11_scu_properties[] = {
     DEFINE_PROP_UINT32("num-cpu", ARM11SCUState, num_cpu, 1),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void arm11_scu_class_init(ObjectClass *oc, void *data)
hw/misc/arm_l2x0.c +0 -1
index 9c209f13b03..39b4642da7d 100644
@@ -175,7 +175,6 @@ static void l2x0_priv_init(Object *obj)
 
 static const Property l2x0_properties[] = {
     DEFINE_PROP_UINT32("cache-type", L2x0State, cache_type, 0x1c100100),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void l2x0_class_init(ObjectClass *klass, void *data)
hw/misc/arm_sysctl.c +0 -1
index 69e379fa107..1c25d51b968 100644
@@ -632,7 +632,6 @@ static const Property arm_sysctl_properties[] = {
     /* Daughterboard clock reset values (as reported via SYS_CFG) */
     DEFINE_PROP_ARRAY("db-clock", arm_sysctl_state, db_num_clocks,
                       db_clock_reset, qdev_prop_uint32, uint32_t),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void arm_sysctl_class_init(ObjectClass *klass, void *data)
hw/misc/armsse-cpuid.c +0 -1
index b05bcdcabc4..58cb37333f0 100644
@@ -94,7 +94,6 @@ static const MemoryRegionOps armsse_cpuid_ops = {
 
 static const Property armsse_cpuid_props[] = {
     DEFINE_PROP_UINT32("CPUID", ARMSSECPUID, cpuid, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void armsse_cpuid_init(Object *obj)
hw/misc/aspeed_hace.c +0 -1
index 5cefbadf9a0..e3f7df2e862 100644
@@ -439,7 +439,6 @@ static void aspeed_hace_realize(DeviceState *dev, Error **errp)
 static const Property aspeed_hace_properties[] = {
     DEFINE_PROP_LINK("dram", AspeedHACEState, dram_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 
hw/misc/aspeed_i3c.c +0 -1
index 7f5a3898644..ab39c6435b5 100644
@@ -325,7 +325,6 @@ static void aspeed_i3c_realize(DeviceState *dev, Error **errp)
 
 static const Property aspeed_i3c_device_properties[] = {
     DEFINE_PROP_UINT8("device-id", AspeedI3CDevice, id, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_i3c_device_class_init(ObjectClass *klass, void *data)
hw/misc/aspeed_lpc.c +0 -1
index bb9066b0f07..228d250dc03 100644
@@ -456,7 +456,6 @@ static const VMStateDescription vmstate_aspeed_lpc = {
 
 static const Property aspeed_lpc_properties[] = {
     DEFINE_PROP_UINT32("hicr7", AspeedLPCState, hicr7, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_lpc_class_init(ObjectClass *klass, void *data)
hw/misc/aspeed_sbc.c +0 -1
index b97cf51fa19..e4a6bd15818 100644
@@ -139,7 +139,6 @@ static const VMStateDescription vmstate_aspeed_sbc = {
 static const Property aspeed_sbc_properties[] = {
     DEFINE_PROP_BOOL("emmc-abr", AspeedSBCState, emmc_abr, 0),
     DEFINE_PROP_UINT32("signing-settings", AspeedSBCState, signing_settings, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_sbc_class_init(ObjectClass *klass, void *data)
hw/misc/aspeed_scu.c +0 -1
index ac33b8d6cbd..bac1441b061 100644
@@ -607,7 +607,6 @@ static const Property aspeed_scu_properties[] = {
     DEFINE_PROP_UINT32("hw-strap1", AspeedSCUState, hw_strap1, 0),
     DEFINE_PROP_UINT32("hw-strap2", AspeedSCUState, hw_strap2, 0),
     DEFINE_PROP_UINT32("hw-prot-key", AspeedSCUState, hw_prot_key, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_scu_class_init(ObjectClass *klass, void *data)
hw/misc/aspeed_sdmc.c +0 -1
index 4980080f741..f359640a9a5 100644
@@ -297,7 +297,6 @@ static const VMStateDescription vmstate_aspeed_sdmc = {
 static const Property aspeed_sdmc_properties[] = {
     DEFINE_PROP_UINT64("max-ram-size", AspeedSDMCState, max_ram_size, 0),
     DEFINE_PROP_BOOL("unlocked", AspeedSDMCState, unlocked, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_sdmc_class_init(ObjectClass *klass, void *data)
hw/misc/bcm2835_cprman.c +0 -1
index 1a20cd0bc8a..aa14cd931f5 100644
@@ -780,7 +780,6 @@ static const VMStateDescription cprman_vmstate = {
 
 static const Property cprman_properties[] = {
     DEFINE_PROP_UINT32("xosc-freq-hz", BCM2835CprmanState, xosc_freq, 19200000),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void cprman_class_init(ObjectClass *klass, void *data)
hw/misc/bcm2835_property.c +0 -1
index 09a6f2c6e3e..fde66cd590d 100644
@@ -554,7 +554,6 @@ static void bcm2835_property_realize(DeviceState *dev, Error **errp)
 static const Property bcm2835_property_props[] = {
     DEFINE_PROP_UINT32("board-rev", BCM2835PropertyState, board_rev, 0),
     DEFINE_PROP_STRING("command-line", BCM2835PropertyState, command_line),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void bcm2835_property_class_init(ObjectClass *klass, void *data)
hw/misc/debugexit.c +0 -1
index 639a8cc3e3e..260537bba3c 100644
@@ -59,7 +59,6 @@ static void debug_exit_realizefn(DeviceState *d, Error **errp)
 static const Property debug_exit_properties[] = {
     DEFINE_PROP_UINT32("iobase", ISADebugExitState, iobase, 0x501),
     DEFINE_PROP_UINT32("iosize", ISADebugExitState, iosize, 0x02),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void debug_exit_class_initfn(ObjectClass *klass, void *data)
hw/misc/eccmemctl.c +0 -1
index 4fc88bd4e57..d7452c4cc8a 100644
@@ -327,7 +327,6 @@ static void ecc_realize(DeviceState *dev, Error **errp)
 
 static const Property ecc_properties[] = {
     DEFINE_PROP_UINT32("version", ECCState, version, -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ecc_class_init(ObjectClass *klass, void *data)
hw/misc/empty_slot.c +0 -1
index 79572c5be03..221ea7cb54d 100644
@@ -82,7 +82,6 @@ static void empty_slot_realize(DeviceState *dev, Error **errp)
 static const Property empty_slot_properties[] = {
     DEFINE_PROP_UINT64("size", EmptySlot, size, 0),
     DEFINE_PROP_STRING("name", EmptySlot, name),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void empty_slot_class_init(ObjectClass *klass, void *data)
hw/misc/iotkit-secctl.c +0 -1
index abb6a963cae..04ced3559c2 100644
@@ -816,7 +816,6 @@ static const VMStateDescription iotkit_secctl_vmstate = {
 
 static const Property iotkit_secctl_props[] = {
     DEFINE_PROP_UINT32("sse-version", IoTKitSecCtl, sse_version, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void iotkit_secctl_class_init(ObjectClass *klass, void *data)
hw/misc/iotkit-sysctl.c +0 -1
index 23b49d7dff3..57ffdc3d025 100644
@@ -842,7 +842,6 @@ static const Property iotkit_sysctl_props[] = {
                        0x10000000),
     DEFINE_PROP_UINT32("INITSVTOR1_RST", IoTKitSysCtl, initsvtor1_rst,
                        0x10000000),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void iotkit_sysctl_class_init(ObjectClass *klass, void *data)
hw/misc/iotkit-sysinfo.c +0 -1
index 7d4eea6bfbf..75260f7fabb 100644
@@ -136,7 +136,6 @@ static const Property iotkit_sysinfo_props[] = {
     DEFINE_PROP_UINT32("SYS_CONFIG", IoTKitSysInfo, sys_config, 0),
     DEFINE_PROP_UINT32("sse-version", IoTKitSysInfo, sse_version, 0),
     DEFINE_PROP_UINT32("IIDR", IoTKitSysInfo, iidr, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void iotkit_sysinfo_init(Object *obj)
hw/misc/ivshmem.c +0 -2
index 6d735ec29fe..8f9e1f2fc63 100644
@@ -1026,7 +1026,6 @@ static const Property ivshmem_plain_properties[] = {
     DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OFF),
     DEFINE_PROP_LINK("memdev", IVShmemState, hostmem, TYPE_MEMORY_BACKEND,
                      HostMemoryBackend *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ivshmem_plain_realize(PCIDevice *dev, Error **errp)
@@ -1083,7 +1082,6 @@ static const Property ivshmem_doorbell_properties[] = {
     DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD,
                     true),
     DEFINE_PROP_ON_OFF_AUTO("master", IVShmemState, master, ON_OFF_AUTO_OFF),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ivshmem_doorbell_init(Object *obj)
hw/misc/led.c +0 -1
index 76efdbc3f16..9364d9945ec 100644
@@ -105,7 +105,6 @@ static const Property led_properties[] = {
     DEFINE_PROP_STRING("color", LEDState, color),
     DEFINE_PROP_STRING("description", LEDState, description),
     DEFINE_PROP_BOOL("gpio-active-high", LEDState, gpio_active_high, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void led_class_init(ObjectClass *klass, void *data)
hw/misc/mac_via.c +0 -1
index a376a2b8a02..5d16bff12cb 100644
@@ -1324,7 +1324,6 @@ static const VMStateDescription vmstate_q800_via1 = {
 
 static const Property mos6522_q800_via1_properties[] = {
     DEFINE_PROP_DRIVE("drive", MOS6522Q800VIA1State, blk),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mos6522_q800_via1_class_init(ObjectClass *oc, void *data)
hw/misc/macio/cuda.c +0 -1
index cfc8afd1dc2..270adcb0cdc 100644
@@ -556,7 +556,6 @@ static void cuda_init(Object *obj)
 
 static const Property cuda_properties[] = {
     DEFINE_PROP_UINT64("timebase-frequency", CUDAState, tb_frequency, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void cuda_class_init(ObjectClass *oc, void *data)
hw/misc/macio/macio.c +0 -2
index 7e3d5aa977e..194b152effe 100644
@@ -408,7 +408,6 @@ static const VMStateDescription vmstate_macio_newworld = {
 static const Property macio_newworld_properties[] = {
     DEFINE_PROP_BOOL("has-pmu", NewWorldMacIOState, has_pmu, false),
     DEFINE_PROP_BOOL("has-adb", NewWorldMacIOState, has_adb, false),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void macio_newworld_class_init(ObjectClass *oc, void *data)
@@ -424,7 +423,6 @@ static void macio_newworld_class_init(ObjectClass *oc, void *data)
 
 static const Property macio_properties[] = {
     DEFINE_PROP_UINT64("frequency", MacIOState, frequency, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void macio_class_init(ObjectClass *klass, void *data)
hw/misc/macio/pmu.c +0 -1
index 64bf44f67f6..47ebb8e8c0f 100644
@@ -762,7 +762,6 @@ static void pmu_init(Object *obj)
 
 static const Property pmu_properties[] = {
     DEFINE_PROP_BOOL("has-adb", PMUState, has_adb, true),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pmu_class_init(ObjectClass *oc, void *data)
hw/misc/mips_cmgcr.c +0 -1
index 80ca224f76c..95f19912b46 100644
@@ -219,7 +219,6 @@ static const Property mips_gcr_properties[] = {
                      MemoryRegion *),
     DEFINE_PROP_LINK("cpc", MIPSGCRState, cpc_mr, TYPE_MEMORY_REGION,
                      MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mips_gcr_realize(DeviceState *dev, Error **errp)
hw/misc/mips_cpc.c +0 -1
index 86ff0f7ad89..772b8c0017d 100644
@@ -166,7 +166,6 @@ static const VMStateDescription vmstate_mips_cpc = {
 static const Property mips_cpc_properties[] = {
     DEFINE_PROP_UINT32("num-vp", MIPSCPCState, num_vp, 0x1),
     DEFINE_PROP_UINT64("vp-start-running", MIPSCPCState, vp_start_running, 0x1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mips_cpc_class_init(ObjectClass *klass, void *data)
hw/misc/mips_itu.c +0 -1
index d84a7dbf152..2d126ebaf85 100644
@@ -538,7 +538,6 @@ static const Property mips_itu_properties[] = {
                       ITC_FIFO_NUM_MAX),
     DEFINE_PROP_UINT32("num-semaphores", MIPSITUState, num_semaphores,
                       ITC_SEMAPH_NUM_MAX),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mips_itu_class_init(ObjectClass *klass, void *data)
hw/misc/mos6522.c +0 -1
index 0225a5869bf..0b8f6a4cb4c 100644
@@ -698,7 +698,6 @@ static void mos6522_finalize(Object *obj)
 
 static const Property mos6522_properties[] = {
     DEFINE_PROP_UINT64("frequency", MOS6522State, frequency, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void mos6522_class_init(ObjectClass *oc, void *data)
hw/misc/mps2-fpgaio.c +0 -1
index 2e8d1c721c1..d07568248d6 100644
@@ -326,7 +326,6 @@ static const Property mps2_fpgaio_properties[] = {
     DEFINE_PROP_UINT32("num-leds", MPS2FPGAIO, num_leds, 2),
     DEFINE_PROP_BOOL("has-switches", MPS2FPGAIO, has_switches, false),
     DEFINE_PROP_BOOL("has-dbgctrl", MPS2FPGAIO, has_dbgctrl, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mps2_fpgaio_class_init(ObjectClass *klass, void *data)
hw/misc/mps2-scc.c +0 -1
index f378b755714..5f8d6bca43b 100644
@@ -472,7 +472,6 @@ static const Property mps2_scc_properties[] = {
      */
     DEFINE_PROP_ARRAY("oscclk", MPS2SCC, num_oscclk, oscclk_reset,
                       qdev_prop_uint32, uint32_t),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mps2_scc_class_init(ObjectClass *klass, void *data)
hw/misc/msf2-sysreg.c +0 -1
index 0d7a713c766..20009adbd95 100644
@@ -122,7 +122,6 @@ static const Property msf2_sysreg_properties[] = {
     /* default divisors in Libero GUI */
     DEFINE_PROP_UINT8("apb0divisor", MSF2SysregState, apb0div, 2),
     DEFINE_PROP_UINT8("apb1divisor", MSF2SysregState, apb1div, 2),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void msf2_sysreg_realize(DeviceState *dev, Error **errp)
hw/misc/npcm7xx_gcr.c +0 -1
index 17aeaf22cbd..07464a4dc93 100644
@@ -232,7 +232,6 @@ static const VMStateDescription vmstate_npcm7xx_gcr = {
 static const Property npcm7xx_gcr_properties[] = {
     DEFINE_PROP_UINT32("disabled-modules", NPCM7xxGCRState, reset_mdlr, 0),
     DEFINE_PROP_UINT32("power-on-straps", NPCM7xxGCRState, reset_pwron, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void npcm7xx_gcr_class_init(ObjectClass *klass, void *data)
hw/misc/nrf51_rng.c +0 -1
index 2b550a6bcab..1e67acdf234 100644
@@ -224,7 +224,6 @@ static const Property nrf51_rng_properties[] = {
             period_unfiltered_us, 167),
     DEFINE_PROP_UINT16("period_filtered_us", NRF51RNGState,
             period_filtered_us, 660),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_rng = {
hw/misc/pci-testdev.c +0 -1
index 7927397a23a..ca6a3884310 100644
@@ -321,7 +321,6 @@ static void qdev_pci_testdev_reset(DeviceState *dev)
 
 static const Property pci_testdev_properties[] = {
     DEFINE_PROP_SIZE("membar", PCITestDevState, membar_size, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pci_testdev_class_init(ObjectClass *klass, void *data)
hw/misc/pvpanic-isa.c +0 -1
index 824a2e4528c..f9a3156a5c0 100644
@@ -102,7 +102,6 @@ static const Property pvpanic_isa_properties[] = {
     DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505),
     DEFINE_PROP_UINT8("events", PVPanicISAState, pvpanic.events,
                       PVPANIC_EVENTS),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pvpanic_isa_class_init(ObjectClass *klass, void *data)
hw/misc/pvpanic-pci.c +0 -1
index 1c3eafc1377..967842359f0 100644
@@ -56,7 +56,6 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error **errp)
 static const Property pvpanic_pci_properties[] = {
     DEFINE_PROP_UINT8("events", PVPanicPCIState, pvpanic.events,
                       PVPANIC_EVENTS),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pvpanic_pci_class_init(ObjectClass *klass, void *data)
hw/misc/sifive_e_aon.c +0 -1
index c48429b1315..165e41dfc3d 100644
@@ -292,7 +292,6 @@ static void sifive_e_aon_init(Object *obj)
 static const Property sifive_e_aon_properties[] = {
     DEFINE_PROP_UINT64("wdogclk-frequency", SiFiveEAONState, wdogclk_freq,
                        SIFIVE_E_LFCLK_DEFAULT_FREQ),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sifive_e_aon_class_init(ObjectClass *oc, void *data)
hw/misc/sifive_u_otp.c +0 -1
index 32cd8e8dfbd..955134af0d0 100644
@@ -197,7 +197,6 @@ static const MemoryRegionOps sifive_u_otp_ops = {
 static const Property sifive_u_otp_properties[] = {
     DEFINE_PROP_UINT32("serial", SiFiveUOTPState, serial, 0),
     DEFINE_PROP_DRIVE("drive", SiFiveUOTPState, blk),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sifive_u_otp_realize(DeviceState *dev, Error **errp)
hw/misc/stm32l4x5_rcc.c +0 -1
index b61241d1954..fd8466dff34 100644
@@ -1433,7 +1433,6 @@ static const Property stm32l4x5_rcc_properties[] = {
         sai1_extclk_frequency, 0),
     DEFINE_PROP_UINT64("sai2_extclk_frequency", Stm32l4x5RccState,
         sai2_extclk_frequency, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void stm32l4x5_rcc_class_init(ObjectClass *klass, void *data)
hw/misc/tz-mpc.c +0 -1
index b06eb9f119f..6d827d21dc2 100644
@@ -590,7 +590,6 @@ static const VMStateDescription tz_mpc_vmstate = {
 static const Property tz_mpc_properties[] = {
     DEFINE_PROP_LINK("downstream", TZMPC, downstream,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void tz_mpc_class_init(ObjectClass *klass, void *data)
hw/misc/tz-msc.c +0 -1
index 96413a502da..505df4e1902 100644
@@ -283,7 +283,6 @@ static const Property tz_msc_properties[] = {
                      TYPE_MEMORY_REGION, MemoryRegion *),
     DEFINE_PROP_LINK("idau", TZMSC, idau,
                      TYPE_IDAU_INTERFACE, IDAUInterface *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void tz_msc_class_init(ObjectClass *klass, void *data)
hw/misc/tz-ppc.c +0 -1
index 1943d8d165a..1daa54c5e69 100644
@@ -323,7 +323,6 @@ static const Property tz_ppc_properties[] = {
     DEFINE_PORT(13),
     DEFINE_PORT(14),
     DEFINE_PORT(15),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void tz_ppc_class_init(ObjectClass *klass, void *data)
hw/misc/unimp.c +0 -1
index 62e1153627f..257282a3a9d 100644
@@ -73,7 +73,6 @@ static void unimp_realize(DeviceState *dev, Error **errp)
 static const Property unimp_properties[] = {
     DEFINE_PROP_UINT64("size", UnimplementedDeviceState, size, 0),
     DEFINE_PROP_STRING("name", UnimplementedDeviceState, name),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void unimp_class_init(ObjectClass *klass, void *data)
hw/misc/xlnx-versal-cframe-reg.c +0 -2
index 8281a9bafff..8db0f7e6589 100644
@@ -737,7 +737,6 @@ static const Property cframe_regs_props[] = {
                        cfg.blktype_num_frames[5], 0),
     DEFINE_PROP_UINT32("blktype6-frames", XlnxVersalCFrameReg,
                        cfg.blktype_num_frames[6], 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cframe_bcast_reg_init(Object *obj)
@@ -802,7 +801,6 @@ static const Property cframe_bcast_regs_props[] = {
                      TYPE_XLNX_CFI_IF, XlnxCfiIf *),
     DEFINE_PROP_LINK("cframe14", XlnxVersalCFrameBcastReg, cfg.cframe[14],
                      TYPE_XLNX_CFI_IF, XlnxCfiIf *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void cframe_reg_class_init(ObjectClass *klass, void *data)
hw/misc/xlnx-versal-cfu.c +0 -2
index 7cfdabdb8e1..26d06e2557d 100644
@@ -457,13 +457,11 @@ static const Property cfu_props[] = {
                          TYPE_XLNX_CFI_IF, XlnxCfiIf *),
         DEFINE_PROP_LINK("cframe14", XlnxVersalCFUAPB, cfg.cframe[14],
                          TYPE_XLNX_CFI_IF, XlnxCfiIf *),
-        DEFINE_PROP_END_OF_LIST(),
 };
 
 static const Property cfu_sfr_props[] = {
         DEFINE_PROP_LINK("cfu", XlnxVersalCFUSFR, cfg.cfu,
                          TYPE_XLNX_VERSAL_CFU_APB, XlnxVersalCFUAPB *),
-        DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_cfu_apb = {
hw/misc/xlnx-versal-trng.c +0 -2
index 2f6af4f6800..0419f648b7a 100644
@@ -666,8 +666,6 @@ static const Property trng_props[] = {
     DEFINE_PROP_UINT32("hw-version", XlnxVersalTRng, hw_version, 0x0200),
     DEFINE_PROP("fips-fault-events", XlnxVersalTRng, forced_faults,
                 trng_prop_fault_events, uint32_t),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_trng = {
hw/misc/xlnx-versal-xramc.c +0 -1
index a06b9fbc05a..d1e76be027c 100644
@@ -220,7 +220,6 @@ static const VMStateDescription vmstate_xram_ctrl = {
 
 static const Property xram_ctrl_properties[] = {
     DEFINE_PROP_UINT64("size", XlnxXramCtrl, cfg.size, 1 * MiB),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xram_ctrl_class_init(ObjectClass *klass, void *data)
hw/misc/zynq_slcr.c +0 -1
index ffa14ecb84f..f4fa3b18405 100644
@@ -625,7 +625,6 @@ static const VMStateDescription vmstate_zynq_slcr = {
 
 static const Property zynq_slcr_props[] = {
     DEFINE_PROP_UINT8("boot-mode", ZynqSLCRState, boot_mode, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void zynq_slcr_class_init(ObjectClass *klass, void *data)
hw/net/allwinner-sun8i-emac.c +0 -1
index 3f03060bf57..314a28af6df 100644
@@ -834,7 +834,6 @@ static const Property allwinner_sun8i_emac_properties[] = {
     DEFINE_PROP_UINT8("phy-addr", AwSun8iEmacState, mii_phy_addr, 0),
     DEFINE_PROP_LINK("dma-memory", AwSun8iEmacState, dma_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static int allwinner_sun8i_emac_post_load(void *opaque, int version_id)
hw/net/allwinner_emac.c +0 -1
index 39c10426cfe..3eb9e09dc5c 100644
@@ -465,7 +465,6 @@ static void aw_emac_realize(DeviceState *dev, Error **errp)
 static const Property aw_emac_properties[] = {
     DEFINE_NIC_PROPERTIES(AwEmacState, conf),
     DEFINE_PROP_UINT8("phy-addr", AwEmacState, phy_addr, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_mii = {
hw/net/cadence_gem.c +0 -1
index 3fce01315fe..0282bd1d7fc 100644
@@ -1799,7 +1799,6 @@ static const Property gem_properties[] = {
                        jumbo_max_len, 10240),
     DEFINE_PROP_LINK("dma", CadenceGEMState, dma_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void gem_class_init(ObjectClass *klass, void *data)
hw/net/can/xlnx-versal-canfd.c +0 -1
index 97fa46c4b3b..dc242e92155 100644
@@ -2052,7 +2052,6 @@ static const Property canfd_core_properties[] = {
                        CANFD_DEFAULT_CLOCK),
     DEFINE_PROP_LINK("canfdbus", XlnxVersalCANFDState, canfdbus, TYPE_CAN_BUS,
                      CanBusState *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void canfd_class_init(ObjectClass *klass, void *data)
hw/net/can/xlnx-zynqmp-can.c +0 -1
index 61c104c18b5..9fbdeea368f 100644
@@ -1174,7 +1174,6 @@ static const Property xlnx_zynqmp_can_properties[] = {
                        CAN_DEFAULT_CLOCK),
     DEFINE_PROP_LINK("canbus", XlnxZynqMPCANState, canbus, TYPE_CAN_BUS,
                      CanBusState *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xlnx_zynqmp_can_class_init(ObjectClass *klass, void *data)
hw/net/dp8393x.c +0 -1
index e3ca11991b4..c80ddb12e38 100644
@@ -937,7 +937,6 @@ static const Property dp8393x_properties[] = {
                      TYPE_MEMORY_REGION, MemoryRegion *),
     DEFINE_PROP_UINT8("it_shift", dp8393xState, it_shift, 0),
     DEFINE_PROP_BOOL("big_endian", dp8393xState, big_endian, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void dp8393x_class_init(ObjectClass *klass, void *data)
hw/net/e1000.c +0 -1
index ef0af31751a..7348d396323 100644
@@ -1685,7 +1685,6 @@ static const Property e1000_properties[] = {
                     compat_flags, E1000_FLAG_TSO_BIT, true),
     DEFINE_PROP_BIT("init-vet", E1000State,
                     compat_flags, E1000_FLAG_VET_BIT, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 typedef struct E1000Info {
hw/net/e1000e.c +0 -1
index e2b7576f678..544a39eae96 100644
@@ -672,7 +672,6 @@ static const Property e1000e_properties[] = {
                         e1000e_prop_subsys, uint16_t),
     DEFINE_PROP_BOOL("init-vet", E1000EState, init_vet, true),
     DEFINE_PROP_BOOL("migrate-timadj", E1000EState, timadj, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void e1000e_class_init(ObjectClass *class, void *data)
hw/net/eepro100.c +0 -1
index b8cb8d5cf10..5801cb06351 100644
@@ -2060,7 +2060,6 @@ static E100PCIDeviceInfo *eepro100_get_class(EEPRO100State *s)
 
 static const Property e100_properties[] = {
     DEFINE_NIC_PROPERTIES(EEPRO100State, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void eepro100_class_init(ObjectClass *klass, void *data)
hw/net/fsl_etsec/etsec.c +0 -1
index 764be2c6a25..781b9003954 100644
@@ -416,7 +416,6 @@ static void etsec_instance_init(Object *obj)
 
 static const Property etsec_properties[] = {
     DEFINE_NIC_PROPERTIES(eTSEC, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void etsec_class_init(ObjectClass *klass, void *data)
hw/net/ftgmac100.c +0 -2
index 4adc7fb10c4..40a13d16677 100644
@@ -1258,7 +1258,6 @@ static const Property ftgmac100_properties[] = {
     DEFINE_PROP_BOOL("aspeed", FTGMAC100State, aspeed, false),
     DEFINE_NIC_PROPERTIES(FTGMAC100State, conf),
     DEFINE_PROP_BOOL("dma64", FTGMAC100State, dma64, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ftgmac100_class_init(ObjectClass *klass, void *data)
@@ -1418,7 +1417,6 @@ static const VMStateDescription vmstate_aspeed_mii = {
 static const Property aspeed_mii_properties[] = {
     DEFINE_PROP_LINK("nic", AspeedMiiState, nic, TYPE_FTGMAC100,
                      FTGMAC100State *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void aspeed_mii_class_init(ObjectClass *klass, void *data)
hw/net/igb.c +0 -1
index ad0f748d822..ae973f40d6f 100644
@@ -594,7 +594,6 @@ static const VMStateDescription igb_vmstate = {
 static const Property igb_properties[] = {
     DEFINE_NIC_PROPERTIES(IGBState, conf),
     DEFINE_PROP_BOOL("x-pcie-flr-init", IGBState, has_flr, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void igb_class_init(ObjectClass *class, void *data)
hw/net/imx_fec.c +0 -1
index 9b649684772..e0342d93634 100644
@@ -1229,7 +1229,6 @@ static const Property imx_eth_properties[] = {
     DEFINE_PROP_BOOL("phy-connected", IMXFECState, phy_connected, true),
     DEFINE_PROP_LINK("phy-consumer", IMXFECState, phy_consumer, TYPE_IMX_FEC,
                      IMXFECState *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void imx_eth_class_init(ObjectClass *klass, void *data)
hw/net/lan9118.c +0 -1
index 237e9b97d59..afee68c7db6 100644
@@ -1307,7 +1307,6 @@ static void lan9118_realize(DeviceState *dev, Error **errp)
 static const Property lan9118_properties[] = {
     DEFINE_NIC_PROPERTIES(lan9118_state, conf),
     DEFINE_PROP_UINT32("mode_16bit", lan9118_state, mode_16bit, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void lan9118_class_init(ObjectClass *klass, void *data)
hw/net/lance.c +0 -1
index 9ed9c94cff6..a0945e1c881 100644
@@ -141,7 +141,6 @@ static const Property lance_properties[] = {
     DEFINE_PROP_LINK("dma", SysBusPCNetState, state.dma_opaque,
                      TYPE_DEVICE, DeviceState *),
     DEFINE_NIC_PROPERTIES(SysBusPCNetState, state.conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void lance_class_init(ObjectClass *klass, void *data)
hw/net/lasi_i82596.c +0 -1
index 248e3841dba..95f56311d9b 100644
@@ -160,7 +160,6 @@ static void lasi_82596_instance_init(Object *obj)
 
 static const Property lasi_82596_properties[] = {
     DEFINE_NIC_PROPERTIES(SysBusI82596State, state.conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void lasi_82596_class_init(ObjectClass *klass, void *data)
hw/net/mcf_fec.c +0 -1
index 55bad4c0697..d5572a81d3f 100644
@@ -662,7 +662,6 @@ static void mcf_fec_instance_init(Object *obj)
 
 static const Property mcf_fec_properties[] = {
     DEFINE_NIC_PROPERTIES(mcf_fec_state, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mcf_fec_class_init(ObjectClass *oc, void *data)
hw/net/mipsnet.c +0 -1
index c9ef1beb7b3..8852b6f3a12 100644
@@ -268,7 +268,6 @@ static void mipsnet_sysbus_reset(DeviceState *dev)
 
 static const Property mipsnet_properties[] = {
     DEFINE_NIC_PROPERTIES(MIPSnetState, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mipsnet_class_init(ObjectClass *klass, void *data)
hw/net/msf2-emac.c +0 -1
index 8d9015f962b..80f75f19ddf 100644
@@ -550,7 +550,6 @@ static const Property msf2_emac_properties[] = {
     DEFINE_PROP_LINK("ahb-bus", MSF2EmacState, dma_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
     DEFINE_NIC_PROPERTIES(MSF2EmacState, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_msf2_emac = {
hw/net/mv88w8618_eth.c +0 -1
index ccb11512dba..a1f51f7ade0 100644
@@ -375,7 +375,6 @@ static const Property mv88w8618_eth_properties[] = {
     DEFINE_NIC_PROPERTIES(mv88w8618_eth_state, conf),
     DEFINE_PROP_LINK("dma-memory", mv88w8618_eth_state, dma_mr,
                      TYPE_MEMORY_REGION, MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mv88w8618_eth_class_init(ObjectClass *klass, void *data)
hw/net/ne2000-isa.c +0 -1
index 1cd070d4199..c445f2a2223 100644
@@ -83,7 +83,6 @@ static const Property ne2000_isa_properties[] = {
     DEFINE_PROP_UINT32("iobase", ISANE2000State, iobase, 0x300),
     DEFINE_PROP_UINT32("irq",   ISANE2000State, isairq, 9),
     DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)
hw/net/ne2000-pci.c +0 -1
index 12fa579d228..929e9a19308 100644
@@ -98,7 +98,6 @@ static void ne2000_instance_init(Object *obj)
 
 static const Property ne2000_properties[] = {
     DEFINE_NIC_PROPERTIES(PCINE2000State, ne2000.c),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ne2000_class_init(ObjectClass *klass, void *data)
hw/net/npcm7xx_emc.c +0 -1
index f06e908d044..cc38080c7d4 100644
@@ -847,7 +847,6 @@ static const VMStateDescription vmstate_npcm7xx_emc = {
 
 static const Property npcm7xx_emc_properties[] = {
     DEFINE_NIC_PROPERTIES(NPCM7xxEMCState, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void npcm7xx_emc_class_init(ObjectClass *klass, void *data)
hw/net/npcm_gmac.c +0 -1
index 1db29307d7a..6d7f8398b65 100644
@@ -914,7 +914,6 @@ static const VMStateDescription vmstate_npcm_gmac = {
 
 static const Property npcm_gmac_properties[] = {
     DEFINE_NIC_PROPERTIES(NPCMGMACState, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void npcm_gmac_class_init(ObjectClass *klass, void *data)
hw/net/opencores_eth.c +0 -1
index 003b452bc9b..54daab7b04c 100644
@@ -745,7 +745,6 @@ static void qdev_open_eth_reset(DeviceState *dev)
 
 static const Property open_eth_properties[] = {
     DEFINE_NIC_PROPERTIES(OpenEthState, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void open_eth_class_init(ObjectClass *klass, void *data)
hw/net/pcnet-pci.c +0 -1
index 83ba8cd9493..b8e9ff95e88 100644
@@ -254,7 +254,6 @@ static void pcnet_instance_init(Object *obj)
 
 static const Property pcnet_properties[] = {
     DEFINE_NIC_PROPERTIES(PCIPCNetState, state.conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pcnet_class_init(ObjectClass *klass, void *data)
hw/net/rocker/rocker.c +0 -1
index efc20396aa4..aa5d87fbc5a 100644
@@ -1468,7 +1468,6 @@ static const Property rocker_properties[] = {
                        switch_id, 0),
     DEFINE_PROP_ARRAY("ports", Rocker, fp_ports,
                       fp_ports_peers, qdev_prop_netdev, NICPeers),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription rocker_vmsd = {
hw/net/rtl8139.c +0 -1
index 064a73b6b49..3245aa1f1d8 100644
@@ -3412,7 +3412,6 @@ static void rtl8139_instance_init(Object *obj)
 
 static const Property rtl8139_properties[] = {
     DEFINE_NIC_PROPERTIES(RTL8139State, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void rtl8139_class_init(ObjectClass *klass, void *data)
hw/net/smc91c111.c +0 -1
index a853c30fa20..b18d5c23c39 100644
@@ -790,7 +790,6 @@ static void smc91c111_realize(DeviceState *dev, Error **errp)
 
 static const Property smc91c111_properties[] = {
     DEFINE_NIC_PROPERTIES(smc91c111_state, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void smc91c111_class_init(ObjectClass *klass, void *data)
hw/net/spapr_llan.c +0 -1
index d381c041db3..da98a7ec3ea 100644
@@ -791,7 +791,6 @@ static const Property spapr_vlan_properties[] = {
     DEFINE_NIC_PROPERTIES(SpaprVioVlan, nicconf),
     DEFINE_PROP_BIT("use-rx-buffer-pools", SpaprVioVlan,
                     compat_flags, SPAPRVLAN_FLAG_RX_BUF_POOLS_BIT, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static bool spapr_vlan_rx_buffer_pools_needed(void *opaque)
hw/net/stellaris_enet.c +0 -1
index 4af1afa7337..a420732d48f 100644
@@ -499,7 +499,6 @@ static void stellaris_enet_realize(DeviceState *dev, Error **errp)
 
 static const Property stellaris_enet_properties[] = {
     DEFINE_NIC_PROPERTIES(stellaris_enet_state, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void stellaris_enet_class_init(ObjectClass *klass, void *data)
hw/net/sungem.c +0 -1
index bcc7a18382c..e1c672acd3a 100644
@@ -1427,7 +1427,6 @@ static const Property sungem_properties[] = {
      * override.
      */
     DEFINE_PROP_UINT32("phy_addr", SunGEMState, phy_addr, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_sungem = {
hw/net/sunhme.c +0 -1
index 86f472fcbe7..539e0d5e463 100644
@@ -179,7 +179,6 @@ struct SunHMEState {
 
 static const Property sunhme_properties[] = {
     DEFINE_NIC_PROPERTIES(SunHMEState, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sunhme_reset_tx(SunHMEState *s)
hw/net/tulip.c +0 -1
index f35b58a88c2..d753dc790d3 100644
@@ -1009,7 +1009,6 @@ static void tulip_instance_init(Object *obj)
 
 static const Property tulip_properties[] = {
     DEFINE_NIC_PROPERTIES(TULIPState, c),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void tulip_class_init(ObjectClass *klass, void *data)
hw/net/virtio-net.c +0 -1
index 4fd1f9accab..e2d3d188045 100644
@@ -4057,7 +4057,6 @@ static const Property virtio_net_properties[] = {
                       VIRTIO_NET_F_GUEST_USO6, true),
     DEFINE_PROP_BIT64("host_uso", VirtIONet, host_features,
                       VIRTIO_NET_F_HOST_USO, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void virtio_net_class_init(ObjectClass *klass, void *data)
hw/net/vmxnet3.c +0 -1
index f69547cad5e..4c77d69b78e 100644
@@ -2477,7 +2477,6 @@ static const Property vmxnet3_properties[] = {
                     VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT, false),
     DEFINE_PROP_BIT("x-disable-pcie", VMXNET3State, compat_flags,
                     VMXNET3_COMPAT_FLAG_DISABLE_PCIE_BIT, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void vmxnet3_realize(DeviceState *qdev, Error **errp)
hw/net/xen_nic.c +0 -1
index 5a5259150a1..97ebd9fa307 100644
@@ -558,7 +558,6 @@ static void xen_netdev_unrealize(XenDevice *xendev)
 static const Property xen_netdev_properties[] = {
     DEFINE_NIC_PROPERTIES(XenNetDev, conf),
     DEFINE_PROP_INT32("idx", XenNetDev, dev, -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xen_netdev_class_init(ObjectClass *class, void *data)
hw/net/xgmac.c +0 -1
index 6e0f96f4858..e3cc4c60ebd 100644
@@ -416,7 +416,6 @@ static void xgmac_enet_realize(DeviceState *dev, Error **errp)
 
 static const Property xgmac_properties[] = {
     DEFINE_NIC_PROPERTIES(XgmacState, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xgmac_enet_class_init(ObjectClass *klass, void *data)
hw/net/xilinx_axienet.c +0 -1
index 9d0c618e2f8..457952af196 100644
@@ -1005,7 +1005,6 @@ static const Property xilinx_enet_properties[] = {
                      tx_data_dev, TYPE_STREAM_SINK, StreamSink *),
     DEFINE_PROP_LINK("axistream-control-connected", XilinxAXIEnet,
                      tx_control_dev, TYPE_STREAM_SINK, StreamSink *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xilinx_enet_class_init(ObjectClass *klass, void *data)
hw/net/xilinx_ethlite.c +0 -1
index 9413731d20d..f3eb2af1934 100644
@@ -255,7 +255,6 @@ static const Property xilinx_ethlite_properties[] = {
     DEFINE_PROP_UINT32("tx-ping-pong", struct xlx_ethlite, c_tx_pingpong, 1),
     DEFINE_PROP_UINT32("rx-ping-pong", struct xlx_ethlite, c_rx_pingpong, 1),
     DEFINE_NIC_PROPERTIES(struct xlx_ethlite, conf),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xilinx_ethlite_class_init(ObjectClass *klass, void *data)
hw/nubus/nubus-bridge.c +0 -1
index 83893e5a463..8fe43627237 100644
@@ -26,7 +26,6 @@ static void nubus_bridge_init(Object *obj)
 static const Property nubus_bridge_properties[] = {
     DEFINE_PROP_UINT16("slot-available-mask", NubusBridge,
                        bus.slot_available_mask, 0xffff),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void nubus_bridge_class_init(ObjectClass *klass, void *data)
hw/nubus/nubus-device.c +0 -1
index 7cafc134272..6755c3dc438 100644
@@ -110,7 +110,6 @@ static void nubus_device_realize(DeviceState *dev, Error **errp)
 static const Property nubus_device_properties[] = {
     DEFINE_PROP_INT32("slot", NubusDevice, slot, -1),
     DEFINE_PROP_STRING("romfile", NubusDevice, romfile),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void nubus_device_class_init(ObjectClass *oc, void *data)
hw/nvme/ctrl.c +0 -1
index 33a3062466e..d9c8dace1e1 100644
@@ -8965,7 +8965,6 @@ static const Property nvme_props[] = {
     DEFINE_PROP_BOOL("atomic.dn", NvmeCtrl, params.atomic_dn, 0),
     DEFINE_PROP_UINT16("atomic.awun", NvmeCtrl, params.atomic_awun, 0),
     DEFINE_PROP_UINT16("atomic.awupf", NvmeCtrl, params.atomic_awupf, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nvme_get_smart_warning(Object *obj, Visitor *v, const char *name,
hw/nvme/ns.c +0 -1
index 192b80f18db..0a7881b21f3 100644
@@ -834,7 +834,6 @@ static const Property nvme_ns_props[] = {
     DEFINE_PROP_BOOL("eui64-default", NvmeNamespace, params.eui64_default,
                      false),
     DEFINE_PROP_STRING("fdp.ruhs", NvmeNamespace, params.fdp.ruhs),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nvme_ns_class_init(ObjectClass *oc, void *data)
hw/nvme/subsys.c +0 -1
index 3171c3888c2..2ae56f12a59 100644
@@ -223,7 +223,6 @@ static const Property nvme_subsystem_props[] = {
                      NVME_DEFAULT_RU_SIZE),
     DEFINE_PROP_UINT32("fdp.nrg", NvmeSubsystem, params.fdp.nrg, 1),
     DEFINE_PROP_UINT16("fdp.nruh", NvmeSubsystem, params.fdp.nruh, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nvme_subsys_class_init(ObjectClass *oc, void *data)
hw/nvram/ds1225y.c +0 -1
index 19bf8d2091b..6b2aa8c7d26 100644
@@ -145,7 +145,6 @@ static void nvram_sysbus_realize(DeviceState *dev, Error **errp)
 static const Property nvram_sysbus_properties[] = {
     DEFINE_PROP_UINT32("size", SysBusNvRamState, nvram.chip_size, 0x2000),
     DEFINE_PROP_STRING("filename", SysBusNvRamState, nvram.filename),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void nvram_sysbus_class_init(ObjectClass *klass, void *data)
hw/nvram/eeprom_at24c.c +0 -1
index 669920b2b92..5f525d37e47 100644
@@ -239,7 +239,6 @@ static const Property at24c_eeprom_props[] = {
     DEFINE_PROP_UINT8("address-size", EEPROMState, asize, 0),
     DEFINE_PROP_BOOL("writable", EEPROMState, writable, true),
     DEFINE_PROP_DRIVE("drive", EEPROMState, blk),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static
hw/nvram/fw_cfg.c +0 -3
index 7461d99ff2e..327d623d8d6 100644
@@ -1084,7 +1084,6 @@ static void fw_cfg_machine_ready(struct Notifier *n, void *data)
 
 static const Property fw_cfg_properties[] = {
     DEFINE_PROP_BOOL("acpi-mr-restore", FWCfgState, acpi_mr_restore, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void fw_cfg_common_realize(DeviceState *dev, Error **errp)
@@ -1278,7 +1277,6 @@ static const Property fw_cfg_io_properties[] = {
                      true),
     DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots,
                        FW_CFG_FILE_SLOTS_DFLT),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void fw_cfg_io_realize(DeviceState *dev, Error **errp)
@@ -1328,7 +1326,6 @@ static const Property fw_cfg_mem_properties[] = {
                      true),
     DEFINE_PROP_UINT16("x-file-slots", FWCfgMemState, parent_obj.file_slots,
                        FW_CFG_FILE_SLOTS_DFLT),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void fw_cfg_mem_realize(DeviceState *dev, Error **errp)
hw/nvram/mac_nvram.c +0 -1
index d62ad719c84..db42817e1f9 100644
@@ -138,7 +138,6 @@ static const Property macio_nvram_properties[] = {
     DEFINE_PROP_UINT32("size", MacIONVRAMState, size, 0),
     DEFINE_PROP_UINT32("it_shift", MacIONVRAMState, it_shift, 0),
     DEFINE_PROP_DRIVE("drive", MacIONVRAMState, blk),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void macio_nvram_class_init(ObjectClass *oc, void *data)
hw/nvram/nrf51_nvm.c +0 -1
index 236049462bf..2ed40788582 100644
@@ -356,7 +356,6 @@ static void nrf51_nvm_reset(DeviceState *dev)
 
 static const Property nrf51_nvm_properties[] = {
     DEFINE_PROP_UINT32("flash-size", NRF51NVMState, flash_size, 0x40000),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_nvm = {
hw/nvram/spapr_nvram.c +0 -1
index 2251ff2f4c8..1230884f526 100644
@@ -255,7 +255,6 @@ static const VMStateDescription vmstate_spapr_nvram = {
 static const Property spapr_nvram_properties[] = {
     DEFINE_SPAPR_PROPERTIES(SpaprNvram, sdev),
     DEFINE_PROP_DRIVE("drive", SpaprNvram, blk),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void spapr_nvram_class_init(ObjectClass *klass, void *data)
hw/nvram/xlnx-bbram.c +0 -1
index 4fa528f0480..d3f238fc837 100644
@@ -523,7 +523,6 @@ static const VMStateDescription vmstate_bbram_ctrl = {
 static const Property bbram_ctrl_props[] = {
     DEFINE_PROP("drive", XlnxBBRam, blk, bbram_prop_drive, BlockBackend *),
     DEFINE_PROP_UINT32("crc-zpads", XlnxBBRam, crc_zpads, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void bbram_ctrl_class_init(ObjectClass *klass, void *data)
hw/nvram/xlnx-efuse.c +0 -1
index 5dae9e8e9a0..f1787d0db57 100644
@@ -272,7 +272,6 @@ static const Property efuse_properties[] = {
     DEFINE_PROP_BOOL("init-factory-tbits", XlnxEFuse, init_tbits, true),
     DEFINE_PROP_ARRAY("read-only", XlnxEFuse, ro_bits_cnt, ro_bits,
                       qdev_prop_uint32, uint32_t),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void efuse_class_init(ObjectClass *klass, void *data)
hw/nvram/xlnx-versal-efuse-cache.c +0 -2
index 1aea27afd3c..2fb599422ca 100644
@@ -87,8 +87,6 @@ static const Property efuse_cache_props[] = {
     DEFINE_PROP_LINK("efuse",
                      XlnxVersalEFuseCache, efuse,
                      TYPE_XLNX_EFUSE, XlnxEFuse *),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void efuse_cache_class_init(ObjectClass *klass, void *data)
hw/nvram/xlnx-versal-efuse-ctrl.c +0 -2
index 599aa126fb3..3246eb3ca6e 100644
@@ -750,8 +750,6 @@ static const Property efuse_ctrl_props[] = {
     DEFINE_PROP_ARRAY("pg0-lock",
                       XlnxVersalEFuseCtrl, extra_pg0_lock_n16,
                       extra_pg0_lock_spec, qdev_prop_uint16, uint16_t),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void efuse_ctrl_class_init(ObjectClass *klass, void *data)
hw/nvram/xlnx-zynqmp-efuse.c +0 -2
index af531879056..15024daf4fc 100644
@@ -837,8 +837,6 @@ static const Property zynqmp_efuse_props[] = {
     DEFINE_PROP_LINK("efuse",
                      XlnxZynqMPEFuse, efuse,
                      TYPE_XLNX_EFUSE, XlnxEFuse *),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void zynqmp_efuse_class_init(ObjectClass *klass, void *data)
hw/pci-bridge/cxl_downstream.c +0 -1
index cfe50e60e9f..e337f1ac501 100644
@@ -217,7 +217,6 @@ static const Property cxl_dsp_props[] = {
                                 speed, PCIE_LINK_SPEED_64),
     DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot,
                                 width, PCIE_LINK_WIDTH_16),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void cxl_dsp_class_init(ObjectClass *oc, void *data)
hw/pci-bridge/cxl_root_port.c +0 -1
index 5824ba3c750..c0037f2cfbf 100644
@@ -211,7 +211,6 @@ static const Property gen_rp_props[] = {
                                 speed, PCIE_LINK_SPEED_64),
     DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot,
                                 width, PCIE_LINK_WIDTH_32),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void cxl_rp_dvsec_write_config(PCIDevice *dev, uint32_t addr,
hw/pci-bridge/cxl_upstream.c +0 -1
index ef94aa36543..28b109c49af 100644
@@ -369,7 +369,6 @@ static const Property cxl_upstream_props[] = {
                                 speed, PCIE_LINK_SPEED_32),
     DEFINE_PROP_PCIE_LINK_WIDTH("x-width", CXLUpstreamPort,
                                 width, PCIE_LINK_WIDTH_16),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void cxl_upstream_class_init(ObjectClass *oc, void *data)
hw/pci-bridge/gen_pcie_root_port.c +0 -1
index c319ca82638..3c0b41ef1a5 100644
@@ -145,7 +145,6 @@ static const Property gen_rp_props[] = {
                                 speed, PCIE_LINK_SPEED_16),
     DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot,
                                 width, PCIE_LINK_WIDTH_32),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void gen_rp_dev_class_init(ObjectClass *klass, void *data)
hw/pci-bridge/pci_bridge_dev.c +0 -1
index 35a37e056a7..0a91a8ae6c4 100644
@@ -186,7 +186,6 @@ static const Property pci_bridge_dev_properties[] = {
                      res_reserve.mem_pref_32, -1),
     DEFINE_PROP_SIZE("pref64-reserve", PCIBridgeDev,
                      res_reserve.mem_pref_64, -1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static bool pci_device_shpc_present(void *opaque, int version_id)
hw/pci-bridge/pci_expander_bridge.c +0 -2
index 01997c1ab3b..af4591a9c39 100644
@@ -425,7 +425,6 @@ static const Property pxb_dev_properties[] = {
     DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0),
     DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED),
     DEFINE_PROP_BOOL("bypass_iommu", PXBDev, bypass_iommu, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pxb_dev_class_init(ObjectClass *klass, void *data)
@@ -509,7 +508,6 @@ static void pxb_cxl_dev_realize(PCIDevice *dev, Error **errp)
 
 static const Property pxb_cxl_dev_properties[] = {
     DEFINE_PROP_BOOL("hdm_for_passthrough", PXBCXLDev, hdm_for_passthrough, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pxb_cxl_dev_class_init(ObjectClass *klass, void *data)
hw/pci-bridge/pcie_pci_bridge.c +0 -1
index 8834ff3dbfe..fd4514a595c 100644
@@ -126,7 +126,6 @@ static void pcie_pci_bridge_write_config(PCIDevice *d,
 
 static const Property pcie_pci_bridge_dev_properties[] = {
         DEFINE_PROP_ON_OFF_AUTO("msi", PCIEPCIBridge, msi, ON_OFF_AUTO_AUTO),
-        DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription pcie_pci_bridge_dev_vmstate = {
hw/pci-bridge/pcie_root_port.c +0 -1
index a7f87a1bc48..dd40b366bfa 100644
@@ -152,7 +152,6 @@ static const Property rp_props[] = {
     DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present,
                     QEMU_PCIE_SLTCAP_PCP_BITNR, true),
     DEFINE_PROP_BOOL("disable-acs", PCIESlot, disable_acs, false),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void rp_instance_post_init(Object *obj)
hw/pci-bridge/xio3130_downstream.c +0 -1
index 92e5fb72ecd..d4e94f26571 100644
@@ -137,7 +137,6 @@ static void xio3130_downstream_exitfn(PCIDevice *d)
 static const Property xio3130_downstream_props[] = {
     DEFINE_PROP_BIT(COMPAT_PROP_PCP, PCIDevice, cap_present,
                     QEMU_PCIE_SLTCAP_PCP_BITNR, true),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const VMStateDescription vmstate_xio3130_downstream = {
hw/pci-host/dino.c +0 -1
index ead9893f213..58fdbf7bc90 100644
@@ -495,7 +495,6 @@ static void dino_pcihost_init(Object *obj)
 static const Property dino_pcihost_properties[] = {
     DEFINE_PROP_LINK("memory-as", DinoState, memory_as, TYPE_MEMORY_REGION,
                      MemoryRegion *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void dino_pcihost_class_init(ObjectClass *klass, void *data)
hw/pci-host/gpex.c +0 -1
index 8a955ca1305..c6aa8e87a22 100644
@@ -166,7 +166,6 @@ static const Property gpex_host_properties[] = {
                        gpex_cfg.mmio64.base, 0),
     DEFINE_PROP_SIZE(PCI_HOST_ABOVE_4G_MMIO_SIZE, GPEXHost,
                      gpex_cfg.mmio64.size, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void gpex_host_class_init(ObjectClass *klass, void *data)
hw/pci-host/grackle.c +0 -1
index d64de737744..84e5ee8c6ef 100644
@@ -131,7 +131,6 @@ static char *grackle_ofw_unit_address(const SysBusDevice *dev)
 
 static const Property grackle_properties[] = {
     DEFINE_PROP_UINT32("ofw-addr", GrackleState, ofw_addr, -1),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void grackle_class_init(ObjectClass *klass, void *data)
hw/pci-host/gt64120.c +0 -1
index 3c73ebe83ff..d5c13a89b68 100644
@@ -1277,7 +1277,6 @@ static const TypeInfo gt64120_pci_info = {
 static const Property gt64120_properties[] = {
     DEFINE_PROP_BOOL("cpu-little-endian", GT64120State,
                      cpu_little_endian, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void gt64120_class_init(ObjectClass *klass, void *data)
hw/pci-host/i440fx.c +0 -1
index 40780fbc525..1e69691c6d1 100644
@@ -362,7 +362,6 @@ static const Property i440fx_props[] = {
                      above_4g_mem_size, 0),
     DEFINE_PROP_BOOL("x-pci-hole64-fix", I440FXState, pci_hole64_fix, true),
     DEFINE_PROP_STRING(I440FX_HOST_PROP_PCI_TYPE, I440FXState, pci_type),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
hw/pci-host/mv64361.c +0 -1
index 2518d5abe6b..9c41c155fb4 100644
@@ -100,7 +100,6 @@ static void mv64361_pcihost_realize(DeviceState *dev, Error **errp)
 
 static const Property mv64361_pcihost_props[] = {
     DEFINE_PROP_UINT8("index", MV64361PCIState, index, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void mv64361_pcihost_class_init(ObjectClass *klass, void *data)
hw/pci-host/pnv_phb.c +0 -4
index 888f0786a07..97cfb52119d 100644
@@ -192,8 +192,6 @@ static const Property pnv_phb_properties[] = {
 
     DEFINE_PROP_LINK("pec", PnvPHB, pec, TYPE_PNV_PHB4_PEC,
                      PnvPhb4PecState *),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_phb_class_init(ObjectClass *klass, void *data)
@@ -304,8 +302,6 @@ static void pnv_phb_root_port_realize(DeviceState *dev, Error **errp)
 
 static const Property pnv_phb_root_port_properties[] = {
     DEFINE_PROP_UINT32("version", PnvPHBRootPort, version, 0),
-
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_phb_root_port_class_init(ObjectClass *klass, void *data)
hw/pci-host/pnv_phb3.c +0 -1
index 529b33b5a2a..cd178f7eaf3 100644
@@ -1095,7 +1095,6 @@ static const Property pnv_phb3_properties[] = {
     DEFINE_PROP_UINT32("chip-id", PnvPHB3, chip_id, 0),
     DEFINE_PROP_LINK("chip", PnvPHB3, chip, TYPE_PNV_CHIP, PnvChip *),
     DEFINE_PROP_LINK("phb-base", PnvPHB3, phb_base, TYPE_PNV_PHB, PnvPHB *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_phb3_class_init(ObjectClass *klass, void *data)
hw/pci-host/pnv_phb4.c +0 -1
index 482fe25803c..178c73f519b 100644
@@ -1694,7 +1694,6 @@ static const Property pnv_phb4_properties[] = {
     DEFINE_PROP_LINK("pec", PnvPHB4, pec, TYPE_PNV_PHB4_PEC,
                      PnvPhb4PecState *),
     DEFINE_PROP_LINK("phb-base", PnvPHB4, phb_base, TYPE_PNV_PHB, PnvPHB *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_phb4_class_init(ObjectClass *klass, void *data)
hw/pci-host/pnv_phb4_pec.c +0 -1
index f8975403d33..e4d33fa0606 100644
@@ -288,7 +288,6 @@ static const Property pnv_pec_properties[] = {
     DEFINE_PROP_UINT32("chip-id", PnvPhb4PecState, chip_id, 0),
     DEFINE_PROP_LINK("chip", PnvPhb4PecState, chip, TYPE_PNV_CHIP,
                      PnvChip *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static uint32_t pnv_pec_xscom_pci_base(PnvPhb4PecState *pec)
hw/pci-host/ppce500.c +0 -1
index 54071fc125a..345ce4c5262 100644
@@ -510,7 +510,6 @@ static void e500_host_bridge_class_init(ObjectClass *klass, void *data)
 static const Property pcihost_properties[] = {
     DEFINE_PROP_UINT32("first_slot", PPCE500PCIState, first_slot, 0x11),
     DEFINE_PROP_UINT32("first_pin_irq", PPCE500PCIState, first_pin_irq, 0x1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void e500_pcihost_class_init(ObjectClass *klass, void *data)
hw/pci-host/q35.c +0 -2
index af0b77ea1e6..06be3d77cb9 100644
@@ -182,7 +182,6 @@ static const Property q35_host_props[] = {
     DEFINE_PROP_BOOL(PCI_HOST_PROP_SMM_RANGES, Q35PCIHost,
                      mch.has_smm_ranges, true),
     DEFINE_PROP_BOOL("x-pci-hole64-fix", Q35PCIHost, pci_hole64_fix, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void q35_host_class_init(ObjectClass *klass, void *data)
@@ -666,7 +665,6 @@ static const Property mch_props[] = {
     DEFINE_PROP_UINT16("extended-tseg-mbytes", MCHPCIState, ext_tseg_mbytes,
                        16),
     DEFINE_PROP_BOOL("smbase-smram", MCHPCIState, has_smram_at_smbase, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void mch_class_init(ObjectClass *klass, void *data)
hw/pci-host/raven.c +0 -1
index b0a4a669f59..918a3237a9e 100644
@@ -429,7 +429,6 @@ static const Property raven_pcihost_properties[] = {
     /* Temporary workaround until legacy prep machine is removed */
     DEFINE_PROP_BOOL("is-legacy-prep", PREPPCIState, is_legacy_prep,
                      false),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void raven_pcihost_class_init(ObjectClass *klass, void *data)
hw/pci-host/sabre.c +0 -1
index 623afed6447..56f057a63f1 100644
@@ -495,7 +495,6 @@ static char *sabre_ofw_unit_address(const SysBusDevice *dev)
 static const Property sabre_properties[] = {
     DEFINE_PROP_UINT64("special-base", SabreState, special_base, 0),
     DEFINE_PROP_UINT64("mem-base", SabreState, mem_base, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void sabre_class_init(ObjectClass *klass, void *data)
hw/pci-host/uninorth.c +0 -1
index bd670cfa9db..37e2461bbbf 100644
@@ -425,7 +425,6 @@ static const TypeInfo unin_internal_pci_host_info = {
 
 static const Property pci_unin_main_pci_host_props[] = {
     DEFINE_PROP_UINT32("ofw-addr", UNINHostState, ofw_addr, -1),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pci_unin_main_class_init(ObjectClass *klass, void *data)
hw/pci-host/versatile.c +0 -1
index 5d596406916..c3fbf4cbf94 100644
@@ -501,7 +501,6 @@ static const TypeInfo versatile_pci_host_info = {
 static const Property pci_vpb_properties[] = {
     DEFINE_PROP_UINT8("broken-irq-mapping", PCIVPBState, irq_mapping_prop,
                       PCI_VPB_IRQMAP_ASSUME_OK),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pci_vpb_class_init(ObjectClass *klass, void *data)
hw/pci-host/xilinx-pcie.c +0 -1
index 848403970bc..18688485f48 100644
@@ -163,7 +163,6 @@ static const Property xilinx_pcie_host_props[] = {
     DEFINE_PROP_SIZE("mmio_base", XilinxPCIEHost, mmio_base, 0),
     DEFINE_PROP_SIZE("mmio_size", XilinxPCIEHost, mmio_size, 1 * MiB),
     DEFINE_PROP_BOOL("link_up", XilinxPCIEHost, link_up, true),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void xilinx_pcie_host_class_init(ObjectClass *klass, void *data)
hw/pci/pci.c +0 -1
index 90248481b18..714208aa986 100644
@@ -104,7 +104,6 @@ static const Property pci_props[] = {
     DEFINE_PROP_BIT("x-pcie-ext-tag", PCIDevice, cap_present,
                     QEMU_PCIE_EXT_TAG_BITNR, true),
     { .name = "busnr", .info = &prop_pci_busnr },
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static const VMStateDescription vmstate_pcibus = {
hw/pci/pci_bridge.c +0 -1
index dd4fd3674f5..aee4dd7d1f6 100644
@@ -480,7 +480,6 @@ int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, int cap_offset,
 static const Property pci_bridge_properties[] = {
     DEFINE_PROP_BOOL("x-pci-express-writeable-slt-bug", PCIBridge,
                      pcie_writeable_slt_bug, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pci_bridge_class_init(ObjectClass *klass, void *data)
hw/pci/pci_host.c +0 -1
index 321e7be709c..4510890dfc1 100644
@@ -244,7 +244,6 @@ static const Property pci_host_properties_common[] = {
     DEFINE_PROP_BOOL("x-config-reg-migration-enabled", PCIHostState,
                      mig_enabled, true),
     DEFINE_PROP_BOOL(PCI_HOST_BYPASS_IOMMU, PCIHostState, bypass_iommu, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pci_host_class_init(ObjectClass *klass, void *data)
hw/pci/pcie_port.c +0 -2
index bac2822e988..c73db30e989 100644
@@ -116,7 +116,6 @@ static const Property pcie_port_props[] = {
     DEFINE_PROP_UINT16("aer_log_max", PCIEPort,
                        parent_obj.parent_obj.exp.aer_log.log_max,
                        PCIE_AER_LOG_MAX_DEFAULT),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pcie_port_class_init(ObjectClass *oc, void *data)
@@ -210,7 +209,6 @@ static const Property pcie_slot_props[] = {
     DEFINE_PROP_BOOL("hotplug", PCIESlot, hotplug, true),
     DEFINE_PROP_BOOL("x-do-not-expose-native-hotplug-cap", PCIESlot,
                      hide_native_hotplug_cap, false),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void pcie_slot_class_init(ObjectClass *oc, void *data)
hw/ppc/pnv.c +0 -1
index b90a052ce0d..770516d7e52 100644
@@ -2431,7 +2431,6 @@ static const Property pnv_chip_properties[] = {
     DEFINE_PROP_UINT32("nr-threads", PnvChip, nr_threads, 1),
     DEFINE_PROP_BOOL("big-core", PnvChip, big_core, false),
     DEFINE_PROP_BOOL("lpar-per-core", PnvChip, lpar_per_core, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_chip_class_init(ObjectClass *klass, void *data)
hw/ppc/pnv_adu.c +0 -1
index 646736f7e98..d09a167466b 100644
@@ -187,7 +187,6 @@ static void pnv_adu_realize(DeviceState *dev, Error **errp)
 
 static const Property pnv_adu_properties[] = {
     DEFINE_PROP_LINK("lpc", PnvADU, lpc, TYPE_PNV_LPC, PnvLpcController *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_adu_class_init(ObjectClass *klass, void *data)
hw/ppc/pnv_chiptod.c +0 -1
index 840ef23128d..011822ea1d5 100644
@@ -454,7 +454,6 @@ static const Property pnv_chiptod_properties[] = {
     DEFINE_PROP_BOOL("primary", PnvChipTOD, primary, false),
     DEFINE_PROP_BOOL("secondary", PnvChipTOD, secondary, false),
     DEFINE_PROP_LINK("chip", PnvChipTOD , chip, TYPE_PNV_CHIP, PnvChip *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_chiptod_power9_class_init(ObjectClass *klass, void *data)
hw/ppc/pnv_core.c +0 -2
index 22864c92f38..a5ebd392e17 100644
@@ -443,7 +443,6 @@ static const Property pnv_core_properties[] = {
                      false),
     DEFINE_PROP_BOOL("lpar-per-core", PnvCore, lpar_per_core, false),
     DEFINE_PROP_LINK("chip", PnvCore, chip, TYPE_PNV_CHIP, PnvChip *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_core_power8_class_init(ObjectClass *oc, void *data)
@@ -695,7 +694,6 @@ static void pnv_quad_power10_realize(DeviceState *dev, Error **errp)
 
 static const Property pnv_quad_properties[] = {
     DEFINE_PROP_UINT32("quad-id", PnvQuad, quad_id, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_quad_power9_class_init(ObjectClass *oc, void *data)
hw/ppc/pnv_homer.c +0 -1
index b1f83e2cf27..11c8da8bed0 100644
@@ -414,7 +414,6 @@ static void pnv_homer_realize(DeviceState *dev, Error **errp)
 
 static const Property pnv_homer_properties[] = {
     DEFINE_PROP_LINK("chip", PnvHomer, chip, TYPE_PNV_CHIP, PnvChip *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_homer_class_init(ObjectClass *klass, void *data)
hw/ppc/pnv_i2c.c +0 -1
index 4bd61abeed9..13f16906dc4 100644
@@ -547,7 +547,6 @@ static const Property pnv_i2c_properties[] = {
     DEFINE_PROP_LINK("chip", PnvI2C, chip, TYPE_PNV_CHIP, PnvChip *),
     DEFINE_PROP_UINT32("engine", PnvI2C, engine, 1),
     DEFINE_PROP_UINT32("num-busses", PnvI2C, num_busses, 1),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_i2c_class_init(ObjectClass *klass, void *data)
hw/ppc/pnv_lpc.c +0 -1
index 4d471671630..0480a60f3f7 100644
@@ -830,7 +830,6 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
 
 static const Property pnv_lpc_properties[] = {
     DEFINE_PROP_BOOL("psi-serirq", PnvLpcController, psi_has_serirq, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_lpc_class_init(ObjectClass *klass, void *data)
hw/ppc/pnv_pnor.c +0 -1
index eed6d326505..5bb755df76d 100644
@@ -115,7 +115,6 @@ static void pnv_pnor_realize(DeviceState *dev, Error **errp)
 static const Property pnv_pnor_properties[] = {
     DEFINE_PROP_INT64("size", PnvPnor, size, 128 * MiB),
     DEFINE_PROP_DRIVE("drive", PnvPnor, blk),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_pnor_class_init(ObjectClass *klass, void *data)
hw/ppc/pnv_psi.c +0 -1
index e7d6ceee99e..cd5021c4f55 100644
@@ -555,7 +555,6 @@ static int pnv_psi_dt_xscom(PnvXScomInterface *dev, void *fdt, int xscom_offset)
 static const Property pnv_psi_properties[] = {
     DEFINE_PROP_UINT64("bar", PnvPsi, bar, 0),
     DEFINE_PROP_UINT64("fsp-bar", PnvPsi, fsp_bar, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void pnv_psi_power8_class_init(ObjectClass *klass, void *data)
hw/ppc/ppc405_uc.c +0 -1
index 801f97811f5..f8c9cec9ceb 100644
@@ -967,7 +967,6 @@ static void ppc405_cpc_realize(DeviceState *dev, Error **errp)
 
 static const Property ppc405_cpc_properties[] = {
     DEFINE_PROP_UINT32("sys-clk", Ppc405CpcState, sysclk, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ppc405_cpc_class_init(ObjectClass *oc, void *data)
hw/ppc/ppc440_uc.c +0 -1
index 05a5ef6f773..0d6f8d8a04a 100644
@@ -1025,7 +1025,6 @@ static const Property ppc460ex_pcie_props[] = {
     DEFINE_PROP_INT32("dcrn-base", PPC460EXPCIEState, dcrn_base, -1),
     DEFINE_PROP_LINK("cpu", PPC460EXPCIEState, cpu, TYPE_POWERPC_CPU,
                      PowerPCCPU *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ppc460ex_pcie_class_init(ObjectClass *klass, void *data)
hw/ppc/ppc4xx_devs.c +0 -2
index 530a392f2a0..9ce97775109 100644
@@ -234,7 +234,6 @@ static void ppc4xx_mal_finalize(Object *obj)
 static const Property ppc4xx_mal_properties[] = {
     DEFINE_PROP_UINT8("txc-num", Ppc4xxMalState, txcnum, 0),
     DEFINE_PROP_UINT8("rxc-num", Ppc4xxMalState, rxcnum, 0),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ppc4xx_mal_class_init(ObjectClass *oc, void *data)
@@ -542,7 +541,6 @@ bool ppc4xx_dcr_realize(Ppc4xxDcrDeviceState *dev, PowerPCCPU *cpu,
 static const Property ppc4xx_dcr_properties[] = {
     DEFINE_PROP_LINK("cpu", Ppc4xxDcrDeviceState, cpu, TYPE_POWERPC_CPU,
                      PowerPCCPU *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ppc4xx_dcr_class_init(ObjectClass *oc, void *data)
hw/ppc/ppc4xx_sdram.c +0 -2
index 6cfb07a11fd..562bff8d53e 100644
@@ -429,7 +429,6 @@ static const Property ppc4xx_sdram_ddr_props[] = {
     DEFINE_PROP_LINK("dram", Ppc4xxSdramDdrState, dram_mr, TYPE_MEMORY_REGION,
                      MemoryRegion *),
     DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdrState, nbanks, 4),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ppc4xx_sdram_ddr_class_init(ObjectClass *oc, void *data)
@@ -714,7 +713,6 @@ static const Property ppc4xx_sdram_ddr2_props[] = {
     DEFINE_PROP_LINK("dram", Ppc4xxSdramDdr2State, dram_mr, TYPE_MEMORY_REGION,
                      MemoryRegion *),
     DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdr2State, nbanks, 4),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void ppc4xx_sdram_ddr2_class_init(ObjectClass *oc, void *data)
hw/ppc/prep_systemio.c +0 -1
index ca475c69f45..6e2ae98625c 100644
@@ -288,7 +288,6 @@ static const VMStateDescription vmstate_prep_systemio = {
 static const Property prep_systemio_properties[] = {
     DEFINE_PROP_UINT8("ibm-planar-id", PrepSystemIoState, ibm_planar_id, 0),
     DEFINE_PROP_UINT8("equipment", PrepSystemIoState, equipment, 0),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void prep_systemio_class_initfn(ObjectClass *klass, void *data)
hw/ppc/rs6000_mc.c +0 -1
index bee9bc62d46..0e5d53b8b69 100644
@@ -210,7 +210,6 @@ static const VMStateDescription vmstate_rs6000mc = {
 static const Property rs6000mc_properties[] = {
     DEFINE_PROP_UINT32("ram-size", RS6000MCState, ram_size, 0),
     DEFINE_PROP_BOOL("auto-configure", RS6000MCState, autoconfigure, true),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void rs6000mc_class_initfn(ObjectClass *klass, void *data)
hw/ppc/spapr_cpu_core.c +0 -1
index 88d743a3c3f..559dd918e13 100644
@@ -363,7 +363,6 @@ static void spapr_cpu_core_realize(DeviceState *dev, Error **errp)
 
 static const Property spapr_cpu_core_properties[] = {
     DEFINE_PROP_INT32("node-id", SpaprCpuCore, node_id, CPU_UNSET_NUMA_NODE_ID),
-    DEFINE_PROP_END_OF_LIST()
 };
 
 static void spapr_cpu_core_class_init(ObjectClass *oc, void *data)
hw/ppc/spapr_nvdimm.c +0 -1
index 8bcce4146a5..6f875d73b25 100644
@@ -887,7 +887,6 @@ static void spapr_nvdimm_unrealize(NVDIMMDevice *dimm)
 #ifdef CONFIG_LIBPMEM
 static const Property spapr_nvdimm_properties[] = {
     DEFINE_PROP_BOOL("pmem-override", SpaprNVDIMMDevice, pmem_override, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 #endif
 
hw/ppc/spapr_pci.c +0 -1
index 3edff528ca1..0dcbd5900cc 100644
@@ -2055,7 +2055,6 @@ static const Property spapr_phb_properties[] = {
                      pcie_ecs, true),
     DEFINE_PROP_BOOL("pre-5.1-associativity", SpaprPhbState,
                      pre_5_1_assoc, false),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static const VMStateDescription vmstate_spapr_pci_lsi = {
hw/ppc/spapr_rng.c +0 -1
index 51c3a54d45d..6935f00832d 100644
@@ -134,7 +134,6 @@ static const Property spapr_rng_properties[] = {
     DEFINE_PROP_BOOL("use-kvm", SpaprRngState, use_kvm, false),
     DEFINE_PROP_LINK("rng", SpaprRngState, backend, TYPE_RNG_BACKEND,
                      RngBackend *),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
 static void spapr_rng_class_init(ObjectClass *oc, void *data)
hw/ppc/spapr_tpm_proxy.c +0 -1
index 37521b88cbb..2a17a5108bd 100644
@@ -147,7 +147,6 @@ static void spapr_tpm_proxy_unrealize(DeviceState *d)
 
 static const Property spapr_tpm_proxy_properties[] = {
     DEFINE_PROP_STRING("host-path", SpaprTpmProxy, host_path),
-    DEFINE_PROP_END_OF_LIST(),
 };
 
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

hw/remote/proxy.c +0 -1
index 6f84fdd3faf..ee9a22bba36 100644

Lines of this file are not shown. View the raw message.

hw/riscv/opentitan.c +0 -1
index 8ce85ea9f73..bc26b5313a6 100644

Lines of this file are not shown. View the raw message.

hw/riscv/riscv-iommu-pci.c +0 -1
index a695314bbeb..257a5faa5f6 100644

Lines of this file are not shown. View the raw message.

hw/riscv/riscv-iommu.c +0 -1
index 07fed36986c..41f3e6cf7cf 100644

Lines of this file are not shown. View the raw message.

hw/riscv/riscv_hart.c +0 -1
index 0df454772fa..74b91ac60ca 100644

Lines of this file are not shown. View the raw message.

hw/riscv/sifive_u.c +0 -1
index 124ffd48424..f5c01dbbd00 100644

Lines of this file are not shown. View the raw message.

hw/rtc/allwinner-rtc.c +0 -1
index 838db721362..b56098b0a98 100644

Lines of this file are not shown. View the raw message.

hw/rtc/goldfish_rtc.c +0 -1
index 389f192efa4..cd11bf8208f 100644

Lines of this file are not shown. View the raw message.

hw/rtc/m48t59-isa.c +0 -1
index 51f80d27ef3..38bc8dcf100 100644

Lines of this file are not shown. View the raw message.

hw/rtc/m48t59.c +0 -1
index 5a2c7b4abdd..57c17e51336 100644

Lines of this file are not shown. View the raw message.

hw/rtc/mc146818rtc.c +0 -1
index 973ed9914d0..37f247fce88 100644

Lines of this file are not shown. View the raw message.

hw/rtc/pl031.c +0 -1
index 1dc8e6e00ff..32ce5bbb99f 100644

Lines of this file are not shown. View the raw message.

hw/rx/rx62n.c +0 -1
index dfa27bc94ef..da1a1cc00ed 100644

Lines of this file are not shown. View the raw message.

hw/s390x/ccw-device.c +0 -1
index 0d10c3ed552..494faebb5a8 100644

Lines of this file are not shown. View the raw message.

hw/s390x/css-bridge.c +0 -1
index 860a04a7da2..04ab1f6402c 100644

Lines of this file are not shown. View the raw message.

hw/s390x/ipl.c +0 -1
index 88a97f00854..0344c02ecec 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-pci-bus.c +0 -1
index 22e6be67aff..5fbbf41a3db 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-skeys.c +0 -1
index 6d0a47ed731..4409e62b6a5 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-stattrib.c +0 -1
index 6c69c01e1f1..8e07acbddc9 100644

Lines of this file are not shown. View the raw message.

hw/s390x/vhost-scsi-ccw.c +0 -1
index 0be0f8a82c4..e6bf0c55bc2 100644

Lines of this file are not shown. View the raw message.

hw/s390x/vhost-user-fs-ccw.c +0 -1
index 934378aaec4..6a9654d77b4 100644

Lines of this file are not shown. View the raw message.

hw/s390x/vhost-vsock-ccw.c +0 -1
index 3ba4008b4b6..875ccf3485e 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-9p.c +0 -1
index c10b084d408..287ae2ba767 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-balloon.c +0 -1
index bbbed494b3f..1180efaf6d5 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-blk.c +0 -1
index 31828512346..db9d442ffb5 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-crypto.c +0 -1
index b4cd7605c95..b693f87c70e 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-gpu.c +0 -1
index c44dc2d3559..a6b14c25d97 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-input.c +0 -1
index 040a9e04a9f..6ca10d58eeb 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-net.c +0 -1
index c41d347034e..80a5581baf8 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-rng.c +0 -1
index c9a15c4eb68..ccd124ee917 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-scsi.c +0 -1
index bec9a735188..bfcea3cfe78 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw-serial.c +0 -1
index 037d4f9db1c..59743d1e256 100644

Lines of this file are not shown. View the raw message.

hw/scsi/mptsas.c +0 -1
index a06113d9083..de628ae89b1 100644

Lines of this file are not shown. View the raw message.

hw/scsi/scsi-bus.c +0 -1
index 2f1678d51e7..181720b7a8c 100644

Lines of this file are not shown. View the raw message.

hw/scsi/scsi-disk.c +0 -3
index a47b80907f1..16351b49883 100644

Lines of this file are not shown. View the raw message.

hw/scsi/scsi-generic.c +0 -1
index d7ae7549d06..0290a196ccd 100644

Lines of this file are not shown. View the raw message.

hw/scsi/spapr_vscsi.c +0 -1
index 7c55e4d40f2..6962194eaac 100644

Lines of this file are not shown. View the raw message.

hw/scsi/vhost-scsi.c +0 -1
index effb8dab1f0..9f760663a00 100644

Lines of this file are not shown. View the raw message.

hw/scsi/vhost-user-scsi.c +0 -1
index d5265c57bce..689bc6c13ec 100644

Lines of this file are not shown. View the raw message.

hw/scsi/virtio-scsi.c +0 -1
index c0a4f1a6208..eb70a7a46e5 100644

Lines of this file are not shown. View the raw message.

hw/scsi/vmw_pvscsi.c +0 -1
index 46cec531cc2..f07e377cb88 100644

Lines of this file are not shown. View the raw message.

hw/sd/allwinner-sdhost.c +0 -1
index be39ec2e71a..0b235bccfd2 100644

Lines of this file are not shown. View the raw message.

hw/sd/aspeed_sdhci.c +0 -1
index 99703f18429..12cbbae5e77 100644

Lines of this file are not shown. View the raw message.

hw/sd/sd.c +0 -3
index b994ef581e6..779bac6631f 100644

Lines of this file are not shown. View the raw message.

hw/sd/sdhci-pci.c +0 -1
index 83892a7a152..5268c0dee50 100644

Lines of this file are not shown. View the raw message.

hw/sd/sdhci.c +0 -1
index e697ee05b38..64a936fcf06 100644

Lines of this file are not shown. View the raw message.

hw/sparc/sun4m_iommu.c +0 -1
index 3d6fcdf5760..8c1fc82534f 100644

Lines of this file are not shown. View the raw message.

hw/sparc64/sun4u.c +0 -2
index 05b8c7369e2..b6f65e8d2fe 100644

Lines of this file are not shown. View the raw message.

hw/ssi/aspeed_smc.c +0 -2
index bbdd4e47869..faef1a8e5b8 100644

Lines of this file are not shown. View the raw message.

hw/ssi/ibex_spi_host.c +0 -1
index 60a0b17b628..46c7b633c26 100644

Lines of this file are not shown. View the raw message.

hw/ssi/npcm7xx_fiu.c +0 -1
index fdd3ad2fdc7..21fc4890383 100644

Lines of this file are not shown. View the raw message.

hw/ssi/pnv_spi.c +0 -1
index 4ca9c469a4b..15e25bd1be3 100644

Lines of this file are not shown. View the raw message.

hw/ssi/sifive_spi.c +0 -1
index 74587477793..76f8654f412 100644

Lines of this file are not shown. View the raw message.

hw/ssi/ssi.c +0 -1
index cab0014c3f0..872c4e8036e 100644

Lines of this file are not shown. View the raw message.

hw/ssi/xilinx_spi.c +0 -1
index 588c1ec071c..fd1ff12eb1d 100644

Lines of this file are not shown. View the raw message.

hw/ssi/xilinx_spips.c +0 -2
index f72cb3cbc87..984c1780872 100644

Lines of this file are not shown. View the raw message.

hw/ssi/xlnx-versal-ospi.c +0 -1
index e51abe9de2c..9e96c9b69af 100644

Lines of this file are not shown. View the raw message.

hw/timer/a9gtimer.c +0 -1
index c0a91bab0c8..0c4eef2636a 100644

Lines of this file are not shown. View the raw message.

hw/timer/allwinner-a10-pit.c +0 -1
index 2904ccfb423..ddaf2128c2d 100644

Lines of this file are not shown. View the raw message.

hw/timer/arm_mptimer.c +0 -1
index 6244a7a84f3..803dad1e8a6 100644

Lines of this file are not shown. View the raw message.

hw/timer/arm_timer.c +0 -1
index dfa034296c0..1213b77aa09 100644

Lines of this file are not shown. View the raw message.

hw/timer/aspeed_timer.c +0 -1
index 4c16b5016e0..4868651ad48 100644

Lines of this file are not shown. View the raw message.

hw/timer/avr_timer16.c +0 -1
index 2e3ce83c431..96baf9cf605 100644

Lines of this file are not shown. View the raw message.

hw/timer/grlib_gptimer.c +0 -1
index a7428ed938c..f0802b6eb6d 100644

Lines of this file are not shown. View the raw message.

hw/timer/hpet.c +0 -1
index 46886c379ed..2a45410c0da 100644

Lines of this file are not shown. View the raw message.

hw/timer/i8254_common.c +0 -1
index 953c1e11eb3..29105afcc33 100644

Lines of this file are not shown. View the raw message.

hw/timer/ibex_timer.c +0 -1
index fba4466a898..3ebc8700973 100644

Lines of this file are not shown. View the raw message.

hw/timer/mss-timer.c +0 -1
index e5c5cd6a84e..594da64eae6 100644

Lines of this file are not shown. View the raw message.

hw/timer/nrf51_timer.c +0 -1
index 48fccec1bfc..11ad8b575e4 100644

Lines of this file are not shown. View the raw message.

hw/timer/pxa2xx_timer.c +0 -1
index 345145bfa80..6ec3fa54dd8 100644

Lines of this file are not shown. View the raw message.

hw/timer/renesas_cmt.c +0 -1
index 6d451fa86b3..93e7f58cc20 100644

Lines of this file are not shown. View the raw message.

hw/timer/renesas_tmr.c +0 -1
index 890f803cf8f..884349c2cc2 100644

Lines of this file are not shown. View the raw message.

hw/timer/sifive_pwm.c +0 -1
index 042c89c67a9..fc796e9bc30 100644

Lines of this file are not shown. View the raw message.

hw/timer/slavio_timer.c +0 -1
index 32991f44363..65b24e4f06b 100644

Lines of this file are not shown. View the raw message.

hw/timer/sse-timer.c +0 -1
index 6b7a67941c4..e106739ea9c 100644

Lines of this file are not shown. View the raw message.

hw/timer/stm32f2xx_timer.c +0 -1
index d9d745cd76f..4707190d6a2 100644

Lines of this file are not shown. View the raw message.

hw/timer/xilinx_timer.c +0 -1
index 7fe3e83baa5..4955fe1b01b 100644

Lines of this file are not shown. View the raw message.

hw/tpm/tpm_crb.c +0 -1
index 2bf6e7ffe96..e652679a1fc 100644

Lines of this file are not shown. View the raw message.

hw/tpm/tpm_spapr.c +0 -1
index e15b67dd45e..797fd8b290e 100644

Lines of this file are not shown. View the raw message.

hw/tpm/tpm_tis_i2c.c +0 -1
index b27af230cdc..504328e3b0d 100644

Lines of this file are not shown. View the raw message.

hw/tpm/tpm_tis_isa.c +0 -1
index 9b2160972a9..876cb02cb51 100644

Lines of this file are not shown. View the raw message.

hw/tpm/tpm_tis_sysbus.c +0 -1
index 88c1f1e4788..ee0bfe9538e 100644

Lines of this file are not shown. View the raw message.

hw/ufs/lu.c +0 -1
index 74ff52ad096..4100ea28e29 100644

Lines of this file are not shown. View the raw message.

hw/ufs/ufs.c +0 -1
index fe77158439d..8d26d137918 100644

Lines of this file are not shown. View the raw message.

hw/usb/bus.c +0 -1
index 80e6a928202..7e4ff36fed2 100644

Lines of this file are not shown. View the raw message.

hw/usb/canokey.c +0 -1
index 7cb600e3c86..fae212f0530 100644

Lines of this file are not shown. View the raw message.

hw/usb/ccid-card-emulated.c +0 -1
index dd58333943b..b1e330f21d7 100644

Lines of this file are not shown. View the raw message.

hw/usb/ccid-card-passthru.c +0 -1
index f97dcf767f5..bf81485f876 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-audio.c +0 -1
index 6007f16d30b..40f031252a7 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-hid.c +0 -3
index d83f67b9849..accdd460e3b 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-hub.c +0 -1
index 317ca0b0811..3880e2aca8e 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-mtp.c +0 -1
index 7994727e5ea..326c92a43d0 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-network.c +0 -1
index 6c4f5776d48..81863105acf 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-serial.c +0 -2
index 0c3e9160ec3..a0821db902f 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-smartcard-reader.c +0 -2
index c3c02f0aad1..73deb3ce839 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-storage-classic.c +0 -1
index ca037ba96f9..818f58db2fa 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-uas.c +0 -1
index 57e8d200514..44e30013d73 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-dwc2.c +0 -1
index 6a10f3e9cd8..e8152719f8e 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-dwc3.c +0 -1
index ff970bd9891..9ce9ba0b046 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ehci-pci.c +0 -1
index 374f25c5ede..d410c38a8a2 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ehci-sysbus.c +0 -1
index f4e08aab89c..768c3dd797f 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ohci-pci.c +0 -1
index 459644cc1bb..b3684a2ef6b 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ohci-sysbus.c +0 -1
index 81cf2e558d1..15311949b39 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-uhci.c +0 -2
index 245352c2317..142f24f2ea0 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-xhci-nec.c +0 -1
index f06e7403e2d..b1df95b52a5 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-xhci-sysbus.c +0 -1
index f4dbad7cc69..ce433223963 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-xhci.c +0 -1
index 3c5006f4254..3719c0f190d 100644

Lines of this file are not shown. View the raw message.

hw/usb/host-libusb.c +0 -1
index 85d33b51bab..0c753f5cc51 100644

Lines of this file are not shown. View the raw message.

hw/usb/redirect.c +0 -1
index f72a612d5a2..96fb9638092 100644

Lines of this file are not shown. View the raw message.

hw/usb/u2f-emulated.c +0 -1
index df86ce97fca..e1dd19ee92b 100644

Lines of this file are not shown. View the raw message.

hw/usb/u2f-passthru.c +0 -1
index ec4f6165d8e..8df5215a1fa 100644

Lines of this file are not shown. View the raw message.

hw/vfio/ap.c +0 -1
index 2e6ea2dd931..529aad6332c 100644

Lines of this file are not shown. View the raw message.

hw/vfio/ccw.c +0 -1
index b96ab27e129..bac56e8dd9a 100644

Lines of this file are not shown. View the raw message.

hw/vfio/pci.c +0 -2
index 93aca850e31..0c5621da360 100644

Lines of this file are not shown. View the raw message.

hw/vfio/platform.c +0 -1
index 766e8a86efd..7bc52a6f56c 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vdpa-dev.c +0 -1
index 61849b3b0e1..d7b6af03f62 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-scsi-pci.c +0 -1
index 7536b37f184..3778f6131ef 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-blk-pci.c +0 -1
index 99f14720234..1767ef2c9c9 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-device.c +0 -1
index 3222b67bd9d..86eba138b4e 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-fs-pci.c +0 -1
index 9ba6c406550..116eaab9071 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-fs.c +0 -1
index c0462329a58..f8714b56600 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-gpio.c +0 -1
index c997c66d80b..4a08814904d 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-i2c.c +0 -1
index b0a5cbf3eab..1c7cde503c3 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-input.c +0 -1
index c57cc461bb1..917405329f2 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-rng-pci.c +0 -1
index 0016ee74ce8..a4e690148d6 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-rng.c +0 -1
index c9985b5fadd..5aa432e5e1a 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-scmi.c +0 -1
index a15e6916efa..410a936ca74 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-scsi-pci.c +0 -1
index b2f6451f483..34e1a701b1a 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-snd.c +0 -1
index 8810a9f6998..8610370af80 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-vsock-pci.c +0 -1
index 529d967059f..f730a05e781 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-user-vsock.c +0 -1
index 97885bfeab7..293273080b4 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-vsock-common.c +0 -1
index cb2253c39fa..9ac587d20c1 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-vsock-pci.c +0 -1
index 1d9abd02bd9..6c618ee9083 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-vsock.c +0 -1
index ce80e84494b..940b30fa27c 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-9p-pci.c +0 -1
index b33faf2fbbc..aa1dce8f284 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-balloon.c +0 -1
index ab2ee304756..ec4aa945f2e 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-blk-pci.c +0 -1
index abdcc11b2eb..fc06cec6566 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-crypto-pci.c +0 -1
index 23c85fe5864..8699481375d 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-crypto.c +0 -1
index 9ae0b02598b..617163f127d 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-input-pci.c +0 -1
index 55c0b0555b0..9e3c1067776 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-iommu-pci.c +0 -1
index 92adf636842..97e03ce803b 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-iommu.c +0 -1
index 576ad8383f8..0988d212092 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-mem.c +0 -1
index 3f6f46fad77..317d056eba7 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-mmio.c +0 -1
index 49d9fe8f302..27d2f4b3b08 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-net-pci.c +0 -1
index e86094ae221..e18953ad674 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-nsm.c +0 -1
index 685c5483610..098e1aeac6e 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-pci.c +0 -2
index de41cb5ef22..cb61adc659f 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-pmem.c +0 -1
index f6f3b5ddaf5..9759023ab37 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-rng-pci.c +0 -1
index 398f4322370..a94ff767b2d 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-rng.c +0 -1
index 13a1a0b236a..0660e872f7c 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-scsi-pci.c +0 -1
index 733b5756db1..d44fd2fffbe 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-serial-pci.c +0 -1
index bda643ec546..b5b77eb2661 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio.c +0 -1
index 7fcdb55ba49..b871295b949 100644

Lines of this file are not shown. View the raw message.

hw/watchdog/sbsa_gwdt.c +0 -1
index 2e25d4b4e9a..6b6fc31f227 100644

Lines of this file are not shown. View the raw message.

hw/watchdog/wdt_aspeed.c +0 -1
index c95877e5c73..78dedb065eb 100644

Lines of this file are not shown. View the raw message.

hw/watchdog/wdt_imx2.c +0 -1
index 61fbd91ee4f..878e5098b67 100644

Lines of this file are not shown. View the raw message.

hw/xen/xen-bus.c +0 -1
index 0d7defb8cd3..2007ec08923 100644

Lines of this file are not shown. View the raw message.

hw/xen/xen_pt.c +0 -1
index 557aa98be41..e2bd4c7d411 100644

Lines of this file are not shown. View the raw message.

target/arm/cpu.c +0 -1
index 1afa07511e3..0e882c474ec 100644

Lines of this file are not shown. View the raw message.

target/avr/cpu.c +0 -1
index a7529a1b3d9..64dc15655b7 100644

Lines of this file are not shown. View the raw message.

target/hexagon/cpu.c +0 -1
index a70007245e4..8c89a8ce311 100644

Lines of this file are not shown. View the raw message.

target/i386/cpu.c +0 -2
index 52533994592..c28adee34f7 100644

Lines of this file are not shown. View the raw message.

target/microblaze/cpu.c +0 -1
index 0e41e39c0e2..83554f62d36 100644

Lines of this file are not shown. View the raw message.

target/mips/cpu.c +0 -1
index 02c0e1b0f9b..aa3d905e708 100644

Lines of this file are not shown. View the raw message.

target/s390x/cpu.c +0 -1
index 263f9e84ed6..9b367ed2d55 100644

Lines of this file are not shown. View the raw message.

target/sparc/cpu.c +0 -1
index 8f494c286ae..a65a6466a7e 100644

Lines of this file are not shown. View the raw message.

tests/unit/test-qdev-global-props.c +0 -1
index 1eb95d2429b..de7a572e680 100644

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
2.47.1

Part of the diff is not shown here. View the raw message.

#30 lore raw

[PULL 35/41] rust: pl011: fix declaration of LineControl bits

In reply to Paolo Bonzini

The bits in the LineControl struct were backwards. :(

---
 rust/hw/char/pl011/src/lib.rs | 82 +++++++++++++++++------------------
 1 file changed, 41 insertions(+), 41 deletions(-)
rust/hw/char/pl011/src/lib.rs +41 -41
index 4dc0e8f345f..d5089f78854 100644
@@ -319,32 +319,21 @@ fn default() -> Self {
     /// Line Control Register, `UARTLCR_H`
     #[doc(alias = "UARTLCR_H")]
     pub struct LineControl {
-        /// 15:8 - Reserved, do not modify, read as zero.
-        _reserved_zero_no_modify: u8,
-        /// 7 SPS Stick parity select.
-        /// 0 = stick parity is disabled
-        /// 1 = either:
-        /// • if the EPS bit is 0 then the parity bit is transmitted and checked
-        /// as a 1 • if the EPS bit is 1 then the parity bit is
-        /// transmitted and checked as a 0. This bit has no effect when
-        /// the PEN bit disables parity checking and generation. See Table 3-11
-        /// on page 3-14 for the parity truth table.
-        pub sticky_parity: bool,
-        /// WLEN Word length. These bits indicate the number of data bits
-        /// transmitted or received in a frame as follows: b11 = 8 bits
-        /// b10 = 7 bits
-        /// b01 = 6 bits
-        /// b00 = 5 bits.
-        pub word_length: WordLength,
-        /// FEN Enable FIFOs:
-        /// 0 = FIFOs are disabled (character mode) that is, the FIFOs become
-        /// 1-byte-deep holding registers 1 = transmit and receive FIFO
-        /// buffers are enabled (FIFO mode).
-        pub fifos_enabled: Mode,
-        /// 3 STP2 Two stop bits select. If this bit is set to 1, two stop bits
-        /// are transmitted at the end of the frame. The receive
-        /// logic does not check for two stop bits being received.
-        pub two_stops_bits: bool,
+        /// BRK Send break.
+        ///
+        /// If this bit is set to `1`, a low-level is continually output on the
+        /// `UARTTXD` output, after completing transmission of the
+        /// current character. For the proper execution of the break command,
+        /// the software must set this bit for at least two complete
+        /// frames. For normal use, this bit must be cleared to `0`.
+        pub send_break: bool,
+        /// 1 PEN Parity enable:
+        ///
+        /// - 0 = parity is disabled and no parity bit added to the data frame
+        /// - 1 = parity checking and generation is enabled.
+        ///
+        /// See Table 3-11 on page 3-14 for the parity truth table.
+        pub parity_enabled: bool,
         /// EPS Even parity select. Controls the type of parity the UART uses
         /// during transmission and reception:
         /// - 0 = odd parity. The UART generates or checks for an odd number of
@@ -355,21 +344,32 @@ pub struct LineControl {
         /// and generation. See Table 3-11 on page 3-14 for the parity
         /// truth table.
         pub parity: Parity,
-        /// 1 PEN Parity enable:
-        ///
-        /// - 0 = parity is disabled and no parity bit added to the data frame
-        /// - 1 = parity checking and generation is enabled.
-        ///
-        /// See Table 3-11 on page 3-14 for the parity truth table.
-        pub parity_enabled: bool,
-        /// BRK Send break.
-        ///
-        /// If this bit is set to `1`, a low-level is continually output on the
-        /// `UARTTXD` output, after completing transmission of the
-        /// current character. For the proper execution of the break command,
-        /// the software must set this bit for at least two complete
-        /// frames. For normal use, this bit must be cleared to `0`.
-        pub send_break: bool,
+        /// 3 STP2 Two stop bits select. If this bit is set to 1, two stop bits
+        /// are transmitted at the end of the frame. The receive
+        /// logic does not check for two stop bits being received.
+        pub two_stops_bits: bool,
+        /// FEN Enable FIFOs:
+        /// 0 = FIFOs are disabled (character mode) that is, the FIFOs become
+        /// 1-byte-deep holding registers 1 = transmit and receive FIFO
+        /// buffers are enabled (FIFO mode).
+        pub fifos_enabled: Mode,
+        /// WLEN Word length. These bits indicate the number of data bits
+        /// transmitted or received in a frame as follows: b11 = 8 bits
+        /// b10 = 7 bits
+        /// b01 = 6 bits
+        /// b00 = 5 bits.
+        pub word_length: WordLength,
+        /// 7 SPS Stick parity select.
+        /// 0 = stick parity is disabled
+        /// 1 = either:
+        /// • if the EPS bit is 0 then the parity bit is transmitted and checked
+        /// as a 1 • if the EPS bit is 1 then the parity bit is
+        /// transmitted and checked as a 0. This bit has no effect when
+        /// the PEN bit disables parity checking and generation. See Table 3-11
+        /// on page 3-14 for the parity truth table.
+        pub sticky_parity: bool,
+        /// 15:8 - Reserved, do not modify, read as zero.
+        _reserved_zero_no_modify: u8,
     }
 
     impl LineControl {
Signature · 1 line
2.47.1
#31 lore raw

[PULL 06/41] hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

Do not register an empty set of properties.

---
 hw/ppc/spapr_nvdimm.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
hw/ppc/spapr_nvdimm.c +5 -4
index 2ef6f29f3dd..8bcce4146a5 100644
@@ -884,22 +884,23 @@ static void spapr_nvdimm_unrealize(NVDIMMDevice *dimm)
     vmstate_unregister(NULL, &vmstate_spapr_nvdimm_states, dimm);
 }
 
-static const Property spapr_nvdimm_properties[] = {
 #ifdef CONFIG_LIBPMEM
+static const Property spapr_nvdimm_properties[] = {
     DEFINE_PROP_BOOL("pmem-override", SpaprNVDIMMDevice, pmem_override, false),
-#endif
     DEFINE_PROP_END_OF_LIST(),
 };
+#endif
 
 static void spapr_nvdimm_class_init(ObjectClass *oc, void *data)
 {
-    DeviceClass *dc = DEVICE_CLASS(oc);
     NVDIMMClass *nvc = NVDIMM_CLASS(oc);
 
     nvc->realize = spapr_nvdimm_realize;
     nvc->unrealize = spapr_nvdimm_unrealize;
 
-    device_class_set_props(dc, spapr_nvdimm_properties);
+#ifdef CONFIG_LIBPMEM
+    device_class_set_props(DEVICE_CLASS(oc), spapr_nvdimm_properties);
+#endif
 }
 
 static void spapr_nvdimm_init(Object *obj)
Signature · 1 line
2.47.1
#32 lore raw

[PULL 34/41] target/i386: Reset TSCs of parked vCPUs too on VM reset

In reply to Paolo Bonzini

From: "Maciej S. Szmigiero" <[email protected]>

Since commit 5286c3662294 ("target/i386: properly reset TSC on reset") QEMU writes the special value of "1" to each online vCPU TSC on VM reset to reset it.

However parked vCPUs don't get that handling and due to that their TSCs get desynchronized when the VM gets reset.
This in turn causes KVM to turn off PVCLOCK_TSC_STABLE_BIT in its exported PV clock.
Note that KVM has no understanding of vCPU being currently parked.

Without PVCLOCK_TSC_STABLE_BIT the sched clock is marked unstable in the guest's kvm_sched_clock_init().
This causes a performance regressions to show in some tests.

Fix this issue by writing the special value of "1" also to TSCs of parked vCPUs on VM reset.

Reproducing the issue:
1) Boot a VM with "-smp 2,maxcpus=3" or similar

2) device_add host-x86_64-cpu,id=vcpu,node-id=0,socket-id=0,core-id=2,thread-id=0

3) Wait a few seconds

4) device_del vcpu

5) Inside the VM run:

# echo "t" >/proc/sysrq-trigger; dmesg | grep sched_clock_stable
Observe the sched_clock_stable() value is 1.

6) Reboot the VM

7) Once the VM boots once again run inside it:

# echo "t" >/proc/sysrq-trigger; dmesg | grep sched_clock_stable
Observe the sched_clock_stable() value is now 0.
---
 configs/targets/i386-softmmu.mak   |  1 +
 configs/targets/x86_64-softmmu.mak |  1 +
 include/sysemu/kvm.h               |  8 ++++++++
 accel/kvm/kvm-all.c                | 11 +++++++++++
 target/i386/kvm/kvm.c              | 15 +++++++++++++++
 5 files changed, 36 insertions(+)
configs/targets/i386-softmmu.mak +1 -0
index 2ac69d5ba37..2eb0e862500 100644
@@ -1,4 +1,5 @@
 TARGET_ARCH=i386
 TARGET_SUPPORTS_MTTCG=y
 TARGET_KVM_HAVE_GUEST_DEBUG=y
+TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
 TARGET_XML_FILES= gdb-xml/i386-32bit.xml
configs/targets/x86_64-softmmu.mak +1 -0
index e12ac3dc59b..920e9a42006 100644
@@ -2,4 +2,5 @@ TARGET_ARCH=x86_64
 TARGET_BASE_ARCH=i386
 TARGET_SUPPORTS_MTTCG=y
 TARGET_KVM_HAVE_GUEST_DEBUG=y
+TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
 TARGET_XML_FILES= gdb-xml/i386-64bit.xml
include/sysemu/kvm.h +8 -0
index c3a60b28909..ab17c09a551 100644
@@ -377,6 +377,14 @@ int kvm_arch_init(MachineState *ms, KVMState *s);
 int kvm_arch_init_vcpu(CPUState *cpu);
 int kvm_arch_destroy_vcpu(CPUState *cpu);
 
+#ifdef TARGET_KVM_HAVE_RESET_PARKED_VCPU
+void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd);
+#else
+static inline void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd)
+{
+}
+#endif
+
 bool kvm_vcpu_id_is_valid(int vcpu_id);
 
 /* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */
accel/kvm/kvm-all.c +11 -0
index 77d811ca70c..4ab277cc84a 100644
@@ -437,6 +437,16 @@ int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id)
     return kvm_fd;
 }
 
+static void kvm_reset_parked_vcpus(void *param)
+{
+    KVMState *s = param;
+    struct KVMParkedVcpu *cpu;
+
+    QLIST_FOREACH(cpu, &s->kvm_parked_vcpus, node) {
+        kvm_arch_reset_parked_vcpu(cpu->vcpu_id, cpu->kvm_fd);
+    }
+}
+
 int kvm_create_vcpu(CPUState *cpu)
 {
     unsigned long vcpu_id = kvm_arch_vcpu_id(cpu);
@@ -2728,6 +2738,7 @@ static int kvm_init(MachineState *ms)
     }
 
     qemu_register_reset(kvm_unpoison_all, NULL);
+    qemu_register_reset(kvm_reset_parked_vcpus, s);
 
     if (s->kernel_irqchip_allowed) {
         kvm_irqchip_create(s);
target/i386/kvm/kvm.c +15 -0
index 8e17942c3ba..2ff618fbf13 100644
@@ -2415,6 +2415,21 @@ void kvm_arch_after_reset_vcpu(X86CPU *cpu)
     }
 }
 
+void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd)
+{
+    g_autofree struct kvm_msrs *msrs = NULL;
+
+    msrs = g_malloc0(sizeof(*msrs) + sizeof(msrs->entries[0]));
+    msrs->entries[0].index = MSR_IA32_TSC;
+    msrs->entries[0].data = 1; /* match the value in x86_cpu_reset() */
+    msrs->nmsrs++;
+
+    if (ioctl(kvm_fd, KVM_SET_MSRS, msrs) != 1) {
+        warn_report("parked vCPU %lu TSC reset failed: %d",
+                    vcpu_id, errno);
+    }
+}
+
 void kvm_arch_do_init_vcpu(X86CPU *cpu)
 {
     CPUX86State *env = &cpu->env;
Signature · 1 line
2.47.1
#33 lore raw

[PULL 36/41] rust: pl011: match break logic of C version

In reply to Paolo Bonzini

Check loopback_enabled(), not fifo_enabled(), like the C code.

Also, set_break_error() must not happen until the break is read from the FIFO.

---
 rust/hw/char/pl011/src/device.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
rust/hw/char/pl011/src/device.rs +1 -2
index e85d13c5a2b..960ee38ed69 100644
@@ -460,9 +460,8 @@ pub fn can_receive(&self) -> bool {
     }
 
     pub fn event(&mut self, event: QEMUChrEvent) {
-        if event == bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.fifo_enabled() {
+        if event == bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.loopback_enabled() {
             self.put_fifo(DATA_BREAK);
-            self.receive_status_error_clear.set_break_error(true);
         }
     }
 
Signature · 1 line
2.47.1
#34 lore raw

[PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

In reply to Paolo Bonzini

Parameterize the implementation of ClassInitImpl so that it is possible to call up the chain of implementations, one superclass at a time starting at ClassInitImpl<Self::Class>.

In order to avoid having to implement (for example) ClassInitImpl<PL011Class>, also remove the dummy PL011Class and PL011LuminaryClass structs and specify the same ObjectType::Class as the superclass. In the future this default behavior can be handled by a procedural macro, by looking at the first field in the struct.

Note that the new trait is safe: the calls are started by rust_class_init<>(), which is not public and can convert the class pointer to a Rust reference.

Since CLASS_BASE_INIT applies to the type that is being defined, and only to it, move it to ObjectImpl.

---
 rust/hw/char/pl011/src/device.rs  |  19 +----
 rust/qemu-api/src/definitions.rs  | 111 ++++++++++++++++++++++++------
 rust/qemu-api/src/device_class.rs |  50 +++++---------
 rust/qemu-api/src/sysbus.rs       |  18 ++++-
 rust/qemu-api/tests/tests.rs      |   9 +--
 5 files changed, 127 insertions(+), 80 deletions(-)
rust/hw/char/pl011/src/device.rs +2 -17
index 3e29442a625..d9e9f35f456 100644
@@ -13,7 +13,6 @@
     c_str,
     definitions::ObjectImpl,
     device_class::DeviceImpl,
-    impl_device_class,
     irq::InterruptSource,
     prelude::*,
 };
@@ -108,7 +107,7 @@ pub struct PL011State {
 }
 
 unsafe impl ObjectType for PL011State {
-    type Class = PL011Class;
+    type Class = <SysBusDevice as ObjectType>::Class;
     const TYPE_NAME: &'static CStr = crate::TYPE_PL011;
 }
 
@@ -118,11 +117,6 @@ impl ObjectImpl for PL011State {
     const INSTANCE_INIT: Option<unsafe fn(&mut Self)> = Some(Self::init);
 }
 
-#[repr(C)]
-pub struct PL011Class {
-    _inner: [u8; 0],
-}
-
 impl DeviceImpl for PL011State {
     fn properties() -> &'static [Property] {
         &device_class::PL011_PROPERTIES
@@ -134,8 +128,6 @@ fn vmsd() -> Option<&'static VMStateDescription> {
     const RESET: Option<fn(&mut Self)> = Some(Self::reset);
 }
 
-impl_device_class!(PL011State);
-
 impl PL011State {
     /// Initializes a pre-allocated, unitialized instance of `PL011State`.
     ///
@@ -627,11 +619,6 @@ pub struct PL011Luminary {
     parent_obj: PL011State,
 }
 
-#[repr(C)]
-pub struct PL011LuminaryClass {
-    _inner: [u8; 0],
-}
-
 impl PL011Luminary {
     /// Initializes a pre-allocated, unitialized instance of `PL011Luminary`.
     ///
@@ -646,7 +633,7 @@ unsafe fn init(&mut self) {
 }
 
 unsafe impl ObjectType for PL011Luminary {
-    type Class = PL011LuminaryClass;
+    type Class = <PL011State as ObjectType>::Class;
     const TYPE_NAME: &'static CStr = crate::TYPE_PL011_LUMINARY;
 }
 
@@ -657,5 +644,3 @@ impl ObjectImpl for PL011Luminary {
 }
 
 impl DeviceImpl for PL011Luminary {}
-
-impl_device_class!(PL011Luminary);
rust/qemu-api/src/definitions.rs +90 -21

153 lines not on this page · raw message

rust/qemu-api/src/device_class.rs +17 -33

90 lines not on this page · raw message

rust/qemu-api/src/sysbus.rs +17 -1
index 5ee068541cf..5d15b317405 100644
@@ -6,7 +6,13 @@
 
 pub use bindings::{SysBusDevice, SysBusDeviceClass};
 
-use crate::{bindings, cell::bql_locked, irq::InterruptSource, prelude::*};
+use crate::{
+    bindings::{self, DeviceClass},
+    cell::bql_locked,
+    definitions::ClassInitImpl,
+    irq::InterruptSource,
+    prelude::*,
+};
 
 unsafe impl ObjectType for SysBusDevice {
     type Class = SysBusDeviceClass;
@@ -14,6 +20,16 @@ unsafe impl ObjectType for SysBusDevice {
         unsafe { CStr::from_bytes_with_nul_unchecked(bindings::TYPE_SYS_BUS_DEVICE) };
 }
 
+// TODO: add SysBusDeviceImpl
+impl<T> ClassInitImpl<SysBusDeviceClass> for T
+where
+    T: ClassInitImpl<DeviceClass>,
+{
+    fn class_init(sdc: &mut SysBusDeviceClass) {
+        <T as ClassInitImpl<DeviceClass>>::class_init(&mut sdc.parent_class);
+    }
+}
+
 impl SysBusDevice {
     /// Return `self` cast to a mutable pointer, for use in calls to C code.
     const fn as_mut_ptr(&self) -> *mut SysBusDevice {
rust/qemu-api/tests/tests.rs +1 -8
index 278efe967fe..ed3a555e76d 100644
@@ -26,11 +26,6 @@ pub struct DummyState {
         pub migrate_clock: bool,
     }
 
-    #[repr(C)]
-    pub struct DummyClass {
-        pub _parent: DeviceClass,
-    }
-
     declare_properties! {
         DUMMY_PROPERTIES,
             define_property!(
@@ -43,7 +38,7 @@ pub struct DummyClass {
     }
 
     unsafe impl ObjectType for DummyState {
-        type Class = DummyClass;
+        type Class = <DeviceState as ObjectType>::Class;
         const TYPE_NAME: &'static CStr = c_str!("dummy");
     }
 
@@ -61,8 +56,6 @@ fn vmsd() -> Option<&'static VMStateDescription> {
         }
     }
 
-    impl_device_class!(DummyState);
-
     unsafe {
         module_call_init(module_init_type::MODULE_INIT_QOM);
         object_unref(object_new(DummyState::TYPE_NAME.as_ptr()).cast());
Signature · 1 line
2.47.1
#35 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Hi,

Quoted 48 lines · Paolo Bonzini

Parameterize the implementation of ClassInitImpl so that it is possible to call up the chain of implementations, one superclass at a time starting at ClassInitImpl<Self::Class>.

In order to avoid having to implement (for example) ClassInitImpl<PL011Class>, also remove the dummy PL011Class and PL011LuminaryClass structs and specify the same ObjectType::Class as the superclass. In the future this default behavior can be handled by a procedural macro, by looking at the first field in the struct.

Note that the new trait is safe: the calls are started by rust_class_init<>(), which is not public and can convert the class pointer to a Rust reference.

Since CLASS_BASE_INIT applies to the type that is being defined, and only to it, move it to ObjectImpl.

---
  rust/hw/char/pl011/src/device.rs  |  19 +----
  rust/qemu-api/src/definitions.rs  | 111 ++++++++++++++++++++++++------
  rust/qemu-api/src/device_class.rs |  50 +++++---------
  rust/qemu-api/src/sysbus.rs       |  18 ++++-
  rust/qemu-api/tests/tests.rs      |   9 +--
  5 files changed, 127 insertions(+), 80 deletions(-)
rust/qemu-api/src/device_class.rs +2 -12
index c98f0b2c7da..dcec5488291 100644
 
 
-/// # Safety
-///
-/// We expect the FFI user of this function to pass a valid pointer that
-/// can be downcasted to type `DeviceClass`, because `T` implements
-/// `DeviceImpl`.
-pub unsafe extern "C" fn rust_device_class_init<T: DeviceImpl>(
-    klass: *mut ObjectClass,
-    _: *mut c_void,
-) {
-    let mut dc = ::core::ptr::NonNull::new(klass.cast::<DeviceClass>()).unwrap();
-    unsafe {
-        let dc = dc.as_mut();
+impl<T> ClassInitImpl<DeviceClass> for T
+where

rust/qemu-api/src/device_class.rs fn vmsd() -> Option<&'static VMStateDescription> { · line 79

Quoted 10 lines
rust/qemu-api/src/device_class.rs +5 -1
+    T: DeviceImpl,
+{
+    fn class_init(dc: &mut DeviceClass) {
          if <T as DeviceImpl>::REALIZE.is_some() {
              dc.realize = Some(rust_realize_fn::<T>);
          }
          if <T as DeviceImpl>::RESET.is_some() {
-            bindings::device_class_set_legacy_reset(dc, Some(rust_reset_fn::<T>));
+            unsafe {
+                bindings::device_class_set_legacy_reset(dc, Some(rust_reset_fn::<T>));

Pre-existing, but since it appears on this patch, Rust device models should not implement this legacy interface. If a non-Rust parent implements it, I think we should convert the non-Rust parent before adding a Rust child. No clue how to check a parent don't implement this interface in Rust.

Generally, we shouldn't access legacy API from Rust IMHO.

Quoted 14 lines
rust/qemu-api/src/device_class.rs +4 -1
+            }
          }
          if let Some(vmsd) = <T as DeviceImpl>::vmsd() {
              dc.vmsd = vmsd;
          }
          let prop = <T as DeviceImpl>::properties();
          if !prop.is_empty() {
-            bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
+            unsafe {
+                bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
+            }
          }
      }
  }
#36 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Quoted 19 lines
Quoted 19 lines
rust/qemu-api/src/device_class.rs +5 -12
-/// # Safety
-///
-/// We expect the FFI user of this function to pass a valid pointer that
-/// can be downcasted to type `DeviceClass`, because `T` implements
-/// `DeviceImpl`.
-pub unsafe extern "C" fn rust_device_class_init<T: DeviceImpl>(
-    klass: *mut ObjectClass,
-    _: *mut c_void,
-) {
-    let mut dc = ::core::ptr::NonNull::new(klass.cast::<DeviceClass>()).unwrap();
-    unsafe {
-        let dc = dc.as_mut();
+impl<T> ClassInitImpl<DeviceClass> for T
+where
+    T: DeviceImpl,
+{
+    fn class_init(dc: &mut DeviceClass) {
          if <T as DeviceImpl>::REALIZE.is_some() {
              dc.realize = Some(rust_realize_fn::<T>);
Quoted 8 lines

rust/qemu-api/src/device_class.rs fn vmsd() -> Option<&'static VMStateDescription> { · line 79

Quoted 5 lines
          }
          if <T as DeviceImpl>::RESET.is_some() {
rust/qemu-api/src/device_class.rs +2 -1
-            bindings::device_class_set_legacy_reset(dc, Some(rust_reset_fn::<T>));
+            unsafe {
+                bindings::device_class_set_legacy_reset(dc, Some(rust_reset_fn::<T>));

Pre-existing, but since it appears on this patch, Rust device models should not implement this legacy interface.

Rust pl011 is just faithful to the C functionality, and it's really time to make the rust version drop the previous technical debt too!

But I think this patch is OK for now since using legacy interface is the most simplified approach, and next step we can consider how to convert it to the modern interface with proper rust binding (my initial thought tells me that there is at least some effort needed here to explore whether a simple resettable trait would be enough...).

Quoted 4 lines

If a non-Rust parent
implements it, I think we should convert the non-Rust parent before adding a Rust child. No clue how to check a parent don't implement this interface in Rust.

For C side, I also didn't find some case to check parent's legacy_reset before device_class_set_legacy_reset().

Maybe we should add assert(!dc->legacy_reset) in device_class_set_legacy_reset()?

Similarly, device_class_set_parent_[realize|unrealize] are worth adding assert().

If you agree, I'd be happy to add assert() to these three functions as well. :-)

Quoted 17 lines

Generally, we shouldn't access legacy API from Rust IMHO.

Quoted 14 lines
rust/qemu-api/src/device_class.rs +4 -1
+            }
          }
          if let Some(vmsd) = <T as DeviceImpl>::vmsd() {
              dc.vmsd = vmsd;
          }
          let prop = <T as DeviceImpl>::properties();
          if !prop.is_empty() {
-            bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
+            unsafe {
+                bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
+            }
          }
      }
  }
#37 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

+Markus, Daniel & Peter

Quoted 71 lines · Zhao Liu
Quoted 19 lines
Quoted 19 lines
rust/qemu-api/src/device_class.rs +5 -12
-/// # Safety
-///
-/// We expect the FFI user of this function to pass a valid pointer that
-/// can be downcasted to type `DeviceClass`, because `T` implements
-/// `DeviceImpl`.
-pub unsafe extern "C" fn rust_device_class_init<T: DeviceImpl>(
-    klass: *mut ObjectClass,
-    _: *mut c_void,
-) {
-    let mut dc = ::core::ptr::NonNull::new(klass.cast::<DeviceClass>()).unwrap();
-    unsafe {
-        let dc = dc.as_mut();
+impl<T> ClassInitImpl<DeviceClass> for T
+where
+    T: DeviceImpl,
+{
+    fn class_init(dc: &mut DeviceClass) {
           if <T as DeviceImpl>::REALIZE.is_some() {
               dc.realize = Some(rust_realize_fn::<T>);
Quoted 8 lines

rust/qemu-api/src/device_class.rs fn vmsd() -> Option<&'static VMStateDescription> { · line 79

Quoted 5 lines
           }
           if <T as DeviceImpl>::RESET.is_some() {
rust/qemu-api/src/device_class.rs +2 -1
-            bindings::device_class_set_legacy_reset(dc, Some(rust_reset_fn::<T>));
+            unsafe {
+                bindings::device_class_set_legacy_reset(dc, Some(rust_reset_fn::<T>));

Pre-existing, but since it appears on this patch, Rust device models should not implement this legacy interface.

Rust pl011 is just faithful to the C functionality, and it's really time to make the rust version drop the previous technical debt too!

But I think this patch is OK for now since using legacy interface is the most simplified approach, and next step we can consider how to convert it to the modern interface with proper rust binding (my initial thought tells me that there is at least some effort needed here to explore whether a simple resettable trait would be enough...).

Quoted 4 lines

If a non-Rust parent
implements it, I think we should convert the non-Rust parent before adding a Rust child. No clue how to check a parent don't implement this interface in Rust.

For C side, I also didn't find some case to check parent's legacy_reset before device_class_set_legacy_reset().

Maybe we should add assert(!dc->legacy_reset) in device_class_set_legacy_reset()?

Similarly, device_class_set_parent_[realize|unrealize] are worth adding assert().

If you agree, I'd be happy to add assert() to these three functions as well. :-)

Quoted 17 lines

Generally, we shouldn't access legacy API from Rust IMHO.

Quoted 14 lines
rust/qemu-api/src/device_class.rs +4 -1
+            }
           }
           if let Some(vmsd) = <T as DeviceImpl>::vmsd() {
               dc.vmsd = vmsd;
           }
           let prop = <T as DeviceImpl>::properties();
           if !prop.is_empty() {
-            bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
+            unsafe {
+                bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
+            }
           }
       }
   }
#38 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

In reply to Philippe Mathieu-Daudé

Il gio 2 gen 2025, 18:04 Philippe Mathieu-Daudé <[email protected]> ha scritto:

Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+            unsafe {
+                bindings::device_class_set_legacy_reset(dc,

Some(rust_reset_fn::<T>));

Quoted 8 lines

Pre-existing, but since it appears on this patch, Rust device models should not implement this legacy interface. If a non-Rust parent implements it, I think we should convert the non-Rust parent before adding a Rust child. No clue how to check a parent don't implement this interface in Rust.

Generally, we shouldn't access legacy API from Rust IMHO.

I disagree that device_class_set_legacy_reset() should not be used. Three-phase reset is only needed for buses, and requires more code in order to implement the Resettable interface. Devices gain nothing compared to using device_class_set_legacy_reset().

In fact, perhaps it should have been named something like device_class_set_simple_reset()...

Paolo

#39 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Quoted 11 lines · Paolo Bonzini

Il gio 2 gen 2025, 18:04 Philippe Mathieu-Daudé <[email protected]> ha scritto:

Quoted 7 lines

Pre-existing, but since it appears on this patch, Rust device models should not implement this legacy interface. If a non-Rust parent implements it, I think we should convert the non-Rust parent before adding a Rust child. No clue how to check a parent don't implement this interface in Rust.

Generally, we shouldn't access legacy API from Rust IMHO.

I disagree that device_class_set_legacy_reset() should not be used. Three-phase reset is only needed for buses, and requires more code in order to implement the Resettable interface. Devices gain nothing compared to using device_class_set_legacy_reset().

Devices using device_class_set_legacy_reset() *are* using three-phase reset, just with a different function signature:
-- all that device_class_set_legacy_reset() does is register the provided reset function as the 'hold' phase reset via a trivial passthrough function that adjusts for the function signature being slightly different. (This is different from the situation prior to commit 5fdb6cd27211eff, where we still had more of the "legacy reset" machinery around with various transitional handling to make it interwork with three-phase.)

I think here I agree with Philippe that we might as well provide only the new API to Rust devices.

-- PMM

#40 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Il lun 6 gen 2025, 14:32 Peter Maydell <[email protected]> ha scritto:

Quoted 3 lines

I think here I agree with Philippe that we might as well provide only the new API to Rust devices.

Ok, I wasn't thinking of doing that because there isn't right now an easy way to add interfaces to Rust-defined classes. However, all devices are Resettable and Device isn't defined in Rust, so it's not hard to add a ResettableImpl trait in rust/qemu-api/srv/qdev.rs, and initialize it for all devices.

If anybody wants to do it as an exercise, I am happy to help, otherwise I can prepare a patch too.

Paolo

Quoted 3 lines

-- PMM

#41 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Quoted 12 lines · Paolo Bonzini

Date: Mon, 6 Jan 2025 16:21:16 +0100
From: Paolo Bonzini <[email protected]>
Subject: Re: [PULL 25/41] rust: qom: put class_init together from multiple
ClassInitImpl<>

Il lun 6 gen 2025, 14:32 Peter Maydell <[email protected]> ha scritto:

Quoted 3 lines

I think here I agree with Philippe that we might as well provide only the new API to Rust devices.

Quoted 9 lines

Ok, I wasn't thinking of doing that because there isn't right now an easy way to add interfaces to Rust-defined classes. However, all devices are Resettable and Device isn't defined in Rust, so it's not hard to add a ResettableImpl trait in rust/qemu-api/srv/qdev.rs, and initialize it for all devices.

If anybody wants to do it as an exercise, I am happy to help, otherwise I can prepare a patch too.

If possible and if no one else wants to practice, I would also like to give it a try (I'll add it to my list).

Zhao

#42 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Quoted 19 lines · Zhao Liu
Quoted 18 lines · Paolo Bonzini

Date: Mon, 6 Jan 2025 16:21:16 +0100
From: Paolo Bonzini <[email protected]>
Subject: Re: [PULL 25/41] rust: qom: put class_init together from multiple
ClassInitImpl<>

Il lun 6 gen 2025, 14:32 Peter Maydell <[email protected]> ha scritto:

Quoted 3 lines

I think here I agree with Philippe that we might as well provide only the new API to Rust devices.

Ok, I wasn't thinking of doing that because there isn't right now an easy way to add interfaces to Rust-defined classes. However, all devices are Resettable and Device isn't defined in Rust, so it's not hard to add a ResettableImpl trait in rust/qemu-api/srv/qdev.rs, and initialize it for all devices.

Quoted 6 lines
Quoted 3 lines

If anybody wants to do it as an exercise, I am happy to help, otherwise I can prepare a patch too.

If possible and if no one else wants to practice, I would also like to give it a try (I'll add it to my list).

Go ahead! (I'm very busy right now)

Thanks :)

#43 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

In reply to Zhao Liu
Quoted 5 lines · Zhao Liu
Quoted 2 lines

If anybody wants to do it as an exercise, I am happy to help, otherwise I can prepare a patch too.

If possible and if no one else wants to practice, I would also like to give it a try (I'll add it to my list).

Hmm, thinking more about it, it does require a bit that is slightly more complicated than I anticipated, which is a binding to object_class_dynamic_cast(). I placed something completely untested (except it compiles...) in rust-next. It uses a new trait InterfaceType that can be used as

    ResettableClass::interface_init::<T, DeviceState>(dc);

but I don't really like the two parameters and also I don't like that class_init is called differently for classes and interfaces. It's probably possible to design a better API, but I didn't spend too much time on it because it may require rethinking how classes are declared (not a huge deal, as we have only four of them).

Feel free to give it a try, but it seems like a relatively low priority item compared to upstreaming timers (i.e. HPET) and MemoryRegionOps; or figuring out logging.

Paolo

#44 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Quoted 13 lines · Paolo Bonzini
Quoted 5 lines · Zhao Liu
Quoted 2 lines

If anybody wants to do it as an exercise, I am happy to help, otherwise I can prepare a patch too.

If possible and if no one else wants to practice, I would also like to give it a try (I'll add it to my list).

Hmm, thinking more about it, it does require a bit that is slightly more complicated than I anticipated, which is a binding to object_class_dynamic_cast(). I placed something completely untested (except it compiles...) in rust-next. It uses a new trait InterfaceType that can be used as

Quoted 7 lines
     ResettableClass::interface_init::<T, DeviceState>(dc);

but I don't really like the two parameters and also I don't like that class_init is called differently for classes and interfaces. It's probably possible to design a better API, but I didn't spend too much time on it because it may require rethinking how classes are declared (not a huge deal, as we have only four of them).

Are you saying this is not a problem related to QDev Reset, but a limitation with any QOM interface, and we can not instantiate any type implementing TYPE_INTERFACE? As in:

  .interfaces = (InterfaceInfo[]) {
    ...
  },
Quoted 6 lines

Feel free to give it a try, but it seems like a relatively low priority item compared to upstreaming timers (i.e. HPET) and MemoryRegionOps; or figuring out logging.

Paolo

#45 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 5 lines

but I don't really like the two parameters and also I don't like that class_init is called differently for classes and interfaces. It's probably possible to design a better API, but I didn't spend too much time on it because it may require rethinking how classes are declared (not a huge deal, as we have only four of them).

Quoted 7 lines

Are you saying this is not a problem related to QDev Reset, but a limitation with any QOM interface, and we can not instantiate any type implementing TYPE_INTERFACE? As in:

   .interfaces = (InterfaceInfo[]) {
     ...
   },

So far there was no need for that, so it is not implemented. There are three parts:

1) adding interfaces to the TypeInfo

2) filling in vtables for the interfaces

3) filling in the ResettableClass vtable based on a trait

None of these is supported by Rust code right now, but only (2) and
(3) are needed for qdev reset. That's because the Resettable interface is declared in DeviceState rather than in the individual devices.

(2) boils down to wrapping object_class_dynamic_cast into a nice-enough API. The commit that I added to rust-next covers that and it should work, but the API is a bit unorthogonal.

Paolo

#46 lore raw

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

Quoted 24 lines · Paolo Bonzini
Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 5 lines

but I don't really like the two parameters and also I don't like that class_init is called differently for classes and interfaces. It's probably possible to design a better API, but I didn't spend too much time on it because it may require rethinking how classes are declared (not a huge deal, as we have only four of them).

Quoted 7 lines

Are you saying this is not a problem related to QDev Reset, but a limitation with any QOM interface, and we can not instantiate any type implementing TYPE_INTERFACE? As in:

    .interfaces = (InterfaceInfo[]) {
      ...
    },

So far there was no need for that, so it is not implemented. There are three parts:

1) adding interfaces to the TypeInfo

2) filling in vtables for the interfaces

3) filling in the ResettableClass vtable based on a trait

Quoted 7 lines

None of these is supported by Rust code right now, but only (2) and
(3) are needed for qdev reset. That's because the Resettable interface is declared in DeviceState rather than in the individual devices.

(2) boils down to wrapping object_class_dynamic_cast into a nice-enough API. The commit that I added to rust-next covers that and it should work, but the API is a bit unorthogonal.

OK, thanks for explaining.

So currently we can not implement any device requiring one of these interfaces:

$ git grep -hwA1 INTERFACE_CHECK
31:    INTERFACE_CHECK(void, obj, TYPE_RESETTABLE_INTERFACE);
--
12:     INTERFACE_CHECK(AcpiDevAmlIf, (obj), TYPE_ACPI_DEV_AML_IF)
--
24:     INTERFACE_CHECK(AcpiDeviceIf, (obj), \
25-                     TYPE_ACPI_DEVICE_IF)
--
16:    INTERFACE_CHECK(ARMLinuxBootIf, (obj), TYPE_ARM_LINUX_BOOT_IF)
--
29:     INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER)
--
23:     INTERFACE_CHECK(HotplugHandler, (obj), TYPE_HOTPLUG_HANDLER)
--
12:    INTERFACE_CHECK(InterruptStatsProvider, (obj), \
13-                    TYPE_INTERRUPT_STATS_PROVIDER)
--
113:     INTERFACE_CHECK(IPMIInterface, (obj), TYPE_IPMI_INTERFACE)
--
25:    INTERFACE_CHECK(IsaDma, (obj), TYPE_ISADMA)
--
26:     INTERFACE_CHECK(MemoryDeviceState, (obj), TYPE_MEMORY_DEVICE)
--
21:     INTERFACE_CHECK(XlnxCfiIf, (obj), TYPE_XLNX_CFI_IF)
--
33:     INTERFACE_CHECK(NMIState, (obj), TYPE_NMI)
--
30:    INTERFACE_CHECK(PnvXScomInterface, (obj), TYPE_PNV_XSCOM_INTERFACE)
--
50:    INTERFACE_CHECK(SpaprInterruptController, (obj), TYPE_SPAPR_INTC)
--
141:    INTERFACE_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC)
--
156:    INTERFACE_CHECK(XiveNotifier, (obj), TYPE_XIVE_NOTIFIER)
--
431:    INTERFACE_CHECK(XivePresenter, (obj), TYPE_XIVE_PRESENTER)
--
463:    INTERFACE_CHECK(XiveFabric, (obj), TYPE_XIVE_FABRIC)
--
38:    INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
--
12:     INTERFACE_CHECK(StreamSink, (obj), TYPE_STREAM_SINK)
--
20:    INTERFACE_CHECK(VMStateIf, (obj), TYPE_VMSTATE_IF)
--
14:     INTERFACE_CHECK(UserCreatable, (obj), \
15-                     TYPE_USER_CREATABLE)
--
35:    INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
--
35:    INTERFACE_CHECK(IDAUInterface, (obj), TYPE_IDAU_INTERFACE)
--
23:     INTERFACE_CHECK(TestIf, (obj), TYPE_TEST_IF)

Not a big deal at this point, but just to keep it in mind.

Regards,

Phil.

#47 lore raw

[PULL 21/41] include/hw/qdev-properties: Shrink struct Property

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

Before, via pahole:

arm32, a 32-bit host which aligns uint64_t:

struct Property {

        const char  *              name;                 /*     0     4 */
        const PropertyInfo  *      info;                 /*     4     4 */
        ptrdiff_t                  offset;               /*     8     4 */
        uint8_t                    bitnr;                /*    12     1 */

/* XXX 3 bytes hole, try to pack */
uint64_t bitmask; /* 16 8 */
_Bool set_default; /* 24 1 */
/* XXX 7 bytes hole, try to pack */ union {
int64_t i; /* 32 8 */
uint64_t u; /* 32 8 */
} defval; /* 32 8 */
int arrayoffset; /* 40 4 */
const PropertyInfo * arrayinfo; /* 44 4 */
int arrayfieldsize; /* 48 4 */
const char * link_type; /* 52 4 */
/* size: 56, cachelines: 1, members: 11 */ /* sum members: 46, holes: 2, sum holes: 10 */
};

arm64, an arbitrary 64-bit host:

struct Property {

        const char  *              name;                 /*     0     8 */
        const PropertyInfo  *      info;                 /*     8     8 */
        ptrdiff_t                  offset;               /*    16     8 */
        uint8_t                    bitnr;                /*    24     1 */

/* XXX 7 bytes hole, try to pack */
uint64_t bitmask; /* 32 8 */
_Bool set_default; /* 40 1 */
/* XXX 7 bytes hole, try to pack */ union {
int64_t i; /* 48 8 */
uint64_t u; /* 48 8 */
} defval; /* 48 8 */
int arrayoffset; /* 56 4 */
/* XXX 4 bytes hole, try to pack */
const PropertyInfo * arrayinfo; /* 64 8 */
int arrayfieldsize; /* 72 4 */
/* XXX 4 bytes hole, try to pack */
const char * link_type; /* 80 8 */
/* size: 88, cachelines: 2, members: 11 */ /* sum members: 66, holes: 4, sum holes: 22 */
};

Afterward there are no holes in either structure.
For arm32, size 48, padding 2, saved 8 bytes.
For arm64, size 72, padding 6, saved 16 bytes.

Saves 20k from qemu-system-aarch64 on a 64-bit host.

---
 include/hw/qdev-properties.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/hw/qdev-properties.h +4 -4
index ef3fd7b4ae2..3680cd239fb 100644
@@ -16,17 +16,17 @@ struct Property {
     const char   *name;
     const PropertyInfo *info;
     ptrdiff_t    offset;
-    uint8_t      bitnr;
+    const char   *link_type;
     uint64_t     bitmask;
-    bool         set_default;
     union {
         int64_t i;
         uint64_t u;
     } defval;
-    int          arrayoffset;
     const PropertyInfo *arrayinfo;
+    int          arrayoffset;
     int          arrayfieldsize;
-    const char   *link_type;
+    uint8_t      bitnr;
+    bool         set_default;
 };
 
 struct PropertyInfo {
Signature · 1 line
2.47.1
#48 lore raw

[PULL 12/41] include/hw/qdev-core: Detect most empty Property lists at compile time

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 include/hw/qdev-core.h    | 8 ++++++++
 hw/core/qdev-properties.c | 2 +-
 migration/migration.c     | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
include/hw/qdev-core.h +8 -0
index 5be9844412f..b2859d1e39e 100644
@@ -943,6 +943,14 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev);
  */
 void device_class_set_props(DeviceClass *dc, const Property *props);
 
+/* Validate at least one Property, plus the terminator. */
+#define device_class_set_props(DC, PROPS) \
+    do {                                                                \
+        QEMU_BUILD_BUG_ON(sizeof(PROPS) != sizeof(const Property *) &&  \
+                          sizeof(PROPS) < 2 * sizeof(Property));        \
+        (device_class_set_props)(DC, PROPS);                            \
+    } while (0)
+
 /**
  * device_class_set_parent_realize() - set up for chaining realize fns
  * @dc: The device class
hw/core/qdev-properties.c +1 -1
index 315196bd85a..de618a964a9 100644
@@ -1061,7 +1061,7 @@ static void qdev_class_add_legacy_property(DeviceClass *dc, const Property *prop
         NULL, NULL, (Property *)prop);
 }
 
-void device_class_set_props(DeviceClass *dc, const Property *props)
+void (device_class_set_props)(DeviceClass *dc, const Property *props)
 {
     const Property *prop;
 
migration/migration.c +1 -1
index 8c5bd0a75c8..6b3b85d31e5 100644
@@ -3822,7 +3822,7 @@ static void migration_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->user_creatable = false;
-    device_class_set_props(dc, migration_properties);
+    (device_class_set_props)(dc, migration_properties);
 }
 
 static void migration_instance_finalize(Object *obj)
Signature · 1 line
2.47.1
#49 lore raw

[PULL 22/41] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 include/hw/qdev-properties.h | 2 +-
 hw/core/qdev-properties.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/hw/qdev-properties.h +1 -1
index 3680cd239fb..447767688b6 100644
@@ -201,7 +201,7 @@ void qdev_prop_set_enum(DeviceState *dev, const char *name, int value);
 /* Takes ownership of @values */
 void qdev_prop_set_array(DeviceState *dev, const char *name, QList *values);
 
-void *object_field_prop_ptr(Object *obj, Property *prop);
+void *object_field_prop_ptr(Object *obj, const Property *prop);
 
 void qdev_prop_register_global(GlobalProperty *prop);
 const GlobalProperty *qdev_find_global_prop(Object *obj,
hw/core/qdev-properties.c +1 -1
index a3d49e20202..61929b2865a 100644
@@ -51,7 +51,7 @@ void qdev_prop_allow_set_link_before_realize(const Object *obj,
     }
 }
 
-void *object_field_prop_ptr(Object *obj, Property *prop)
+void *object_field_prop_ptr(Object *obj, const Property *prop)
 {
     void *ptr = obj;
     ptr += prop->offset;
Signature · 1 line
2.47.1
#50 lore raw

[PULL 04/41] target/s390x: Use s390x_cpu_properties for system mode only

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

Avoid the empty property list for user-only mode.

---
 target/s390x/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
target/s390x/cpu.c +3 -3
index 4702761ca30..263f9e84ed6 100644
@@ -309,8 +309,8 @@ static const gchar *s390_gdb_arch_name(CPUState *cs)
     return "s390:64-bit";
 }
 
+#ifndef CONFIG_USER_ONLY
 static const Property s390x_cpu_properties[] = {
-#if !defined(CONFIG_USER_ONLY)
     DEFINE_PROP_UINT32("core-id", S390CPU, env.core_id, 0),
     DEFINE_PROP_INT32("socket-id", S390CPU, env.socket_id, -1),
     DEFINE_PROP_INT32("book-id", S390CPU, env.book_id, -1),
@@ -318,9 +318,9 @@ static const Property s390x_cpu_properties[] = {
     DEFINE_PROP_BOOL("dedicated", S390CPU, env.dedicated, false),
     DEFINE_PROP_CPUS390ENTITLEMENT("entitlement", S390CPU, env.entitlement,
                                    S390_CPU_ENTITLEMENT_AUTO),
-#endif
     DEFINE_PROP_END_OF_LIST()
 };
+#endif
 
 #ifdef CONFIG_TCG
 #include "hw/core/tcg-cpu-ops.h"
@@ -388,7 +388,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
 
     device_class_set_parent_realize(dc, s390_cpu_realizefn,
                                     &scc->parent_realize);
-    device_class_set_props(dc, s390x_cpu_properties);
     dc->user_creatable = true;
 
     resettable_class_set_parent_phases(rc, NULL, s390_cpu_reset_hold, NULL,
@@ -404,6 +403,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
     cc->gdb_read_register = s390_cpu_gdb_read_register;
     cc->gdb_write_register = s390_cpu_gdb_write_register;
 #ifndef CONFIG_USER_ONLY
+    device_class_set_props(dc, s390x_cpu_properties);
     s390_cpu_class_init_sysemu(cc);
 #endif
     cc->disas_set_info = s390_cpu_disas_set_info;
Signature · 1 line
2.47.1
#51 lore raw

[PULL 09/41] hw/xen: Remove empty Property lists

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

There is no point in registering no properties. Remove xen_sysdev_class_init entirely, as it did nothing else.

---
 hw/xen/xen-legacy-backend.c | 17 -----------------
 1 file changed, 17 deletions(-)
hw/xen/xen-legacy-backend.c +0 -17
index e8e1ee4f7d8..118c571b3a7 100644
@@ -635,15 +635,10 @@ int xen_be_bind_evtchn(struct XenLegacyDevice *xendev)
 }
 
 
-static Property xendev_properties[] = {
-    DEFINE_PROP_END_OF_LIST(),
-};
-
 static void xendev_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    device_class_set_props(dc, xendev_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     /* xen-backend devices can be plugged/unplugged dynamically */
     dc->user_creatable = true;
@@ -674,22 +669,10 @@ static const TypeInfo xensysbus_info = {
     }
 };
 
-static Property xen_sysdev_properties[] = {
-    {/* end of property list */},
-};
-
-static void xen_sysdev_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-
-    device_class_set_props(dc, xen_sysdev_properties);
-}
-
 static const TypeInfo xensysdev_info = {
     .name          = TYPE_XENSYSDEV,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(SysBusDevice),
-    .class_init    = xen_sysdev_class_init,
 };
 
 static void xenbe_register_types(void)
Signature · 1 line
2.47.1
#52 lore raw

[PULL 39/41] rust: pl011: extend registers to 32 bits

In reply to Paolo Bonzini

The PL011 Technical Reference Manual lists the "real" size of the registers in table 3-1, and only rounds up to the next byte when describing the registers; for example, UARTDR is listed as having width 12/8 (12 bits read, 8 written) and only bits 15:0 are listed in "Table 3-2 UARTDR Register".

However, in practice these are 32-bit registers, accessible only through 32-bit MMIO accesses; preserving the fiction that they're smaller introduces multiple casts (to go from the bilge bitfield type to e.g u16 to u64) and more importantly it breaks the migration stream because the Rust vmstate macros are not yet type safe.

So, just make everything 32-bits wide.

---
 rust/hw/char/pl011/src/device.rs | 36 ++++++++++++++------------------
 rust/hw/char/pl011/src/lib.rs    | 23 +++++++++-----------
 2 files changed, 26 insertions(+), 33 deletions(-)
rust/hw/char/pl011/src/device.rs +16 -20
index 5e3a9c6f581..090e5d64504 100644
@@ -186,9 +186,9 @@ unsafe fn init(&mut self) {
     pub fn read(&mut self, offset: hwaddr, _size: c_uint) -> std::ops::ControlFlow<u64, u64> {
         use RegisterOffset::*;
 
-        std::ops::ControlFlow::Break(match RegisterOffset::try_from(offset) {
+        let value = match RegisterOffset::try_from(offset) {
             Err(v) if (0x3f8..0x400).contains(&(v >> 2)) => {
-                u64::from(self.device_id[(offset - 0xfe0) >> 2])
+                u32::from(self.device_id[(offset - 0xfe0) >> 2])
             }
             Err(_) => {
                 // qemu_log_mask(LOG_GUEST_ERROR, "pl011_read: Bad offset 0x%x\n", (int)offset);
@@ -214,27 +214,25 @@ pub fn read(&mut self, offset: hwaddr, _size: c_uint) -> std::ops::ControlFlow<u
                 let c = u32::from(c);
                 return std::ops::ControlFlow::Continue(u64::from(c));
             }
-            Ok(RSR) => u8::from(self.receive_status_error_clear).into(),
-            Ok(FR) => u16::from(self.flags).into(),
-            Ok(FBRD) => self.fbrd.into(),
-            Ok(ILPR) => self.ilpr.into(),
-            Ok(IBRD) => self.ibrd.into(),
-            Ok(LCR_H) => u16::from(self.line_control).into(),
-            Ok(CR) => {
-                // We exercise our self-control.
-                u16::from(self.control).into()
-            }
-            Ok(FLS) => self.ifl.into(),
-            Ok(IMSC) => self.int_enabled.into(),
-            Ok(RIS) => self.int_level.into(),
-            Ok(MIS) => u64::from(self.int_level & self.int_enabled),
+            Ok(RSR) => u32::from(self.receive_status_error_clear),
+            Ok(FR) => u32::from(self.flags),
+            Ok(FBRD) => self.fbrd,
+            Ok(ILPR) => self.ilpr,
+            Ok(IBRD) => self.ibrd,
+            Ok(LCR_H) => u32::from(self.line_control),
+            Ok(CR) => u32::from(self.control),
+            Ok(FLS) => self.ifl,
+            Ok(IMSC) => self.int_enabled,
+            Ok(RIS) => self.int_level,
+            Ok(MIS) => self.int_level & self.int_enabled,
             Ok(ICR) => {
                 // "The UARTICR Register is the interrupt clear register and is write-only"
                 // Source: ARM DDI 0183G 3.3.13 Interrupt Clear Register, UARTICR
                 0
             }
-            Ok(DMACR) => self.dmacr.into(),
-        })
+            Ok(DMACR) => self.dmacr,
+        };
+        std::ops::ControlFlow::Break(value.into())
     }
 
     pub fn write(&mut self, offset: hwaddr, value: u64) {
@@ -276,7 +274,6 @@ pub fn write(&mut self, offset: hwaddr, value: u64) {
                 self.fbrd = value;
             }
             Ok(LCR_H) => {
-                let value = value as u16;
                 let new_val: registers::LineControl = value.into();
                 // Reset the FIFO state on FIFO enable or disable
                 if bool::from(self.line_control.fifos_enabled())
@@ -303,7 +300,6 @@ pub fn write(&mut self, offset: hwaddr, value: u64) {
             }
             Ok(CR) => {
                 // ??? Need to implement the enable bit.
-                let value = value as u16;
                 self.control = value.into();
                 self.loopback_mdmctrl();
             }
rust/hw/char/pl011/src/lib.rs +10 -13
index 463ae60543b..0747e130cae 100644
@@ -131,12 +131,6 @@ const fn _assert_exhaustive(val: RegisterOffset) {
 pub mod registers {
     //! Device registers exposed as typed structs which are backed by arbitrary
     //! integer bitmaps. [`Data`], [`Control`], [`LineControl`], etc.
-    //!
-    //! All PL011 registers are essentially 32-bit wide, but are typed here as
-    //! bitmaps with only the necessary width. That is, if a struct bitmap
-    //! in this module is for example 16 bits long, it should be conceived
-    //! as a 32-bit register where the unmentioned higher bits are always
-    //! unused thus treated as zero when read or written.
     use bilge::prelude::*;
 
     /// Receive Status Register / Data Register common error bits
@@ -234,10 +228,11 @@ impl Data {
     /// # Source
     /// ARM DDI 0183G 3.3.2 Receive Status Register/Error Clear Register,
     /// UARTRSR/UARTECR
-    #[bitsize(8)]
+    #[bitsize(32)]
     #[derive(Clone, Copy, DebugBits, FromBits)]
     pub struct ReceiveStatusErrorClear {
         pub errors: Errors,
+        _reserved_unpredictable: u24,
     }
 
     impl ReceiveStatusErrorClear {
@@ -257,7 +252,7 @@ fn default() -> Self {
         }
     }
 
-    #[bitsize(16)]
+    #[bitsize(32)]
     #[derive(Clone, Copy, DebugBits, FromBits)]
     /// Flag Register, `UARTFR`
     #[doc(alias = "UARTFR")]
@@ -309,7 +304,7 @@ pub struct Flags {
         pub transmit_fifo_empty: bool,
         /// `RI`, is `true` when `nUARTRI` is `LOW`.
         pub ring_indicator: bool,
-        _reserved_zero_no_modify: u7,
+        _reserved_zero_no_modify: u23,
     }
 
     impl Flags {
@@ -328,7 +323,7 @@ fn default() -> Self {
         }
     }
 
-    #[bitsize(16)]
+    #[bitsize(32)]
     #[derive(Clone, Copy, DebugBits, FromBits)]
     /// Line Control Register, `UARTLCR_H`
     #[doc(alias = "UARTLCR_H")]
@@ -382,8 +377,8 @@ pub struct LineControl {
         /// the PEN bit disables parity checking and generation. See Table 3-11
         /// on page 3-14 for the parity truth table.
         pub sticky_parity: bool,
-        /// 15:8 - Reserved, do not modify, read as zero.
-        _reserved_zero_no_modify: u8,
+        /// 31:8 - Reserved, do not modify, read as zero.
+        _reserved_zero_no_modify: u24,
     }
 
     impl LineControl {
@@ -454,7 +449,7 @@ pub enum WordLength {
     ///
     /// # Source
     /// ARM DDI 0183G, 3.3.8 Control Register, `UARTCR`, Table 3-12
-    #[bitsize(16)]
+    #[bitsize(32)]
     #[doc(alias = "UARTCR")]
     #[derive(Clone, Copy, DebugBits, FromBits)]
     pub struct Control {
@@ -532,6 +527,8 @@ pub struct Control {
         /// CTS hardware flow control is enabled. Data is only transmitted when
         /// the `nUARTCTS` signal is asserted.
         pub cts_hardware_flow_control_enable: bool,
+        /// 31:16 - Reserved, do not modify, read as zero.
+        _reserved_zero_no_modify2: u16,
     }
 
     impl Control {
Signature · 1 line
2.47.1
#53 lore raw

[PULL 05/41] hw/pci-host/astro: Remove empty Property list

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

---
 hw/pci-host/astro.c | 5 -----
 1 file changed, 5 deletions(-)
hw/pci-host/astro.c +0 -5
index 379095b3566..62e9c8acbf4 100644
@@ -461,10 +461,6 @@ static void elroy_pcihost_init(Object *obj)
     qdev_init_gpio_in(DEVICE(obj), elroy_set_irq, ELROY_IRQS);
 }
 
-static Property elroy_pcihost_properties[] = {
-    DEFINE_PROP_END_OF_LIST(),
-};
-
 static const VMStateDescription vmstate_elroy = {
     .name = "Elroy",
     .version_id = 1,
@@ -490,7 +486,6 @@ static void elroy_pcihost_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     device_class_set_legacy_reset(dc, elroy_reset);
-    device_class_set_props(dc, elroy_pcihost_properties);
     dc->vmsd = &vmstate_elroy;
     dc->user_creatable = false;
 }
Signature · 1 line
2.47.1
#54 lore raw
In reply to Paolo Bonzini
Quoted 58 lines · Paolo Bonzini

The following changes since commit 8032c78e556cd0baec111740a6c636863f9bd7c8:

   Merge tag 'firmware-20241216-pull-request' of https://gitlab.com/kraxel/qemu into staging (2024-12-16 14:20:33 -0500)

are available in the Git repository at:

https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 9f832641fa069a88eb41008694cfa5b62d29bc3a:

rust: pl011: simplify handling of the FIFO enabled bit in LCR (2024-12-18 17:52:36 +0100)

----------------------------------------------------------------
* qdev: second part of Property cleanups
* rust: second part of QOM rework
* rust: callbacks wrapper
* rust: pl011 bugfixes
* kvm: cleanup errors in kvm_convert_memory()

----------------------------------------------------------------
Maciej S. Szmigiero (1):
target/i386: Reset TSCs of parked vCPUs too on VM reset

Paolo Bonzini (16):
rust: qom: put class_init together from multiple ClassInitImpl<>
rust: qom: add possibility of overriding unparent
rust: rename qemu-api modules to follow C code a bit more
rust: re-export C types from qemu-api submodules
rust: tests: allow writing more than one test
rust: qom: add casting functionality
rust: qom: add initial subset of methods on Object
rust: qemu-api: add a module to wrap functions and zero-sized closures
kvm: consistently return 0/-errno from kvm_convert_memory
rust: pl011: fix declaration of LineControl bits
rust: pl011: match break logic of C version
rust: pl011: always use reset() method on registers
rust: pl011: fix break errors and definition of Data struct
rust: pl011: extend registers to 32 bits
rust: pl011: fix migration stream
rust: pl011: simplify handling of the FIFO enabled bit in LCR

Richard Henderson (24):
migration: Constify migration_properties
hw/ide: Constify sysbus_ahci_properties
target/ppc: Remove empty property list
target/s390x: Use s390x_cpu_properties for system mode only hw/pci-host/astro: Remove empty Property list
hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM hw/tricore: Remove empty Property lists
hw/s390x: Remove empty Property lists
hw/xen: Remove empty Property lists
hw/sparc: Remove empty Property lists
hw/virtio: Remove empty Property lists include/hw/qdev-core: Detect most empty Property lists at compile time hw/core: Introduce device_class_set_props_n
migration: Use device_class_set_props_n
hw/scsi/megasas: Use device_class_set_props_n hw/arm/armsse: Use device_class_set_props_n

Quoted 8 lines

rust/qemu-api: Use device_class_set_props_n
hw/core: Replace device_class_set_props with a macro target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST include/hw/qdev-properties: Shrink struct Property hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr hw/core/qdev-properties: Constify Property argument to PropertyInfo.print Constify all opaque Property pointers

I posted a v2 of this, and cc'd you. There are, at minimum, two bisection errors in v1.

r~