diff mbox

[RFC,2/4] qdev: Wrap DeviceClass.props setting into a function

Message ID 1415901921-14372-3-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost Nov. 13, 2014, 6:05 p.m. UTC
The property array will become a linked list. Wrap the DeviceClass.props
setting into a function so later we can change how it is set.

Coccinelle semantic patch:

@@
typedef ObjectClass;
identifier class_init_func, klass, data, dc;
expression proplist;
@@
static void class_init_func(ObjectClass *klass, void *data)
{
    ...
    DeviceClass *dc = DEVICE_CLASS(klass);
    ...
-   dc->props = proplist;
+   device_class_add_properties(dc, proplist);
    ...
}

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/9pfs/virtio-9p-device.c         |  2 +-
 hw/acpi/piix4.c                    |  2 +-
 hw/arm/armv7m.c                    |  2 +-
 hw/arm/integratorcp.c              |  2 +-
 hw/arm/musicpal.c                  |  2 +-
 hw/arm/pxa2xx.c                    |  2 +-
 hw/arm/pxa2xx_gpio.c               |  2 +-
 hw/arm/spitz.c                     |  4 ++--
 hw/arm/strongarm.c                 |  2 +-
 hw/audio/ac97.c                    |  2 +-
 hw/audio/adlib.c                   |  2 +-
 hw/audio/cs4231.c                  |  2 +-
 hw/audio/cs4231a.c                 |  2 +-
 hw/audio/gus.c                     |  2 +-
 hw/audio/hda-codec.c               |  2 +-
 hw/audio/intel-hda.c               |  4 ++--
 hw/audio/marvell_88w8618.c         |  2 +-
 hw/audio/pcspk.c                   |  2 +-
 hw/audio/pl041.c                   |  2 +-
 hw/audio/sb16.c                    |  2 +-
 hw/block/fdc.c                     |  6 +++---
 hw/block/nand.c                    |  2 +-
 hw/block/nvme.c                    |  2 +-
 hw/block/onenand.c                 |  2 +-
 hw/block/pflash_cfi01.c            |  2 +-
 hw/block/pflash_cfi02.c            |  2 +-
 hw/block/virtio-blk.c              |  2 +-
 hw/char/debugcon.c                 |  2 +-
 hw/char/escc.c                     |  2 +-
 hw/char/exynos4210_uart.c          |  2 +-
 hw/char/grlib_apbuart.c            |  2 +-
 hw/char/imx_serial.c               |  2 +-
 hw/char/ipoctal232.c               |  2 +-
 hw/char/parallel.c                 |  2 +-
 hw/char/sclpconsole-lm.c           |  2 +-
 hw/char/sclpconsole.c              |  2 +-
 hw/char/serial-isa.c               |  2 +-
 hw/char/serial-pci.c               |  6 +++---
 hw/char/spapr_vty.c                |  2 +-
 hw/char/virtio-console.c           |  2 +-
 hw/char/virtio-serial-bus.c        |  4 ++--
 hw/core/platform-bus.c             |  2 +-
 hw/core/qdev.c                     |  5 +++++
 hw/cpu/a15mpcore.c                 |  2 +-
 hw/cpu/a9mpcore.c                  |  2 +-
 hw/cpu/arm11mpcore.c               |  2 +-
 hw/cpu/realview_mpcore.c           |  2 +-
 hw/display/cg3.c                   |  2 +-
 hw/display/cirrus_vga.c            |  4 ++--
 hw/display/g364fb.c                |  2 +-
 hw/display/milkymist-vgafb.c       |  2 +-
 hw/display/qxl.c                   |  4 ++--
 hw/display/tcx.c                   |  2 +-
 hw/display/vga-isa.c               |  2 +-
 hw/display/vga-pci.c               |  4 ++--
 hw/display/vmware_vga.c            |  2 +-
 hw/dma/i82374.c                    |  2 +-
 hw/dma/pl330.c                     |  2 +-
 hw/dma/pxa2xx_dma.c                |  2 +-
 hw/dma/sparc32_dma.c               |  2 +-
 hw/dma/sun4m_iommu.c               |  2 +-
 hw/dma/xilinx_axidma.c             |  2 +-
 hw/gpio/omap_gpio.c                |  4 ++--
 hw/gpio/zaurus.c                   |  2 +-
 hw/i2c/core.c                      |  2 +-
 hw/i2c/omap_i2c.c                  |  2 +-
 hw/i2c/smbus_eeprom.c              |  2 +-
 hw/i386/intel_iommu.c              |  2 +-
 hw/i386/kvm/i8254.c                |  2 +-
 hw/i386/kvm/ioapic.c               |  2 +-
 hw/i386/kvm/pci-assign.c           |  2 +-
 hw/i386/xen/xen_pvdevice.c         |  2 +-
 hw/ide/ahci.c                      |  2 +-
 hw/ide/cmd646.c                    |  2 +-
 hw/ide/isa.c                       |  2 +-
 hw/ide/mmio.c                      |  2 +-
 hw/ide/qdev.c                      |  8 ++++----
 hw/input/milkymist-softusb.c       |  2 +-
 hw/input/vmmouse.c                 |  2 +-
 hw/intc/apic_common.c              |  2 +-
 hw/intc/arm_gic_common.c           |  2 +-
 hw/intc/etraxfs_pic.c              |  2 +-
 hw/intc/exynos4210_combiner.c      |  2 +-
 hw/intc/exynos4210_gic.c           |  4 ++--
 hw/intc/grlib_irqmp.c              |  2 +-
 hw/intc/i8259_common.c             |  2 +-
 hw/intc/omap_intc.c                |  4 ++--
 hw/intc/openpic.c                  |  2 +-
 hw/intc/openpic_kvm.c              |  2 +-
 hw/intc/xilinx_intc.c              |  2 +-
 hw/ipack/ipack.c                   |  2 +-
 hw/isa/pc87312.c                   |  2 +-
 hw/isa/vt82c686.c                  |  2 +-
 hw/mem/pc-dimm.c                   |  2 +-
 hw/misc/a9scu.c                    |  2 +-
 hw/misc/applesmc.c                 |  2 +-
 hw/misc/arm11scu.c                 |  2 +-
 hw/misc/arm_l2x0.c                 |  2 +-
 hw/misc/arm_sysctl.c               |  2 +-
 hw/misc/debugexit.c                |  2 +-
 hw/misc/eccmemctl.c                |  2 +-
 hw/misc/ivshmem.c                  |  2 +-
 hw/misc/macio/cuda.c               |  2 +-
 hw/misc/macio/macio.c              |  2 +-
 hw/misc/pvpanic.c                  |  2 +-
 hw/misc/vfio.c                     |  2 +-
 hw/net/allwinner_emac.c            |  2 +-
 hw/net/cadence_gem.c               |  2 +-
 hw/net/e1000.c                     |  2 +-
 hw/net/eepro100.c                  |  2 +-
 hw/net/etraxfs_eth.c               |  2 +-
 hw/net/fsl_etsec/etsec.c           |  2 +-
 hw/net/lan9118.c                   |  2 +-
 hw/net/lance.c                     |  2 +-
 hw/net/milkymist-minimac2.c        |  2 +-
 hw/net/mipsnet.c                   |  2 +-
 hw/net/ne2000-isa.c                |  2 +-
 hw/net/ne2000.c                    |  2 +-
 hw/net/opencores_eth.c             |  2 +-
 hw/net/pcnet-pci.c                 |  2 +-
 hw/net/rtl8139.c                   |  2 +-
 hw/net/smc91c111.c                 |  2 +-
 hw/net/spapr_llan.c                |  2 +-
 hw/net/stellaris_enet.c            |  2 +-
 hw/net/virtio-net.c                |  2 +-
 hw/net/vmxnet3.c                   |  2 +-
 hw/net/xgmac.c                     |  2 +-
 hw/net/xilinx_axienet.c            |  2 +-
 hw/net/xilinx_ethlite.c            |  2 +-
 hw/nvram/ds1225y.c                 |  2 +-
 hw/nvram/fw_cfg.c                  |  2 +-
 hw/nvram/mac_nvram.c               |  2 +-
 hw/nvram/spapr_nvram.c             |  2 +-
 hw/pci-bridge/ioh3420.c            |  2 +-
 hw/pci-bridge/pci_bridge_dev.c     |  2 +-
 hw/pci-bridge/xio3130_downstream.c |  2 +-
 hw/pci-host/piix.c                 |  2 +-
 hw/pci-host/ppce500.c              |  2 +-
 hw/pci-host/prep.c                 |  2 +-
 hw/pci-host/q35.c                  |  2 +-
 hw/pci-host/versatile.c            |  2 +-
 hw/pci/pci.c                       |  2 +-
 hw/pci/pcie_port.c                 |  4 ++--
 hw/ppc/spapr_pci.c                 |  2 +-
 hw/ppc/spapr_pci_vfio.c            |  2 +-
 hw/ppc/spapr_vio.c                 |  2 +-
 hw/s390x/ipl.c                     |  2 +-
 hw/s390x/s390-virtio-bus.c         | 10 +++++-----
 hw/s390x/virtio-ccw.c              | 16 ++++++++--------
 hw/scsi/megasas.c                  |  2 +-
 hw/scsi/scsi-bus.c                 |  2 +-
 hw/scsi/scsi-disk.c                |  8 ++++----
 hw/scsi/scsi-generic.c             |  2 +-
 hw/scsi/spapr_vscsi.c              |  2 +-
 hw/scsi/vhost-scsi.c               |  2 +-
 hw/scsi/virtio-scsi.c              |  2 +-
 hw/scsi/vmw_pvscsi.c               |  2 +-
 hw/sd/sdhci.c                      |  2 +-
 hw/sparc/sun4m.c                   |  4 ++--
 hw/sparc64/sun4u.c                 |  4 ++--
 hw/ssi/xilinx_spi.c                |  2 +-
 hw/ssi/xilinx_spips.c              |  2 +-
 hw/timer/a9gtimer.c                |  2 +-
 hw/timer/allwinner-a10-pit.c       |  2 +-
 hw/timer/arm_mptimer.c             |  2 +-
 hw/timer/arm_timer.c               |  2 +-
 hw/timer/grlib_gptimer.c           |  2 +-
 hw/timer/hpet.c                    |  2 +-
 hw/timer/i8254.c                   |  2 +-
 hw/timer/lm32_timer.c              |  2 +-
 hw/timer/m48t59.c                  |  4 ++--
 hw/timer/mc146818rtc.c             |  2 +-
 hw/timer/milkymist-sysctl.c        |  2 +-
 hw/timer/pxa2xx_timer.c            |  4 ++--
 hw/timer/slavio_timer.c            |  2 +-
 hw/timer/xilinx_timer.c            |  2 +-
 hw/tpm/tpm_tis.c                   |  2 +-
 hw/usb/bus.c                       |  2 +-
 hw/usb/ccid-card-emulated.c        |  2 +-
 hw/usb/ccid-card-passthru.c        |  2 +-
 hw/usb/dev-audio.c                 |  2 +-
 hw/usb/dev-hid.c                   |  6 +++---
 hw/usb/dev-mtp.c                   |  2 +-
 hw/usb/dev-network.c               |  2 +-
 hw/usb/dev-serial.c                |  4 ++--
 hw/usb/dev-smartcard-reader.c      |  4 ++--
 hw/usb/dev-storage.c               |  2 +-
 hw/usb/dev-uas.c                   |  2 +-
 hw/usb/hcd-ehci-pci.c              |  2 +-
 hw/usb/hcd-ehci-sysbus.c           |  2 +-
 hw/usb/hcd-ohci.c                  |  4 ++--
 hw/usb/hcd-uhci.c                  |  4 ++--
 hw/usb/hcd-xhci.c                  |  2 +-
 hw/usb/host-libusb.c               |  2 +-
 hw/usb/redirect.c                  |  2 +-
 hw/virtio/virtio-balloon.c         |  2 +-
 hw/virtio/virtio-mmio.c            |  2 +-
 hw/virtio/virtio-pci.c             | 18 +++++++++---------
 hw/virtio/virtio-rng.c             |  2 +-
 hw/xen/xen_pt.c                    |  2 +-
 include/hw/qdev-core.h             |  3 +++
 target-arm/cpu.c                   |  2 +-
 target-i386/cpu.c                  |  4 ++--
 target-microblaze/cpu.c            |  2 +-
 tests/test-qdev-global-props.c     |  2 +-
 205 files changed, 261 insertions(+), 253 deletions(-)
diff mbox

Patch

diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 2572747..bdc9ad8 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -149,7 +149,7 @@  static void virtio_9p_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
 
