aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-11kvm: add machine state to kvm_arch_initMarcel Apfelbaum
Needed to query machine's properties. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-11machine: query kernel-irqchip propertyMarcel Apfelbaum
Running x86_64-softmmu/qemu-system-x86_64 -machine pc,kernel_irqchip=on -enable-kvm leads to crash: qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Aborted (core dumped) This happens because the commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Fix this by querying machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-11machine: allowed/required kernel-irqchip supportMarcel Apfelbaum
The code using kernel-irqchip property requires 'allowed/required' functionality. Replace machine's kernel_irqchip field with two fields representing the new functionality and expose them through wrappers. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-11machine: replace qemu opts with iommu propertyMarcel Apfelbaum
Fixes a QEMU crash when passing iommu parameter in command line. Running x86_64-softmmu/qemu-system-x86_64 -machine pc,iommu=on -enable-kvm leads to crash: qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Aborted (core dumped) This happens because commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Fix this by querying machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-11pci/shpc: fix signed integer overflowMichael S. Tsirkin
clang undefined behaviour sanitizer reports: > hw/pci/shpc.c:162:27: runtime error: left shift of 1 by 31 places > cannot be represented in type 'int' Caused by the usual lack of a 'U' qualifier on a constant 1 being shifted left. Fix it up. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-11acpi-test: update expected filesMichael S. Tsirkin
commit ecdc7bab095a2cf29d9e9d4a7e1494f586a8b270 "acpi: fix aml_equal term implementation" dropped a useless Zero in generated code, update expected files appropriately. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-10acpi: fix aml_equal term implementationMarcel Apfelbaum
The DefLEqual op does not have a target operand. Remove it. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2015-03-10aml-build: append opcodes using build_append_byteMichael S. Tsirkin
Opcodes are raw bytes, they shouldn't be added using build_append_int. This only happens to work with 0 and 1 opcodes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2015-03-10aml-build: don't modify childMichael S. Tsirkin
this code: aml_append(foo, bar); might, non-intuitively, modify bar, which means that e.g. the following might not DTRT: c = ....; aml_append(a, c); aml_append(b, c); to fix, simply allocate an intermediate array, and always modify that. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2015-03-10Merge remote-tracking branch ↵Peter Maydell
'remotes/mjt/tags/pull-trivial-patches-2015-03-04' into staging trivial patches for 2015-03-04 # gpg: Signature made Tue Mar 10 05:16:59 2015 GMT using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2015-03-04: (44 commits) 9pfs: remove useless return gdbstub: avoid possible NULL pointer dereference milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning fix GCC 5.0.0 logical-not-parentheses warnings migration: Fix coding style (whitespace issues) oslib-posix: Fix compiler warning (-Wclobbered) and simplify the code disas/microblaze: Fix warnings caused by missing 'static' attribute disas/arm: Fix warnings caused by missing 'static' attribute vhost_net: Add missing 'static' attribute e500: fix memory leak gitignore: Ignore new tests gitignore: Track common.env in iotests gitignore sysbus: fix memory leak milkymist.c: fix memory leak macio: fix possible memory leak sparc/leon3.c: fix memory leak nbd: fix resource leak qemu-char: add cyrillic key 'numerosign' to Russian keymap qemu-char: add cyrillic characters 'numerosign' to VNC keysyms qapi-schema: Fix SpiceChannel docs ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-109pfs: remove useless returnMichael Tokarev
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10gdbstub: avoid possible NULL pointer dereferencePaolo Bonzini
Coverity reports that s->chr is checked after put_packet dereferences it. Move the check earlier, consistent with the code used for user-mode emulation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warningRadim Krčmář
man gcc: Warn if in a loop with constant number of iterations the compiler detects undefined behavior in some statement during one or more of the iterations. Milkymist pfpu has no jump instructions, so checking for MICROCODE_WORDS instructions should have kept us in bounds of s->microcode, but i++ allowed one loop too many, hw/misc/milkymist-pfpu.c: In function ‘pfpu_write’: hw/misc/milkymist-pfpu.c:365:20: error: loop exit may only be reached after undefined behavior [-Werror=aggressive-loop-optimizations] if (i++ >= MICROCODE_WORDS) { ^ hw/misc/milkymist-pfpu.c:167:14: note: possible undefined statement is here uint32_t insn = s->microcode[pc]; ^ The code can still access out of bounds, because it presumes that PC register always begins at 0, and we allow writing to it. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Acked-by: Michael Walle <michael@walle.cc> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10fix GCC 5.0.0 logical-not-parentheses warningsRadim Krčmář
man gcc: Warn about logical not used on the left hand side operand of a comparison. This option does not warn if the RHS operand is of a boolean type. By preferring bool over int where sensible, but without modifying any depending code, make GCC happy in cases like this, qemu-img.c: In function ‘compare_sectors’: qemu-img.c:992:39: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses] if (!!memcmp(buf1, buf2, 512) != res) { hw/ide/core.c:1836 doesn't throw an error, assert(!!s->error == !!(s->status & ERR_STAT)); even thought the second operand is int (and first hunk of this patch has a very similar case), maybe GCC developers still have a little faith in C programmers. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10migration: Fix coding style (whitespace issues)Stefan Weil
* Remove trailing whitespace (fixes 9 errors from checkpatch.pl). One comment line was longer than 80 characters, so wrap it and fix a typo, too. * Replace tabs by blanks (fixes 1 error). Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10oslib-posix: Fix compiler warning (-Wclobbered) and simplify the codeStefan Weil
gcc reports this warning with -Wclobbered: util/oslib-posix.c: In function ‘os_mem_prealloc’: util/oslib-posix.c:374:49: error: argument ‘memory’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] Fix this and simplify the code by using an existing macro. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10disas/microblaze: Fix warnings caused by missing 'static' attributeStefan Weil
Warnings from the Sparse static analysis tool: disas/microblaze.c:289:3: warning: symbol 'opcodes' was not declared. Should it be static? disas/microblaze.c:570:6: warning: symbol 'register_prefix' was not declared. Should it be static? disas/microblaze.c:571:6: warning: symbol 'special_register_prefix' was not declared. Should it be static? disas/microblaze.c:572:6: warning: symbol 'fsl_register_prefix' was not declared. Should it be static? disas/microblaze.c:573:6: warning: symbol 'pvr_register_prefix' was not declared. Should it be static? Remove the unused variable special_register_prefix. The variable pvr_register_prefix was unused, too, but can be used. Add also 'const' where possible. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10disas/arm: Fix warnings caused by missing 'static' attributeStefan Weil
Warnings from the Sparse static analysis tool: disas/arm.c:1552:15: warning: symbol 'last_type' was not declared. Should it be static? disas/arm.c:1553:5: warning: symbol 'last_mapping_sym' was not declared. Should it be static? disas/arm.c:1554:9: warning: symbol 'last_mapping_addr' was not declared. Should it be static? Instead of adding 'static', the unused variables and the unused code which refers to those variables (which was deactivated a long time ago in commit 4b0f1a8b) are removed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10vhost_net: Add missing 'static' attributeStefan Weil
This fixes a warning from smatch. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10e500: fix memory leakMichael Tokarev
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de>
2015-03-10gitignore: Ignore new testsCole Robinson
Signed-off-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10gitignore: Track common.env in iotests gitignoreCole Robinson
Rather than track it in the toplevel gitignore Signed-off-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10sysbus: fix memory leakGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10milkymist.c: fix memory leakGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10macio: fix possible memory leakGonglei
If ret = macio_initfn_ide() is less than 0, the timer_memory will leak the memory it points to. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10sparc/leon3.c: fix memory leakGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10nbd: fix resource leakGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10qemu-char: add cyrillic key 'numerosign' to Russian keymapWang Xin
numero sign is the number sign key of Russian keyboard layout, we get this key with 'shift + 3'. It's missing in current Russian keymap file, this patch fixes it. As number sign does not exsit in Russian keyboard layout[1][2], this patch also removes the 'numbersign' from Russian keymap. [1] http://en.wikipedia.org/wiki/Keyboard_layout#Russian [2] http://kbd-intl.narod.ru/english/layouts Signed-off-by: Wang Xin <wangxinxin.wang@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10qemu-char: add cyrillic characters 'numerosign' to VNC keysymsWang Xin
This patch adds missing cyrillic character 'numerosign' to the VNC keysym table, it's needed by Russian keyboard. And I get the keysym from '<X11/keysymdef.h>', the current keysym table in Qemu was generated from it. Signed-off-by: Wang xin <wangxinxin.wang@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10qapi-schema: Fix SpiceChannel docsCole Robinson
The value is called channel-type, not connection-type Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10xen: Remove xen_cmos_set_s3_resume()Thomas Huth
The function is not used anymore, and thus can be deleted. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10ui/vnc: Remove vnc_stop_worker_thread()Thomas Huth
This function is not used anymore, let's remove it. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10ui: Removed unused functionsThomas Huth
Remove qemu_console_displaystate(), qemu_remove_kbd_event_handler(), qemu_different_endianness_pixelformat() and cpkey(), since they are completely unused. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10vhost: Remove superfluous '\n' around error_report()Gonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10arm/digic_boards: Remove superfluous '\n' around error_report()Gonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10tpm: Remove superfluous '\n' around error_report()Gonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10xtensa: Remove superfluous '\n' around error_report()Gonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10vfio: Remove superfluous '\n' around error_report()Gonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10vhost-scsi: Remove superfluous '\n' around error_report()Gonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10Remove superfluous '\n' around error_report()Gonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10numa: remove superfluous '\n' around error_setgGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10pl330.c: remove superfluous '\n' around error_setgGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10a9gtimer: remove superfluous '\n' around error_setgGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10block: remove superfluous '\n' around error_report/error_setgGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10qmp-commands.hx: Fix several typosAlberto Garcia
Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10qerror.h: Swap definitions that were not in alphabetical orderAlberto Garcia
Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10Add copyright and author after file splitStefan Berger
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10cutils: refine strtol error handling in parse_debug_envPaolo Bonzini
Avoid truncation of a 64-bit long to a 32-bit int, and check for errno (especially ERANGE). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10qemu-options: fix/document -incoming optionsMichael Tokarev
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10smbios: document cmdline options for smbios type 2-4, 17 structuresGabriel L. Somlo
Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>