Anthony Liguori [Mon, 19 Dec 2011 15:45:17 +0000 (09:45 -0600)]
Merge remote-tracking branch 'qemu-kvm/memory/exec-obsolete' into staging
Anthony Liguori [Mon, 19 Dec 2011 15:45:12 +0000 (09:45 -0600)]
Merge remote-tracking branch 'qemu-kvm/memory/xen' into staging
Avi Kivity [Thu, 15 Dec 2011 13:25:22 +0000 (15:25 +0200)]
memory: move obsolete exec.c functions to a private header
This will help avoid accidental usage.
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Thu, 15 Dec 2011 13:23:03 +0000 (15:23 +0200)]
etraxfs_eth: drop bogus cpu_unregister_io_memory()
Leftover call to cpu_unregister_io_memory() can segfault on cleanup. Remove.
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Sun, 18 Dec 2011 14:27:48 +0000 (16:27 +0200)]
xen: convert to memory API
Undo the private implementation of qemu_ram_alloc(); use the global one
(which calls right back into xen_ram_alloc()).
Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity [Sun, 18 Dec 2011 13:48:55 +0000 (15:48 +0200)]
memory, xen: pass MemoryRegion to xen_ram_alloc()
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>
Anthony Liguori [Mon, 19 Dec 2011 15:12:25 +0000 (09:12 -0600)]
Merge remote-tracking branch 'qemu-kvm/memory/mutators' into staging
Conflicts:
memory.h
Anthony Liguori [Mon, 19 Dec 2011 15:10:49 +0000 (09:10 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Mon, 19 Dec 2011 14:50:47 +0000 (08:50 -0600)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Sun, 18 Dec 2011 19:07:03 +0000 (13:07 -0600)]
pc: fix event_idx compatibility for virtio devices
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>
Stefan Weil [Sat, 17 Dec 2011 08:27:39 +0000 (09:27 +0100)]
configure: Improve Xen autodetection for hosts without Xen
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>
Stefan Weil [Sat, 17 Dec 2011 08:27:38 +0000 (09:27 +0100)]
configure: Fix compiler warnings in config.log (statement without effect)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Stefan Weil [Sat, 17 Dec 2011 08:27:37 +0000 (09:27 +0100)]
configure: Fix compiler warning in config.log (value was never used)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Stefan Weil [Sat, 17 Dec 2011 08:27:36 +0000 (09:27 +0100)]
configure: Fix compiler warning in config.log (undefined NULL)
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>
Stefan Weil [Sat, 17 Dec 2011 08:27:35 +0000 (09:27 +0100)]
configure: Fix compiler warnings in config.log (uninitialized variable)
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>
Stefan Weil [Sat, 17 Dec 2011 08:27:34 +0000 (09:27 +0100)]
configure: Fix compiler warning in config.log (macro redefined)
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>
Stefan Weil [Sat, 17 Dec 2011 08:27:33 +0000 (09:27 +0100)]
configure: Fix compiler warning in config.log (unused variable)
warning: unused variable ‘iov’
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Stefan Weil [Sat, 17 Dec 2011 08:27:32 +0000 (09:27 +0100)]
configure: Fix compiler warnings in config.log (null arguments)
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>
Stefan Weil [Sat, 17 Dec 2011 16:46:02 +0000 (17:46 +0100)]
configure: Fix compiler warning in config.log (integer from pointer)
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>
Stefan Weil [Sat, 17 Dec 2011 08:27:30 +0000 (09:27 +0100)]
configure: Fix compiler warnings in config.log (old-style function definition)
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>
Stefan Weil [Sat, 17 Dec 2011 08:27:29 +0000 (09:27 +0100)]
configure: Fix compiler warnings in config.log (always return a value from main)
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>
Julian Pidancet [Sun, 18 Dec 2011 18:08:44 +0000 (18:08 +0000)]
Also create piix3 property when Xen is enabled
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>
Geoffrey Thomas [Sat, 17 Dec 2011 09:23:59 +0000 (04:23 -0500)]
slirp: Fix typo in net_slirp_hostfwd_remove
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>
Anthony Liguori [Sun, 18 Dec 2011 18:59:12 +0000 (12:59 -0600)]
pc: add pc-0.15
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael Ellerman [Fri, 16 Dec 2011 00:20:20 +0000 (11:20 +1100)]
kvm: Print something before calling abort() if KVM_RUN fails
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>
Peter Maydell [Thu, 15 Dec 2011 18:58:26 +0000 (18:58 +0000)]
stellaris: Calculate system clock period on reset
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>
Peter Maydell [Thu, 15 Dec 2011 18:28:52 +0000 (18:28 +0000)]
Makefile.target: Remove unnecessary dependency rules
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>
Paolo Bonzini [Thu, 15 Dec 2011 14:11:16 +0000 (15:11 +0100)]
ide: drop argument to dma_buf_commit
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>
Alex Rozenman [Tue, 13 Dec 2011 10:52:08 +0000 (12:52 +0200)]
phys_page_find_alloc: Use correct initial region_offset.
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>
Michael Roth [Thu, 8 Dec 2011 03:48:07 +0000 (21:48 -0600)]
network scripts: don't block SIGCHLD before forking
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>
Peter Maydell [Thu, 15 Dec 2011 13:33:54 +0000 (13:33 +0000)]
HACKING: clarify allocation/free recommendations
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>
Stefan Hajnoczi [Thu, 15 Dec 2011 10:05:18 +0000 (10:05 +0000)]
usb: fix usb_qdev_init() error handling again
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>
Andreas Färber [Wed, 30 Nov 2011 15:26:21 +0000 (16:26 +0100)]
exec.c: Fix subpage memory access to RAM MemoryRegion
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>
michael@ozlabs.org [Tue, 13 Dec 2011 01:22:58 +0000 (12:22 +1100)]
vl.c: Print the actual program name in help output
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>
michael@ozlabs.org [Tue, 13 Dec 2011 01:22:57 +0000 (12:22 +1100)]
error: Add an accessor for progname
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>
Paolo Bonzini [Tue, 13 Dec 2011 12:43:52 +0000 (13:43 +0100)]
fix win32 build
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:43 +0000 (14:29 -0600)]
qdev: add a qdev_get_type() function and expose as a 'type' property
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:42 +0000 (14:29 -0600)]
qom: add string property type
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:41 +0000 (14:29 -0600)]
qom: add vga node to the pc composition tree
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:40 +0000 (14:29 -0600)]
qom: optimize qdev_get_canonical_path using a parent link
The full tree search was a bit unreasonable.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:39 +0000 (14:29 -0600)]
rtc: add a dynamic property for retrieving the date
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:38 +0000 (14:29 -0600)]
rtc: make piix3 set the rtc as a child (v2)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:37 +0000 (14:29 -0600)]
dev: add an anonymous peripheral container
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:36 +0000 (14:29 -0600)]
qdev: add explicitly named devices to the root complex
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:35 +0000 (14:29 -0600)]
qom: qom_{get, set} monitor commands (v2)
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:34 +0000 (14:29 -0600)]
qmp: add qom-list command
This can be used to list properties in the device model.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:33 +0000 (14:29 -0600)]
qapi: allow a 'gen' key to suppress code generation
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:32 +0000 (14:29 -0600)]
qom: add link properties (v2)
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:31 +0000 (14:29 -0600)]
qom: add child properties (composition) (v3)
Child properties express a relationship of composition.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 12 Dec 2011 20:29:30 +0000 (14:29 -0600)]
qdev: provide a path resolution (v2)
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:29 +0000 (14:29 -0600)]
qdev: provide an interface to return canonical path from root (v2)
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:28 +0000 (14:29 -0600)]
qom: introduce root device
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:27 +0000 (14:29 -0600)]
qom: register legacy properties as new style properties (v2)
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:26 +0000 (14:29 -0600)]
qom: add new dynamic property infrastructure based on Visitors (v2)
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>
Anthony Liguori [Mon, 12 Dec 2011 20:29:25 +0000 (14:29 -0600)]
qom: add a reference count to qdev objects
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>
Paolo Bonzini [Fri, 25 Nov 2011 11:06:22 +0000 (12:06 +0100)]
qiov: prevent double free or use-after-free
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>
Li Zhi Hui [Mon, 12 Dec 2011 05:54:33 +0000 (13:54 +0800)]
block/cow: Return real error code
Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Avi Kivity [Mon, 5 Dec 2011 17:20:12 +0000 (19:20 +0200)]
coroutine: switch per-thread free pool to a global pool
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>
Kevin Wolf [Wed, 16 Nov 2011 10:35:54 +0000 (11:35 +0100)]
qcow2: Allow >4 GB VM state
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>
Kevin Wolf [Wed, 7 Dec 2011 12:57:13 +0000 (13:57 +0100)]
Documentation: Add qemu-img -t parameter in man page
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Kevin Wolf [Wed, 7 Dec 2011 11:42:10 +0000 (12:42 +0100)]
qemu-img rebase: Fix for undersized backing files
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>
Josh Durgin [Wed, 7 Dec 2011 01:05:10 +0000 (17:05 -0800)]
rbd: always set out parameter in qemu_rbd_snap_list
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>
Li Zhi Hui [Wed, 7 Dec 2011 09:25:48 +0000 (17:25 +0800)]
block/qcow2.c: call qcow2_free_snapshots in the function of qcow2_close
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>
Paolo Bonzini [Mon, 14 Nov 2011 16:50:54 +0000 (17:50 +0100)]
block: avoid useless checks on acb->bh
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>
Paolo Bonzini [Mon, 14 Nov 2011 16:50:53 +0000 (17:50 +0100)]
block: dma_bdrv_* does not return NULL
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>
Paolo Bonzini [Mon, 14 Nov 2011 16:50:52 +0000 (17:50 +0100)]
dma: the passed io_func does not return NULL
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>
Paolo Bonzini [Mon, 14 Nov 2011 16:50:51 +0000 (17:50 +0100)]
block: qemu_aio_get does not return NULL
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>
Paolo Bonzini [Mon, 14 Nov 2011 16:50:50 +0000 (17:50 +0100)]
block: simplify failure handling for bdrv_aio_multiwrite
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>
Paolo Bonzini [Wed, 30 Nov 2011 08:12:30 +0000 (09:12 +0100)]
block: bdrv_aio_* do not return NULL
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>
Dr. David Alan Gilbert [Mon, 12 Dec 2011 15:37:31 +0000 (16:37 +0100)]
tcg/arm: remove fixed map code buffer restriction
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>
Andrzej Zaborowski [Wed, 14 Dec 2011 20:34:00 +0000 (21:34 +0100)]
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
Anthony Liguori [Wed, 14 Dec 2011 13:59:21 +0000 (07:59 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging
Stefan Weil [Wed, 14 Dec 2011 06:30:24 +0000 (07:30 +0100)]
doc: Remove Symbian Virtual Platform
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>
Isaku Yamahata [Tue, 13 Dec 2011 03:40:51 +0000 (12:40 +0900)]
migration.h: remove incoming_expected declarations
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>
Peter Maydell [Sat, 10 Dec 2011 16:35:31 +0000 (16:35 +0000)]
tcg: make tcg_const_ptr actually accept a pointer argument
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>
Stefan Weil [Fri, 9 Dec 2011 23:19:46 +0000 (00:19 +0100)]
Fix spelling in comments, documentation and messages
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>
Stefan Weil [Fri, 9 Dec 2011 23:19:45 +0000 (00:19 +0100)]
hw: Fix spelling in comments and code
compatiblity->compatibility
transfered->transferred
transfering->transferring
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Stefan Weil [Fri, 9 Dec 2011 23:19:44 +0000 (00:19 +0100)]
hw: Fix spelling in comments
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>
Stefan Weil [Fri, 9 Dec 2011 23:19:43 +0000 (00:19 +0100)]
hw: Fix spelling (licenced->licensed)
New code introduced old misspellings.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Stefan Weil [Fri, 9 Dec 2011 23:19:42 +0000 (00:19 +0100)]
fmopl: Fix spelling in code and comments
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>
Andreas Färber [Tue, 13 Dec 2011 18:19:25 +0000 (18:19 +0000)]
target-arm: Infer VFPv3 feature from VFPv4
VFP4 => VFP3
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber [Tue, 13 Dec 2011 18:19:24 +0000 (18:19 +0000)]
target-arm: Infer VFP feature from VFPv3
VFP3 => VFP
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber [Tue, 13 Dec 2011 18:19:24 +0000 (18:19 +0000)]
target-arm: Infer Thumb division feature from M profile
M => THUMB_DIV
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber [Tue, 13 Dec 2011 18:19:24 +0000 (18:19 +0000)]
target-arm: Infer Thumb2 feature from ARMv7
V7 => THUMB2
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber [Tue, 13 Dec 2011 18:19:24 +0000 (18:19 +0000)]
target-arm: Infer AUXCR feature from ARMv6
V6 && !M => AUXCR
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber [Tue, 13 Dec 2011 18:19:24 +0000 (18:19 +0000)]
target-arm: Infer ARMv6(K) feature from ARMv7
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>
Andreas Färber [Tue, 13 Dec 2011 18:19:24 +0000 (18:19 +0000)]
target-arm: Infer ARMv6 feature from v6K
V6K => V6
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber [Tue, 13 Dec 2011 18:19:24 +0000 (18:19 +0000)]
target-arm: Infer ARMv5 feature from ARMv6
V6 => V5
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber [Tue, 13 Dec 2011 18:19:23 +0000 (18:19 +0000)]
target-arm: Infer ARMv4T feature from ARMv5
V5 => V4T
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Jean-Christophe DUBOIS [Tue, 13 Dec 2011 18:19:23 +0000 (18:19 +0000)]
arm: Fix CP15 FSR (C5) domain setting
Return the correct value in the domain field in the cp15 DFSR
(C5) -- bug noticed during Xvisor development.
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[Peter Maydell: reworded commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Paolo Bonzini [Mon, 12 Dec 2011 16:21:34 +0000 (17:21 +0100)]
ccid: make threads joinable
Destroying a mutex that another thread might have just unlocked
is racy. It usually works, but you cannot do that in general and
can lead to deadlocks or segfaults. Change ccid to use joinable
threads instead.
(Also, qemu_mutex_init/qemu_cond_init were missing).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Mon, 12 Dec 2011 16:21:33 +0000 (17:21 +0100)]
qemu-thread: implement joinable threads for Win32
Rewrite the handshaking between qemu_thread_create and the
win32_start_routine, so that the thread can be joined without races.
Similar handshaking is done now between qemu_thread_exit and
qemu_thread_join.
This also simplifies how QemuThreads are initialized.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Mon, 12 Dec 2011 16:21:32 +0000 (17:21 +0100)]
qemu-thread: implement joinable threads for POSIX
Allow to control if a QEMU thread is created joinable or not. Make it
not joinable by default to avoid that we keep the associated resources
around when terminating a thread without joining it (what we couldn't do
so far for obvious reasons).
The audio subsystem will need the join feature when converting it to
QEMU threading/locking abstractions, so provide that service.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Mon, 12 Dec 2011 16:21:31 +0000 (17:21 +0100)]
qemu-thread: add API for joinable threads
Split from Jan's original qemu-thread-posix.c patch. No semantic change,
just introduce the new API that POSIX and Win32 implementations will
conform to.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Hajnoczi [Mon, 12 Dec 2011 12:11:41 +0000 (12:11 +0000)]
syborg: drop support for Symbian Virtual Platform
The Symbian Virtual Platform was an ARM-based development and debugging
board. Since Symbian has been disbanded and the code is no longer being
used it can now be removed.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Hajnoczi [Wed, 7 Dec 2011 15:01:49 +0000 (15:01 +0000)]
net: take ownership of fd in socket init functions
Today net/socket.c has no consistent policy for closing the socket file
descriptor when initialization fails. This means we leak the file
descriptor in some cases or we could also try to close it twice.
Make error paths consistent by taking ownership of the file descriptor
and closing it on error.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Hajnoczi [Wed, 7 Dec 2011 15:01:48 +0000 (15:01 +0000)]
net: expand tabs in net/socket.c
In order to make later patches sane, expand the tab characters and
conform to QEMU coding style now.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael Roth [Wed, 7 Dec 2011 04:03:43 +0000 (22:03 -0600)]
guest agent: add supported command list to guest-info RPC
Not that there is blacklisting functionality we can no longer infer
the agent's capabilities via version. This patch extends the current
guest-info RPC to also return a list of dictionaries containing the name
of each supported RPC, along with a boolean indicating whether or not
the command has been disabled by a guest administrator/distro.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael Roth [Wed, 7 Dec 2011 04:03:42 +0000 (22:03 -0600)]
guest agent: add RPC blacklist command-line option
This adds a command-line option, -b/--blacklist, that accepts a
comma-seperated list of RPCs to disable, or prints a list of
available RPCs if passed "?".
In consequence this also adds general blacklisting and RPC listing
facilities to the new QMP dispatch/registry facilities, should the
QMP monitor ever have a need for such a thing.
Ideally, to avoid support/compatability issues in the future,
blacklisting guest agent functionality will be the exceptional
case, but we add the functionality here to handle guest administrators
with specific requirements.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Peter Maydell [Mon, 12 Dec 2011 10:58:26 +0000 (10:58 +0000)]
Add a .mailmap to map pre-git-conversion authors to friendly names
Add a .mailmap file so 'git shortlog' can map the unfriendly
pre-git-conversion author entries to real names.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>