-    dc->props = virtio_9p_properties;
+    device_class_add_properties(dc, virtio_9p_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     vdc->realize = virtio_9p_device_realize;
     vdc->get_features = virtio_9p_get_features;
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 78c0a6d..2043d77 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -597,7 +597,7 @@  static void piix4_pm_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_BRIDGE_OTHER;
     dc->desc = "PM";
     dc->vmsd = &vmstate_acpi;
-    dc->props = piix4_pm_properties;
+    device_class_add_properties(dc, piix4_pm_properties);
     /*
      * Reason: part of PIIX4 southbridge, needs to be wired up,
      * e.g. by mips_malta_init()
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index ef24ca4..2f05bae 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -275,7 +275,7 @@  static void bitband_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = bitband_init;
-    dc->props = bitband_properties;
+    device_class_add_properties(dc, bitband_properties);
 }
 
 static const TypeInfo bitband_info = {
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index 266ec18..18c2d63 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -555,7 +555,7 @@  static void core_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = integratorcm_init;
-    dc->props = core_properties;
+    device_class_add_properties(dc, core_properties);
 }
 
 static const TypeInfo core_info = {
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 3712de6..234f39f 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -429,7 +429,7 @@  static void mv88w8618_eth_class_init(ObjectClass *klass, void *data)
 
     k->init = mv88w8618_eth_init;
     dc->vmsd = &mv88w8618_eth_vmsd;
-    dc->props = mv88w8618_eth_properties;
+    device_class_add_properties(dc, mv88w8618_eth_properties);
 }
 
 static const TypeInfo mv88w8618_eth_info = {
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index 693dfec..9d21f67 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -1538,7 +1538,7 @@  static void pxa2xx_i2c_class_init(ObjectClass *klass, void *data)
     k->init = pxa2xx_i2c_initfn;
     dc->desc = "PXA2xx I2C Bus Controller";
     dc->vmsd = &vmstate_pxa2xx_i2c;
-    dc->props = pxa2xx_i2c_properties;
+    device_class_add_properties(dc, pxa2xx_i2c_properties);
 }
 
 static const TypeInfo pxa2xx_i2c_info = {
diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c
index 354ccf1..f61e583 100644
--- a/hw/arm/pxa2xx_gpio.c
+++ b/hw/arm/pxa2xx_gpio.c
@@ -337,7 +337,7 @@  static void pxa2xx_gpio_class_init(ObjectClass *klass, void *data)
 
     k->init = pxa2xx_gpio_initfn;
     dc->desc = "PXA2xx GPIO controller";
-    dc->props = pxa2xx_gpio_properties;
+    device_class_add_properties(dc, pxa2xx_gpio_properties);
     dc->vmsd = &vmstate_pxa2xx_gpio_regs;
 }
 
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index a16831c..0a6c2f2 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -1034,7 +1034,7 @@  static void sl_nand_class_init(ObjectClass *klass, void *data)
 
     k->init = sl_nand_init;
     dc->vmsd = &vmstate_sl_nand_info;
-    dc->props = sl_nand_properties;
+    device_class_add_properties(dc, sl_nand_properties);
 }
 
 static const TypeInfo sl_nand_info = {
@@ -1068,7 +1068,7 @@  static void spitz_keyboard_class_init(ObjectClass *klass, void *data)
 
     k->init = spitz_keyboard_init;
     dc->vmsd = &vmstate_spitz_kbd;
-    dc->props = spitz_keyboard_properties;
+    device_class_add_properties(dc, spitz_keyboard_properties);
 }
 
 static const TypeInfo spitz_keyboard_info = {
diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
index 3206345..e2b042d 100644
--- a/hw/arm/strongarm.c
+++ b/hw/arm/strongarm.c
@@ -1322,7 +1322,7 @@  static void strongarm_uart_class_init(ObjectClass *klass, void *data)
     dc->desc = "StrongARM UART controller";
     dc->reset = strongarm_uart_reset;
     dc->vmsd = &vmstate_strongarm_uart_regs;
-    dc->props = strongarm_uart_properties;
+    device_class_add_properties(dc, strongarm_uart_properties);
 }
 
 static const TypeInfo strongarm_uart_info = {
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index 111ec0e..2a8a344 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1411,7 +1411,7 @@  static void ac97_class_init (ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     dc->desc = "Intel 82801AA AC97 Audio";
     dc->vmsd = &vmstate_ac97;
-    dc->props = ac97_properties;
+    device_class_add_properties(dc, ac97_properties);
     dc->reset = ac97_on_reset;
 }
 
diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c
index 656eb37..d2f83b4 100644
--- a/hw/audio/adlib.c
+++ b/hw/audio/adlib.c
@@ -364,7 +364,7 @@  static void adlib_class_initfn (ObjectClass *klass, void *data)
     dc->realize = adlib_realizefn;
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     dc->desc = ADLIB_DESC;
-    dc->props = adlib_properties;
+    device_class_add_properties(dc, adlib_properties);
 }
 
 static const TypeInfo adlib_info = {
diff --git a/hw/audio/cs4231.c b/hw/audio/cs4231.c
index 6325a8c..8a0b095 100644
--- a/hw/audio/cs4231.c
+++ b/hw/audio/cs4231.c
@@ -168,7 +168,7 @@  static void cs4231_class_init(ObjectClass *klass, void *data)
     k->init = cs4231_init1;
     dc->reset = cs_reset;
     dc->vmsd = &vmstate_cs4231;
-    dc->props = cs4231_properties;
+    device_class_add_properties(dc, cs4231_properties);
 }
 
 static const TypeInfo cs4231_info = {
diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c
index f96f561..f595bea 100644
--- a/hw/audio/cs4231a.c
+++ b/hw/audio/cs4231a.c
@@ -687,7 +687,7 @@  static void cs4231a_class_initfn (ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     dc->desc = "Crystal Semiconductor CS4231A";
     dc->vmsd = &vmstate_cs4231a;
-    dc->props = cs4231a_properties;
+    device_class_add_properties(dc, cs4231a_properties);
 }
 
 static const TypeInfo cs4231a_info = {
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index 4a43ce7..381c46c 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -317,7 +317,7 @@  static void gus_class_initfn (ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     dc->desc = "Gravis Ultrasound GF1";
     dc->vmsd = &vmstate_gus;
-    dc->props = gus_properties;
+    device_class_add_properties(dc, gus_properties);
 }
 
 static const TypeInfo gus_info = {
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index 3c03ff5..18aa937 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -662,7 +662,7 @@  static void hda_audio_base_class_init(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     dc->reset = hda_audio_reset;
     dc->vmsd = &vmstate_hda_audio;
-    dc->props = hda_audio_properties;
+    device_class_add_properties(dc, hda_audio_properties);
 }
 
 static const TypeInfo hda_audio_info = {
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 2885231..138ec39 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -1251,7 +1251,7 @@  static void intel_hda_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_MULTIMEDIA_HD_AUDIO;
     dc->reset = intel_hda_reset;
     dc->vmsd = &vmstate_intel_hda;
-    dc->props = intel_hda_properties;
+    device_class_add_properties(dc, intel_hda_properties);
 }
 
 static void intel_hda_class_init_ich6(ObjectClass *klass, void *data)
@@ -1303,7 +1303,7 @@  static void hda_codec_device_class_init(ObjectClass *klass, void *data)
     k->exit = hda_codec_dev_exit;
     set_bit(DEVICE_CATEGORY_SOUND, k->categories);
     k->bus_type = TYPE_HDA_BUS;
-    k->props = hda_props;
+    device_class_add_properties(k, hda_props);
 }
 
 static const TypeInfo hda_codec_device_type_info = {
diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c
index 8699267..60b8124 100644
--- a/hw/audio/marvell_88w8618.c
+++ b/hw/audio/marvell_88w8618.c
@@ -286,7 +286,7 @@  static void mv88w8618_audio_class_init(ObjectClass *klass, void *data)
     k->init = mv88w8618_audio_init;
     dc->reset = mv88w8618_audio_reset;
     dc->vmsd = &mv88w8618_audio_vmsd;
-    dc->props = mv88w8618_audio_properties;
+    device_class_add_properties(dc, mv88w8618_audio_properties);
     /* Reason: pointer property "wm8750" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
index 1d81bbe..8efddd6 100644
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -192,7 +192,7 @@  static void pcspk_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = pcspk_realizefn;
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
-    dc->props = pcspk_properties;
+    device_class_add_properties(dc, pcspk_properties);
     /* Reason: pointer property "pit", realize sets global pcspk_state */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
index 19982f2..6c1066e 100644
--- a/hw/audio/pl041.c
+++ b/hw/audio/pl041.c
@@ -631,7 +631,7 @@  static void pl041_device_class_init(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     dc->reset = pl041_device_reset;
     dc->vmsd = &vmstate_pl041;
-    dc->props = pl041_device_properties;
+    device_class_add_properties(dc, pl041_device_properties);
 }
 
 static const TypeInfo pl041_device_info = {
diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index bda26d0..8427ac1 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -1414,7 +1414,7 @@  static void sb16_class_initfn (ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     dc->desc = "Creative Sound Blaster 16";
     dc->vmsd = &vmstate_sb16;
-    dc->props = sb16_properties;
+    device_class_add_properties(dc, sb16_properties);
 }
 
 static const TypeInfo sb16_info = {
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 739a03e..c103578 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -2305,7 +2305,7 @@  static void isabus_fdc_class_init(ObjectClass *klass, void *data)
     dc->fw_name = "fdc";
     dc->reset = fdctrl_external_reset_isa;
     dc->vmsd = &vmstate_isa_fdc;
-    dc->props = isa_fdc_properties;
+    device_class_add_properties(dc, isa_fdc_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
@@ -2349,7 +2349,7 @@  static void sysbus_fdc_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    dc->props = sysbus_fdc_properties;
+    device_class_add_properties(dc, sysbus_fdc_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
@@ -2369,7 +2369,7 @@  static void sun4m_fdc_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    dc->props = sun4m_fdc_properties;
+    device_class_add_properties(dc, sun4m_fdc_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
diff --git a/hw/block/nand.c b/hw/block/nand.c
index 1882a0c..2f77875 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -435,7 +435,7 @@  static void nand_class_init(ObjectClass *klass, void *data)
     dc->realize = nand_realize;
     dc->reset = nand_reset;
     dc->vmsd = &vmstate_nand;
-    dc->props = nand_properties;
+    device_class_add_properties(dc, nand_properties);
 }
 
 static const TypeInfo nand_info = {
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index b6263dc..90e1ba3 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -870,7 +870,7 @@  static void nvme_class_init(ObjectClass *oc, void *data)
 
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     dc->desc = "Non-Volatile Memory Express";
-    dc->props = nvme_props;
+    device_class_add_properties(dc, nvme_props);
     dc->vmsd = &nvme_vmstate;
 }
 
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 348630d..997c504 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -829,7 +829,7 @@  static void onenand_class_init(ObjectClass *klass, void *data)
 
     k->init = onenand_initfn;
     dc->reset = onenand_system_reset;
-    dc->props = onenand_properties;
+    device_class_add_properties(dc, onenand_properties);
 }
 
 static const TypeInfo onenand_info = {
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 89d380e..89c80bf 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -939,7 +939,7 @@  static void pflash_cfi01_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = pflash_cfi01_realize;
-    dc->props = pflash_cfi01_properties;
+    device_class_add_properties(dc, pflash_cfi01_properties);
     dc->vmsd = &vmstate_pflash;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 8513a17..00ef847 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -743,7 +743,7 @@  static void pflash_cfi02_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = pflash_cfi02_realize;
-    dc->props = pflash_cfi02_properties;
+    device_class_add_properties(dc, pflash_cfi02_properties);
 }
 
 static const TypeInfo pflash_cfi02_info = {
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b19b102..640f1e9 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -817,7 +817,7 @@  static void virtio_blk_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
 
-    dc->props = virtio_blk_properties;
+    device_class_add_properties(dc, virtio_blk_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     vdc->realize = virtio_blk_device_realize;
     vdc->unrealize = virtio_blk_device_unrealize;
diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c
index 36f1c4a..44603ef 100644
--- a/hw/char/debugcon.c
+++ b/hw/char/debugcon.c
@@ -121,7 +121,7 @@  static void debugcon_isa_class_initfn(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = debugcon_isa_realizefn;
-    dc->props = debugcon_isa_properties;
+    device_class_add_properties(dc, debugcon_isa_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
diff --git a/hw/char/escc.c b/hw/char/escc.c
index ba653ef..43aadd8 100644
--- a/hw/char/escc.c
+++ b/hw/char/escc.c
@@ -1034,7 +1034,7 @@  static void escc_class_init(ObjectClass *klass, void *data)
     k->init = escc_init1;
     dc->reset = escc_reset;
     dc->vmsd = &vmstate_escc;
-    dc->props = escc_properties;
+    device_class_add_properties(dc, escc_properties);
 }
 
 static const TypeInfo escc_info = {
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index 7614e58..7e6876a 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -657,7 +657,7 @@  static void exynos4210_uart_class_init(ObjectClass *klass, void *data)
 
     k->init = exynos4210_uart_init;
     dc->reset = exynos4210_uart_reset;
-    dc->props = exynos4210_uart_properties;
+    device_class_add_properties(dc, exynos4210_uart_properties);
     dc->vmsd = &vmstate_exynos4210_uart;
 }
 
diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c
index 35ef661..3409883 100644
--- a/hw/char/grlib_apbuart.c
+++ b/hw/char/grlib_apbuart.c
@@ -280,7 +280,7 @@  static void grlib_apbuart_class_init(ObjectClass *klass, void *data)
 
     k->init = grlib_apbuart_init;
     dc->reset = grlib_apbuart_reset;
-    dc->props = grlib_apbuart_properties;
+    device_class_add_properties(dc, grlib_apbuart_properties);
 }
 
 static const TypeInfo grlib_apbuart_info = {
diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c
index f3fbc77..ab23969 100644
--- a/hw/char/imx_serial.c
+++ b/hw/char/imx_serial.c
@@ -454,7 +454,7 @@  static void imx_serial_class_init(ObjectClass *klass, void *data)
     dc->reset = imx_serial_reset_at_boot;
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
     dc->desc = "i.MX series UART";
-    dc->props = imx32_serial_properties;
+    device_class_add_properties(dc, imx32_serial_properties);
 }
 
 static const TypeInfo imx_serial_info = {
diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c
index c8d5cdb..9bd725b 100644
--- a/hw/char/ipoctal232.c
+++ b/hw/char/ipoctal232.c
@@ -584,7 +584,7 @@  static void ipoctal_class_init(ObjectClass *klass, void *data)
 
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
     dc->desc    = "GE IP-Octal 232 8-channel RS-232 IndustryPack";
-    dc->props   = ipoctal_properties;
+    device_class_add_properties(dc, ipoctal_properties);
     dc->vmsd    = &vmstate_ipoctal;
 }
 
diff --git a/hw/char/parallel.c b/hw/char/parallel.c
index c2b553f..0c8656d 100644
--- a/hw/char/parallel.c
+++ b/hw/char/parallel.c
@@ -624,7 +624,7 @@  static void parallel_isa_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = parallel_isa_realizefn;
     dc->vmsd = &vmstate_parallel_isa;
-    dc->props = parallel_isa_properties;
+    device_class_add_properties(dc, parallel_isa_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c
index a9f5e62..6cf125a 100644
--- a/hw/char/sclpconsole-lm.c
+++ b/hw/char/sclpconsole-lm.c
@@ -354,7 +354,7 @@  static void console_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     SCLPEventClass *ec = SCLP_EVENT_CLASS(klass);
 
-    dc->props = console_properties;
+    device_class_add_properties(dc, console_properties);
     dc->reset = console_reset;
     dc->vmsd = &vmstate_sclplmconsole;
     ec->init = console_init;
diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c
index 79891df..7608f54 100644
--- a/hw/char/sclpconsole.c
+++ b/hw/char/sclpconsole.c
@@ -256,7 +256,7 @@  static void console_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     SCLPEventClass *ec = SCLP_EVENT_CLASS(klass);
 
-    dc->props = console_properties;
+    device_class_add_properties(dc, console_properties);
     dc->reset = console_reset;
     dc->vmsd = &vmstate_sclpconsole;
     ec->init = console_init;
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index c9fcb27..6c33c7e 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -101,7 +101,7 @@  static void serial_isa_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = serial_isa_realizefn;
     dc->vmsd = &vmstate_isa_serial;
-    dc->props = serial_isa_properties;
+    device_class_add_properties(dc, serial_isa_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index f05c9b4..9ab18e0 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -210,7 +210,7 @@  static void serial_pci_class_initfn(ObjectClass *klass, void *data)
     pc->revision = 1;
     pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
     dc->vmsd = &vmstate_pci_serial;
-    dc->props = serial_pci_properties;
+    device_class_add_properties(dc, serial_pci_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
@@ -225,7 +225,7 @@  static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data)
     pc->revision = 1;
     pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
     dc->vmsd = &vmstate_pci_multi_serial;
-    dc->props = multi_2x_serial_pci_properties;
+    device_class_add_properties(dc, multi_2x_serial_pci_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
@@ -240,7 +240,7 @@  static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data)
     pc->revision = 1;
     pc->class_id = PCI_CLASS_COMMUNICATION_SERIAL;
     dc->vmsd = &vmstate_pci_multi_serial;
-    dc->props = multi_4x_serial_pci_properties;
+    device_class_add_properties(dc, multi_4x_serial_pci_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 0adf096..197970b 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -168,7 +168,7 @@  static void spapr_vty_class_init(ObjectClass *klass, void *data)
     k->dt_type = "serial";
     k->dt_compatible = "hvterm1";
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
-    dc->props = spapr_vty_properties;
+    device_class_add_properties(dc, spapr_vty_properties);
     dc->vmsd = &vmstate_spapr_vty;
 }
 
diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c
index 752ed2c..7050c91 100644
--- a/hw/char/virtio-console.c
+++ b/hw/char/virtio-console.c
@@ -188,7 +188,7 @@  static void virtserialport_class_init(ObjectClass *klass, void *data)
     k->unrealize = virtconsole_unrealize;
     k->have_data = flush_buf;
     k->set_guest_connected = set_guest_connected;
-    dc->props = virtserialport_properties;
+    device_class_add_properties(dc, virtserialport_properties);
 }
 
 static const TypeInfo virtserialport_info = {
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index a7b1b68..9cc17bc 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -1025,7 +1025,7 @@  static void virtio_serial_port_class_init(ObjectClass *klass, void *data)
     k->bus_type = TYPE_VIRTIO_SERIAL_BUS;
     k->realize = virtser_port_device_realize;
     k->unrealize = virtser_port_device_unrealize;
-    k->props = virtser_props;
+    device_class_add_properties(k, virtser_props);
 }
 
 static const TypeInfo virtio_serial_port_type_info = {
@@ -1071,7 +1071,7 @@  static void virtio_serial_class_init(ObjectClass *klass, void *data)
 
     QLIST_INIT(&vserdevices.devices);
 
-    dc->props = virtio_serial_properties;
+    device_class_add_properties(dc, virtio_serial_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
     vdc->realize = virtio_serial_device_realize;
     vdc->unrealize = virtio_serial_device_unrealize;
diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c
index 0f052b3..8afc36e 100644
--- a/hw/core/platform-bus.c
+++ b/hw/core/platform-bus.c
@@ -235,7 +235,7 @@  static void platform_bus_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = platform_bus_realize;
-    dc->props = platform_bus_properties;
+    device_class_add_properties(dc, platform_bus_properties);
 }
 
 static const TypeInfo platform_bus_info = {
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 5c6a109..ca4682c 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -1116,6 +1116,11 @@  static void device_initfn(Object *obj)
     QLIST_INIT(&dev->gpios);
 }
 
+void device_class_add_properties(DeviceClass *dc, Property *props)
+{
+    dc->props = props;
+}
+
 static void device_post_init(Object *obj)
 {
     Error *err = NULL;
diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c
index acc419e..2076d64 100644
--- a/hw/cpu/a15mpcore.c
+++ b/hw/cpu/a15mpcore.c
@@ -120,7 +120,7 @@  static void a15mp_priv_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = a15mp_priv_realize;
-    dc->props = a15mp_priv_properties;
+    device_class_add_properties(dc, a15mp_priv_properties);
     /* We currently have no savable state */
 }
 
diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c
index c09358c..8f543e8 100644
--- a/hw/cpu/a9mpcore.c
+++ b/hw/cpu/a9mpcore.c
@@ -160,7 +160,7 @@  static void a9mp_priv_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = a9mp_priv_realize;
-    dc->props = a9mp_priv_properties;
+    device_class_add_properties(dc, a9mp_priv_properties);
 }
 
 static const TypeInfo a9mp_priv_info = {
diff --git a/hw/cpu/arm11mpcore.c b/hw/cpu/arm11mpcore.c
index 717d3e4..02c0525 100644
--- a/hw/cpu/arm11mpcore.c
+++ b/hw/cpu/arm11mpcore.c
@@ -153,7 +153,7 @@  static void mpcore_priv_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = mpcore_priv_realize;
-    dc->props = mpcore_priv_properties;
+    device_class_add_properties(dc, mpcore_priv_properties);
 }
 
 static const TypeInfo mpcore_priv_info = {
diff --git a/hw/cpu/realview_mpcore.c b/hw/cpu/realview_mpcore.c
index c39a2da..b20e8b0 100644
--- a/hw/cpu/realview_mpcore.c
+++ b/hw/cpu/realview_mpcore.c
@@ -120,7 +120,7 @@  static void mpcore_rirq_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = realview_mpcore_realize;
-    dc->props = mpcore_rirq_properties;
+    device_class_add_properties(dc, mpcore_rirq_properties);
 }
 
 static const TypeInfo mpcore_rirq_info = {
diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index 1e6ff2b..9113481 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -375,7 +375,7 @@  static void cg3_class_init(ObjectClass *klass, void *data)
     dc->realize = cg3_realizefn;
     dc->reset = cg3_reset;
     dc->vmsd = &vmstate_cg3;
-    dc->props = cg3_properties;
+    device_class_add_properties(dc, cg3_properties);
 }
 
 static const TypeInfo cg3_info = {
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 8a5b76c..67eaec9 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -2952,7 +2952,7 @@  static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
 
     dc->vmsd  = &vmstate_cirrus_vga;
     dc->realize = isa_cirrus_vga_realizefn;
-    dc->props = isa_cirrus_vga_properties;
+    device_class_add_properties(dc, isa_cirrus_vga_properties);
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
@@ -3029,7 +3029,7 @@  static void cirrus_vga_class_init(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
     dc->desc = "Cirrus CLGD 54xx VGA";
     dc->vmsd = &vmstate_pci_cirrus_vga;
-    dc->props = pci_vga_cirrus_properties;
+    device_class_add_properties(dc, pci_vga_cirrus_properties);
     dc->hotpluggable = false;
 }
 
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index 46f7b41..3e5fef6 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -538,7 +538,7 @@  static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
     dc->desc = "G364 framebuffer";
     dc->reset = g364fb_sysbus_reset;
     dc->vmsd = &vmstate_g364fb;
-    dc->props = g364fb_sysbus_properties;
+    device_class_add_properties(dc, g364fb_sysbus_properties);
 }
 
 static const TypeInfo g364fb_sysbus_info = {
diff --git a/hw/display/milkymist-vgafb.c b/hw/display/milkymist-vgafb.c
index 9b35e76..43431f0 100644
--- a/hw/display/milkymist-vgafb.c
+++ b/hw/display/milkymist-vgafb.c
@@ -326,7 +326,7 @@  static void milkymist_vgafb_class_init(ObjectClass *klass, void *data)
     k->init = milkymist_vgafb_init;
     dc->reset = milkymist_vgafb_reset;
     dc->vmsd = &vmstate_milkymist_vgafb;
-    dc->props = milkymist_vgafb_properties;
+    device_class_add_properties(dc, milkymist_vgafb_properties);
 }
 
 static const TypeInfo milkymist_vgafb_info = {
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index b540dd6..6513829 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2296,7 +2296,7 @@  static void qxl_primary_class_init(ObjectClass *klass, void *data)
     dc->desc = "Spice QXL GPU (primary, vga compatible)";
     dc->reset = qxl_reset_handler;
     dc->vmsd = &qxl_vmstate;
-    dc->props = qxl_properties;
+    device_class_add_properties(dc, qxl_properties);
     dc->hotpluggable = false;
 }
 
@@ -2320,7 +2320,7 @@  static void qxl_secondary_class_init(ObjectClass *klass, void *data)
     dc->desc = "Spice QXL GPU (secondary)";
     dc->reset = qxl_reset_handler;
     dc->vmsd = &qxl_vmstate;
-    dc->props = qxl_properties;
+    device_class_add_properties(dc, qxl_properties);
 }
 
 static const TypeInfo qxl_secondary_info = {
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index a9f9f66..6684c8e 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -1081,7 +1081,7 @@  static void tcx_class_init(ObjectClass *klass, void *data)
     dc->realize = tcx_realizefn;
     dc->reset = tcx_reset;
     dc->vmsd = &vmstate_tcx;
-    dc->props = tcx_properties;
+    device_class_add_properties(dc, tcx_properties);
 }
 
 static const TypeInfo tcx_info = {
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
index 2b480bd..dd6cb3c 100644
--- a/hw/display/vga-isa.c
+++ b/hw/display/vga-isa.c
@@ -86,7 +86,7 @@  static void vga_isa_class_initfn(ObjectClass *klass, void *data)
     dc->realize = vga_isa_realizefn;
     dc->reset = vga_isa_reset;
     dc->vmsd = &vmstate_vga_common;
-    dc->props = vga_isa_properties;
+    device_class_add_properties(dc, vga_isa_properties);
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index db922f1..24760ff 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -304,7 +304,7 @@  static void vga_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_QEMU_VGA;
     k->class_id = PCI_CLASS_DISPLAY_VGA;
     dc->vmsd = &vmstate_vga_pci;
-    dc->props = vga_pci_properties;
+    device_class_add_properties(dc, vga_pci_properties);
     dc->hotpluggable = false;
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
@@ -319,7 +319,7 @@  static void secondary_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_QEMU_VGA;
     k->class_id = PCI_CLASS_DISPLAY_OTHER;
     dc->vmsd = &vmstate_vga_pci;
-    dc->props = secondary_pci_properties;
+    device_class_add_properties(dc, secondary_pci_properties);
     dc->reset = pci_secondary_vga_reset;
 }
 
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 1751f19..bd7a3a0 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -1347,7 +1347,7 @@  static void vmsvga_class_init(ObjectClass *klass, void *data)
     k->subsystem_id = SVGA_PCI_DEVICE_ID;
     dc->reset = vmsvga_reset;
     dc->vmsd = &vmstate_vmware_vga;
-    dc->props = vga_vmware_properties;
+    device_class_add_properties(dc, vga_vmware_properties);
     dc->hotpluggable = false;
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c
index b8ad2e6..9932ff6 100644
--- a/hw/dma/i82374.c
+++ b/hw/dma/i82374.c
@@ -160,7 +160,7 @@  static void i82374_class_init(ObjectClass *klass, void *data)
     
     dc->realize = i82374_isa_realize;
     dc->vmsd = &vmstate_isa_i82374;
-    dc->props = i82374_properties;
+    device_class_add_properties(dc, i82374_properties);
 }
 
 static const TypeInfo i82374_isa_info = {
diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c
index 6b6eaae..95313fe 100644
--- a/hw/dma/pl330.c
+++ b/hw/dma/pl330.c
@@ -1647,7 +1647,7 @@  static void pl330_class_init(ObjectClass *klass, void *data)
 
     dc->realize = pl330_realize;
     dc->reset = pl330_reset;
-    dc->props = pl330_properties;
+    device_class_add_properties(dc, pl330_properties);
     dc->vmsd = &vmstate_pl330;
 }
 
diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c
index d4501fb..23a8668 100644
--- a/hw/dma/pxa2xx_dma.c
+++ b/hw/dma/pxa2xx_dma.c
@@ -558,7 +558,7 @@  static void pxa2xx_dma_class_init(ObjectClass *klass, void *data)
     k->init = pxa2xx_dma_init;
     dc->desc = "PXA2xx DMA controller";
     dc->vmsd = &vmstate_pxa2xx_dma;
-    dc->props = pxa2xx_dma_properties;
+    device_class_add_properties(dc, pxa2xx_dma_properties);
 }
 
 static const TypeInfo pxa2xx_dma_info = {
diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c
index e6a453c..ee95589 100644
--- a/hw/dma/sparc32_dma.c
+++ b/hw/dma/sparc32_dma.c
@@ -302,7 +302,7 @@  static void sparc32_dma_class_init(ObjectClass *klass, void *data)
     k->init = sparc32_dma_init1;
     dc->reset = dma_reset;
     dc->vmsd = &vmstate_dma;
-    dc->props = sparc32_dma_properties;
+    device_class_add_properties(dc, sparc32_dma_properties);
     /* Reason: pointer property "iommu_opaque" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/dma/sun4m_iommu.c b/hw/dma/sun4m_iommu.c
index ec7c2ef..20d9f89 100644
--- a/hw/dma/sun4m_iommu.c
+++ b/hw/dma/sun4m_iommu.c
@@ -373,7 +373,7 @@  static void iommu_class_init(ObjectClass *klass, void *data)
     k->init = iommu_init1;
     dc->reset = iommu_reset;
     dc->vmsd = &vmstate_iommu;
-    dc->props = iommu_properties;
+    device_class_add_properties(dc, iommu_properties);
 }
 
 static const TypeInfo iommu_info = {
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index d06002d..ee05a0f 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -613,7 +613,7 @@  static void axidma_class_init(ObjectClass *klass, void *data)
 
     dc->realize = xilinx_axidma_realize,
     dc->reset = xilinx_axidma_reset;
-    dc->props = axidma_properties;
+    device_class_add_properties(dc, axidma_properties);
 }
 
 static StreamSlaveClass xilinx_axidma_data_stream_class = {
diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c
index 938782a..7ed74e5 100644
--- a/hw/gpio/omap_gpio.c
+++ b/hw/gpio/omap_gpio.c
@@ -758,7 +758,7 @@  static void omap_gpio_class_init(ObjectClass *klass, void *data)
 
     k->init = omap_gpio_init;
     dc->reset = omap_gpif_reset;
-    dc->props = omap_gpio_properties;
+    device_class_add_properties(dc, omap_gpio_properties);
     /* Reason: pointer property "clk" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
@@ -789,7 +789,7 @@  static void omap2_gpio_class_init(ObjectClass *klass, void *data)
 
     k->init = omap2_gpio_init;
     dc->reset = omap2_gpif_reset;
-    dc->props = omap2_gpio_properties;
+    device_class_add_properties(dc, omap2_gpio_properties);
     /* Reason: pointer properties "iclk", "fclk0", ..., "fclk5" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c
index 9408342..affc40a 100644
--- a/hw/gpio/zaurus.c
+++ b/hw/gpio/zaurus.c
@@ -247,7 +247,7 @@  static void scoop_sysbus_class_init(ObjectClass *klass, void *data)
     k->init = scoop_init;
     dc->desc = "Scoop2 Sharp custom ASIC";
     dc->vmsd = &vmstate_scoop_regs;
-    dc->props = scoop_sysbus_properties;
+    device_class_add_properties(dc, scoop_sysbus_properties);
 }
 
 static const TypeInfo scoop_sysbus_info = {
diff --git a/hw/i2c/core.c b/hw/i2c/core.c
index 5a64026..a72f2c0 100644
--- a/hw/i2c/core.c
+++ b/hw/i2c/core.c
@@ -224,7 +224,7 @@  static void i2c_slave_class_init(ObjectClass *klass, void *data)
     k->init = i2c_slave_qdev_init;
     set_bit(DEVICE_CATEGORY_MISC, k->categories);
     k->bus_type = TYPE_I2C_BUS;
-    k->props = i2c_props;
+    device_class_add_properties(k, i2c_props);
 }
 
 static const TypeInfo i2c_slave_type_info = {
diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
index d63278d..dc6bb0e 100644
--- a/hw/i2c/omap_i2c.c
+++ b/hw/i2c/omap_i2c.c
@@ -473,7 +473,7 @@  static void omap_i2c_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
     k->init = omap_i2c_init;
-    dc->props = omap_i2c_properties;
+    device_class_add_properties(dc, omap_i2c_properties);
     dc->reset = omap_i2c_reset;
     /* Reason: pointer properties "iclk", "fclk" */
     dc->cannot_instantiate_with_device_add_yet = true;
diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c
index 72c09cb..79e69ed 100644
--- a/hw/i2c/smbus_eeprom.c
+++ b/hw/i2c/smbus_eeprom.c
@@ -120,7 +120,7 @@  static void smbus_eeprom_class_initfn(ObjectClass *klass, void *data)
     sc->receive_byte = eeprom_receive_byte;
     sc->write_data = eeprom_write_data;
     sc->read_data = eeprom_read_data;
-    dc->props = smbus_eeprom_properties;
+    device_class_add_properties(dc, smbus_eeprom_properties);
     /* Reason: pointer property "data" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 0a4282a..65c322c 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1944,7 +1944,7 @@  static void vtd_class_init(ObjectClass *klass, void *data)
     dc->reset = vtd_reset;
     dc->realize = vtd_realize;
     dc->vmsd = &vtd_vmstate;
-    dc->props = vtd_properties;
+    device_class_add_properties(dc, vtd_properties);
 }
 
 static const TypeInfo vtd_info = {
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index 472af81..a366cf3 100644
--- a/hw/i386/kvm/i8254.c
+++ b/hw/i386/kvm/i8254.c
@@ -316,7 +316,7 @@  static void kvm_pit_class_init(ObjectClass *klass, void *data)
     k->set_channel_gate = kvm_pit_set_gate;
     k->get_channel_info = kvm_pit_get_channel_info;
     dc->reset = kvm_pit_reset;
-    dc->props = kvm_pit_properties;
+    device_class_add_properties(dc, kvm_pit_properties);
 }
 
 static const TypeInfo kvm_pit_info = {
diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
index d2a6c4c..a586a7e 100644
--- a/hw/i386/kvm/ioapic.c
+++ b/hw/i386/kvm/ioapic.c
@@ -150,7 +150,7 @@  static void kvm_ioapic_class_init(ObjectClass *klass, void *data)
     k->pre_save  = kvm_ioapic_get;
     k->post_load = kvm_ioapic_put;
     dc->reset    = kvm_ioapic_reset;
-    dc->props    = kvm_ioapic_properties;
+    device_class_add_properties(dc, kvm_ioapic_properties);
 }
 
 static const TypeInfo kvm_ioapic_info = {
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index bb206da..c53ac01 100644
--- a/hw/i386/kvm/pci-assign.c
+++ b/hw/i386/kvm/pci-assign.c
@@ -1877,7 +1877,7 @@  static void assign_class_init(ObjectClass *klass, void *data)
     k->exit         = assigned_exitfn;
     k->config_read  = assigned_dev_pci_read_config;
     k->config_write = assigned_dev_pci_write_config;
-    dc->props       = assigned_dev_properties;
+    device_class_add_properties(dc, assigned_dev_properties);
     dc->vmsd        = &vmstate_assigned_device;
     dc->reset       = reset_assigned_device;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index c218947..194727a 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -117,7 +117,7 @@  static void xen_pv_class_init(ObjectClass *klass, void *data)
     k->init = xen_pv_init;
     k->class_id = PCI_CLASS_SYSTEM_OTHER;
     dc->desc = "Xen PV Device";
-    dc->props = xen_pv_props;
+    device_class_add_properties(dc, xen_pv_props);
 }
 
 static const TypeInfo xen_pv_type_info = {
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 61dbed1..9a3dff7 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1425,7 +1425,7 @@  static void sysbus_ahci_class_init(ObjectClass *klass, void *data)
 
     dc->realize = sysbus_ahci_realize;
     dc->vmsd = &vmstate_sysbus_ahci;
-    dc->props = sysbus_ahci_properties;
+    device_class_add_properties(dc, sysbus_ahci_properties);
     dc->reset = sysbus_ahci_reset;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index c8b0322..2b9d83a 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -418,7 +418,7 @@  static void cmd646_ide_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_STORAGE_IDE;
     k->config_read = cmd646_pci_config_read;
     k->config_write = cmd646_pci_config_write;
-    dc->props = cmd646_ide_properties;
+    device_class_add_properties(dc, cmd646_ide_properties);
 }
 
 static const TypeInfo cmd646_ide_info = {
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index b084162..d4b3dd1 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -116,7 +116,7 @@  static void isa_ide_class_initfn(ObjectClass *klass, void *data)
     dc->realize = isa_ide_realizefn;
     dc->fw_name = "ide";
     dc->reset = isa_ide_reset;
-    dc->props = isa_ide_properties;
+    device_class_add_properties(dc, isa_ide_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index b6ce62a..d0ffb83 100644
--- a/hw/ide/mmio.c
+++ b/hw/ide/mmio.c
@@ -151,7 +151,7 @@  static void mmio_ide_class_init(ObjectClass *oc, void *data)
 
     dc->realize = mmio_ide_realizefn;
     dc->reset = mmio_ide_reset;
-    dc->props = mmio_ide_properties;
+    device_class_add_properties(dc, mmio_ide_properties);
     dc->vmsd = &vmstate_ide_mmio;
 }
 
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index b4f096e..d6dcfdb 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -277,7 +277,7 @@  static void ide_hd_class_init(ObjectClass *klass, void *data)
     k->init = ide_hd_initfn;
     dc->fw_name = "drive";
     dc->desc = "virtual IDE disk";
-    dc->props = ide_hd_properties;
+    device_class_add_properties(dc, ide_hd_properties);
 }
 
 static const TypeInfo ide_hd_info = {
@@ -299,7 +299,7 @@  static void ide_cd_class_init(ObjectClass *klass, void *data)
     k->init = ide_cd_initfn;
     dc->fw_name = "drive";
     dc->desc = "virtual IDE CD-ROM";
-    dc->props = ide_cd_properties;
+    device_class_add_properties(dc, ide_cd_properties);
 }
 
 static const TypeInfo ide_cd_info = {
@@ -321,7 +321,7 @@  static void ide_drive_class_init(ObjectClass *klass, void *data)
     k->init = ide_drive_initfn;
     dc->fw_name = "drive";
     dc->desc = "virtual IDE disk or CD-ROM (legacy)";
-    dc->props = ide_drive_properties;
+    device_class_add_properties(dc, ide_drive_properties);
 }
 
 static const TypeInfo ide_drive_info = {
@@ -337,7 +337,7 @@  static void ide_device_class_init(ObjectClass *klass, void *data)
     k->init = ide_qdev_init;
     set_bit(DEVICE_CATEGORY_STORAGE, k->categories);
     k->bus_type = TYPE_IDE_BUS;
-    k->props = ide_props;
+    device_class_add_properties(k, ide_props);
 }
 
 static const TypeInfo ide_device_type_info = {
diff --git a/hw/input/milkymist-softusb.c b/hw/input/milkymist-softusb.c
index 5a427f0..9e39e71 100644
--- a/hw/input/milkymist-softusb.c
+++ b/hw/input/milkymist-softusb.c
@@ -294,7 +294,7 @@  static void milkymist_softusb_class_init(ObjectClass *klass, void *data)
     k->init = milkymist_softusb_init;
     dc->reset = milkymist_softusb_reset;
     dc->vmsd = &vmstate_milkymist_softusb;
-    dc->props = milkymist_softusb_properties;
+    device_class_add_properties(dc, milkymist_softusb_properties);
 }
 
 static const TypeInfo milkymist_softusb_info = {
diff --git a/hw/input/vmmouse.c b/hw/input/vmmouse.c
index d7b1c76..ad548fa 100644
--- a/hw/input/vmmouse.c
+++ b/hw/input/vmmouse.c
@@ -283,7 +283,7 @@  static void vmmouse_class_initfn(ObjectClass *klass, void *data)
     dc->realize = vmmouse_realizefn;
     dc->reset = vmmouse_reset;
     dc->vmsd = &vmstate_vmmouse;
-    dc->props = vmmouse_properties;
+    device_class_add_properties(dc, vmmouse_properties);
     /* Reason: pointer property "ps2_mouse" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index 4e62f25..2223fb2 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -431,7 +431,7 @@  static void apic_common_class_init(ObjectClass *klass, void *data)
 
     dc->vmsd = &vmstate_apic_common;
     dc->reset = apic_reset_common;
-    dc->props = apic_properties_common;
+    device_class_add_properties(dc, apic_properties_common);
     idc->realize = apic_common_realize;
     /*
      * Reason: APIC and CPU need to be wired up by
diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
index 18b01ba..500a8e6 100644
--- a/hw/intc/arm_gic_common.c
+++ b/hw/intc/arm_gic_common.c
@@ -158,7 +158,7 @@  static void arm_gic_common_class_init(ObjectClass *klass, void *data)
 
     dc->reset = arm_gic_common_reset;
     dc->realize = arm_gic_common_realize;
-    dc->props = arm_gic_common_properties;
+    device_class_add_properties(dc, arm_gic_common_properties);
     dc->vmsd = &vmstate_gic;
 }
 
diff --git a/hw/intc/etraxfs_pic.c b/hw/intc/etraxfs_pic.c
index 636262b..ffa44ee 100644
--- a/hw/intc/etraxfs_pic.c
+++ b/hw/intc/etraxfs_pic.c
@@ -169,7 +169,7 @@  static void etraxfs_pic_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = etraxfs_pic_init;
-    dc->props = etraxfs_pic_properties;
+    device_class_add_properties(dc, etraxfs_pic_properties);
     /*
      * Note: pointer property "interrupt_vector" may remain null, thus
      * no need for dc->cannot_instantiate_with_device_add_yet = true;
diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
index a6b7028..92b8d53 100644
--- a/hw/intc/exynos4210_combiner.c
+++ b/hw/intc/exynos4210_combiner.c
@@ -439,7 +439,7 @@  static void exynos4210_combiner_class_init(ObjectClass *klass, void *data)
 
     k->init = exynos4210_combiner_init;
     dc->reset = exynos4210_combiner_reset;
-    dc->props = exynos4210_combiner_properties;
+    device_class_add_properties(dc, exynos4210_combiner_properties);
     dc->vmsd = &vmstate_exynos4210_combiner;
 }
 
diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c
index 0590d5d..878b084 100644
--- a/hw/intc/exynos4210_gic.c
+++ b/hw/intc/exynos4210_gic.c
@@ -349,7 +349,7 @@  static void exynos4210_gic_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = exynos4210_gic_init;
-    dc->props = exynos4210_gic_properties;
+    device_class_add_properties(dc, exynos4210_gic_properties);
 }
 
 static const TypeInfo exynos4210_gic_info = {
@@ -454,7 +454,7 @@  static void exynos4210_irq_gate_class_init(ObjectClass *klass, void *data)
     k->init = exynos4210_irq_gate_init;
     dc->reset = exynos4210_irq_gate_reset;
     dc->vmsd = &vmstate_exynos4210_irq_gate;
-    dc->props = exynos4210_irq_gate_properties;
+    device_class_add_properties(dc, exynos4210_irq_gate_properties);
 }
 
 static const TypeInfo exynos4210_irq_gate_info = {
diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c
index d1813f7..56322b9 100644
--- a/hw/intc/grlib_irqmp.c
+++ b/hw/intc/grlib_irqmp.c
@@ -354,7 +354,7 @@  static void grlib_irqmp_class_init(ObjectClass *klass, void *data)
 
     k->init = grlib_irqmp_init;
     dc->reset = grlib_irqmp_reset;
-    dc->props = grlib_irqmp_properties;
+    device_class_add_properties(dc, grlib_irqmp_properties);
     /* Reason: pointer properties "set_pil_in", "set_pil_in_opaque" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c
index fbf26e5..aae95cb 100644
--- a/hw/intc/i8259_common.c
+++ b/hw/intc/i8259_common.c
@@ -134,7 +134,7 @@  static void pic_common_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->vmsd = &vmstate_pic_common;
-    dc->props = pic_properties_common;
+    device_class_add_properties(dc, pic_properties_common);
     dc->realize = pic_common_realize;
     /*
      * Reason: unlike ordinary ISA devices, the PICs need additional
diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c
index ad3931c..b72b459 100644
--- a/hw/intc/omap_intc.c
+++ b/hw/intc/omap_intc.c
@@ -391,7 +391,7 @@  static void omap_intc_class_init(ObjectClass *klass, void *data)
 
     k->init = omap_intc_init;
     dc->reset = omap_inth_reset;
-    dc->props = omap_intc_properties;
+    device_class_add_properties(dc, omap_intc_properties);
     /* Reason: pointer property "clk" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
@@ -638,7 +638,7 @@  static void omap2_intc_class_init(ObjectClass *klass, void *data)
 
     k->init = omap2_intc_init;
     dc->reset = omap_inth_reset;
-    dc->props = omap2_intc_properties;
+    device_class_add_properties(dc, omap2_intc_properties);
     /* Reason: pointer property "iclk", "fclk" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 7d1f3b9..88daa1b 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -1651,7 +1651,7 @@  static void openpic_class_init(ObjectClass *oc, void *data)
     DeviceClass *dc = DEVICE_CLASS(oc);
 
     dc->realize = openpic_realize;
-    dc->props = openpic_properties;
+    device_class_add_properties(dc, openpic_properties);
     dc->reset = openpic_reset;
 }
 
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index 3e2cd18..529bded 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -274,7 +274,7 @@  static void kvm_openpic_class_init(ObjectClass *oc, void *data)
     DeviceClass *dc = DEVICE_CLASS(oc);
 
     dc->realize = kvm_openpic_realize;
-    dc->props = kvm_openpic_properties;
+    device_class_add_properties(dc, kvm_openpic_properties);
     dc->reset = kvm_openpic_reset;
 }
 
diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c
index 12804ab..c8f9694 100644
--- a/hw/intc/xilinx_intc.c
+++ b/hw/intc/xilinx_intc.c
@@ -182,7 +182,7 @@  static void xilinx_intc_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    dc->props = xilinx_intc_properties;
+    device_class_add_properties(dc, xilinx_intc_properties);
 }
 
 static const TypeInfo xilinx_intc_info = {
diff --git a/hw/ipack/ipack.c b/hw/ipack/ipack.c
index 59bfe28..4411d46 100644
--- a/hw/ipack/ipack.c
+++ b/hw/ipack/ipack.c
@@ -82,7 +82,7 @@  static void ipack_device_class_init(ObjectClass *klass, void *data)
     k->bus_type = TYPE_IPACK_BUS;
     k->realize = ipack_device_realize;
     k->unrealize = ipack_device_unrealize;
-    k->props = ipack_device_props;
+    device_class_add_properties(k, ipack_device_props);
 }
 
 const VMStateDescription vmstate_ipack_device = {
diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index 40a1106..04ccf75 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -379,7 +379,7 @@  static void pc87312_class_init(ObjectClass *klass, void *data)
     dc->realize = pc87312_realize;
     dc->reset = pc87312_reset;
     dc->vmsd = &vmstate_pc87312;
-    dc->props = pc87312_properties;
+    device_class_add_properties(dc, pc87312_properties);
 }
 
 static const TypeInfo pc87312_type_info = {
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index e0c235c..890ffba 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -403,7 +403,7 @@  static void via_pm_class_init(ObjectClass *klass, void *data)
     dc->desc = "PM";
     dc->vmsd = &vmstate_acpi;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
-    dc->props = via_pm_properties;
+    device_class_add_properties(dc, via_pm_properties);
 }
 
 static const TypeInfo via_pm_info = {
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index a800ea7..ba8f38c 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -271,7 +271,7 @@  static void pc_dimm_class_init(ObjectClass *oc, void *data)
     PCDIMMDeviceClass *ddc = PC_DIMM_CLASS(oc);
 
     dc->realize = pc_dimm_realize;
-    dc->props = pc_dimm_properties;
+    device_class_add_properties(dc, pc_dimm_properties);
 
     ddc->get_memory_region = pc_dimm_get_memory_region;
 }
diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c
index 4434945..d9a45c5 100644
--- a/hw/misc/a9scu.c
+++ b/hw/misc/a9scu.c
@@ -131,7 +131,7 @@  static void a9_scu_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    dc->props = a9_scu_properties;
+    device_class_add_properties(dc, a9_scu_properties);
     dc->vmsd = &vmstate_a9_scu;
     dc->reset = a9_scu_reset;
 }
diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
index 6a56b07..5306c05 100644
--- a/hw/misc/applesmc.c
+++ b/hw/misc/applesmc.c
@@ -261,7 +261,7 @@  static void qdev_applesmc_class_init(ObjectClass *klass, void *data)
 
     dc->realize = applesmc_isa_realize;
     dc->reset = qdev_applesmc_isa_reset;
-    dc->props = applesmc_isa_properties;
+    device_class_add_properties(dc, applesmc_isa_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
diff --git a/hw/misc/arm11scu.c b/hw/misc/arm11scu.c
index a791675..8a8f340 100644
--- a/hw/misc/arm11scu.c
+++ b/hw/misc/arm11scu.c
@@ -81,7 +81,7 @@  static void arm11_scu_class_init(ObjectClass *oc, void *data)
     DeviceClass *dc = DEVICE_CLASS(oc);
 
     dc->realize = arm11_scu_realize;
-    dc->props = arm11_scu_properties;
+    device_class_add_properties(dc, arm11_scu_properties);
 }
 
 static const TypeInfo arm11_scu_type_info = {
diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c
index 9e220c9..430a3c0 100644
--- a/hw/misc/arm_l2x0.c
+++ b/hw/misc/arm_l2x0.c
@@ -179,7 +179,7 @@  static void l2x0_class_init(ObjectClass *klass, void *data)
 
     k->init = l2x0_priv_init;
     dc->vmsd = &vmstate_l2x0;
-    dc->props = l2x0_properties;
+    device_class_add_properties(dc, l2x0_properties);
     dc->reset = l2x0_priv_reset;
 }
 
diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c
index 3fad6f8..22c9268 100644
--- a/hw/misc/arm_sysctl.c
+++ b/hw/misc/arm_sysctl.c
@@ -636,7 +636,7 @@  static void arm_sysctl_class_init(ObjectClass *klass, void *data)
     dc->realize = arm_sysctl_realize;
     dc->reset = arm_sysctl_reset;
     dc->vmsd = &vmstate_arm_sysctl;
-    dc->props = arm_sysctl_properties;
+    device_class_add_properties(dc, arm_sysctl_properties);
 }
 
 static const TypeInfo arm_sysctl_info = {
diff --git a/hw/misc/debugexit.c b/hw/misc/debugexit.c
index 69a1b00..4116de2 100644
--- a/hw/misc/debugexit.c
+++ b/hw/misc/debugexit.c
@@ -57,7 +57,7 @@  static void debug_exit_class_initfn(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = debug_exit_realizefn;
-    dc->props = debug_exit_properties;
+    device_class_add_properties(dc, debug_exit_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
diff --git a/hw/misc/eccmemctl.c b/hw/misc/eccmemctl.c
index 8bad6f6..0b20e6c 100644
--- a/hw/misc/eccmemctl.c
+++ b/hw/misc/eccmemctl.c
@@ -325,7 +325,7 @@  static void ecc_class_init(ObjectClass *klass, void *data)
     k->init = ecc_init1;
     dc->reset = ecc_reset;
     dc->vmsd = &vmstate_ecc;
-    dc->props = ecc_properties;
+    device_class_add_properties(dc, ecc_properties);
 }
 
 static const TypeInfo ecc_info = {
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 5d272c8..dfa84c9 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -873,7 +873,7 @@  static void ivshmem_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_IVSHMEM;
     k->class_id = PCI_CLASS_MEMORY_RAM;
     dc->reset = ivshmem_reset;
-    dc->props = ivshmem_properties;
+    device_class_add_properties(dc, ivshmem_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index b4273aa..ff6b079 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -736,7 +736,7 @@  static void cuda_class_init(ObjectClass *oc, void *data)
     dc->realize = cuda_realizefn;
     dc->reset = cuda_reset;
     dc->vmsd = &vmstate_cuda;
-    dc->props = cuda_properties;
+    device_class_add_properties(dc, cuda_properties);
 }
 
 static const TypeInfo cuda_type_info = {
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index e0f1e88..59aa5a5 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -364,7 +364,7 @@  static void macio_class_init(ObjectClass *klass, void *data)
 
     k->vendor_id = PCI_VENDOR_ID_APPLE;
     k->class_id = PCI_CLASS_OTHERS << 8;
-    dc->props = macio_properties;
+    device_class_add_properties(dc, macio_properties);
 }
 
 static const TypeInfo macio_oldworld_type_info = {
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index 994f8af..0a77dee 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -124,7 +124,7 @@  static void pvpanic_isa_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = pvpanic_isa_realizefn;
-    dc->props = pvpanic_isa_properties;
+    device_class_add_properties(dc, pvpanic_isa_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index fd318a1..cd3f658 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -4400,7 +4400,7 @@  static void vfio_pci_dev_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *pdc = PCI_DEVICE_CLASS(klass);
 
     dc->reset = vfio_pci_reset;
-    dc->props = vfio_pci_dev_properties;
+    device_class_add_properties(dc, vfio_pci_dev_properties);
     dc->vmsd = &vfio_pci_vmstate;
     dc->desc = "VFIO-based PCI device assignment";
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c
index d780ba0..e88e68a 100644
--- a/hw/net/allwinner_emac.c
+++ b/hw/net/allwinner_emac.c
@@ -520,7 +520,7 @@  static void aw_emac_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = aw_emac_realize;
-    dc->props = aw_emac_properties;
+    device_class_add_properties(dc, aw_emac_properties);
     dc->reset = aw_emac_reset;
     dc->vmsd = &vmstate_aw_emac;
 }
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index de26609..721f0fa 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -1278,7 +1278,7 @@  static void gem_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
 
     sdc->init = gem_init;
-    dc->props = gem_properties;
+    device_class_add_properties(dc, gem_properties);
     dc->vmsd = &vmstate_cadence_gem;
     dc->reset = gem_reset;
 }
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index e33a4da..4a7322f 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -1616,7 +1616,7 @@  static void e1000_class_init(ObjectClass *klass, void *data)
     dc->desc = "Intel Gigabit Ethernet";
     dc->reset = qdev_e1000_reset;
     dc->vmsd = &vmstate_e1000;
-    dc->props = e1000_properties;
+    device_class_add_properties(dc, e1000_properties);
 }
 
 static void e1000_instance_init(Object *obj)
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index 4877bfd..59fa4ce 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -2086,7 +2086,7 @@  static void eepro100_class_init(ObjectClass *klass, void *data)
     info = eepro100_get_class_by_name(object_class_get_name(klass));
 
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
-    dc->props = e100_properties;
+    device_class_add_properties(dc, e100_properties);
     dc->desc = info->desc;
     k->vendor_id = PCI_VENDOR_ID_INTEL;
     k->class_id = PCI_CLASS_NETWORK_ETHERNET;
diff --git a/hw/net/etraxfs_eth.c b/hw/net/etraxfs_eth.c
index 6a3c86db..5c7ca8e 100644
--- a/hw/net/etraxfs_eth.c
+++ b/hw/net/etraxfs_eth.c
@@ -645,7 +645,7 @@  static void etraxfs_eth_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = fs_eth_init;
-    dc->props = etraxfs_eth_properties;
+    device_class_add_properties(dc, etraxfs_eth_properties);
     /* Reason: pointer properties "dma_out", "dma_in" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
index d4b4429..2b6ff36 100644
--- a/hw/net/fsl_etsec/etsec.c
+++ b/hw/net/fsl_etsec/etsec.c
@@ -420,7 +420,7 @@  static void etsec_class_init(ObjectClass *klass, void *data)
 
     dc->realize = etsec_realize;
     dc->reset = etsec_reset;
-    dc->props = etsec_properties;
+    device_class_add_properties(dc, etsec_properties);
 }
 
 static TypeInfo etsec_info = {
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index e528290..77527f6 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -1371,7 +1371,7 @@  static void lan9118_class_init(ObjectClass *klass, void *data)
 
     k->init = lan9118_init1;
     dc->reset = lan9118_reset;
-    dc->props = lan9118_properties;
+    device_class_add_properties(dc, lan9118_properties);
     dc->vmsd = &vmstate_lan9118;
 }
 
diff --git a/hw/net/lance.c b/hw/net/lance.c
index a1c49f1..baacb05 100644
--- a/hw/net/lance.c
+++ b/hw/net/lance.c
@@ -170,7 +170,7 @@  static void lance_class_init(ObjectClass *klass, void *data)
     dc->fw_name = "ethernet";
     dc->reset = lance_reset;
     dc->vmsd = &vmstate_lance;
-    dc->props = lance_properties;
+    device_class_add_properties(dc, lance_properties);
     /* Reason: pointer property "dma" */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c
index c632672..d79cd21 100644
--- a/hw/net/milkymist-minimac2.c
+++ b/hw/net/milkymist-minimac2.c
@@ -531,7 +531,7 @@  static void milkymist_minimac2_class_init(ObjectClass *klass, void *data)
     k->init = milkymist_minimac2_init;
     dc->reset = milkymist_minimac2_reset;
     dc->vmsd = &vmstate_milkymist_minimac2;
-    dc->props = milkymist_minimac2_properties;
+    device_class_add_properties(dc, milkymist_minimac2_properties);
 }
 
 static const TypeInfo milkymist_minimac2_info = {
diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c
index b26c369..454403a 100644
--- a/hw/net/mipsnet.c
+++ b/hw/net/mipsnet.c
@@ -271,7 +271,7 @@  static void mipsnet_class_init(ObjectClass *klass, void *data)
     dc->desc = "MIPS Simulator network device";
     dc->reset = mipsnet_sysbus_reset;
     dc->vmsd = &vmstate_mipsnet;
-    dc->props = mipsnet_properties;
+    device_class_add_properties(dc, mipsnet_properties);
 }
 
 static const TypeInfo mipsnet_info = {
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c
index 82e2ba1..3a4760f 100644
--- a/hw/net/ne2000-isa.c
+++ b/hw/net/ne2000-isa.c
@@ -97,7 +97,7 @@  static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = isa_ne2000_realizefn;
-    dc->props = ne2000_isa_properties;
+    device_class_add_properties(dc, ne2000_isa_properties);
     dc->vmsd = &vmstate_isa_ne2000;
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
 }
diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
index 3ab2d03..933836a 100644
--- a/hw/net/ne2000.c
+++ b/hw/net/ne2000.c
@@ -778,7 +778,7 @@  static void ne2000_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_REALTEK_8029;
     k->class_id = PCI_CLASS_NETWORK_ETHERNET;
     dc->vmsd = &vmstate_pci_ne2000;
-    dc->props = ne2000_properties;
+    device_class_add_properties(dc, ne2000_properties);
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
 }
 
diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c
index 4a44304..147a86c 100644
--- a/hw/net/opencores_eth.c
+++ b/hw/net/opencores_eth.c
@@ -751,7 +751,7 @@  static void open_eth_class_init(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
     dc->desc = "Opencores 10/100 Mbit Ethernet";
     dc->reset = qdev_open_eth_reset;
-    dc->props = open_eth_properties;
+    device_class_add_properties(dc, open_eth_properties);
 }
 
 static const TypeInfo open_eth_info = {
diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
index fb5f5d6..0f0246d 100644
--- a/hw/net/pcnet-pci.c
+++ b/hw/net/pcnet-pci.c
@@ -374,7 +374,7 @@  static void pcnet_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_NETWORK_ETHERNET;
     dc->reset = pci_reset;
     dc->vmsd = &vmstate_pci_pcnet;
-    dc->props = pcnet_properties;
+    device_class_add_properties(dc, pcnet_properties);
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
 }
 
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 8b8a1b1..2fd5875 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -3569,7 +3569,7 @@  static void rtl8139_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_NETWORK_ETHERNET;
     dc->reset = rtl8139_reset;
     dc->vmsd = &vmstate_rtl8139;
-    dc->props = rtl8139_properties;
+    device_class_add_properties(dc, rtl8139_properties);
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
 }
 
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index d1dca8f..c751232 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -781,7 +781,7 @@  static void smc91c111_class_init(ObjectClass *klass, void *data)
     k->init = smc91c111_init1;
     dc->reset = smc91c111_reset;
     dc->vmsd = &vmstate_smc91c111;
-    dc->props = smc91c111_properties;
+    device_class_add_properties(dc, smc91c111_properties);
 }
 
 static const TypeInfo smc91c111_info = {
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index 2c8b038..c1fecf5 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -550,7 +550,7 @@  static void spapr_vlan_class_init(ObjectClass *klass, void *data)
     k->dt_compatible = "IBM,l-lan";
     k->signal_mask = 0x1;
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
-    dc->props = spapr_vlan_properties;
+    device_class_add_properties(dc, spapr_vlan_properties);
     k->rtce_window_size = 0x10000000;
     dc->vmsd = &vmstate_spapr_llan;
 }
diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
index c07e513..a93d9f6 100644
--- a/hw/net/stellaris_enet.c
+++ b/hw/net/stellaris_enet.c
@@ -496,7 +496,7 @@  static void stellaris_enet_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = stellaris_enet_init;
-    dc->props = stellaris_enet_properties;
+    device_class_add_properties(dc, stellaris_enet_properties);
     dc->vmsd = &vmstate_stellaris_enet;
 }
 
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 9b88775..e2ddedb 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1731,7 +1731,7 @@  static void virtio_net_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
 
