summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* framebuffer: drop use of cpu_get_physical_page_desc()Avi Kivity2011-12-206-24/+27
| | | | | | | cpu_get_physical_page_desc() is tied into the memory core's innards, replace it with uses of the API. Signed-off-by: Avi Kivity <avi@redhat.com>
* sysbus: add sysbus_address_space()Avi Kivity2011-12-202-0/+6
| | | | | | Given a bus device, retrieves the memory address space for its bus. Signed-off-by: Avi Kivity <avi@redhat.com>
* sysbus: remove sysbus_init_mmio_cb2Benoît Canet2011-12-192-21/+0
| | | | | | | This function is not longer in use so remove it. Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ppce500_pci: remove sysbus_init_mmio_cb2 usageBenoît Canet2011-12-191-21/+6
| | | | | | | | | Expose only one container MemoryRegion to sysbus. (Peter Maydell's idea) Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sh_pci: remove sysbus_init_mmio_cb2 usageBenoît Canet2011-12-192-27/+16
| | | | | | | | | | The isa region is not exposed as a sysbus region because the iobr register contains its address and use it to remap dynamically the region. (Peter Maydell's idea) Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: register qdev properties also as non-legacy propertiesPaolo Bonzini2011-12-192-7/+28
| | | | | | | | | | | | | Push legacy properties into a "legacy-..." namespace, and make them available with correct types too. For now, all properties come in both variants. This need not be the case for string properties. We will revisit this after -device is changed to actually use the legacy properties. 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>
* qom: distinguish "legacy" property type name from QOM type namePaolo Bonzini2011-12-193-7/+15
| | | | | | 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>
* qom: introduce get/set methods for PropertyPaolo Bonzini2011-12-193-0/+399
| | | | | | | | | | | | | | | | This patch adds a visitor interface to Property. This way, QOM will be able to expose Properties that access a fixed field in a struct without exposing also the everything-is-a-string "feature" of qdev properties. Whenever the printed representation in both QOM and qdev (which is typically the case for device backends), parse/print code can be reused via get_generic/set_generic. Dually, whenever multiple PropertyInfos have the same representation in both the struct and the visitors the code can be reused (for example among all of int32/uint32/hex32). 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>
* qom: interpret the return value when setting legacy propertiesPaolo Bonzini2011-12-193-19/+29
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: push permission checks up into qdev_property_add_legacyPaolo Bonzini2011-12-191-27/+19
| | | | | | | | | | qdev_property_get and qdev_property_set can generate permission denied errors themselves. Do not duplicate this functionality in qdev_get/set_legacy_property, and clean up excessive indentation. Reviewed-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: fix swapped parametersPaolo Bonzini2011-12-191-1/+1
| | | | | | Reviewed-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'qemu-kvm/memory/exec-obsolete' into stagingAnthony Liguori2011-12-191-3/+0
|\
| * etraxfs_eth: drop bogus cpu_unregister_io_memory()Avi Kivity2011-12-191-3/+0
| | | | | | | | | | | | Leftover call to cpu_unregister_io_memory() can segfault on cleanup. Remove. Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge remote-tracking branch 'qemu-kvm/memory/xen' into stagingAnthony Liguori2011-12-191-1/+3
|\ \ | |/
| * memory, xen: pass MemoryRegion to xen_ram_alloc()Avi Kivity2011-12-191-1/+3
| | | | | | | | | | | | | | Currently xen_ram_alloc() relies on ram_addr, which is going away. Give it something else to use as a cookie. Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge remote-tracking branch 'qemu-kvm/memory/mutators' into stagingAnthony Liguori2011-12-192-47/+23
|\ \ | | | | | | | | | | | | Conflicts: memory.h
| * | piix_pci: adapt smram mapping to use memory mutatorsAvi Kivity2011-12-051-14/+6
| | | | | | | | | | | | | | | | | | Eliminates fake state ->smram_enabled. Signed-off-by: Avi Kivity <avi@redhat.com>
| * | cirrus_vga: adapt to memory mutators APIAvi Kivity2011-12-051-33/+17
| | | | | | | | | | | | | | | | | | | | | Simplify the code by avoiding dynamic creation and destruction of memory regions. Signed-off-by: Avi Kivity <avi@redhat.com>
* | | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-12-193-5/+5
|\ \ \
| * | | Also create piix3 property when Xen is enabledJulian Pidancet2011-12-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This recently added line in hw/pc_piix.c is causing a SEGV on a Xen setup because the piix3 property is never created: qdev_property_add_child(qdev_resolve_path("/i440fx/piix3", NULL), "rtc", (DeviceState *)rtc_state, NULL); Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | stellaris: Calculate system clock period on resetPeter Maydell2011-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calculate the system clock period on reset; otherwise it remains set to the default value of zero and attempting to use it provokes a hang. This is one of the issues noted in LP:696094. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | ide: drop argument to dma_buf_commitPaolo Bonzini2011-12-161-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | The argument is unused and even wrong when the function is called by ide_handle_rw_error. Drop it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2011-12-196-57/+7
|\ \ \
| * | | block: dma_bdrv_* does not return NULLPaolo Bonzini2011-12-152-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>
| * | | block: bdrv_aio_* do not return NULLPaolo Bonzini2011-12-156-48/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | pc: fix event_idx compatibility for virtio devicesAnthony Liguori2011-12-191-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | event_idx was introduced in 0.15 and must be disabled for all virtio-pci devices (including virtio-balloon-pci). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | pc: add pc-0.15Anthony Liguori2011-12-181-0/+9
| |/ / |/| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | usb: fix usb_qdev_init() error handling againStefan Hajnoczi2011-12-151-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f462141f18ffdd75847f6459ef83d90b831d12c0 introduced clean up code when usb_qdev_init() fails. Unfortunately it calls .handle_destroy() when .init() was never invoked or failed. This can lead to crashes when .handle_destroy() tries to clean up things that were never initialized. This patch is careful to undo only those steps that completed along the usb_qdev_init() code path. It's not as pretty as the unified error handling in f462141f18ffdd75847f6459ef83d90b831d12c0 but it's necessary. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qdev: add a qdev_get_type() function and expose as a 'type' propertyAnthony Liguori2011-12-152-0/+21
| | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qom: add string property typeAnthony Liguori2011-12-152-0/+81
| | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qom: add vga node to the pc composition treeAnthony Liguori2011-12-156-27/+38
| | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qom: optimize qdev_get_canonical_path using a parent linkAnthony Liguori2011-12-152-32/+28
| | | | | | | | | | | | | | | | | | The full tree search was a bit unreasonable. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | rtc: add a dynamic property for retrieving the dateAnthony Liguori2011-12-151-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>
* | | rtc: make piix3 set the rtc as a child (v2)Anthony Liguori2011-12-152-0/+14
| | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | dev: add an anonymous peripheral containerAnthony Liguori2011-12-151-1/+20
| | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qdev: add explicitly named devices to the root complexAnthony Liguori2011-12-151-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>
* | | qom: add link properties (v2)Anthony Liguori2011-12-152-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>
* | | qom: add child properties (composition) (v3)Anthony Liguori2011-12-152-0/+46
| | | | | | | | | | | | | | | | | | Child properties express a relationship of composition. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qdev: provide a path resolution (v2)Anthony Liguori2011-12-152-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>
* | | qdev: provide an interface to return canonical path from root (v2)Anthony Liguori2011-12-152-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>
* | | qom: introduce root deviceAnthony Liguori2011-12-153-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | qom: register legacy properties as new style properties (v2)Anthony Liguori2011-12-152-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>
* | | qom: add new dynamic property infrastructure based on Visitors (v2)Anthony Liguori2011-12-152-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | qom: add a reference count to qdev objectsAnthony Liguori2011-12-152-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>
* | Merge remote-tracking branch 'stefanha/trivial-patches-next' into stagingAnthony Liguori2011-12-1446-84/+86
|\ \
| * | hw: Fix spelling in comments and codeStefan Weil2011-12-141-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>
| * | hw: Fix spelling in commentsStefan Weil2011-12-143-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>
| * | hw: Fix spelling (licenced->licensed)Stefan Weil2011-12-145-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>
| * | fmopl: Fix spelling in code and commentsStefan Weil2011-12-142-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>
| * | virtio-pci: use pci macrosHui Kai Ran2011-12-091-3/+4
| | | | | | | | | | | | | | | Signed-off-by: Hui Kai Ran <hkran@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud