qdev: Drop misleading qbus_free() function
Same reasoning as commit 02a5c4c97422b40034f31265e0f139f7846172a8("qdev: Drop misleading qdev_free() function"). The qbus_free()function removes the child from the namespace and decrements thereference count. It does not, however, guarantee to free the child...
apic: Cleanup for QOM'ification
Do some cleanup, including:1. Remove DO_UPCAST() for APICCommonState2. Change DeviceState pointers from 'd' to 'dev', better to understand3. Rename 'register_types' to specifically 'apic_common_register_types'
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>...
apic: QOM'ify APIC
Convert 'init' function to QOM's 'realize' for apic, kvm/apic andxen/xen_apic.
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qom: Detect bad reentrance during object_class_foreach()
We should not modify the type hash table while it is being iterated on.Assert that it does not happen.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
hw: cannot_instantiate_with_device_add_yet due to pointer props
Pointer properties can be set only by code, not by device_add. Adevice with a pointer property can work with device_add only when theproperty may remain null.
This is the case for property "interrupt_vector" of device...
qdev: Document that pointer properties kill device_add
Ask users of DEFINE_PROP_PTR() to setcannot_instantiate_with_device_add_yet, or explain why it's notneeded.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qom: Split out object and class caches
The object-cast and class-cast caches cannot be shared because classcaching is conditional on the target type not being an interface andobject caching is unconditional. Leads to a bug when a class castto an interface follows an object cast to the same interface type:...
qom: Do not register interface "types" in the type table and fix names
There should be no need to look up nor enumerate the interface "types",whose "classes" are really just vtables. Just create the types andadd them to the interface list of the parent type....
tests: Test QOM interface casting
Add basic regression testing for QOM Interface usage.Test checks casting to interface type/class for following cases: - interface implementation in leaf class - interface implementation in intermediate (parent) class...
qdev-monitor: Avoid device_add crashing on non-device driver name
Watch this:
$ upstream-qemu -nodefaults -S -display none -monitor stdio QEMU 1.7.50 monitor - type 'help' for more information (qemu) device_add rng-egd /work/armbru/qemu/qdev-monitor.c:491:qdev_device_add: Object 0x2089b00 is not an instance of type device...
View all revisions | View revisions
Also available in: Atom