-    dc->props = virtio_net_properties;
+    device_class_add_properties(dc, virtio_net_properties);
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
     vdc->realize = virtio_net_device_realize;
     vdc->unrealize = virtio_net_device_unrealize;
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 8eea589..d08f20c 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2520,7 +2520,7 @@  static void vmxnet3_class_init(ObjectClass *class, void *data)
     dc->desc = "VMWare Paravirtualized Ethernet v3";
     dc->reset = vmxnet3_qdev_reset;
     dc->vmsd = &vmstate_vmxnet3;
-    dc->props = vmxnet3_properties;
+    device_class_add_properties(dc, vmxnet3_properties);
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
 }
 
diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c
index aeffcb5..8058c5e 100644
--- a/hw/net/xgmac.c
+++ b/hw/net/xgmac.c
@@ -422,7 +422,7 @@  static void xgmac_enet_class_init(ObjectClass *klass, void *data)
 
     sbc->init = xgmac_enet_init;
     dc->vmsd = &vmstate_xgmac;
-    dc->props = xgmac_properties;
+    device_class_add_properties(dc, xgmac_properties);
 }
 
 static const TypeInfo xgmac_enet_info = {
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index cd952d2..5c9bca7 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -1030,7 +1030,7 @@  static void xilinx_enet_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = xilinx_enet_realize;
-    dc->props = xilinx_enet_properties;
+    device_class_add_properties(dc, xilinx_enet_properties);
     dc->reset = xilinx_axienet_reset;
 }
 
diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c
index 1b177b3..3405750 100644
--- a/hw/net/xilinx_ethlite.c
+++ b/hw/net/xilinx_ethlite.c
@@ -261,7 +261,7 @@  static void xilinx_ethlite_class_init(ObjectClass *klass, void *data)
 
     dc->realize = xilinx_ethlite_realize;
     dc->reset = xilinx_ethlite_reset;
-    dc->props = xilinx_ethlite_properties;
+    device_class_add_properties(dc, xilinx_ethlite_properties);
 }
 
 static const TypeInfo xilinx_ethlite_info = {
diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
index 332598b..2b4c3cb 100644
--- a/hw/nvram/ds1225y.c
+++ b/hw/nvram/ds1225y.c
@@ -151,7 +151,7 @@  static void nvram_sysbus_class_init(ObjectClass *klass, void *data)
 
     k->init = nvram_sysbus_initfn;
     dc->vmsd = &vmstate_nvram;
-    dc->props = nvram_sysbus_properties;
+    device_class_add_properties(dc, nvram_sysbus_properties);
 }
 
 static const TypeInfo nvram_sysbus_info = {
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index e7ed27e..103f2c9 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -649,7 +649,7 @@  static void fw_cfg_class_init(ObjectClass *klass, void *data)
     dc->realize = fw_cfg_realize;
     dc->reset = fw_cfg_reset;
     dc->vmsd = &vmstate_fw_cfg;
-    dc->props = fw_cfg_properties;
+    device_class_add_properties(dc, fw_cfg_properties);
 }
 
 static const TypeInfo fw_cfg_info = {
diff --git a/hw/nvram/mac_nvram.c b/hw/nvram/mac_nvram.c
index d35f8a3..1a354b8 100644
--- a/hw/nvram/mac_nvram.c
+++ b/hw/nvram/mac_nvram.c
@@ -122,7 +122,7 @@  static void macio_nvram_class_init(ObjectClass *oc, void *data)
     dc->unrealize = macio_nvram_unrealizefn;
     dc->reset = macio_nvram_reset;
     dc->vmsd = &vmstate_macio_nvram;
-    dc->props = macio_nvram_properties;
+    device_class_add_properties(dc, macio_nvram_properties);
 }
 
 static const TypeInfo macio_nvram_type_info = {
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index 35dc6d5..25efb39 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -230,7 +230,7 @@  static void spapr_nvram_class_init(ObjectClass *klass, void *data)
     k->dt_type = "nvram";
     k->dt_compatible = "qemu,spapr-nvram";
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    dc->props = spapr_nvram_properties;
+    device_class_add_properties(dc, spapr_nvram_properties);
     dc->vmsd = &vmstate_spapr_nvram;
 }
 
diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
index cce2fdd..215439c 100644
--- a/hw/pci-bridge/ioh3420.c
+++ b/hw/pci-bridge/ioh3420.c
@@ -195,7 +195,7 @@  static void ioh3420_class_init(ObjectClass *klass, void *data)
     dc->desc = "Intel IOH device id 3420 PCIE Root Port";
     dc->reset = ioh3420_reset;
     dc->vmsd = &vmstate_ioh3420;
-    dc->props = ioh3420_props;
+    device_class_add_properties(dc, ioh3420_props);
 }
 
 static const TypeInfo ioh3420_info = {
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index 252ea5e..0f56b84 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -146,7 +146,7 @@  static void pci_bridge_dev_class_init(ObjectClass *klass, void *data)
     k->is_bridge = 1,
     dc->desc = "Standard PCI Bridge";
     dc->reset = qdev_pci_bridge_dev_reset;
-    dc->props = pci_bridge_dev_properties;
+    device_class_add_properties(dc, pci_bridge_dev_properties);
     dc->vmsd = &pci_bridge_dev_vmstate;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
     hc->plug = shpc_device_hotplug_cb;
diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c
index b3a6479..9284d51 100644
--- a/hw/pci-bridge/xio3130_downstream.c
+++ b/hw/pci-bridge/xio3130_downstream.c
@@ -183,7 +183,7 @@  static void xio3130_downstream_class_init(ObjectClass *klass, void *data)
     dc->desc = "TI X3130 Downstream Port of PCI Express Switch";
     dc->reset = xio3130_downstream_reset;
     dc->vmsd = &vmstate_xio3130_downstream;
-    dc->props = xio3130_downstream_props;
+    device_class_add_properties(dc, xio3130_downstream_props);
 }
 
 static const TypeInfo xio3130_downstream_info = {
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 1530038..f885633 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -757,7 +757,7 @@  static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
     hc->root_bus_path = i440fx_pcihost_root_bus_path;
     dc->realize = i440fx_pcihost_realize;
     dc->fw_name = "pci";
-    dc->props = i440fx_props;
+    device_class_add_properties(dc, i440fx_props);
 }
 
 static const TypeInfo i440fx_pcihost_info = {
diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
index 1b4c0f0..f082121 100644
--- a/hw/pci-host/ppce500.c
+++ b/hw/pci-host/ppce500.c
@@ -431,7 +431,7 @@  static void e500_pcihost_class_init(ObjectClass *klass, void *data)
 
     k->init = e500_pcihost_initfn;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
-    dc->props = pcihost_properties;
+    device_class_add_properties(dc, pcihost_properties);
     dc->vmsd = &vmstate_ppce500_pci;
 }
 
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 1de3681..2088143 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -383,7 +383,7 @@  static void raven_pcihost_class_init(ObjectClass *klass, void *data)
 
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
     dc->realize = raven_pcihost_realizefn;
