History | View | Annotate | Download (15.1 kB)
qdev: Move bus properties to abstract superclasses
In qdev, each bus in practice identified an abstract superclass, butthis was mostly hidden. In QOM, instead, these abstract classes areexplicit so we can move bus properties there.
All bus property walks are removed, and all device property walks...
qdev: Clean up global properties
Now that global properties do not depend on buses anymore, setthem directly in the device instance_init function.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qemu-option: qemu_opts_from_qdict(): use error_set()
do_device_add() and do_netdev_add() call qerror_report_err() to maintaintheir QError semantics.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-By: Laszlo Ersek <lersek@redhat.com>
Merge remote-tracking branch 'afaerber-or/qom-1.1' into staging
qdev: fix -device foo,?
Since most property types do not have a parse property now, this wasbroken. Fix it by looking at the setter instead.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Acked-by: Andreas F=E4rber <afaerber@suse.de>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qdev: Use object_property_print() in info qtree
Otherwise, non-string properties without a legacy counterpart are missed.Also fix error propagation in object_property_print() itself.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
qom: Refine container_get() to allow using a custom root
Specify the root to search from as argument. This avoids hardcoding"/machine" in some places and makes it more flexible.
Signed-off-by: Andreas Färber <afaerber@suse.de>Cc: Paolo Bonzini <pbonzini@redhat.com>...
qdev: qdev_unplug(): use error_set()
It currently uses qerror_report(), but next commit will convertthe drive_del command to the QAPI and this requires usingerror_set().
One particularity of qerror_report() is that it knows when it'srunning on monitor context or command-line context and prints the...
qapi: convert device_del
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qom: add container_get
This is QOM "mkdir -p". It is useful when referring tocontainer objects such as "/machine".
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: add children before qdev_init
We want the composition tree to to be in order by the time we callqdev_init, so that a single set of the toplevel realize property canpropagate all the way down the composition tree.
This is not the case so far. Unfortunately, this is incompatible...
qdev: put all devices under /machine
Avoid cluttering too much the QOM root.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
device_add: don't add a /peripheral link until init is complete
Otherwise we end up with a dangling reference which causes qdev_free() to fail.
Reported-by: Michael Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: remove direct calls to print/parse
There's no need to call into ->parse and ->print manually. TheQOM legacy properties do that for us.
Furthermore, in some cases legacy and static properties have exactlythe same behavior, and we could drop the legacy properties right away....
qdev: split out UI portions into a new function
qdev-monitor.c deals with the -device, device_add, and info qdm/qtreeinterfaces.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom: move properties from qdev to object
This is mostly code movement although not entirely. This makes properties partof the Object base class which means that we can now start using Object in ameaningful way outside of qdev.
info qdm: do not require a parent_bus to be set
container: make a decendent of Object
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>---v1 -> v2 - Add license (Paolo)