qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 0/8] qdev class properties + abstract class s


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v3 0/8] qdev class properties + abstract class support on device-list-properties
Date: Thu, 27 Oct 2016 17:48:43 -0200
User-agent: Mutt/1.7.0 (2016-08-17)

Just found out that this series triggers a bug in the
class-property system:

TEST: tests/drive_del-test... (pid=17277)
  /x86_64/drive_del/without-dev:                                       OK
  /x86_64/drive_del/after_failed_device_add:                           **
ERROR:/home/ehabkost/rh/proj/virt/qemu/tests/drive_del-test.c:20:drive_add: 
assertion failed (resp == "OK\r\n"): ("Duplicate ID 'drive0' for drive\r\n" == 
"OK\r\n")
FAIL

It looks like this is happening because the release function is
never called for class properties. I will try to fix this before
resending the series.

On Wed, Oct 26, 2016 at 02:30:18PM -0200, Eduardo Habkost wrote:
> This series allows abstract classes to be used on
> device-list-properties, which will return all class properties
> registered for the class.
> 
> Changes v2 -> v3:
> * Small alignment fix in patch 3/6
> * Included patches from "tests: A few check-qom-proplist fixes"
>   in the series
> * Rebased to latest qemu.git master
> 
> Changes v1 -> v2:
> * s/qdev_class_set_props/device_class_set_props/
>   * Suggested-by: Andreas Färber <address@hidden>
> 
> Patches 1-2 are simple test cases fixes (taken from the ""tests:
> A few check-qom-proplist fixes" series).
> 
> Patches 3-5 change qdev to register all static properties as
> class properties instead of instance properties.
> 
> Patches 6-7 change device-list-properties so it can return the
> list of properties for abstract classes.
> 
> Patch 8 just adds a warning to people to not use
> qdev_property_add_static() in new code.
> 
> A git branch containing this series can be seen at:
>   https://github.com/ehabkost/qemu-hacks.git 
> work/device-list-abstract-properties
> 
> Eduardo Habkost (8):
>   tests: check-qom-proplist: Remove duplicate "bv" property
>   tests: check-qom-proplist: Use &error_abort to catch errors
>   qdev: device_class_set_props() function
>   qdev: Extract property-default code to qdev_property_set_to_default()
>   qdev: Register static properties as class properties
>   qom: object_class_property_iter_init() function
>   qmp: Support abstract classes on device-list-properties
>   qdev: Warning about using object_class_property_add() in new code
> 
>  hw/9pfs/virtio-9p-device.c          |   2 +-
>  hw/acpi/piix4.c                     |   2 +-
>  hw/arm/armv7m.c                     |   2 +-
>  hw/arm/bcm2836.c                    |   2 +-
>  hw/arm/integratorcp.c               |   2 +-
>  hw/arm/musicpal.c                   |   2 +-
>  hw/arm/pxa2xx.c                     |   4 +-
>  hw/arm/pxa2xx_gpio.c                |   2 +-
>  hw/arm/spitz.c                      |   2 +-
>  hw/arm/stm32f205_soc.c              |   2 +-
>  hw/arm/strongarm.c                  |   2 +-
>  hw/arm/xlnx-zynqmp.c                |   2 +-
>  hw/audio/ac97.c                     |   2 +-
>  hw/audio/adlib.c                    |   2 +-
>  hw/audio/cs4231.c                   |   2 +-
>  hw/audio/cs4231a.c                  |   2 +-
>  hw/audio/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/m25p80.c                   |   2 +-
>  hw/block/nand.c                     |   2 +-
>  hw/block/nvme.c                     |   2 +-
>  hw/block/onenand.c                  |   2 +-
>  hw/block/pflash_cfi01.c             |   2 +-
>  hw/block/pflash_cfi02.c             |   2 +-
>  hw/block/virtio-blk.c               |   2 +-
>  hw/char/bcm2835_aux.c               |   2 +-
>  hw/char/cadence_uart.c              |   2 +-
>  hw/char/debugcon.c                  |   2 +-
>  hw/char/digic-uart.c                |   2 +-
>  hw/char/escc.c                      |   2 +-
>  hw/char/etraxfs_ser.c               |   2 +-
>  hw/char/exynos4210_uart.c           |   2 +-
>  hw/char/grlib_apbuart.c             |   2 +-
>  hw/char/imx_serial.c                |   2 +-
>  hw/char/ipoctal232.c                |   2 +-
>  hw/char/lm32_juart.c                |   2 +-
>  hw/char/lm32_uart.c                 |   2 +-
>  hw/char/milkymist-uart.c            |   2 +-
>  hw/char/parallel.c                  |   2 +-
>  hw/char/pl011.c                     |   2 +-
>  hw/char/sclpconsole-lm.c            |   2 +-
>  hw/char/sclpconsole.c               |   2 +-
>  hw/char/serial-isa.c                |   2 +-
>  hw/char/serial-pci.c                |   6 +-
>  hw/char/spapr_vty.c                 |   2 +-
>  hw/char/stm32f2xx_usart.c           |   2 +-
>  hw/char/virtio-console.c            |   2 +-
>  hw/char/virtio-serial-bus.c         |   4 +-
>  hw/char/xilinx_uartlite.c           |   2 +-
>  hw/core/generic-loader.c            |   2 +-
>  hw/core/or-irq.c                    |   2 +-
>  hw/core/platform-bus.c              |   2 +-
>  hw/core/qdev.c                      | 114 
> +++++++++++++++++++++++++++++-------
>  hw/cpu/a15mpcore.c                  |   2 +-
>  hw/cpu/a9mpcore.c                   |   2 +-
>  hw/cpu/arm11mpcore.c                |   2 +-
>  hw/cpu/realview_mpcore.c            |   2 +-
>  hw/display/bcm2835_fb.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                    |   2 +-
>  hw/display/tcx.c                    |   2 +-
>  hw/display/vga-isa.c                |   2 +-
>  hw/display/vga-pci.c                |   4 +-
>  hw/display/virtio-gpu-pci.c         |   2 +-
>  hw/display/virtio-gpu.c             |   2 +-
>  hw/display/virtio-vga.c             |   2 +-
>  hw/display/vmware_vga.c             |   2 +-
>  hw/dma/i82374.c                     |   2 +-
>  hw/dma/i8257.c                      |   2 +-
>  hw/dma/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/imx_gpio.c                  |   2 +-
>  hw/gpio/omap_gpio.c                 |   4 +-
>  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/virtio-input-hid.c         |   2 +-
>  hw/input/virtio-input-host.c        |   2 +-
>  hw/input/virtio-input.c             |   2 +-
>  hw/input/vmmouse.c                  |   2 +-
>  hw/intc/apic_common.c               |   2 +-
>  hw/intc/arm_gic_common.c            |   2 +-
>  hw/intc/arm_gicv2m.c                |   2 +-
>  hw/intc/arm_gicv3_common.c          |   2 +-
>  hw/intc/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/ioapic.c                    |   2 +-
>  hw/intc/mips_gic.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/ipmi/ipmi.c                      |   2 +-
>  hw/ipmi/ipmi_bmc_extern.c           |   2 +-
>  hw/ipmi/isa_ipmi_bt.c               |   2 +-
>  hw/ipmi/isa_ipmi_kcs.c              |   2 +-
>  hw/isa/lpc_ich9.c                   |   2 +-
>  hw/isa/pc87312.c                    |   2 +-
>  hw/isa/vt82c686.c                   |   2 +-
>  hw/mem/pc-dimm.c                    |   2 +-
>  hw/mips/cps.c                       |   2 +-
>  hw/misc/a9scu.c                     |   2 +-
>  hw/misc/applesmc.c                  |   2 +-
>  hw/misc/arm11scu.c                  |   2 +-
>  hw/misc/arm_l2x0.c                  |   2 +-
>  hw/misc/arm_sysctl.c                |   2 +-
>  hw/misc/aspeed_scu.c                |   2 +-
>  hw/misc/aspeed_sdmc.c               |   2 +-
>  hw/misc/bcm2835_property.c          |   2 +-
>  hw/misc/debugexit.c                 |   2 +-
>  hw/misc/eccmemctl.c                 |   2 +-
>  hw/misc/ivshmem.c                   |   6 +-
>  hw/misc/macio/cuda.c                |   2 +-
>  hw/misc/macio/macio.c               |   2 +-
>  hw/misc/mips_cmgcr.c                |   2 +-
>  hw/misc/mips_cpc.c                  |   2 +-
>  hw/misc/mips_itu.c                  |   2 +-
>  hw/misc/pvpanic.c                   |   2 +-
>  hw/net/allwinner_emac.c             |   2 +-
>  hw/net/cadence_gem.c                |   2 +-
>  hw/net/dp8393x.c                    |   2 +-
>  hw/net/e1000.c                      |   2 +-
>  hw/net/e1000e.c                     |   2 +-
>  hw/net/eepro100.c                   |   2 +-
>  hw/net/etraxfs_eth.c                |   2 +-
>  hw/net/fsl_etsec/etsec.c            |   2 +-
>  hw/net/imx_fec.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/rocker/rocker.c              |   2 +-
>  hw/net/rtl8139.c                    |   2 +-
>  hw/net/smc91c111.c                  |   2 +-
>  hw/net/spapr_llan.c                 |   2 +-
>  hw/net/stellaris_enet.c             |   2 +-
>  hw/net/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                   |   4 +-
>  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/pci_expander_bridge.c |   4 +-
>  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_rng.c                  |   2 +-
>  hw/ppc/spapr_vio.c                  |   2 +-
>  hw/s390x/css-bridge.c               |   2 +-
>  hw/s390x/ipl.c                      |   2 +-
>  hw/s390x/s390-pci-bus.c             |   2 +-
>  hw/s390x/virtio-ccw.c               |  18 +++---
>  hw/scsi/megasas.c                   |   2 +-
>  hw/scsi/mptsas.c                    |   2 +-
>  hw/scsi/scsi-bus.c                  |   2 +-
>  hw/scsi/scsi-disk.c                 |   8 +--
>  hw/scsi/scsi-generic.c              |   2 +-
>  hw/scsi/spapr_vscsi.c               |   2 +-
>  hw/scsi/vhost-scsi.c                |   2 +-
>  hw/scsi/virtio-scsi.c               |   2 +-
>  hw/scsi/vmw_pvscsi.c                |   2 +-
>  hw/sd/sd.c                          |   2 +-
>  hw/sd/sdhci.c                       |   4 +-
>  hw/sparc/sun4m.c                    |   4 +-
>  hw/sparc64/sun4u.c                  |   4 +-
>  hw/ssi/aspeed_smc.c                 |   2 +-
>  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/stm32f2xx_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/vfio/pci.c                       |   2 +-
>  hw/vfio/platform.c                  |   2 +-
>  hw/virtio/vhost-vsock.c             |   2 +-
>  hw/virtio/virtio-balloon.c          |   2 +-
>  hw/virtio/virtio-mmio.c             |   2 +-
>  hw/virtio/virtio-pci.c              |  20 +++----
>  hw/virtio/virtio-rng.c              |   2 +-
>  hw/virtio/virtio.c                  |   2 +-
>  hw/xen/xen_backend.c                |   2 +-
>  hw/xen/xen_pt.c                     |   2 +-
>  include/hw/qdev-core.h              |   6 ++
>  include/qom/object.h                |  14 +++++
>  qmp.c                               |  21 +++----
>  qom/object.c                        |  11 +++-
>  target-arm/cpu.c                    |   2 +-
>  target-i386/cpu.c                   |   4 +-
>  target-microblaze/cpu.c             |   2 +-
>  target-ppc/translate_init.c         |   6 +-
>  tests/check-qom-proplist.c          |  38 +++++++++---
>  tests/test-qdev-global-props.c      |   2 +-
>  265 files changed, 476 insertions(+), 354 deletions(-)
> 
> -- 
> 2.7.4
> 
> 

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]