-    dc->props = raven_pcihost_properties;
+    device_class_add_properties(dc, raven_pcihost_properties);
     dc->fw_name = "pci";
 }
 
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index b20bad8..7b5b377 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -136,7 +136,7 @@  static void q35_host_class_init(ObjectClass *klass, void *data)
 
     hc->root_bus_path = q35_host_root_bus_path;
     dc->realize = q35_host_realize;
-    dc->props = mch_props;
+    device_class_add_properties(dc, mch_props);
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
     dc->fw_name = "pci";
 }
diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c
index 71ff0de..dc533f7 100644
--- a/hw/pci-host/versatile.c
+++ b/hw/pci-host/versatile.c
@@ -500,7 +500,7 @@  static void pci_vpb_class_init(ObjectClass *klass, void *data)
     dc->realize = pci_vpb_realize;
     dc->reset = pci_vpb_reset;
     dc->vmsd = &pci_vpb_vmstate;
-    dc->props = pci_vpb_properties;
+    device_class_add_properties(dc, pci_vpb_properties);
 }
 
 static const TypeInfo pci_vpb_info = {
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 371699c..214e1fb 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2286,7 +2286,7 @@  static void pci_device_class_init(ObjectClass *klass, void *data)
     k->init = pci_qdev_init;
     k->exit = pci_unregister_device;
     k->bus_type = TYPE_PCI_BUS;
-    k->props = pci_props;
+    device_class_add_properties(k, pci_props);
 }
 
 AddressSpace *pci_device_iommu_address_space(PCIDevice *dev)
diff --git a/hw/pci/pcie_port.c b/hw/pci/pcie_port.c
index 40ca8d5..68dea25 100644
--- a/hw/pci/pcie_port.c
+++ b/hw/pci/pcie_port.c
@@ -130,7 +130,7 @@  static void pcie_port_class_init(ObjectClass *oc, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(oc);
 
-    dc->props = pcie_port_props;
+    device_class_add_properties(dc, pcie_port_props);
 }
 
 static const TypeInfo pcie_port_type_info = {
@@ -152,7 +152,7 @@  static void pcie_slot_class_init(ObjectClass *oc, void *data)
     DeviceClass *dc = DEVICE_CLASS(oc);
     HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
 
-    dc->props = pcie_slot_props;
+    device_class_add_properties(dc, pcie_slot_props);
     hc->plug = pcie_cap_slot_hotplug_cb;
     hc->unplug_request = pcie_cap_slot_hot_unplug_request_cb;
 }
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 21b95b3..e7838de 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -794,7 +794,7 @@  static void spapr_phb_class_init(ObjectClass *klass, void *data)
 
     hc->root_bus_path = spapr_phb_root_bus_path;
     dc->realize = spapr_phb_realize;
-    dc->props = spapr_phb_properties;
+    device_class_add_properties(dc, spapr_phb_properties);
     dc->reset = spapr_phb_reset;
     dc->vmsd = &vmstate_spapr_pci;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c
index d3bddf2..ec6f568 100644
--- a/hw/ppc/spapr_pci_vfio.c
+++ b/hw/ppc/spapr_pci_vfio.c
@@ -81,7 +81,7 @@  static void spapr_phb_vfio_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     sPAPRPHBClass *spc = SPAPR_PCI_HOST_BRIDGE_CLASS(klass);
 
-    dc->props = spapr_phb_vfio_properties;
+    device_class_add_properties(dc, spapr_phb_vfio_properties);
     dc->reset = spapr_phb_vfio_reset;
     spc->finish_realize = spapr_phb_vfio_finish_realize;
 }
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index dc9e46a..46d9ec5 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -573,7 +573,7 @@  static void vio_spapr_device_class_init(ObjectClass *klass, void *data)
     k->init = spapr_vio_busdev_init;
     k->reset = spapr_vio_busdev_reset;
     k->bus_type = TYPE_SPAPR_VIO_BUS;
-    k->props = spapr_vio_props;
+    device_class_add_properties(k, spapr_vio_props);
 }
 
 static const TypeInfo spapr_vio_type_info = {
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 3b77c9a..875a5a7 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -185,7 +185,7 @@  static void s390_ipl_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = s390_ipl_init;
-    dc->props = s390_ipl_properties;
+    device_class_add_properties(dc, s390_ipl_properties);
     dc->reset = s390_ipl_reset;
 }
 
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 39dc201..5ba07db 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -510,7 +510,7 @@  static void s390_virtio_net_class_init(ObjectClass *klass, void *data)
     VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
 
     k->init = s390_virtio_net_init;
-    dc->props = s390_virtio_net_properties;
+    device_class_add_properties(dc, s390_virtio_net_properties);
 }
 
 static const TypeInfo s390_virtio_net = {
@@ -546,7 +546,7 @@  static void s390_virtio_serial_class_init(ObjectClass *klass, void *data)
     VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
 
     k->init = s390_virtio_serial_init;
-    dc->props = s390_virtio_serial_properties;
+    device_class_add_properties(dc, s390_virtio_serial_properties);
 }
 
 static const TypeInfo s390_virtio_serial = {
@@ -568,7 +568,7 @@  static void s390_virtio_rng_class_init(ObjectClass *klass, void *data)
     VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
 
     k->init = s390_virtio_rng_init;
-    dc->props = s390_virtio_rng_properties;
+    device_class_add_properties(dc, s390_virtio_rng_properties);
 }
 
 static const TypeInfo s390_virtio_rng = {
@@ -626,7 +626,7 @@  static void s390_virtio_scsi_class_init(ObjectClass *klass, void *data)
     VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
 
     k->init = s390_virtio_scsi_init;
-    dc->props = s390_virtio_scsi_properties;
+    device_class_add_properties(dc, s390_virtio_scsi_properties);
 }
 
 static const TypeInfo s390_virtio_scsi = {
@@ -649,7 +649,7 @@  static void s390_vhost_scsi_class_init(ObjectClass *klass, void *data)
     VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass);
 
     k->init = s390_vhost_scsi_init;
-    dc->props = s390_vhost_scsi_properties;
+    device_class_add_properties(dc, s390_vhost_scsi_properties);
 }
 
 static const TypeInfo s390_vhost_scsi = {
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index ea236c9..6b48d31 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -1396,7 +1396,7 @@  static void virtio_ccw_net_class_init(ObjectClass *klass, void *data)
     k->init = virtio_ccw_net_init;
     k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
-    dc->props = virtio_ccw_net_properties;
+    device_class_add_properties(dc, virtio_ccw_net_properties);
 }
 
 static const TypeInfo virtio_ccw_net = {
@@ -1422,7 +1422,7 @@  static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data)
     k->init = virtio_ccw_blk_init;
     k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
-    dc->props = virtio_ccw_blk_properties;
+    device_class_add_properties(dc, virtio_ccw_blk_properties);
 }
 
 static const TypeInfo virtio_ccw_blk = {
@@ -1448,7 +1448,7 @@  static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)
     k->init = virtio_ccw_serial_init;
     k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
-    dc->props = virtio_ccw_serial_properties;
+    device_class_add_properties(dc, virtio_ccw_serial_properties);
 }
 
 static const TypeInfo virtio_ccw_serial = {
@@ -1474,7 +1474,7 @@  static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data)
     k->init = virtio_ccw_balloon_init;
     k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
-    dc->props = virtio_ccw_balloon_properties;
+    device_class_add_properties(dc, virtio_ccw_balloon_properties);
 }
 
 static const TypeInfo virtio_ccw_balloon = {
@@ -1501,7 +1501,7 @@  static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data)
     k->init = virtio_ccw_scsi_init;
     k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
-    dc->props = virtio_ccw_scsi_properties;
+    device_class_add_properties(dc, virtio_ccw_scsi_properties);
 }
 
 static const TypeInfo virtio_ccw_scsi = {
@@ -1526,7 +1526,7 @@  static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)
     k->init = vhost_ccw_scsi_init;
     k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
-    dc->props = vhost_ccw_scsi_properties;
+    device_class_add_properties(dc, vhost_ccw_scsi_properties);
 }
 
 static const TypeInfo vhost_ccw_scsi = {
@@ -1563,7 +1563,7 @@  static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data)
     k->init = virtio_ccw_rng_init;
     k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
-    dc->props = virtio_ccw_rng_properties;
+    device_class_add_properties(dc, virtio_ccw_rng_properties);
 }
 
 static const TypeInfo virtio_ccw_rng = {
@@ -1623,7 +1623,7 @@  static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    dc->props = virtio_ccw_properties;
+    device_class_add_properties(dc, virtio_ccw_properties);
     dc->init = virtio_ccw_busdev_init;
     dc->exit = virtio_ccw_busdev_exit;
     dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 604252a..c556082 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2522,7 +2522,7 @@  static void megasas_class_init(ObjectClass *oc, void *data)
     e->osts = info->osts;
     e->product_name = info->product_name;
     e->product_version = info->product_version;
-    dc->props = info->props;
+    device_class_add_properties(dc, info->props);
     dc->reset = megasas_scsi_reset;
     dc->vmsd = info->vmsd;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 24f7b74..d69f47a 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -2006,7 +2006,7 @@  static void scsi_device_class_init(ObjectClass *klass, void *data)
     k->bus_type  = TYPE_SCSI_BUS;
     k->realize   = scsi_qdev_realize;
     k->unrealize = scsi_qdev_unrealize;
-    k->props     = scsi_props;
+    device_class_add_properties(k, scsi_props);
 }
 
 static void scsi_dev_instance_init(Object *obj)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 2f75d7d..e71ff3a 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2609,7 +2609,7 @@  static void scsi_hd_class_initfn(ObjectClass *klass, void *data)
     dc->fw_name = "disk";
     dc->desc = "virtual SCSI disk";
     dc->reset = scsi_disk_reset;
-    dc->props = scsi_hd_properties;
+    device_class_add_properties(dc, scsi_hd_properties);
     dc->vmsd  = &vmstate_scsi_disk_state;
 }
 
