summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2012-12-19Merge remote-tracking branch 'bonzini/header-dirs' into stagingAnthony Liguori134-7/+18246
* bonzini/header-dirs: (45 commits) janitor: move remaining public headers to include/ hw: move executable format header files to hw/ fpu: move public header file to include/fpu softmmu: move remaining include files to include/ subdirectories softmmu: move include files to include/sysemu/ misc: move include files to include/qemu/ qom: move include files to include/qom/ migration: move include files to include/migration/ monitor: move include files to include/monitor/ exec: move include files to include/exec/ block: move include files to include/block/ qapi: move include files to include/qobject/ janitor: add guards to headers qapi: make struct Visitor opaque qapi: remove qapi/qapi-types-core.h qapi: move inclusions of qemu-common.h from headers to .c files ui: move files to ui/ and include/ui/ qemu-ga: move qemu-ga files to qga/ net: reorganize headers net: move net.c to net/ ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-19janitor: move remaining public headers to include/Paolo Bonzini4-0/+1767
Headers in the root directory are now used only from within that directory. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19fpu: move public header file to include/fpuPaolo Bonzini2-1/+639
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19softmmu: move remaining include files to include/ subdirectoriesPaolo Bonzini2-0/+274
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini16-1/+1343
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini60-38/+4359
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qom: move include files to include/qom/Paolo Bonzini5-4/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19migration: move include files to include/migration/Paolo Bonzini6-1/+1035
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19monitor: move include files to include/monitor/Paolo Bonzini5-4/+160
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini23-0/+4065
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19block: move include files to include/block/Paolo Bonzini9-0/+1743
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qapi: move include files to include/qobject/Paolo Bonzini27-5/+1208
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19ui: move files to ui/ and include/ui/Paolo Bonzini5-0/+790
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19net: reorganize headersPaolo Bonzini5-0/+376
Move public headers to include/net, and leave private headers in net/. Put the virtio headers in include/net/tap.h, removing the multiple copies that existed. Leave include/net/tap.h as the interface for NICs, and net/tap_int.h as the interface for OS-specific parts of the tap backend. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19build: kill libdis, move disassemblers to disas/Paolo Bonzini2-0/+526
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-30stream: fix ratelimit_set_speedDietmar Maurer1-1/+1
The formula to compute slice_quota was wrong since commit 6ef228fc. Signed-off-by: Dietmar Maurer <dietmar@proxmox.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-11-26virtio-rng: fix typos, commentsAmit Shah1-3/+3
Fix typos, whitespace and update comments to match current implementation. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26qom: make object_finalize staticPaolo Bonzini1-9/+0
It is not used anymore, and there is no need to make it public. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26qom: make object_delete usable for statically-allocated objectsPaolo Bonzini1-0/+9
Store in the object the freeing function that will be used at deletion time. This makes it possible to use object_delete on statically-allocated (embedded) objects. Dually, it makes it possible to use object_unparent and object_unref without leaking memory, when the lifetime of object might extend until after the call to object_delete. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26qdev: move bus removal to object_unparentPaolo Bonzini1-0/+11
Add an ObjectClass method that is done at object_unparent time. It should remove any backlinks to the object in the composition tree, so that object_delete will be able to drop the last reference and free the object. Use it for qdev buses. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-16rng-random: add an RNG backend that uses /dev/random (v3)Anthony Liguori1-0/+22
The filename can be overridden but it expects a non-blocking source of entropy. A typical invocation would be: qemu -object rng-random,id=rng0 -device virtio-rng-pci,rng=rng0 This can also be used with /dev/urandom by using the command line: qemu -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - merged header split patch into this one v2 -> v3 - bug fix in rng-random (Paolo)
2012-11-16rng: add RndBackend abstract object classAnthony Liguori1-0/+93
This is the backend used by devices that need to request entropy. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-16object: add object_property_add_bool (v2)Anthony Liguori1-0/+16
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Fix whitespace (Andreas Faerber)
2012-10-31cpu: Move thread_id to CPUStateAndreas Färber1-0/+1
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpus: Pass CPUState to run_on_cpu()Andreas Färber1-0/+10
CPUArchState is no longer needed. Move the declaration to include/qemu/cpu.h and add documentation. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpus: Pass CPUState to [qemu_]cpu_has_work()Andreas Färber1-0/+10
For target-mips also change the return type to bool. Make include paths for cpu-qom.h consistent for alpha and unicore32. Signed-off-by: Andreas Färber <afaerber@suse.de> [AF: Updated new target-openrisc function accordingly] Acked-by: Richard Henderson <rth@twiddle.net> (for alpha)
2012-10-31cpu: Move queued_work_{first,last} to CPUStateAndreas Färber1-0/+1
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpus: Pass CPUState to qemu_cpu_kick()Andreas Färber1-0/+8
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpu: Move halt_cond to CPUStateAndreas Färber1-0/+1
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpus: Pass CPUState to cpu_is_stopped()Andreas Färber1-0/+11
CPUArchState is no longer needed there. Also change the return type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpu: Move stopped field to CPUStateAndreas Färber1-0/+2
Change its type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpu: Move stop field to CPUStateAndreas Färber1-0/+2
Change its type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpu: Move created field to CPUStateAndreas Färber1-0/+2
Change its type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpus: Pass CPUState to qemu_cpu_is_self()Andreas Färber1-0/+10
Change return type to bool, move to include/qemu/cpu.h and add documentation. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com> [AF: Updated new caller qemu_in_vcpu_thread()]
2012-08-13Merge remote-tracking branch 'quintela/migration-next-20120808' into stagingAnthony Liguori1-0/+79
* quintela/migration-next-20120808: Restart optimization on stage3 update version Add XBZRLE statistics Add migration accounting for normal and duplicate pages Change total_time to total-time in MigrationStats Add migrate_set_cache_size command Add XBZRLE to ram_save_block and ram_save_live Add xbzrle_encode_buffer and xbzrle_decode_buffer functions Add uleb encoding/decoding functions Add cache handling functions Add XBZRLE documentation Add migrate-set-capabilities Add migration capabilities
2012-08-13qom: Reimplement InterfacesAnthony Liguori1-16/+30
The current implementation of Interfaces is poorly designed. Each interface that an object implements ends up being an object that's tracked by the implementing object. There's all sorts of gymnastics to deal with casting between these objects. But an interface shouldn't be associated with an Object. Interfaces are global to a class. This patch moves all Interface knowledge to ObjectClass eliminating the relationship between Object and Interfaces. Interfaces are now abstract (as they should be) but this is okay. Interfaces essentially act as additional parents for the classes and are treated as such. With this new implementation, we should fully support derived interfaces including reimplementing an inherited interface. PC: Rebased against qom-next merge Jun-2012. PC: Removed replication of cast logic for interfaces, i.e. there is only one cast function - object_dynamic_cast() (and object_dynamic_cast_assert()) Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-08-08Add cache handling functionsOrit Wasserman1-0/+79
Add MRU page cache mechanism. The page are accessed by their address. Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com> Signed-off-by: Petter Svard <petters@cs.umu.se> Signed-off-by: Aidan Shribman <aidan.shribman@sap.com> Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2012-08-02cpu: Move thread_kicked to CPUStateAndreas Färber1-0/+1
Change field type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-08-02cpu: Move thread field into CPUStateAndreas Färber1-0/+1
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-08-02cpu: Move CPU_COMMON_THREAD into CPUStateAndreas Färber1-0/+5
CPU_COMMON_THREAD was only used for Windows, adding an hThread field to CPU_COMMON. Move the field into QOM CPUState and change its type to HANDLE, which it is assigned from. This requires Windows headers, pulled in through qemu-thread.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18Merge remote-tracking branch 'afaerber-or/qom-next-2' into stagingAnthony Liguori1-5/+42
* afaerber-or/qom-next-2: (22 commits) qom: Push error reporting to object_property_find() qdev: Remove qdev_prop_exists() qbus: Initialize in standard way qbus: Make child devices links qdev: Connect busses with their parent devices qdev: Convert busses to QEMU Object Model qdev: Move SysBus initialization to sysbus.c qdev: Use wrapper for qdev_get_path qdev: Remove qdev_prop_set_defaults qdev: Clean up global properties qdev: Move bus properties to abstract superclasses qdev: Move bus properties to a separate global qdev: Push "type" property up to Object arm_l2x0: Rename "type" property to "cache-type" m48t59: Rename "type" property to "model" qom: Assert that public types have a non-NULL parent field qom: Drop type_register_static_alias() macro qom: Make Object a type qom: Add class_base_init qom: Add object_child_foreach() ...
2012-06-18qom: Push error reporting to object_property_find()Paolo Bonzini1-1/+3
Avoids duplicated error_set(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Also drop error_set() in object_property_del().] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Remove qdev_prop_exists()Paolo Bonzini1-0/+9
Can be replaced everywhere with object_property_find(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Drop type_register_static_alias() macroPaolo Bonzini1-2/+0
It's unused. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Make Object a typePaolo Bonzini1-1/+1
Right now the base Object class has a special NULL type. Change this so that we will be able to add class_init and class_base_init callbacks. To do this, remove some special casing of ObjectClass that is not really necessary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Add class_base_initPaolo Bonzini1-2/+8
The class_base_init TypeInfo callback was present in one of the early QOM versions but removed (on my request...) before committing. We will need it soon, add it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Add object_child_foreach()Paolo Bonzini1-0/+14
A utility function that will be used to implement hierarchical realization. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony 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: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Add object_class_get_parent()Paolo Bonzini1-0/+8
This simple bit of functionality was missing and we'll need it soon, so add it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> [AF: Document possible NULL return value] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-15stream: move rate limiting to a separate header filePaolo Bonzini1-0/+48
Make the code reusable. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-05-12qom: Documentation addition for object_class_by_name()Paolo Bonzini1-0/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Document the possible NULL return value] Signed-off-by: Andreas Färber <afaerber@suse.de>