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: Fix pointer to int property helpers' documentation
Relocate to alongside the other object_property_add_* helpers while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
qom: add pointer to int property helpers
Make it easy to add read-only helpers for simpleinteger properties in memory.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>Tested-by: Gerd Hoffmann <kraxel@redhat.com>...
qom: cleanup struct Error references
now that a typedef for struct Error is available,use it in qom/object.h to match coding style rules.
cleanup object.h: include error.h directly
qapi/error.h is simple enough to be included in qom/object.hdirecly and prepares qom/object.h to use Error typedef.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthandmacros.
cpu: Replace qemu_for_each_cpu()
It was introduced to loop over CPUs from target-independent code, butsince commit 182735efaf956ccab50b6d74a4fed163e0f35660 target-independentCPUState is used.
A loop can be considered more efficient than function calls in a loop,...
qom: Pass available size to object_initialize()
To be passed on to object_initialize_with_type().
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (virtio-ccw)Signed-off-by: Andreas Färber <afaerber@suse.de>
qom: Assert instance size in object_initialize_with_type()
This catches objects initializing beyond allocated memory, e.g.,when subtypes get extended with instance state of their own.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andreas Färber <afaerber@suse.de>
View revisions
Also available in: Atom