@@ -2639,7 +2639,7 @@  static void scsi_cd_class_initfn(ObjectClass *klass, void *data)
     dc->fw_name = "disk";
     dc->desc = "virtual SCSI CD-ROM";
     dc->reset = scsi_disk_reset;
-    dc->props = scsi_cd_properties;
+    device_class_add_properties(dc, scsi_cd_properties);
     dc->vmsd  = &vmstate_scsi_disk_state;
 }
 
@@ -2667,7 +2667,7 @@  static void scsi_block_class_initfn(ObjectClass *klass, void *data)
     dc->fw_name = "disk";
     dc->desc = "SCSI block device passthrough";
     dc->reset = scsi_disk_reset;
-    dc->props = scsi_block_properties;
+    device_class_add_properties(dc, scsi_block_properties);
     dc->vmsd  = &vmstate_scsi_disk_state;
 }
 
@@ -2704,7 +2704,7 @@  static void scsi_disk_class_initfn(ObjectClass *klass, void *data)
     dc->fw_name = "disk";
     dc->desc = "virtual SCSI disk or CD-ROM (legacy)";
     dc->reset = scsi_disk_reset;
-    dc->props = scsi_disk_properties;
+    device_class_add_properties(dc, scsi_disk_properties);
     dc->vmsd  = &vmstate_scsi_disk_state;
 }
 
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index 6b9e4e1..88eaa9c 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -477,7 +477,7 @@  static void scsi_generic_class_initfn(ObjectClass *klass, void *data)
     dc->fw_name = "disk";
     dc->desc = "pass through generic scsi device (/dev/sg*)";
     dc->reset = scsi_generic_reset;
-    dc->props = scsi_generic_properties;
+    device_class_add_properties(dc, scsi_generic_properties);
     dc->vmsd  = &vmstate_scsi_device;
 }
 
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index 20b20f0..0ff1181 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -1289,7 +1289,7 @@  static void spapr_vscsi_class_init(ObjectClass *klass, void *data)
     k->dt_compatible = "IBM,v-scsi";
     k->signal_mask = 0x00000001;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = spapr_vscsi_properties;
+    device_class_add_properties(dc, spapr_vscsi_properties);
     k->rtce_window_size = 0x10000000;
     dc->vmsd = &vmstate_spapr_vscsi;
 }
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 308b393..b12e029 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -280,7 +280,7 @@  static void vhost_scsi_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
 
-    dc->props = vhost_scsi_properties;
+    device_class_add_properties(dc, vhost_scsi_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     vdc->realize = vhost_scsi_realize;
     vdc->unrealize = vhost_scsi_unrealize;
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index ef48550..4bcfe44 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -955,7 +955,7 @@  static void virtio_scsi_class_init(ObjectClass *klass, void *data)
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
     HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
 
-    dc->props = virtio_scsi_properties;
+    device_class_add_properties(dc, virtio_scsi_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     vdc->realize = virtio_scsi_device_realize;
     vdc->unrealize = virtio_scsi_device_unrealize;
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index d3a92fb..b590adb 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -1200,7 +1200,7 @@  static void pvscsi_class_init(ObjectClass *klass, void *data)
     k->subsystem_id = 0x1000;
     dc->reset = pvscsi_reset;
     dc->vmsd = &vmstate_pvscsi;
-    dc->props = pvscsi_properties;
+    device_class_add_properties(dc, pvscsi_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     k->config_write = pvscsi_write_config;
     hc->unplug = pvscsi_hot_unplug;
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index b380050..30f844e 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1266,7 +1266,7 @@  static void sdhci_class_init(ObjectClass *klass, void *data)
     SDHCIClass *k = SDHCI_CLASS(klass);
 
     dc->vmsd = &sdhci_vmstate;
-    dc->props = sdhci_properties;
+    device_class_add_properties(dc, sdhci_properties);
     dc->reset = sdhci_generic_reset;
     dc->realize = sdhci_realize;
 
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index 8273199..82414d1 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -778,7 +778,7 @@  static void prom_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = prom_init1;
-    dc->props = prom_properties;
+    device_class_add_properties(dc, prom_properties);
 }
 
 static const TypeInfo prom_info = {
@@ -846,7 +846,7 @@  static void ram_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = ram_init1;
-    dc->props = ram_properties;
+    device_class_add_properties(dc, ram_properties);
 }
 
 static const TypeInfo ram_info = {
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index f42112c..1da898b 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -704,7 +704,7 @@  static void prom_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = prom_init1;
-    dc->props = prom_properties;
+    device_class_add_properties(dc, prom_properties);
 }
 
 static const TypeInfo prom_info = {
@@ -765,7 +765,7 @@  static void ram_class_init(ObjectClass *klass, void *data)
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = ram_init1;
-    dc->props = ram_properties;
+    device_class_add_properties(dc, ram_properties);
 }
 
 static const TypeInfo ram_info = {
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index 620573c..2cef3db 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -371,7 +371,7 @@  static void xilinx_spi_class_init(ObjectClass *klass, void *data)
 
     k->init = xilinx_spi_init;
     dc->reset = xlx_spi_reset;
-    dc->props = xilinx_spi_properties;
+    device_class_add_properties(dc, xilinx_spi_properties);
     dc->vmsd = &vmstate_xilinx_spi;
 }
 
diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c
index 0910f54..9bb638a 100644
--- a/hw/ssi/xilinx_spips.c
+++ b/hw/ssi/xilinx_spips.c
@@ -739,7 +739,7 @@  static void xilinx_spips_class_init(ObjectClass *klass, void *data)
 
     dc->realize = xilinx_spips_realize;
     dc->reset = xilinx_spips_reset;
-    dc->props = xilinx_spips_properties;
+    device_class_add_properties(dc, xilinx_spips_properties);
     dc->vmsd = &vmstate_xilinx_spips;
 
     xsc->reg_ops = &spips_ops;
diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
index a0656d5..0bad0b7 100644
--- a/hw/timer/a9gtimer.c
+++ b/hw/timer/a9gtimer.c
@@ -351,7 +351,7 @@  static void a9_gtimer_class_init(ObjectClass *klass, void *data)
     dc->realize = a9_gtimer_realize;
     dc->vmsd = &vmstate_a9_gtimer;
     dc->reset = a9_gtimer_reset;
-    dc->props = a9_gtimer_properties;
+    device_class_add_properties(dc, a9_gtimer_properties);
 }
 
 static const TypeInfo a9_gtimer_info = {
diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c
index 34124fe..481d1dd 100644
--- a/hw/timer/allwinner-a10-pit.c
+++ b/hw/timer/allwinner-a10-pit.c
@@ -274,7 +274,7 @@  static void a10_pit_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->reset = a10_pit_reset;
-    dc->props = a10_pit_properties;
+    device_class_add_properties(dc, a10_pit_properties);
     dc->desc = "allwinner a10 timer";
     dc->vmsd = &vmstate_a10_pit;
 }
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
index 35a0a23..3b67ea0 100644
--- a/hw/timer/arm_mptimer.c
+++ b/hw/timer/arm_mptimer.c
@@ -274,7 +274,7 @@  static void arm_mptimer_class_init(ObjectClass *klass, void *data)
     dc->realize = arm_mptimer_realize;
     dc->vmsd = &vmstate_arm_mptimer;
     dc->reset = arm_mptimer_reset;
-    dc->props = arm_mptimer_properties;
+    device_class_add_properties(dc, arm_mptimer_properties);
 }
 
 static const TypeInfo arm_mptimer_info = {
diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
index 1452910..66420c7 100644
--- a/hw/timer/arm_timer.c
+++ b/hw/timer/arm_timer.c
@@ -393,7 +393,7 @@  static void sp804_class_init(ObjectClass *klass, void *data)
     DeviceClass *k = DEVICE_CLASS(klass);
 
     sdc->init = sp804_init;
-    k->props = sp804_properties;
+    device_class_add_properties(k, sp804_properties);
 }
 
 static const TypeInfo sp804_info = {
diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c
index d655bb2..41cb78a 100644
--- a/hw/timer/grlib_gptimer.c
+++ b/hw/timer/grlib_gptimer.c
@@ -393,7 +393,7 @@  static void grlib_gptimer_class_init(ObjectClass *klass, void *data)
 
     k->init = grlib_gptimer_init;
     dc->reset = grlib_gptimer_reset;
-    dc->props = grlib_gptimer_properties;
+    device_class_add_properties(dc, grlib_gptimer_properties);
 }
 
 static const TypeInfo grlib_gptimer_info = {
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index e160e8f..997306e 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -779,7 +779,7 @@  static void hpet_device_class_init(ObjectClass *klass, void *data)
     dc->realize = hpet_realize;
     dc->reset = hpet_reset;
     dc->vmsd = &vmstate_hpet;
-    dc->props = hpet_device_properties;
+    device_class_add_properties(dc, hpet_device_properties);
 }
 
 static const TypeInfo hpet_device_info = {
diff --git a/hw/timer/i8254.c b/hw/timer/i8254.c
index 3450c98..e4ffb89 100644
--- a/hw/timer/i8254.c
+++ b/hw/timer/i8254.c
@@ -358,7 +358,7 @@  static void pit_class_initfn(ObjectClass *klass, void *data)
     k->get_channel_info = pit_get_channel_info_common;
     k->post_load = pit_post_load;
     dc->reset = pit_reset;
-    dc->props = pit_properties;
+    device_class_add_properties(dc, pit_properties);
 }
 
 static const TypeInfo pit_info = {
diff --git a/hw/timer/lm32_timer.c b/hw/timer/lm32_timer.c
index d2ab1e7..e800e13 100644
--- a/hw/timer/lm32_timer.c
+++ b/hw/timer/lm32_timer.c
@@ -217,7 +217,7 @@  static void lm32_timer_class_init(ObjectClass *klass, void *data)
     k->init = lm32_timer_init;
     dc->reset = timer_reset;
     dc->vmsd = &vmstate_lm32_timer;
-    dc->props = lm32_timer_properties;
+    device_class_add_properties(dc, lm32_timer_properties);
 }
 
 static const TypeInfo lm32_timer_info = {
diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
index 31509d5..b78cf14 100644
--- a/hw/timer/m48t59.c
+++ b/hw/timer/m48t59.c
@@ -750,7 +750,7 @@  static void m48t59_isa_class_init(ObjectClass *klass, void *data)
 
     dc->realize = m48t59_isa_realize;
     dc->reset = m48t59_reset_isa;
-    dc->props = m48t59_isa_properties;
+    device_class_add_properties(dc, m48t59_isa_properties);
     /* Reason: needs to be wired up by m48t59_init_isa() */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
@@ -776,7 +776,7 @@  static void m48t59_class_init(ObjectClass *klass, void *data)
 
     k->init = m48t59_init1;
     dc->reset = m48t59_reset_sysbus;
-    dc->props = m48t59_properties;
+    device_class_add_properties(dc, m48t59_properties);
 }
 
 static const TypeInfo m48t59_info = {
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index f18d128..06c0c34 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -973,7 +973,7 @@  static void rtc_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = rtc_realizefn;
     dc->vmsd = &vmstate_rtc;
-    dc->props = mc146818rtc_properties;
+    device_class_add_properties(dc, mc146818rtc_properties);
     /* Reason: needs to be wired up by rtc_init() */
     dc->cannot_instantiate_with_device_add_yet = true;
 }
diff --git a/hw/timer/milkymist-sysctl.c b/hw/timer/milkymist-sysctl.c
index 30535a4..287757f 100644
--- a/hw/timer/milkymist-sysctl.c
+++ b/hw/timer/milkymist-sysctl.c
@@ -323,7 +323,7 @@  static void milkymist_sysctl_class_init(ObjectClass *klass, void *data)
     k->init = milkymist_sysctl_init;
     dc->reset = milkymist_sysctl_reset;
     dc->vmsd = &vmstate_milkymist_sysctl;
-    dc->props = milkymist_sysctl_properties;
+    device_class_add_properties(dc, milkymist_sysctl_properties);
 }
 
 static const TypeInfo milkymist_sysctl_info = {
diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c
index 130e9dc..d522f04 100644
--- a/hw/timer/pxa2xx_timer.c
+++ b/hw/timer/pxa2xx_timer.c
@@ -537,7 +537,7 @@  static void pxa25x_timer_dev_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->desc = "PXA25x timer";
-    dc->props = pxa25x_timer_dev_properties;
+    device_class_add_properties(dc, pxa25x_timer_dev_properties);
 }
 
 static const TypeInfo pxa25x_timer_dev_info = {
@@ -559,7 +559,7 @@  static void pxa27x_timer_dev_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->desc = "PXA27x timer";
-    dc->props = pxa27x_timer_dev_properties;
+    device_class_add_properties(dc, pxa27x_timer_dev_properties);
 }
 
 static const TypeInfo pxa27x_timer_dev_info = {
diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
index 45d97e6..94ea7c9 100644
--- a/hw/timer/slavio_timer.c
+++ b/hw/timer/slavio_timer.c
@@ -416,7 +416,7 @@  static void slavio_timer_class_init(ObjectClass *klass, void *data)
     k->init = slavio_timer_init1;
     dc->reset = slavio_timer_reset;
     dc->vmsd = &vmstate_slavio_timer;
-    dc->props = slavio_timer_properties;
+    device_class_add_properties(dc, slavio_timer_properties);
 }
 
 static const TypeInfo slavio_timer_info = {
diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c
index cdb3355..0eb6dda 100644
--- a/hw/timer/xilinx_timer.c
+++ b/hw/timer/xilinx_timer.c
@@ -246,7 +246,7 @@  static void xilinx_timer_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = xilinx_timer_realize;
-    dc->props = xilinx_timer_properties;
+    device_class_add_properties(dc, xilinx_timer_properties);
 }
 
 static const TypeInfo xilinx_timer_info = {
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index c0e7cd7..b897262 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -901,7 +901,7 @@  static void tpm_tis_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = tpm_tis_realizefn;
-    dc->props = tpm_tis_properties;
+    device_class_add_properties(dc, tpm_tis_properties);
     dc->reset = tpm_tis_reset;
     dc->vmsd  = &vmstate_tpm_tis;
 }
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 986b2d8..9006e6b 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -709,7 +709,7 @@  static void usb_device_class_init(ObjectClass *klass, void *data)
     k->bus_type = TYPE_USB_BUS;
     k->realize  = usb_qdev_realize;
     k->unrealize = usb_qdev_unrealize;
