summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-20i440fx: remove piix3 fieldPaolo Bonzini1-3/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19qdev: fix hotplug when no -device is specifiedAnthony Liguori3-0/+16
The peripheral[-anon] containers are initialized lazily but since they sit on sysbus, they can not be created after realize. This was causing an abort() to occur during hotplug if no -device option was used. This was spotted by qemu-test::device-add.sh Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19sysbus: remove sysbus_init_mmio_cb2Benoît Canet2-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>
2011-12-19ppce500_pci: remove sysbus_init_mmio_cb2 usageBenoît Canet1-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>
2011-12-19sh_pci: remove sysbus_init_mmio_cb2 usageBenoît Canet2-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>
2011-12-19qom: register qdev properties also as non-legacy propertiesPaolo Bonzini2-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>
2011-12-19qom: distinguish "legacy" property type name from QOM type namePaolo Bonzini3-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>
2011-12-19qom: introduce get/set methods for PropertyPaolo Bonzini3-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>
2011-12-19qom: introduce QERR_PROPERTY_VALUE_OUT_OF_RANGEPaolo Bonzini2-0/+8
This will be used when reject invalid values for integer fields that are less than 64-bits wide. 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>
2011-12-19qom: interpret the return value when setting legacy propertiesPaolo Bonzini3-19/+29
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19qom: push permission checks up into qdev_property_add_legacyPaolo Bonzini1-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>
2011-12-19qom: fix swapped parametersPaolo Bonzini1-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>
2011-12-19qapi: protect against NULL QObject in qmp_input_get_objectPaolo Bonzini1-4/+6
A NULL qobj can occur when a parameter is fetched via qdict_get, but the parameter is not in the command. By returning NULL, the caller can choose whether to raise a missing parameter error, an invalid parameter type error, or use a default value. For example, qom-set could can use this to reset a property to its default value, though at this time it will fail with "Invalid parameter type". In any case, anything is better than crashing! Reviewed-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19Documentation: Move balloon option out of i386 only sectionMichael Ellerman1-13/+13
The balloon option is not i386 only, so move it into the standard options section. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19vl.c: In qemu -h output, only print options for the arch we are running asMichael Ellerman4-17/+26
Only print options in the help output that are accepted by our arch. This is less confusing for users and also for other programs that consume the help output. The options affected are: -g and -prom-env only displayed on PPC or SPARC -win2k-hack, -rtc-td-hack, -no-fd-bootchk, -no-acpi, -no-hpet, -acpitable, -smbios only displayed on i386 -semihosting only displayed on ARM, M68K or XTENSA -old-param only displayed on ARM Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19vl.c: Move option generation logic into a wrapper fileMichael Ellerman3-21/+38
In vl.c and qemu-options.h we define macros and include qemu-options.def in order to generate different content. Move the bulk of the def'ing and undef'ing into a wrapper, this will make it cleaner when we add another macro in the next patch. AFAICS undefining GEN_DOCS services no purpose, but I've left it for now. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-19Merge remote-tracking branch 'qemu-kvm/memory/exec-obsolete' into stagingAnthony Liguori5-42/+74
2011-12-19Merge remote-tracking branch 'qemu-kvm/memory/xen' into stagingAnthony Liguori6-31/+42
2011-12-19memory: move obsolete exec.c functions to a private headerAvi Kivity4-39/+74
This will help avoid accidental usage. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-19etraxfs_eth: drop bogus cpu_unregister_io_memory()Avi Kivity1-3/+0
Leftover call to cpu_unregister_io_memory() can segfault on cleanup. Remove. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-19xen: convert to memory APIAvi Kivity1-19/+22
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>
2011-12-19memory, xen: pass MemoryRegion to xen_ram_alloc()Avi Kivity6-12/+20
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>
2011-12-19Merge remote-tracking branch 'qemu-kvm/memory/mutators' into stagingAnthony Liguori5-58/+144
Conflicts: memory.h
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>