aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-08net/filter-mirror: Fix mirror initial check typoZhang Chen1-2/+2
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08virtio: rename the bar index field name in VirtIOPCIProxyChen Fan3-16/+16
the bar index names are much similar to the bar memory regions, distinguish them to improve the code readability. Signed-off-by: Chen Fan <fan.chen@easystack.cn> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08linux-user: include <poll.h> instead of <sys/poll.h>Felix Janda1-1/+1
This removes the last usage of <sys/poll.h> in the code base. Signed-off-by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08char: fix missing return in error path for chardev TLS initDaniel P. Berrange1-0/+1
If the qio_channel_tls_new_(server|client) methods fail, we disconnect the client. Unfortunately a missing return means we then go on to try and run the TLS handshake on a NULL I/O channel. This gives predictably segfaulty results. The main way to trigger this is to request a bogus TLS priority string for the TLS credentials. e.g. -object tls-creds-x509,id=tls0,priority=wibble,... Most other ways appear impossible to trigger except perhaps if OOM conditions cause gnutls initialization to fail. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08CODING_STYLE: Fix a typo ("have" vs. "has")Jonathan Neuschäfer1-1/+1
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08bitmap: refine and move BITMAP_{FIRST/LAST}_WORD_MASKWei Yang2-7/+2
According to linux kernel commit <89c1e79eb30> ("linux/bitmap.h: improve BITMAP_{LAST,FIRST}_WORD_MASK"), these two macro could be improved. This patch takes this change and also move them all in header file. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08build-sys: fix find-in-pathMarc-André Lureau1-1/+1
Fix spelling, the GNU make text functions is not called "find-string" but "findstring". Broken in commit 2b2e59e. Fairly harmless: its only use is in tests/tcg/Makefile, where the bug can cause the I386_TESTS not to run when they should. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08m68k: change default system clock for m5208evbGreg Ungerer1-1/+1
The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166.67MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real time to actually complete. Change the hard coded default to match the default hardware setting. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Thomas Huth <huth@tuxfamily.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08exec: remove unused compacted argumentMarc-André Lureau1-5/+3
Since commit b35ba30f8f when it was introduced, phys_page_compact() takes an unused compacted argument. ubsan complains about it when launching qemu-x86_64 without arguments: qemu/exec.c:310:5: runtime error: variable length array bound evaluates to non-positive value 0 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08usb: ehci: fix memory leak in ehci_process_itdLi Qiang1-0/+1
While processing isochronous transfer descriptors(iTD), if the page select(PG) field value is out of bands it will return. In this situation the ehci's sg list is not freed thus leading to a memory leak issue. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08qapi: make the json schema files more regular.David Anderson2-7/+1
This makes it easier to parse the schema file for tool generation: each paragraph is either a non-docstring comment, or a docstring immediately followed by a Python dict describing an API item. Signed-off-by: David Anderson <dave@natulte.net> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08maint: Add module_block.h to .gitignoreLin Ma1-0/+1
Commit 0c0c1fd9 generated module_block.h automatically, Add it to .gitignore to avoid checking in it by 'git add .'. Signed-off-by: Lin Ma <lma@suse.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Some updates related to the SH4 machinesThomas Huth1-1/+3
hw/intc/sh_intc.c and hw/timer/sh_timer.c seem to belong to the R2D machine, as far as I can see. And concerning the Shix machine, it does not make much sense to have a "M:" entry here and the "S:" set to "Orphan". So I'd like to suggest to use "Odd Fixes" here instead. Signed-off-by: Thomas Huth <huth@tuxfamily.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add some more MIPS related filesThomas Huth1-0/+7
The MIPS section is missing some related header files, and files in the hw/misc/, hw/intc/ and hw/timer/ folders. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add usermode related config filesThomas Huth1-0/+2
The default-configs/*-linux-user.mak belong to Linux usermode emulation, and default-configs/*-bsd-user.mak belong to BSD usermode emulation. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add some more pattern to recognize all win32 related filesThomas Huth1-0/+3
The get_maintainer.pl script currently thinks that the win32 related files in the util and include folders are currently unmaintained. Thus let's add some additional wildcards to match these files. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add some more rocker related filesThomas Huth1-0/+2
The files in tests/rocker/ and docs/specs/rocker.txt should be listed in the Rocker section of MAINTAINERS. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add header files to CRIS sectionThomas Huth1-0/+1
etraxfs_dma.h and etraxfs.h in include/hw/cris/ obviously belong to the CRIS section in MAINTAINERS. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add some more files to the virtio sectionThomas Huth1-0/+2
Makefile.objs and trace-events in hw/virtio/ were not covered by MAINTAINERS yet. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add some SPARC machine related filesThomas Huth1-2/+7
And while we're at it, remove Blue Swirl from the list of maintainers. Blue has apparently been inactive for quite a while now, so I assume he's unfortunately not available as maintainer anymore. Signed-off-by: Thomas Huth <huth@tuxfamily.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add include/hw/audio/ to audio sectionThomas Huth1-0/+1
audio.h and pcspk.h are recognized as maintained files now. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add some more files to the HMP sectionThomas Huth1-2/+3
The hmp-commands-info.hx, hmp.h and include/monitor/hmp-target.h files were classified as unmaintained. Let's add them to the HMP section. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08MAINTAINERS: Add files to the Moxie section.Thomas Huth1-0/+2
The hw/moxie/ folder and default-configs/moxie-softmmu.mak obviously belong to the Moxie CPU. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08tests: Ignore test executablesEric Blake1-0/+2
Commits 9ef8112a and efad6682 introduced new tests, but forgot to ignore the built executables from an in-tree build. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08bt-hci-csr: drop unused argumentPaolo Bonzini3-4/+3
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-08qemu-options.hx: fix -chardev ringbuf typosStefan Hajnoczi1-1/+1
Clean up the documentation for -chardev ringbuf. There is a stray closing parenthesis and the comma is unnecessary. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-07docs: Belatedly update for move of QMP/* to docs/Markus Armbruster2-3/+3
Missed in commit 7537fe0 and commit 9b89b6a. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1475766600-7273-1-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-07docs: Belatedly update for move of qmp-commands.txtMarkus Armbruster1-1/+1
Missed in commit d076a2a and commit bd6092e. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1474546563-16332-1-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-10-07qmp: Disable query-cpu-* commands when they're unavailableEduardo Habkost1-0/+9
Instead of requiring clients to actually call the query-cpu-* commands to find out if they are implemented, remove them from the output of "query-commands", so clients know they are not available. This is implemented by extending the existing hack at qmp_unregister_commands_hack(). I wish I could avoid adding even more #ifdefs to that code, but that's the solution we have today. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1475696941-8056-1-git-send-email-ehabkost@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-10-07MAINTAINERS: Pass the QObject staff from Luiz to MarkusMarkus Armbruster1-3/+3
QObject is fairly tightly coupled to QAPI these days, and I've been effectively maintaining it together with QAPI for a while. Update MAINTAINERS to reflect that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1475084022-30117-3-git-send-email-armbru@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
2016-10-07MAINTAINERS: Pass the HMP staff from Luiz to DavidMarkus Armbruster1-2/+1
David graciously volunteered to take this off Luiz's hands. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1475084022-30117-2-git-send-email-armbru@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
2016-10-07qapi: return a 'missing parameter' errorMarc-André Lureau2-20/+49
The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing parameters, but the qapi qmp_dispatch() code uses QERR_INVALID_PARAMETER_TYPE. Improve qapi code to return QERR_MISSING_PARAMETER where appropriate. Fix expected error message in iotests. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20160930095948.3154-4-marcandre.lureau@redhat.com> [Drop incorrect error_setg() from qmp_input_type_any() and qmp_input_type_null()] Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-10-07qapi: assert list entry has a valueMarc-André Lureau1-0/+1
This helps to figure out the expectations. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20160930095948.3154-3-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-10-07qapi: add assert about root valueMarc-André Lureau1-0/+2
qiv->root should not be null, make that clearer with some assert. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20160930095948.3154-2-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-10-07bsd-user: fix FreeBSD build after d148d90eEd Maste1-0/+10
Signed-off-by: Ed Maste <emaste@freebsd.org> Message-id: 1475611369-74971-1-git-send-email-emaste@freebsd.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-07Merge remote-tracking branch 'mreitz/tags/pull-block-2016-10-07' into ↵Kevin Wolf6-62/+155
queue-block Block patches for the block queue. # gpg: Signature made Fri Oct 7 14:14:45 2016 CEST # gpg: using RSA key 0xF407DB0061D5CF40 # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * mreitz/tags/pull-block-2016-10-07: dmg: Move libbz2 code to dmg-bz2.so module: Don't load the same module if requested multiple times scripts: Allow block module to not define BlockDriver Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-07dmg: Move libbz2 code to dmg-bz2.soFam Zheng4-53/+139
dmg.o was moved to block-obj-m in 5505e8b76 to become a separate module, so that its reference to libbz2, since 6b383c08c, doesn't add an extra library to the main executable. Until recently, commit 06e60f70a (blockdev: Add dynamic module loading for block drivers) moved it back to block-obj-y to simplify the design of dynamic loading of block modules. But we don't want to lose the feature of less library dependency on the main executable. The solution here is to move only the bz2 related code to a separate DSO file, and load it when dmg_open is called. dmg_probe doesn't depend on bz2 support to work, and is the only code in this file which can run before dmg_open. While we are at it, fix the unhelpful cast of last argument passed to dmg_uncompress_bz2. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1473043845-13197-4-git-send-email-famz@redhat.com Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-10-07module: Don't load the same module if requested multiple timesFam Zheng1-2/+16
Use a hash table to keep record of all loaded modules, and return early if the requested module is already loaded. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1473043845-13197-3-git-send-email-famz@redhat.com Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-10-07scripts: Allow block module to not define BlockDriverFam Zheng1-7/+0
Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1473043845-13197-2-git-send-email-famz@redhat.com Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-10-07block: Add qdev ID to DEVICE_TRAY_MOVEDKevin Wolf5-11/+46
The event currently only contains the BlockBackend name. However, with anonymous BlockBackends, this is always the empty string. Add the qdev ID (or if none was given, the QOM path) so that the user can still see which device caused the event. Event generation has to be moved from bdrv_eject() to the BlockBackend because the BDS doesn't know the attached device, but that's easy because blk_eject() is the only user of it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2016-10-07block-backend: Remember if attached device is non-qdevKevin Wolf3-11/+23
Almost all block devices are qdevified by now. This allows us to go back from the BlockBackend to the DeviceState. xen_disk is the last device that is missing. We'll remember in the BlockBackend if a xen_disk is attached and can then disable any features that require going from a BB to the DeviceState. While at it, clearly mark the function used by xen_disk as legacy even in its name, not just in TODO comments. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2016-10-07block: Add node name to BLOCK_IO_ERROR eventKevin Wolf3-5/+18
The event currently only contains the BlockBackend name. However, with anonymous BlockBackends, this is always the empty string. Add the node name so that the user can still see which block device caused the event. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2016-10-07block: Add bdrv_runtime_opts to query-command-line-optionsKevin Wolf4-2/+4
Recently we moved a few options from QemuOptsLists in blockdev.c to bdrv_runtime_opts in block.c in order to make them accissble using blockdev-add. However, this has the side effect that these options are missing from query-command-line-options now, and libvirt consequently disables the corresponding feature. This problem was reported as a regression for the 'discard' option, introduced in commit 818584a4. However, it is more general than that. Fix it by adding bdrv_runtime_opts to the list of QemuOptsLists that are returned in query-command-line-options. For the future, libvirt is advised to use QMP schema introspection for block device options. Reported-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Tested-by: Michal Privoznik <mprivozn@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com>
2016-10-07block: use aio_bh_schedule_oneshotPaolo Bonzini14-81/+27
This simplifies bottom half handlers by removing calls to qemu_bh_delete and thus removing the need to stash the bottom half pointer in the opaque datum. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-07async: add aio_bh_schedule_oneshotPaolo Bonzini2-4/+29
qemu_bh_delete is already clearing bh->scheduled at the same time as it's setting bh->deleted. Since it's not using any memory barriers, there is no synchronization going on for bh->deleted, and this makes the bh->deleted checks superfluous in aio_compute_timeout, aio_bh_poll and aio_ctx_check. Just remove them, and put the (bh->scheduled && bh->deleted) combo to work in a new function aio_bh_schedule_oneshot. The new function removes the need to save the QEMUBH pointer between the creation and the execution of the bottom half. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-07block: use bdrv_add_before_write_notifierPaolo Bonzini1-2/+1
Register the notifier using the specific API for block devices. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-07qemu-doc: merge qemu-tech and qemu-docPaolo Bonzini6-65/+21
Merge what is left of qemu-tech into the main manual as an appendix. Ultimately we should have a new internals manual built from docs/, and then the "Translator Internals" parts of qemu-tech could move to docs/ as well. The bits on limitation and features of CPU emulation should remain in qemu-doc. Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-10-07qemu-tech: rewrite some partsPaolo Bonzini1-82/+42
Drop most the device emulation part and merge the rest into the description of the MMU. Make some bits more up-to-date. Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-10-07qemu-tech: reorganize contentPaolo Bonzini1-97/+74
Split more parts into separate chapters, place comparison last, rename "Introduction" to "CPU emulation". Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-10-07qemu-tech: move TCG test documentation to tests/tcg/READMEPaolo Bonzini2-35/+76
Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>