-    k->props    = usb_props;
+    device_class_add_properties(k, usb_props);
 }
 
 static const TypeInfo usb_device_type_info = {
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index aa1c37a..3e2a0af 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -585,7 +585,7 @@  static void emulated_class_initfn(ObjectClass *klass, void *data)
     cc->apdu_from_guest = emulated_apdu_from_guest;
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
     dc->desc = "emulated smartcard";
-    dc->props = emulated_card_properties;
+    device_class_add_properties(dc, emulated_card_properties);
 }
 
 static const TypeInfo emulated_card_info = {
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index 10f1d30..3069d46 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -395,7 +395,7 @@  static void passthru_class_initfn(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
     dc->desc = "passthrough smartcard";
     dc->vmsd = &passthru_vmstate;
-    dc->props = passthru_card_properties;
+    device_class_add_properties(dc, passthru_card_properties);
 }
 
 static const TypeInfo passthru_card_info = {
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c
index 67deffe..1654158 100644
--- a/hw/usb/dev-audio.c
+++ b/hw/usb/dev-audio.c
@@ -671,7 +671,7 @@  static void usb_audio_class_init(ObjectClass *klass, void *data)
     USBDeviceClass *k = USB_DEVICE_CLASS(klass);
 
     dc->vmsd          = &vmstate_usb_audio;
-    dc->props         = usb_audio_properties;
+    device_class_add_properties(dc, usb_audio_properties);
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
     k->product_desc   = "QEMU USB Audio Interface";
     k->usb_desc       = &desc_audio;
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
index 507c966..94cd87a 100644
--- a/hw/usb/dev-hid.c
+++ b/hw/usb/dev-hid.c
@@ -800,7 +800,7 @@  static void usb_tablet_class_initfn(ObjectClass *klass, void *data)
     uc->realize        = usb_tablet_realize;
     uc->product_desc   = "QEMU USB Tablet";
     dc->vmsd = &vmstate_usb_ptr;
-    dc->props = usb_tablet_properties;
+    device_class_add_properties(dc, usb_tablet_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
@@ -825,7 +825,7 @@  static void usb_mouse_class_initfn(ObjectClass *klass, void *data)
     uc->realize        = usb_mouse_realize;
     uc->product_desc   = "QEMU USB Mouse";
     dc->vmsd = &vmstate_usb_ptr;
-    dc->props = usb_mouse_properties;
+    device_class_add_properties(dc, usb_mouse_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
@@ -851,7 +851,7 @@  static void usb_keyboard_class_initfn(ObjectClass *klass, void *data)
     uc->realize        = usb_keyboard_realize;
     uc->product_desc   = "QEMU USB Keyboard";
     dc->vmsd = &vmstate_usb_kbd;
-    dc->props = usb_keyboard_properties;
+    device_class_add_properties(dc, usb_keyboard_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 108ece8..ce21827 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -1109,7 +1109,7 @@  static void usb_mtp_class_initfn(ObjectClass *klass, void *data)
     uc->handle_data    = usb_mtp_handle_data;
     dc->fw_name = "mtp";
     dc->vmsd = &vmstate_usb_mtp;
-    dc->props = mtp_properties;
+    device_class_add_properties(dc, mtp_properties);
 }
 
 static TypeInfo mtp_info = {
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index 5b95d5c..8967472 100644
--- a/hw/usb/dev-network.c
+++ b/hw/usb/dev-network.c
@@ -1438,7 +1438,7 @@  static void usb_net_class_initfn(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
     dc->fw_name = "network";
     dc->vmsd = &vmstate_usb_net;
-    dc->props = net_properties;
+    device_class_add_properties(dc, net_properties);
 }
 
 static const TypeInfo net_info = {
diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 1cee450..6056cf5 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -595,7 +595,7 @@  static void usb_serial_class_initfn(ObjectClass *klass, void *data)
     uc->handle_control = usb_serial_handle_control;
     uc->handle_data    = usb_serial_handle_data;
     dc->vmsd = &vmstate_usb_serial;
-    dc->props = serial_properties;
+    device_class_add_properties(dc, serial_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
@@ -623,7 +623,7 @@  static void usb_braille_class_initfn(ObjectClass *klass, void *data)
     uc->handle_control = usb_serial_handle_control;
     uc->handle_data    = usb_serial_handle_data;
     dc->vmsd = &vmstate_usb_serial;
-    dc->props = braille_properties;
+    device_class_add_properties(dc, braille_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 78ce681..c1d6b20 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1450,7 +1450,7 @@  static void ccid_class_initfn(ObjectClass *klass, void *data)
     uc->handle_destroy = ccid_handle_destroy;
     dc->desc = "CCID Rev 1.1 smartcard reader";
     dc->vmsd = &ccid_vmstate;
-    dc->props = ccid_properties;
+    device_class_add_properties(dc, ccid_properties);
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
     hc->unplug = qdev_simple_device_unplug_cb;
 }
@@ -1472,7 +1472,7 @@  static void ccid_card_class_init(ObjectClass *klass, void *data)
     k->bus_type = TYPE_CCID_BUS;
     k->init = ccid_card_init;
     k->exit = ccid_card_exit;
-    k->props = ccid_props;
+    device_class_add_properties(k, ccid_props);
 }
 
 static const TypeInfo ccid_card_type_info = {
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 4539733..5d6858d 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -767,7 +767,7 @@  static void usb_msd_class_initfn_storage(ObjectClass *klass, void *data)
     USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
 
     uc->realize = usb_msd_realize_storage;
-    dc->props = msd_properties;
+    device_class_add_properties(dc, msd_properties);
     usb_msd_class_initfn_common(klass);
 }
 
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 04fc515..808ca5a 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -939,7 +939,7 @@  static void usb_uas_class_initfn(ObjectClass *klass, void *data)
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     dc->fw_name = "storage";
     dc->vmsd = &vmstate_usb_uas;
-    dc->props = uas_properties;
+    device_class_add_properties(dc, uas_properties);
 }
 
 static const TypeInfo uas_info = {
diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c
index 490f2b6..f0a2113 100644
--- a/hw/usb/hcd-ehci-pci.c
+++ b/hw/usb/hcd-ehci-pci.c
@@ -144,7 +144,7 @@  static void ehci_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_SERIAL_USB;
     k->config_write = usb_ehci_pci_write_config;
     dc->vmsd = &vmstate_ehci_pci;
-    dc->props = ehci_pci_properties;
+    device_class_add_properties(dc, ehci_pci_properties);
 }
 
 static const TypeInfo ehci_pci_type_info = {
diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c
index 19ed2c2..b01c9ff 100644
--- a/hw/usb/hcd-ehci-sysbus.c
+++ b/hw/usb/hcd-ehci-sysbus.c
@@ -69,7 +69,7 @@  static void ehci_sysbus_class_init(ObjectClass *klass, void *data)
 
     dc->realize = usb_ehci_sysbus_realize;
     dc->vmsd = &vmstate_ehci_sysbus;
-    dc->props = ehci_sysbus_properties;
+    device_class_add_properties(dc, ehci_sysbus_properties);
     set_bit(DEVICE_CATEGORY_USB, dc->categories);
 }
 
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 9a84eb6..be08f1f 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -2094,7 +2094,7 @@  static void ohci_pci_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_SERIAL_USB;
     set_bit(DEVICE_CATEGORY_USB, dc->categories);
     dc->desc = "Apple USB Controller";
-    dc->props = ohci_pci_properties;
+    device_class_add_properties(dc, ohci_pci_properties);
     dc->hotpluggable = false;
     dc->vmsd = &vmstate_ohci;
 }
@@ -2119,7 +2119,7 @@  static void ohci_sysbus_class_init(ObjectClass *klass, void *data)
     dc->realize = ohci_realize_pxa;
     set_bit(DEVICE_CATEGORY_USB, dc->categories);
     dc->desc = "OHCI USB Controller";
-    dc->props = ohci_sysbus_properties;
+    device_class_add_properties(dc, ohci_sysbus_properties);
 }
 
 static const TypeInfo ohci_sysbus_info = {
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 4a4215d..ae5da65 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -1306,9 +1306,9 @@  static void uhci_class_init(ObjectClass *klass, void *data)
     if (!info->unplug) {
         /* uhci controllers in companion setups can't be hotplugged */
         dc->hotpluggable = false;
-        dc->props = uhci_properties_companion;
+        device_class_add_properties(dc, uhci_properties_companion);
     } else {
-        dc->props = uhci_properties_standalone;
+        device_class_add_properties(dc, uhci_properties_standalone);
     }
     set_bit(DEVICE_CATEGORY_USB, dc->categories);
     u->info = *info;
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 9a942cf..643b914 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3884,7 +3884,7 @@  static void xhci_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->vmsd    = &vmstate_xhci;
-    dc->props   = xhci_properties;
+    device_class_add_properties(dc, xhci_properties);
     dc->reset   = xhci_reset;
     set_bit(DEVICE_CATEGORY_USB, dc->categories);
     k->init         = usb_xhci_initfn;
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index a5f9dab..6891649 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1503,7 +1503,7 @@  static void usb_host_class_initfn(ObjectClass *klass, void *data)
     uc->alloc_streams  = usb_host_alloc_streams;
     uc->free_streams   = usb_host_free_streams;
     dc->vmsd = &vmstate_usb_host;
-    dc->props = usb_host_dev_properties;
+    device_class_add_properties(dc, usb_host_dev_properties);
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 9fbd59e..bf94793 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -2490,7 +2490,7 @@  static void usbredir_class_initfn(ObjectClass *klass, void *data)
     uc->alloc_streams  = usbredir_alloc_streams;
     uc->free_streams   = usbredir_free_streams;
     dc->vmsd           = &usbredir_vmstate;
-    dc->props          = usbredir_properties;
+    device_class_add_properties(dc, usbredir_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 7bfbb75..8e362b5 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -417,7 +417,7 @@  static void virtio_balloon_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
 
-    dc->props = virtio_balloon_properties;
+    device_class_add_properties(dc, virtio_balloon_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     vdc->realize = virtio_balloon_device_realize;
     vdc->unrealize = virtio_balloon_device_unrealize;
diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 2450c13..0444936 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -376,7 +376,7 @@  static void virtio_mmio_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    dc->props = virtio_mmio_properties;
+    device_class_add_properties(dc, virtio_mmio_properties);
     dc->realize = virtio_mmio_realizefn;
     dc->reset = virtio_mmio_reset;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index dde1d73..4005e06 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -931,7 +931,7 @@  static void virtio_9p_pci_class_init(ObjectClass *klass, void *data)
     pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
     pcidev_k->class_id = 0x2;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = virtio_9p_pci_properties;
+    device_class_add_properties(dc, virtio_9p_pci_properties);
 }
 
 static void virtio_9p_pci_instance_init(Object *obj)
@@ -1046,7 +1046,7 @@  static void virtio_pci_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
-    dc->props = virtio_pci_properties;
+    device_class_add_properties(dc, virtio_pci_properties);
     k->init = virtio_pci_init;
     k->exit = virtio_pci_exit;
     k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
@@ -1092,7 +1092,7 @@  static void virtio_blk_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
 
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = virtio_blk_pci_properties;
+    device_class_add_properties(dc, virtio_blk_pci_properties);
     k->init = virtio_blk_pci_init;
     pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
@@ -1167,7 +1167,7 @@  static void virtio_scsi_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
     k->init = virtio_scsi_pci_init_pci;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = virtio_scsi_pci_properties;
+    device_class_add_properties(dc, virtio_scsi_pci_properties);
     pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
     pcidev_k->revision = 0x00;
@@ -1225,7 +1225,7 @@  static void vhost_scsi_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
     k->init = vhost_scsi_pci_init_pci;
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = vhost_scsi_pci_properties;
+    device_class_add_properties(dc, vhost_scsi_pci_properties);
     pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
     pcidev_k->revision = 0x00;
@@ -1306,7 +1306,7 @@  static void virtio_balloon_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
     k->init = virtio_balloon_pci_init;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    dc->props = virtio_balloon_pci_properties;
+    device_class_add_properties(dc, virtio_balloon_pci_properties);
     pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BALLOON;
     pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
@@ -1390,7 +1390,7 @@  static void virtio_serial_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
     k->init = virtio_serial_pci_init;
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
-    dc->props = virtio_serial_pci_properties;
+    device_class_add_properties(dc, virtio_serial_pci_properties);
     pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_CONSOLE;
     pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
@@ -1451,7 +1451,7 @@  static void virtio_net_pci_class_init(ObjectClass *klass, void *data)
     k->revision = VIRTIO_PCI_ABI_VERSION;
     k->class_id = PCI_CLASS_NETWORK_ETHERNET;
     set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
-    dc->props = virtio_net_properties;
+    device_class_add_properties(dc, virtio_net_properties);
     vpciklass->init = virtio_net_pci_init;
 }
 
@@ -1504,7 +1504,7 @@  static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
 
     k->init = virtio_rng_pci_init;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    dc->props = virtio_rng_pci_properties;
+    device_class_add_properties(dc, virtio_rng_pci_properties);
 
     pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_RNG;
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index e85a979..0e99e1b 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -226,7 +226,7 @@  static void virtio_rng_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
 
-    dc->props = virtio_rng_properties;
+    device_class_add_properties(dc, virtio_rng_properties);
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     vdc->realize = virtio_rng_device_realize;
     vdc->unrealize = virtio_rng_device_unrealize;
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index c1bf357..9440bdb 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -813,7 +813,7 @@  static void xen_pci_passthrough_class_init(ObjectClass *klass, void *data)
     k->config_write = xen_pt_pci_write_config;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->desc = "Assign an host PCI device with Xen";
-    dc->props = xen_pci_passthrough_properties;
+    device_class_add_properties(dc, xen_pci_passthrough_properties);
 };
 
 static const TypeInfo xen_pci_passthrough_info = {
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index d3a2940..30daa3e 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -376,4 +376,7 @@  static inline bool qbus_is_hotpluggable(BusState *bus)
 {
    return bus->hotplug_handler;
 }
+
+void device_class_add_properties(DeviceClass *dc, Property *props);
+
 #endif
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 5ce7350..89edd8b 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -1135,7 +1135,7 @@  static void arm_cpu_class_init(ObjectClass *oc, void *data)
 
     acc->parent_realize = dc->realize;
     dc->realize = arm_cpu_realizefn;
-    dc->props = arm_cpu_properties;
+    device_class_add_properties(dc, arm_cpu_properties);
 
     acc->parent_reset = cc->reset;
     cc->reset = arm_cpu_reset;
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 3f13dfe..e93b1b7 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1323,7 +1323,7 @@  static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
      * instance_init, because they require KVM to be initialized.
      */
 
-    dc->props = host_x86_cpu_properties;
+    device_class_add_properties(dc, host_x86_cpu_properties);
 }
 
 static void host_x86_cpu_initfn(Object *obj)
@@ -2942,7 +2942,7 @@  static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
     xcc->parent_realize = dc->realize;
     dc->realize = x86_cpu_realizefn;
     dc->bus_type = TYPE_ICC_BUS;
-    dc->props = x86_cpu_properties;
+    device_class_add_properties(dc, x86_cpu_properties);
 
     xcc->parent_reset = cc->reset;
     cc->reset = x86_cpu_reset;
diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c
index 67e3182..70d606f 100644
--- a/target-microblaze/cpu.c
+++ b/target-microblaze/cpu.c
@@ -181,7 +181,7 @@  static void mb_cpu_class_init(ObjectClass *oc, void *data)
     cc->get_phys_page_debug = mb_cpu_get_phys_page_debug;
 #endif
     dc->vmsd = &vmstate_mb_cpu;
-    dc->props = mb_properties;
+    device_class_add_properties(dc, mb_properties);
     cc->gdb_num_core_regs = 32 + 5;
 }
 
diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
index 0be9835..c731506 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/test-qdev-global-props.c
@@ -54,7 +54,7 @@  static void static_prop_class_init(ObjectClass *oc, void *data)
     DeviceClass *dc = DEVICE_CLASS(oc);
 
     dc->realize = NULL;
-    dc->props = static_props;
+    device_class_add_properties(dc, static_props);
 }
 
 static const TypeInfo static_prop_type = {