- 18 6月, 2012 3 次提交
-
-
由 Paolo Bonzini 提交于
A utility function that will be used to implement hierarchical realization. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> [AF: Drop unrelated whitespace change, add Returns: in documentation] [AF: Use new object_property_is_child() helper.] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Avoids hardcoding partial string comparisons. Signed-off-by: NAlexander Barabash <alexander_barabash@mentor.com> Signed-off-by: NAndreas Färber <afaerber@suse.de> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This simple bit of functionality was missing and we'll need it soon, so add it. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> [AF: Document possible NULL return value] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 12 5月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Otherwise, non-string properties without a legacy counterpart are missed. Also fix error propagation in object_property_print() itself. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 03 4月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
This is QOM "mkdir -p". It is useful when referring to container objects such as "/machine". Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 15 3月, 2012 3 次提交
-
-
由 Andreas Färber 提交于
This function allows to obtain a singly-linked list of classes, which can be sorted by the caller. Signed-off-by: NAndreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Igor Mitsyanko 提交于
Function name type_class_init() gave us a wrong impression of separation of type's "class" and "object" entities initialization. Name type_initialize() is more appropriate for type_class_init() function (considering what operations it performs). Signed-off-by: NIgor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Igor Mitsyanko 提交于
QOM documentation states that for objects of type with @instance_size == 0 size will be assigned to match parent object's size. But currently this feauture is not implemented and qemu asserts during creation of object with zero instance_size. Set appropriate value for type instance_size during type_class_init() call. object_initialize_with_type() must call type_class_init() before asserting type->instance_size, and object_new_with_type() must call type_class_init() before object allocation. Signed-off-by: NIgor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 13 3月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Property removal modifies the list, so it is not safe to continue iteration. We know anyway that each object can have only one parent (see object_property_add_child), so exit after finding the requested object. Reported-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 23 2月, 2012 1 次提交
-
-
由 Alexander Barabash 提交于
In the old implementation, if the new value of the property links to the same object, as the old value, that object is first unref-ed, and then ref-ed. This leads to unintended deinitialization of that object. In the new implementation, this is fixed. Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAlexander Barabash <alexander_barabash@mentor.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 22 2月, 2012 2 次提交
-
-
由 Andreas Färber 提交于
Assert the object is at least sizeof(Object), not sizeof(ObjectClass). Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Paolo Bonzini 提交于
Add generic property accessors that take a string and parse it appropriately for the property type. All the magic here is done by the new string-based visitors. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 15 2月, 2012 1 次提交
-
-
由 Andreas Färber 提交于
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: NAndreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 07 2月, 2012 9 次提交
-
-
由 Paolo Bonzini 提交于
These can set a link to any object, as long as it is included in the composition tree. Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This allows to restrict partial matches to objects of the expected type. It will let people use bare names to reference drives even though their name might be the same as a device's (e.g. -drive id=hd0,if=none,... -device ...,drive=hd0,id=hd0). As a useful byproduct, this fixes a problem with links of interface type. When a link property's type is an interface, the code expects the implementation object (not the parent object) to be stored in the variable. The parent object does not contain the right vtable. Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Add wrappers that let you get/set properties using normal C data types. Reviewed-by: Anthony Liguori <anthony@aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The interface loop can be performed only on the parent object. It does not need to be done on each interface. Similarly, we can simplify the code by switching early from the implementation object to the parent object. Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 04 2月, 2012 5 次提交
-
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Add license (Paolo)
-
由 Anthony Liguori 提交于
Now we have the following behavior: 1) object_new() returns an object with ref = 1 2) object_initialize() does not increase the reference count (ref may be 0). 3) object_deref() will finalize the object when ref = 0. it does not free the memory associated with the object. 4) both link and child properties correctly set the reference count. The expected usage is the following: 1) child devices should generally be created via object_initialize() using memory from the parent device. Adding the object as a child property will take ownership of the object and tie the child's life cycle to the parent. 2) If a child device is created via qdev_create() or some other form of object_new(), there must be an object_delete() call in the parent device's finalize function. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Links had limited utility before as they only allowed a concrete type to be specified. Now we can support abstract types and interfaces which means it's now possible to have a link<PCIDevice>. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
This is mostly code movement although not entirely. This makes properties part of the Object base class which means that we can now start using Object in a meaningful way outside of qdev. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 1月, 2012 2 次提交
-
-
由 Anthony Liguori 提交于
Reported-by: NBlue Swirl <blauwirbel@gmail.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
This class provides the main building block for QEMU Object Model and is extensively documented in the header file. It is largely inspired by GObject. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - remove printf() in type registration - fix typo in comment (Paolo) - make Interface private - move object into a new directory and move header into include/qemu/ - don't make object.h depend on qemu-common.h - remove Type and replace it with TypeImpl * (Paolo) - use hash table to store types (Paolo) - aggressively cache parent type (Paolo) - make a type_register and use it with interfaces (Paolo) - fix interface cast comment (Paolo) - add a few more functions required in later series
-