aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-15blockjob: Wrappers for progress counter accessKevin Wolf6-29/+63
Block job drivers are not expected to mess with the internals of the BlockJob object, so provide wrapper functions for one of the cases where they still do it: Updating the progress counter. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
2018-05-15blockjob: Fix assertion in block_job_finalize()Kevin Wolf1-1/+1
Every job gets a non-NULL job->txn on creation, but it doesn't necessarily keep it until it is decommissioned: Finalising a job removes it from its transaction. Therefore, calling 'blockdev-job-finalize' a second time on an already concluded job causes an assertion failure. Remove job->txn from the assertion in block_job_finalize() to fix this. block_job_do_finalize() still has the same assertion, but if a job is already removed from its transaction, block_job_apply_verb() will already error out before we run into that assertion. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
2018-05-15blockjob: expose error string via queryJohn Snow2-1/+7
When we've reached the concluded state, we need to expose the error state if applicable. Add the new field. This should be sufficient for determining if a job completed successfully or not after concluding; if we want to discriminate based on how it failed more mechanically, we can always add an explicit return code enumeration later. I didn't bother to make it only show up if we are in the concluded state; I don't think it's necessary. Cc: qemu-stable@nongnu.org Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15hmp: Allow using a qdev id in block_set_io_throttleAlberto Garcia2-3/+14
The QMP version of this command can take a qdev ID since 7a9877a02635, but the HMP version is still using the deprecated block device name so there's no way to refer to a block device added like this: -blockdev node-name=disk0,driver=qcow2,file.driver=file,file.filename=hd.qcow2 -device virtio-blk-pci,id=virtio-blk-pci0,drive=disk0 This patch works around this problem by using the specified name as a qdev ID if the block device name is not found. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15block: Merge .bdrv_co_writev{,_flags} in driversEric Blake11-24/+32
We have too many driver callback interfaces; simplify the mess somewhat by merging the flags parameter of .bdrv_co_writev_flags() into .bdrv_co_writev(). Note that as long as a driver doesn't set .supported_write_flags, the flags argument will be 0 and behavior is identical. Also note that the public function bdrv_co_writev() still lacks a flags argument; so the driver signature is thus intentionally slightly different. But that's not the end of the world, nor the first time that the driver interface differs slightly from the public interface. Ideally, we should be rewriting all of these drivers to use modern byte-based interfaces. But that's a more invasive patch to write and audit, compared to the simplification done here. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15block: Drop last of the sector-based aio callbacksEric Blake2-54/+36
We are gradually moving away from sector-based interfaces, towards byte-based. Now that all drivers with aio callbacks are using the byte-based interfaces, we can remove the sector-based versions. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15vxhs: Switch to byte-based callbacksEric Blake1-21/+22
We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the last few sector-based callbacks in the vxhs driver. Note that the driver was already using byte-based calls for performing actual I/O, so this just gets rid of a round trip of scaling; however, as I don't know if VxHS is tolerant of non-sector AIO operations, I went with the conservative approach of adding .bdrv_refresh_limits to override the block layer defaults back to the pre-patch value of 512. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15rbd: Switch to byte-based callbacksEric Blake1-18/+22
We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the last few sector-based callbacks in the rbd driver. Note that the driver was already using byte-based calls for performing actual I/O, so this just gets rid of a round trip of scaling; however, as I don't know if RBD is tolerant of non-sector AIO operations, I went with the conservate approach of adding .bdrv_refresh_limits to override the block layer defaults back to the pre-patch value of 512. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15null: Switch to byte-based read/writeEric Blake1-22/+23
We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the last few sector-based callbacks in the null-co and null-aio drivers. Note that since the null driver does nothing on writes, it trivially supports the BDRV_REQ_FUA flag (all writes have already landed to the same bit-bucket without needing an extra flush call). Also, since the null driver does just as well with byte-based requests, we can now avoid cycles wasted on read-modify-write by taking advantage of the block layer now defaulting the alignment to 1 instead of 512. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15file-win32: Switch to byte-based callbacksEric Blake3-22/+32
We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the last few sector-based callbacks in the file-win32 driver. Note that the driver was already using byte-based calls for performing actual I/O, so this just gets rid of a round trip of scaling; however, as I don't know if Windows is tolerant of non-sector AIO operations, I went with the conservative approach of modifying .bdrv_refresh_limits to override the block layer defaults back to the pre-patch value of 512. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15block: Support byte-based aio callbacksEric Blake2-9/+35
We are gradually moving away from sector-based interfaces, towards byte-based. Add new sector-based aio callbacks for read and write, to match the fact that bdrv_aio_pdiscard is already byte-based. Ideally, drivers should be converted to use coroutine callbacks rather than aio; but that is not quite as trivial (and if we were to do that conversion, the null-aio driver would disappear), so for the short term, converting the signature but keeping things with aio is easier. However, we CAN declare that a driver that uses the byte-based aio interfaces now defaults to byte-based operations, and must explicitly provide a refresh_limits override to stick with larger alignments (making the alignment issues more obvious directly in the drivers touched in the next few patches). Once all drivers are converted, the sector-based aio callbacks will be removed; in the meantime, a FIXME comment is added due to a slight inefficiency that will be touched up as part of that later cleanup. Simplify some instances of 'bs->drv' into 'drv' while touching this, since the local variable already exists to reduce typing. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15block-backend: simplify blk_get_aio_contextDaniel Henrique Barboza1-7/+1
blk_get_aio_context verifies if BlockDriverState bs is not NULL, return bdrv_get_aio_context(bs) if true or qemu_get_aio_context() otherwise. However, bdrv_get_aio_context from block.c already does this verification itself, also returning qemu_get_aio_context() if bs is NULL: AioContext *bdrv_get_aio_context(BlockDriverState *bs) { return bs ? bs->aio_context : qemu_get_aio_context(); } This patch simplifies blk_get_aio_context to simply call bdrv_get_aio_context instead of replicating the same logic. Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-05-15Merge remote-tracking branch ↵Peter Maydell2-29/+111
'remotes/kraxel/tags/input-20180515-pull-request' into staging input: ps2 fixes. # gpg: Signature made Tue 15 May 2018 10:43:20 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/input-20180515-pull-request: ps2: Fix mouse stream corruption due to lost data ps2: Clear the PS/2 queue and obey disable Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-15Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180515-pull-request' ↵Peter Maydell7-92/+168
into staging ui: qapi parser for -display cmd line. gtk: multiple fixes. sdl: opts bugfix. vnc: magic cookie. # gpg: Signature made Tue 15 May 2018 10:18:51 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20180515-pull-request: gtk: disable the F10 menubar key console: use linked list for QemuConsoles ui: document non-qapi parser cases. ui: switch gtk display to qapi parser ui: switch trivial displays to qapi parser ui: add qapi parser for -display vnc: add magic cookie to VncState ui/gtk: Only try to initialize EGL/X11 if GtkGlArea failed gtk: make it possible to hide the menu bar sdl2: move opts assignment into loop Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-15Merge remote-tracking branch 'remotes/rth/tags/tgt-openrisc-pull-request' ↵Peter Maydell5-1151/+1050
into staging Convert openrisc to decodetree.py # gpg: Signature made Mon 14 May 2018 23:25:40 BST # gpg: using RSA key 64DF38E8AF7E215F # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/tgt-openrisc-pull-request: target/openrisc: Merge disas_openrisc_insn target/openrisc: Convert dec_float target/openrisc: Convert dec_compi target/openrisc: Convert dec_comp target/openrisc: Convert dec_M target/openrisc: Convert dec_logic target/openrisc: Convert dec_mac target/openrisc: Convert dec_calc target/openrisc: Convert remainder of dec_misc insns target/openrisc: Convert memory insns target/openrisc: Convert branch insns target/openrisc: Start conversion to decodetree.py target-openrisc: Write back result before FPE exception Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-15ps2: Fix mouse stream corruption due to lost dataGeoffrey McRae2-29/+100
This fixes an issue by adding bounds checking to multi-byte packets where the PS/2 mouse data stream may become corrupted due to data being discarded when the PS/2 ringbuffer is full. Interrupts for Multi-byte responses are postponed until the final byte has been queued. These changes fix a bug where windows guests drop the mouse device entirely requring the guest to be restarted. Signed-off-by: Geoffrey McRae <geoff@hostfission.com> Message-Id: <20180507150310.2FEA0381924@moya.office.hostfission.com> [ kraxel: codestyle fixes ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-05-15ps2: Clear the PS/2 queue and obey disableGeoffrey McRae1-0/+11
This allows guest's to correctly reinitialize and identify the mouse should the guest decide to re-scan or reset during mouse input events. When the guest sends the "Identify" command, due to the PC's hardware architecutre it is impossible to reliably determine the response from the command amongst other streaming data, such as mouse or keyboard events. Standard practice is for the guest to disable the device and then issue the identify command, so this must be obeyed. Signed-off-by: Geoffrey McRae <geoff@hostfission.com> Message-Id: <20180507150303.7486B381924@moya.office.hostfission.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-05-15Merge remote-tracking branch ↵Peter Maydell8-38/+343
'remotes/vivier2/tags/linux-user-for-2.13-pull-request' into staging # gpg: Signature made Mon 14 May 2018 19:15:02 BST # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-2.13-pull-request: linux-user: correctly align types in thunking code linux-user: fix UNAME_MACHINE for sparc/sparc64 linux-user: add sparc/sparc64 specific errno linux-user: fix conversion of flock/flock64 l_type field linux-user: update sparc/syscall_nr.h to linux header 4.16 linux-user: fix flock/flock64 padding linux-user: define correct fcntl() values for sparc Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-15gtk: disable the F10 menubar keyPeter Wu1-0/+6
The F10 key is used in various applications, disable it unconditionally (do not limit it to grab mode). Note that this property is deprecated and might be removed in the future (GTK+ commit b082fb598d). Fixes: https://bugs.launchpad.net/qemu/+bug/1726910 Signed-off-by: Peter Wu <peter@lekensteyn.nl> Message-id: 20180510230739.28459-2-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-05-15console: use linked list for QemuConsolesGerd Hoffmann1-47/+58
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180507095424.16220-1-kraxel@redhat.com
2018-05-15ui: document non-qapi parser cases.Gerd Hoffmann1-0/+14
Add comments to the cases not (yet) switched over to parse_display_qapi(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180507095539.19584-5-kraxel@redhat.com
2018-05-15ui: switch gtk display to qapi parserGerd Hoffmann2-33/+5
Drop the gtk option parser from parse_display(), so parse_display_qapi() will handle it instead. With this change the parser will accept gl=core and gl=es too, gtk must catch the unsupported gles variant now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180507095539.19584-4-kraxel@redhat.com
2018-05-15ui: switch trivial displays to qapi parserGerd Hoffmann1-6/+0
Drop the option-less display types (egl-headless, curses, none) from parse_display(), so they'll be handled by parse_display_qapi(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180507095539.19584-3-kraxel@redhat.com
2018-05-15ui: add qapi parser for -displayGerd Hoffmann1-2/+22
Add parse_display_qapi() function which parses the -display command line using a qapi visitor for DisplayOptions. Wire up as default catch in parse_display(). Improves the error message for unknown display types. Also enables json as -display argument, i.e. -display "{ 'type': 'gtk' }" Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180507095539.19584-2-kraxel@redhat.com
2018-05-15vnc: add magic cookie to VncStateGerd Hoffmann3-1/+16
Set magic cookie on initialization. Clear on cleanup. Sprinkle a bunch of assert()s checking the cookie, to verify the pointer is valid. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180507102254.12107-1-kraxel@redhat.com
2018-05-15ui/gtk: Only try to initialize EGL/X11 if GtkGlArea failedTomeu Vizoso1-1/+1
The commit referenced below changed the logic by causing the gtk-egl backend to be initialized regardless of whether GtkGlArea initialization succeeded. This causes eglInitialize to crash in Wayland systems without XWayland. This patch restores the previous logic. Fixes: 4c70280592f5 ("ui/gtk: use GtkGlArea on wayland only") Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Message-id: 20180507134237.14996-1-tomeu.vizoso@collabora.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-05-15gtk: make it possible to hide the menu barPeter Wu1-1/+45
Saves some space and disables the F10 button as side-effect. Fixes: https://bugs.launchpad.net/qemu/+bug/1726910 Signed-off-by: Peter Wu <peter@lekensteyn.nl> Message-Id: <20180510230739.28459-1-peter@lekensteyn.nl> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-05-15sdl2: move opts assignment into loopGerd Hoffmann1-1/+1
So the opts pointer is set for all sdl2_consoles. Fixes: 844fd50dbbcfc9e401895274bf4fb8da8e8d3f64 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-05-14target/openrisc: Merge disas_openrisc_insnRichard Henderson1-9/+4
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert dec_floatRichard Henderson2-230/+149
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert dec_compiRichard Henderson2-58/+70
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert dec_compRichard Henderson2-62/+73
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert dec_MRichard Henderson2-28/+16
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert dec_logicRichard Henderson2-36/+32
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert dec_macRichard Henderson2-33/+27
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert dec_calcRichard Henderson2-169/+229
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert remainder of dec_misc insnsRichard Henderson2-153/+141
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert memory insnsRichard Henderson2-139/+160
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Convert branch insnsRichard Henderson2-78/+84
Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target/openrisc: Start conversion to decodetree.pyRichard Henderson3-43/+78
Begin with the 0x08 major opcode, the system instructions. Acked-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-05-14target-openrisc: Write back result before FPE exceptionRichard Henderson3-252/+126
The architecture manual is unclear about this, but the or1ksim does writeback before the exception. This requires splitting the helpers in half, with the exception raised by the second. Acked-by: Stafford Horne <shorne@gmail.com> Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
2018-05-14Merge remote-tracking branch ↵Peter Maydell1-0/+1
'remotes/vivier/tags/m68k-for-2.13-pull-request' into staging # gpg: Signature made Mon 14 May 2018 19:02:18 BST # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier/tags/m68k-for-2.13-pull-request: m68k: fix floatx80_mod() (Coverity CID1390568) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-14Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180514' into stagingPeter Maydell14-96/+152
Some s390x fixes/cleanups, mainly in the reset area and build fixes for recent compilers (GCC 8 and clang 6.0.0). # gpg: Signature made Mon 14 May 2018 16:32:20 BST # gpg: using RSA key DECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # gpg: aka "Cornelia Huck <cohuck@kernel.org>" # gpg: aka "Cornelia Huck <cohuck@redhat.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20180514: target/s390x: Fix brace Werror with clang 6.0.0 s390x: refactor reset/reipl handling s390x/ccw: make sure all ccw devices are properly reset virtio-ccw: common reset handler pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4) s390x/css: disabled subchannels cannot be status pending Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-14m68k: fix floatx80_mod() (Coverity CID1390568)Laurent Vivier1-0/+1
Update the variable checked by the loop condition (expDiff). Backport the update from Previous. Fixes: 591596b77a ("target/m68k: add fmod/frem") Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Thomas Huth <huth@tuxfamily.org> Message-Id: <20180508203937.16796-1-laurent@vivier.eu>
2018-05-14Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell5-48/+202
staging Block pull request * Support -drive cache.direct=off live migration for POSIX files # gpg: Signature made Sat 12 May 2018 10:27:51 BST # gpg: using RSA key 9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: block/file-posix: add x-check-page-cache=on|off option block/file-posix: implement bdrv_co_invalidate_cache() on Linux checkpatch: reduce MAINTAINERS update message frequency checkpatch: emit a warning on file add/move/delete checkpatch: ignore email headers better checkpatch: check utf-8 content from a commit log when it's missing from charset checkpatch: add a --strict check for utf-8 in commit logs blockjob: drop block_job_pause/resume_all() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-14target/s390x: Fix brace Werror with clang 6.0.0Richard Henderson1-1/+1
The warning is target/s390x/misc_helper.c:209:21: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] SysIB sysib = { 0 }; ^ {} While the original code is correct, and technically exactly correct as per ISO C89, both GCC and Clang support plain empty set of braces as an extension. Cc: Alexander Graf <agraf@suse.de> Cc: David Hildenbrand <david@redhat.com> Cc: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20180512045950.12386-5-richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-05-14s390x: refactor reset/reipl handlingDavid Hildenbrand8-80/+127
Calling pause_all_vcpus()/resume_all_vcpus() from a VCPU thread might not be the best idea. As pause_all_vcpus() temporarily drops the qemu mutex, two parallel calls to pause_all_vcpus() can be active at a time, resulting in a deadlock. (either by two VCPUs or by the main thread and a VCPU) Let's handle it via the main loop instead, as suggested by Paolo. If we would have two parallel reset requests by two different VCPUs at the same time, the last one would win. We use the existing ipl device to handle it. The nice side effect is that we can get rid of reipl_requested. This change implies that all reset handling now goes via the common path, so "no-reboot" handling is now active for all kinds of reboots. Let's execute any CPU initialization code on the target CPU using run_on_cpu. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180424101859.10239-1-david@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-05-14s390x/ccw: make sure all ccw devices are properly resetCornelia Huck3-3/+15
Thomas reported that the subchannel for a 3270 device that ended up in a broken state (status pending even though not enabled) did not get out of that state even after a reboot (which involves a subsytem reset). The reason for this is that the 3270 device did not define a reset handler. Let's fix this by introducing a base reset handler (set up for all ccw devices) that resets the subchannel and have virtio-ccw call its virtio-specific reset procedure in addition to that. CC: qemu-stable@nongnu.org Reported-by: Thomas Huth <thuth@redhat.com> Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-05-14virtio-ccw: common reset handlerCornelia Huck1-12/+1
All the different virtio ccw devices use the same reset handler, so let's move setting it into the base virtio ccw device class. CC: qemu-stable@nongnu.org Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-05-14pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4)Thomas Huth1-1/+1
I've run into a compilation error today with the current version of GCC 8: In file included from s390-ccw.h:49, from main.c:12: cio.h:128:1: error: alignment 1 of 'struct tpi_info' is less than 4 [-Werror=packed-not-aligned] } __attribute__ ((packed)); ^ cc1: all warnings being treated as errors Since the struct tpi_info contains an element ("struct subchannel_id schid") which is marked as aligned(4), we've got to mark the struct tpi_info as aligned(4), too. CC: qemu-stable@nongnu.org Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1525774672-11913-1-git-send-email-thuth@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>