summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-15qom: add vga node to the pc composition treeAnthony Liguori6-27/+38
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: optimize qdev_get_canonical_path using a parent linkAnthony Liguori2-32/+28
The full tree search was a bit unreasonable. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15rtc: add a dynamic property for retrieving the dateAnthony Liguori1-0/+27
This really shows the power of dynamic object properties compared to qdev static properties. This property represents a complex structure who's format is preserved over the wire. This is enabled by visitors. It also shows an entirely synthetic property that is not tied to device state. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15rtc: make piix3 set the rtc as a child (v2)Anthony Liguori2-0/+14
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15dev: add an anonymous peripheral containerAnthony Liguori1-1/+20
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qdev: add explicitly named devices to the root complexAnthony Liguori1-0/+14
We first add a 'peripheral' container to the root device that we add user created devices to. This provides all user created devices with a unique and isolated namespace. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: qom_{get, set} monitor commands (v2)Anthony Liguori4-0/+140
This allows clients to read and write device model properties through QMP. QAPI doesn't support Visitor types yet and these commands are special in that they don't work with fixed types. I've added a documentation stub to qapi-schema.json so we can keep consistency there. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qmp: add qom-list commandAnthony Liguori3-0/+82
This can be used to list properties in the device model. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qapi: allow a 'gen' key to suppress code generationAnthony Liguori2-0/+2
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: add link properties (v2)Anthony Liguori2-0/+97
Links represent an ephemeral relationship between devices. They are meant to replace the qdev concept of busses by allowing more informal relationships between devices. Links are fairly limited in their usefulness without implementing QOM-style subclassing and interfaces. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: add child properties (composition) (v3)Anthony Liguori2-0/+46
Child properties express a relationship of composition. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qdev: provide a path resolution (v2)Anthony Liguori2-0/+131
There are two types of supported paths--absolute paths and partial paths. Absolute paths are derived from the root device and can follow child<> or link<> properties. Since they can follow link<> properties, they can be arbitrarily long. Absolute paths look like absolute filenames and are prefixed with a leading slash. Partial paths are look like relative filenames. They do not begin with a prefix. The matching rules for partial paths are subtle but designed to make specifying devices easy. At each level of the composition tree, the partial path is matched as an absolute path. The first match is not returned. At least two matches are searched for. A successful result is only returned if only one match is founded. If more than one match is found, a flag is returned to indicate that the match was ambiguous. At the end of the day, partial path support means that if you create a device called 'ide0', you can just say 'ide0' as the path name and it will Just Work. If we internally create a device called 'i440fx', you can just say 'i440fx' and it will Just Work and long as you don't do anything silly. A management tool should probably always use absolute paths since then they don't have to deal with the possibility of ambiguity. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qdev: provide an interface to return canonical path from root (v2)Anthony Liguori2-0/+57
The canonical path is the path in the composition tree from the root to the device. This is effectively the name of the device. This is an incredibly unefficient implementation that will be optimized in a future patch. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: introduce root deviceAnthony Liguori4-1/+41
This is based on Jan's suggestion for how to do unique naming. The root device is the root of composition. All devices are reachable via child<> links from this device. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: register legacy properties as new style properties (v2)Anthony Liguori2-0/+93
Expose all legacy properties through the new QOM property mechanism. The qdev property types are exposed through the 'legacy<>' namespace. They are always visited as strings since they do their own string parsing. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: add new dynamic property infrastructure based on Visitors (v2)Anthony Liguori4-0/+224
qdev properties are settable only during construction and static to classes. This isn't flexible enough for QOM. This patch introduces a property interface for qdev that provides dynamic properties that are tied to objects, instead of classes. These properties are Visitor based instead of string based too. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: add a reference count to qdev objectsAnthony Liguori2-0/+42
To ensure that a device isn't removed from the graph until all of its links are broken. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qiov: prevent double free or use-after-freePaolo Bonzini1-0/+3
qemu_iovec_destroy does not clear the QEMUIOVector fully, and the data could thus be used after free or freed again. While I do not know any example in the tree, I observed this using virtio-scsi (and SCSI scatter/gather) when canceling DMA requests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15block/cow: Return real error codeLi Zhi Hui1-15/+29
Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15coroutine: switch per-thread free pool to a global poolAvi Kivity1-14/+16
ucontext-based coroutines use a free pool to reduce allocations and deallocations of coroutine objects. The pool is per-thread, presumably to improve locality. However, as coroutines are usually allocated in a vcpu thread and freed in the I/O thread, the pool accounting gets screwed up and we end allocating and freeing a coroutine for every I/O request. This is expensive since large objects are allocated via the kernel, and are not cached by the C runtime. Fix by switching to a global pool. This is safe since we're protected by the global mutex. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15qcow2: Allow >4 GB VM stateKevin Wolf5-6/+42
This is a compatible extension to the snapshot header format that allows saving a 64 bit VM state size. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15Documentation: Add qemu-img -t parameter in man pageKevin Wolf2-6/+10
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-15qemu-img rebase: Fix for undersized backing filesKevin Wolf1-9/+33
Backing files may be smaller than the corresponding COW file. When reading directly from the backing file, qemu-img rebase must consider this and assume zero sectors after the end of backing files. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-15rbd: always set out parameter in qemu_rbd_snap_listJosh Durgin1-1/+2
The caller expects psn_tab to be NULL when there are no snapshots or an error occurs. This results in calling g_free on an invalid address. Reported-by: Oliver Francke <Oliver@filoo.de> Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15block/qcow2.c: call qcow2_free_snapshots in the function of qcow2_closeLi Zhi Hui1-0/+1
Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15block: avoid useless checks on acb->bhPaolo Bonzini1-3/+1
Coverity is confused by this "if" and reports leaks on acb->bh. The bottom half is always deleted before releasing the AIOCB, in either bdrv_aio_cancel_em or bdrv_aio_bh_cb. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15block: dma_bdrv_* does not return NULLPaolo Bonzini2-9/+1
Initially attempted with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = ( dma_bdrv_io | dma_bdrv_read | dma_bdrv_write ) (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however did not match anything. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15dma: the passed io_func does not return NULLPaolo Bonzini1-3/+1
Initially found with the following semantic patch: @ type @ BlockDriverAIOCB *x; expression E; @@ x = E; - if (x == NULL) { ... } @ acb1 @ expression E, E1; @@ E1->acb = E; - if (E1->acb == NULL) { ... } @ aiocb1 @ expression E, E1; @@ E1->aiocb = E; - if (E1->aiocb == NULL) { ... } @ acb @ expression E, E1; @@ E1.acb = E; - if (E1.acb == NULL) { ... } @ aiocb @ expression E, E1; @@ E1.aiocb = E; - if (E1.aiocb == NULL) { ... } but changed manually to include an assert. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15block: qemu_aio_get does not return NULLPaolo Bonzini5-42/+19
Initially done with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = qemu_aio_get (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however missed occurrences in linux-aio.c and posix-aio-compat.c. Those were done by hand. The change in vdi_aio_setup's caller was also done by hand. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15block: simplify failure handling for bdrv_aio_multiwritePaolo Bonzini1-26/+2
Now that early failure of bdrv_aio_writev is not possible anymore, mcb->num_requests can be set before the loop starts. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-15block: bdrv_aio_* do not return NULLPaolo Bonzini14-212/+46
Initially done with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = ( bdrv_aio_readv | bdrv_aio_writev | bdrv_aio_flush | bdrv_aio_discard | bdrv_aio_ioctl ) (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however missed the occurrence in block/blkverify.c (as it should have done), and left behind some unused variables. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-14tcg/arm: remove fixed map code buffer restrictionDr. David Alan Gilbert2-22/+13
On ARM, don't map the code buffer at a fixed location, and fix up the call/goto tcg routines to let it do long jumps. Mapping the code buffer at a fixed address could sometimes result in it being mapped over the top of the heap with pretty random results. Signed-off-by: Dr. David Alan Gilbert <david.gilbert@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-12-14Merge branch 'target-arm.for-upstream' of ↵Andrzej Zaborowski1-53/+42
git://git.linaro.org/people/pmaydell/qemu-arm
2011-12-14Merge remote-tracking branch 'stefanha/trivial-patches-next' into stagingAnthony Liguori94-533/+228
2011-12-14doc: Remove Symbian Virtual PlatformStefan Weil1-23/+0
Commit d396a657baec8c6b7aa0c888746e0e2f78303650 removed the code for SVP, so the documentation needs this update. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-14migration.h: remove incoming_expected declarationsIsaku Yamahata1-2/+0
The variable is deleted by 1bcef683bf840a928d633755031ac572d5fdb851 So remove its declaration. Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-14tcg: make tcg_const_ptr actually accept a pointer argumentPeter Maydell2-5/+5
Make tcg_const_ptr() include a cast so that you can pass it a pointer. This allows us to drop the casts we had in all the places that use this macro. Acked-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-14Fix spelling in comments, documentation and messagesStefan Weil17-23/+23
accidently->accidentally annother->another choosen->chosen consideres->considers decriptor->descriptor developement->development paramter->parameter preceed->precede preceeding->preceding priviledge->privilege propogation->propagation substraction->subtraction throught->through upto->up to usefull->useful Fix also grammar in posix-aio-compat.c Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-14hw: Fix spelling in comments and codeStefan Weil1-7/+7
compatiblity->compatibility transfered->transferred transfering->transferring Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-14hw: Fix spelling in commentsStefan Weil3-3/+3
adress->address advertisment->advertisement begining->beginning bondary->boundary controler->controller controll->control convertion->conversion doesnt->doesn't existant->existent instuction->instruction loosing->losing managment->management multipled->multiplied negotation->negotiation runing->running teh->the unchangable->unchangeable writen->written yeild->yield Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-14hw: Fix spelling (licenced->licensed)Stefan Weil5-5/+5
New code introduced old misspellings. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-14fmopl: Fix spelling in code and commentsStefan Weil2-18/+18
algorythm->algorithm rythm->rhythm I did not try to fix the coding standard, so checkpatch.pl reports lots of violations. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-13target-arm: Infer VFPv3 feature from VFPv4Andreas Färber1-1/+3
VFP4 => VFP3 Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-12-13target-arm: Infer VFP feature from VFPv3Andreas Färber1-3/+3
VFP3 => VFP Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-12-13target-arm: Infer Thumb division feature from M profileAndreas Färber1-1/+3
M => THUMB_DIV Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-12-13target-arm: Infer Thumb2 feature from ARMv7Andreas Färber1-4/+1
V7 => THUMB2 Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-12-13target-arm: Infer AUXCR feature from ARMv6Andreas Färber1-5/+3
V6 && !M => AUXCR Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-12-13target-arm: Infer ARMv6(K) feature from ARMv7Andreas Färber1-4/+5
V7 && M => V6 V7 && !M => V6K Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-12-13target-arm: Infer ARMv6 feature from v6KAndreas Färber1-5/+3
V6K => V6 Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-12-13target-arm: Infer ARMv5 feature from ARMv6Andreas Färber1-7/+3
V6 => V5 Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>