aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-19Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori7-34/+58
2011-12-19Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori31-346/+206
2011-12-19pc: fix event_idx compatibility for virtio devicesAnthony Liguori1-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>
2011-12-19configure: Improve Xen autodetection for hosts without XenStefan Weil1-4/+25
With this patch, it only takes one test (instead of four) to detect that there is no Xen support at all. For most build hosts, this will reduce the time configure needs. It will also reduce noisy output in config.log. Build hosts with Xen now need up to five (instead of up to four) tests. They get improved diagnostics when Xen support fails. Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warnings in config.log (statement without effect)Stefan Weil1-4/+3
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warning in config.log (value was never used)Stefan Weil1-2/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warning in config.log (undefined NULL)Stefan Weil1-0/+1
Avoid the warning when probing for xfs. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warnings in config.log (uninitialized variable)Stefan Weil1-2/+2
warning: ‘fd’ is used uninitialized in this function warning: ‘id’ is used uninitialized in this function Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warning in config.log (macro redefined)Stefan Weil1-1/+0
warning: "_GNU_SOURCE" redefined The macro is already defined on the command line. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warning in config.log (unused variable)Stefan Weil1-1/+1
warning: unused variable ‘iov’ Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warnings in config.log (null arguments)Stefan Weil1-1/+6
warning: null argument where non-null required (argument 1) warning: null argument where non-null required (argument 3) Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warning in config.log (integer from pointer)Stefan Weil1-1/+5
warning: return makes integer from pointer without a cast v2: Removed type cast. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warnings in config.log (old-style function definition)Stefan Weil1-2/+2
warning: function declaration isn’t a prototype In function ‘foo’: warning: old-style function definition The function name was changed, too, to avoid an additional warning. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19configure: Fix compiler warnings in config.log (always return a value from main)Stefan Weil1-3/+4
Fix several "warning: control reaches end of non-void function". Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-19Also create piix3 property when Xen is enabledJulian Pidancet1-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>
2011-12-19slirp: Fix typo in net_slirp_hostfwd_removeGeoffrey Thomas1-1/+1
Report an error when err is nonzero, not when it is zero. Signed-off-by: Geoffrey Thomas <geofft@ldpreload.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-18pc: add pc-0.15Anthony Liguori1-0/+9
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-16kvm: Print something before calling abort() if KVM_RUN failsMichael Ellerman1-1/+2
It's a little unfriendly to call abort() without printing any sort of error message. So turn the DPRINTK() into an fprintf(stderr, ...). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-16stellaris: Calculate system clock period on resetPeter Maydell1-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>
2011-12-16Makefile.target: Remove unnecessary dependency rulesPeter Maydell1-6/+0
Remove some dependency rules which aren't necessary (the automatically generated .d files cover all these). These were leftovers from dyngen days, when the object files also had a dependency on some generated files. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-16ide: drop argument to dma_buf_commitPaolo Bonzini1-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>
2011-12-15phys_page_find_alloc: Use correct initial region_offset.Alex Rozenman1-1/+2
This fixes a common bug with initial region_offset value. Usually, the pages are re-assigned afterwards, so the bug has a very small effect on regular QEMU use flows. Signed-off-by: Alex Rozenman <Alex_Rozenman@mentor.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15network scripts: don't block SIGCHLD before forkingMichael Roth1-6/+0
This patch fixes a bug where child processes of launch_script() can misbehave due to SIGCHLD being blocked. In the case of `sudo`, this causes a permanent hang. Previously a SIGCHLD handler was added to reap fork_exec()'d zombie processes by calling waitpid(-1, ...). This required other fork()/waitpid() callers to temporarilly block SIGCHILD to avoid having the final wait status being intercepted by the SIGCHLD handler: 7c3370d4fe3fa6cda8655f109e4659afc8ca4269 Since then, the qemu_add_child_watch() interface was added to allow registration of such processes and reap only from that specific set of PIDs: 4d54ec7898bd951007cb6122d5315584bd41d0c4 As a result, we can now avoid blocking SIGCHLD in launch_script(), so drop that behavior. Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15HACKING: clarify allocation/free recommendationsPeter Maydell1-4/+6
Clarify the allocation/free recommendations; this is mostly just tidying up following the global-search-and-replace done with the conversion to the GLib g_malloc and friends. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15usb: fix usb_qdev_init() error handling againStefan Hajnoczi1-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>
2011-12-15exec.c: Fix subpage memory access to RAM MemoryRegionAndreas Färber2-2/+64
Commit 95c318f5e1f88d7e5bcc6deac17330fd4806a2d3 (Fix segfault in mmio subpage handling code.) prevented a segfault by making all subpage registrations over an existing memory page perform an unassigned access. Symptoms were writes not taking effect and reads returning zero. Very small page sizes are not currently supported either, so subpage memory areas cannot fully be avoided. Therefore change the previous fix to use a new IO_MEM_SUBPAGE_RAM instead of IO_MEM_UNASSIGNED. Suggested by Avi. Reviewed-by: Avi Kivity <avi@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Avi Kivity <avi@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15vl.c: Print the actual program name in help outputmichael@ozlabs.org1-1/+1
In help() we do what boils down to: printf("%s", "qemu"); This seems to be an artifact of be995c27640a82c7056b6f53d02ec823570114e5 ("removed unused code"), which removed some ifdef'ery that used to print a different name depending on CONFIG_SOFTMMU. Instead print the actual program name, originally from argv[0]. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15error: Add an accessor for prognamemichael@ozlabs.org2-0/+6
We'd like to get the progname for help output, so add an accessor. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Andreas F=E4rber <afaerber@suse.de> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15fix win32 buildPaolo Bonzini4-10/+42
On Windows, cpus.c needs access to the hThread. Add a Windows-specific function to grab it. This requires changing the CPU threads to joinable. There is no substantial change because the threads run in an infinite loop. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qdev: add a qdev_get_type() function and expose as a 'type' propertyAnthony Liguori2-0/+21
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-15qom: add string property typeAnthony Liguori2-0/+81
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>