aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-10-28aio: convert from RFifoLock to QemuRecMutexPaolo Bonzini
It is simpler and a bit faster, and QEMU does not need the contention callbacks (and thus the fairness) anymore. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-21-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28qemu-thread: introduce QemuRecMutexPaolo Bonzini
GRecMutex is new in glib 2.32, so we cannot use it. Introduce a recursive mutex in qemu-thread instead, which will be used instead of RFifoLock. Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-20-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28iothread: release AioContext around aio_pollPaolo Bonzini
This is the first step towards having fine-grained critical sections in dataplane threads, which will resolve lock ordering problems between address_space_* functions (which need the BQL when doing MMIO, even after we complete RCU-based dispatch) and the AioContext. Because AioContext does not use contention callbacks anymore, the unit test has to be changed. Previously applied as a0710f7995f914e3044e5899bd8ff6c43c62f916 and then reverted. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-19-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28block: only call aio_poll on the current thread's AioContextPaolo Bonzini
aio_poll is not thread safe; for example bdrv_drain can hang if the last in-flight I/O operation is completed in the I/O thread after the main thread has checked bs->in_flight. The bug remains latent as long as all of it is called within aio_context_acquire/aio_context_release, but this will change soon. To fix this, if bdrv_drain is called from outside the I/O thread, signal the main AioContext through a dummy bottom half. The event loop then only runs in the I/O thread. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-18-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28qemu-img: call aio_context_acquire/release around block jobPaolo Bonzini
This will be needed by bdrv_reopen_multiple, which calls bdrv_drain_all and thus will *release* the AioContext. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-17-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28qemu-io: acquire AioContextPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-16-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28block: prepare bdrv_reopen_multiple to release AioContextPaolo Bonzini
After the next patch bdrv_drain_all will have to be called without holding any AioContext. Prepare to do this by adding an AioContext argument to bdrv_reopen_multiple. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-15-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28replication: pass BlockDriverState to reopen_backing_filePaolo Bonzini
This will be needed in the next patch to retrieve the AioContext. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-14-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28iothread: detach all block devices before stopping themPaolo Bonzini
Soon bdrv_drain will not call aio_poll itself on iothreads. If block devices are left hanging off the iothread's AioContext, there will be no one to do I/O for those poor devices. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-13-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28aio: introduce qemu_get_current_aio_contextPaolo Bonzini
This will be used by BDRV_POLL_WHILE (and thus by bdrv_drain) to choose how to wait for I/O completion. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-12-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28sheepdog: use BDRV_POLL_WHILEPaolo Bonzini
This is important when the sheepdog driver works on a BlockDriverState that is attached to an I/O thread other than the main thread. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-11-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28nfs: use BDRV_POLL_WHILEPaolo Bonzini
This will make it possible to use nfs_get_allocated_file_size on a file that is not in the main AioContext. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-10-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28nfs: move nfs_set_events out of the while loopsPaolo Bonzini
nfs_set_events only needs to be called once before entering the while loop; afterwards, nfs_process_read and nfs_process_write take care of it. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-9-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28block: introduce BDRV_POLL_WHILEPaolo Bonzini
We want the BDS event loop to run exclusively in the iothread that owns the BDS's AioContext. This macro will provide the synchronization between the two event loops; for now it just wraps the common idiom of a while loop around aio_poll. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-8-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28qed: Implement .bdrv_drainFam Zheng
The "need_check_timer" is used to clear the "NEED_CHECK" flag in the image header after a grace period once metadata update has finished. To comply with the bdrv_drain semantics, we should make sure it remains deleted once .bdrv_drain is called. The change to qed_need_check_timer_cb is needed because bdrv_qed_drain is called after s->bs has been drained, and should not operate on it; instead it should operate on the BdrvChild-ren exclusively. Doing so is easy because QED does not have a bdrv_co_flush_to_os callback, hence all that is needed to flush it is to ensure writes have reached the disk. Based on commit df9a681dc9a (which however included some unrelated hunks, possibly due to a merge failure or an overlooked squash). The patch was reverted because at the time bdrv_qed_drain could call qed_plug_allocating_write_reqs while an allocating write was queued. This however is not possible anymore after the previous patch; .bdrv_drain is only called after all writes have completed at the QED level, and its purpose is to trigger metadata writes in bs->file. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477565348-5458-7-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28block: change drain to look only at one child at a timePaolo Bonzini
bdrv_requests_pending is checking children to also wait until internal requests (such as metadata writes) have completed. However, checking children is in general overkill. Children requests can be of two kinds: - requests caused by an operation on bs, e.g. a bdrv_aio_write to bs causing a write to bs->file->bs. In this case, the parent's in_flight count will always be incremented by at least one for every request in the child. - asynchronous metadata writes or flushes. Such writes can be started even if bs's in_flight count is zero, but not after the .bdrv_drain callback has been invoked. This patch therefore changes bdrv_drain to finish I/O in the parent (after which the parent's in_flight will be locked to zero), call bdrv_drain (after which the parent will not generate I/O on the child anymore), and then wait for internal I/O in the children to complete. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-6-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28block: add BDS field to count in-flight requestsPaolo Bonzini
Unlike tracked_requests, this field also counts throttled requests, and remains non-zero if an AIO operation needs a BH to be "really" completed. With this change, it is no longer necessary to have a dummy BdrvTrackedRequest for requests that are never serialising, and it is no longer necessary to poll the AioContext once after bdrv_requests_pending(bs) returns false. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-5-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28mirror: use bdrv_drained_begin/bdrv_drained_endPaolo Bonzini
Ensure that there are no changes between the last check to bdrv_get_dirty_count and the switch to the target. There is already a bdrv_drained_end call, we only need to ensure that bdrv_drained_begin is not called twice. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-4-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28blockjob: introduce .drain callback for jobsPaolo Bonzini
This is required to decouple block jobs from running in an AioContext. With multiqueue block devices, a BlockDriverState does not really belong to a single AioContext. The solution is to first wait until all I/O operations are complete; then loop in the main thread for the block job to complete entirely. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-3-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28replication: interrupt failover if the main device is closedPaolo Bonzini
Without this change, there is a race condition in tests/test-replication. Depending on how fast the failover job (active commit) runs, there is a chance of two bad things happening: 1) replication_done can be called after the secondary has been closed and hence when the BDRVReplicationState is not valid anymore. 2) two copies of the active disk are present during the /replication/secondary/stop test (that test runs immediately after /replication/secondary/start, which tests failover). This causes the corruption detector to fire. Reviewed-by: Wen Congyang <wency@cn.fujitsu.com> Reviewed-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-2-git-send-email-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
2016-10-28Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell
Block layer patches # gpg: Signature made Thu 27 Oct 2016 18:15:47 BST # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (23 commits) iotests: Add test for NBD's blockdev-add interface iotests: Add assert_json_filename_equal() method socket_scm_helper: Accept fd directly iotests.py: Allow concurrent qemu instances iotests.py: Add qemu_nbd function qapi: Allow blockdev-add for NBD block/nbd: Use SocketAddress options block/nbd: Accept SocketAddress block/nbd: Add nbd_has_filename_options_conflict() block/nbd: Use qdict_put() block/nbd: Default port in nbd_refresh_filename() block/nbd: Reject port parameter without host block/nbd: Drop trailing "." in error messages qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAX block: Remove bdrv_aio_ioctl() raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctl block: Introduce .bdrv_co_ioctl() driver callback block: Remove bdrv_ioctl() raw-posix: Don't use bdrv_ioctl() block: Use blk_co_ioctl() for all BB level ioctls ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-28Merge remote-tracking branch 'remotes/kraxel/tags/pull-seabios-20161027-2' ↵Peter Maydell
into staging seabios: update to 1.10.0 release. # gpg: Signature made Thu 27 Oct 2016 15:50:54 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # 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/pull-seabios-20161027-2: seabios: update to 1.10.0 release. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-28Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20161027-1' into ↵Peter Maydell
staging virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d # gpg: Signature made Thu 27 Oct 2016 15:32:38 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # 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/pull-vga-20161027-1: virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-27trace: Fix 'char **' compilation error in simple backendFam Zheng
Currently, the generated function body will do "strlen(arg)" but the argument could be 'char **' or 'char * const *'. Avoid that by excluding such cases in is_string check. Reported by patchew's "make docker-test-mingw@fedora". Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1477453806-21097-1-git-send-email-famz@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-27iotests: Add test for NBD's blockdev-add interfaceMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27iotests: Add assert_json_filename_equal() methodMax Reitz
Since the order of keys in JSON filenames is not necessarily fixed, they should not be compared to fixed strings. This method takes a Python dict as a reference, parses a given JSON filename and compares both. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27socket_scm_helper: Accept fd directlyMax Reitz
This gives us more freedom about the fd that is passed to qemu, allowing us to e.g. pass sockets. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27iotests.py: Allow concurrent qemu instancesMax Reitz
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27iotests.py: Add qemu_nbd functionMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27qapi: Allow blockdev-add for NBDMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Use SocketAddress optionsMax Reitz
Drop the use of legacy options in favor of the SocketAddress representation, even for internal use (i.e. for storing the result of the filename parsing). Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Accept SocketAddressMax Reitz
Add a new option "server" to the NBD block driver which accepts a SocketAddress. "path", "host" and "port" are still supported as legacy options and are mapped to their corresponding SocketAddress representation. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Add nbd_has_filename_options_conflict()Max Reitz
Right now, we have four possible options that conflict with specifying an NBD filename, and a future patch will add another one ("address"). This future option is a nested QDict that is flattened at this point, requiring us to test each option whether its key has an "address." prefix. Therefore, we will then need to iterate through all options (including the "export" option which was not covered so far). Adding this iteration logic now will simplify adding the new option later. A nice side effect is that the user will not receive a long list of five options which are not supposed to be specified with a filename, but we can actually print the problematic option. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Use qdict_put()Max Reitz
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Default port in nbd_refresh_filename()Max Reitz
Instead of not emitting the port in nbd_refresh_filename(), just set it to the default if the user did not specify it. This makes the logic a bit simpler. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Reject port parameter without hostMax Reitz
Currently, a port that is passed along with a UNIX socket path is silently ignored. That is not exactly ideal, it should be an error instead. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Drop trailing "." in error messagesMax Reitz
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAXKevin Wolf
Commit 076003f5 added configuration for NFS with IMGOPTSSYNTAX enabled, but it didn't use the right variable name: $TEST_DIR_OPTS doesn't exist. This fixes the mistake. However, this doesn't make anything work that was broken before: The only way to get IMGOPTSSYNTAX is with -luks, but the combination of -luks and -nfs doesn't get qemu-img create commands right (because qemu-img create doesn't support --image-opts yet), so even after this fix some more work would be required to make the tests pass. Reported-by: Tomáš Golembiovský <tgolembi@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block: Remove bdrv_aio_ioctl()Kevin Wolf
It is unused now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctlKevin Wolf
It's the simpler interface to use for the raw format driver. Apart from that, this removes the last user of the AIO emulation implemented by bdrv_aio_ioctl(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27block: Introduce .bdrv_co_ioctl() driver callbackKevin Wolf
This allows drivers to implement ioctls in a coroutine-based way. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27block: Remove bdrv_ioctl()Kevin Wolf
It is unused now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27raw-posix: Don't use bdrv_ioctl()Kevin Wolf
Instead of letting raw-posix use the bdrv_ioctl() abstraction to issue an ioctl to itself, just call ioctl() directly. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27block: Use blk_co_ioctl() for all BB level ioctlsKevin Wolf
All read/write functions already have a single coroutine-based function on the BlockBackend level through which all requests go (no matter what API style the external caller used) and which passes the requests down to the block node level. This patch exports a bdrv_co_ioctl() function and uses it to extend this mode of operation to ioctls. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27block: Remove bdrv_aio_pdiscard()Kevin Wolf
It is unused now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27block: Use blk_co_pdiscard() for all BB level discardKevin Wolf
All read/write functions already have a single coroutine-based function on the BlockBackend level through which all requests go (no matter what API style the external caller used) and which passes the requests down to the block node level. This patch extends this mode of operation to discards. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27block: Use blk_co_flush() for all BB level flushesKevin Wolf
All read/write functions already have a single coroutine-based function on the BlockBackend level through which all requests go (no matter what API style the external caller used) and which passes the requests down to the block node level. This patch extends this mode of operation to flushes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20161027-1' ↵Peter Maydell
into staging audio: intel-hda: check stream entry count during transfer # gpg: Signature made Thu 27 Oct 2016 15:30:51 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # 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/pull-audio-20161027-1: audio: intel-hda: check stream entry count during transfer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-27seabios: update to 1.10.0 release.Gerd Hoffmann
New in this release: =================== * Initial support for Trusted Platform Module (TPM) version 2.0 * Several USB XHCI timing fixes on real hardware * Support for "LSI MPT Fusion" scsi controllers on QEMU * Support for virtio devices mapped above 4GB * Several bug fixes and code cleanups git shortlog rel-1.9.3..rel-1.10.0 ================================== Alex Williamson (1): fw/pci: Add support for mapping Intel IGD via QEMU Cao jin (1): Fix comment typo Cole Robinson (1): biostables: Support SMBIOS 2.6+ UUID format Dana Rubin (2): pvscsi: Fix incorrect arguments order in call to memalign_low pvscsi: Use high memory for rings Don Slutz (1): Support for booting from LSI Logic LSI53C1030, SAS1068, SAS1068e Gerd Hoffmann (4): ahci: set transfer mode according to the capabilities of connected drive virtio: uninline _vp_{read,write} virtio: pci cfg access virtio: fix virtio-pci Haozhong Zhang (1): fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL Igor Mammedov (3): paravirt: disable legacy bios tables in case of more than 255 CPUs add helpers to read etc/boot-cpus at resume time support booting with more than 255 CPUs Kevin O'Connor (124): usb: Allow configuration of sigatt time (in etc/usb-time-sigatt) xhci: Check for device disconnects during USB2 reset polling sdcard: Only enable error_irq_enable for bits defined in SDHCI v1 spec sdcard: fix typo causing 32bit write to 16bit block_size field sdcard: Enable extra debugging on sdcard_waitw() timeout acpi_extract: Move main code to new function main() acpi_extract: Make the generated .hex files more human readable acpi_extract: Don't generate unused (and empty) q35-acpi-dsdt.hex file acpi: Don't build SSDT files on every build; store them in git acpi: Remove build check for iasl tpm: Move standard definitions from tcgbios.h to new file std/tcg.h util.h: Minor - HaveRunPost is in misc.c not resume.c tpm: Add "static" declaration to functions not used outside tcgbios.c tpm: Move code around in tcgbios.c tpm: Move error recovery from tpm_extend_acpi_log() to only caller tpm: Open code tpm_ipl() into callers tpm: Change tpm_add_measurement() to tpm_add_action() tpm: Move tpm_add_bootdevice() into callers tpm: Move tpm_start_option_rom_scan() and tpm_calling_int19h() into callers tpm: pcpes->event is a variable length array tpm: Don't pass entry_count around in parameters to/from tpm_extend_acpi_log() tpm: There is no need to pass pcrindex to hash_log_extend_event() tpm: Perform hashing separately from logging tpm: There is no need to pass event_length to hash/extend functions tpm: Avoid scatter-gather copying in build_and_send_cmd() tpm: Don't implement scatter-gather in transmit() tpm: Merge tpm_log_event() and tpm_extend_acpi_log() tpm: Merge tpm_log_extend_event() and tpm_extend(); extend before logging xhci: Wait for port enable even for USB3 devices xhci: Improve port status change debugging xhci: Disable slot on failed set_address command nmi: Don't try to switch onto extra stack in NMI handler scsi: Do not call printf() from scsi_is_ready() block: Report drive->sectors using "%u" instead of "%d" tpm: Add banner separating the TCG bios interface code from TCG menu code tpm: Avoid macro expansion of tpm request / response structs tpm: Simplify hardware probe and detection checks tpm: Add wrapper function tpmhw_set_timeouts() tpm: Move TPM hardware functions from tcgbios.c to hw/tpm_drivers.c tpm: Rework TPM interface shutdown support tpm: Simplify tcpa probe tpm: Introduce tpm_get_capability() helper function tpm: Eliminate response buffer parameter from build_and_send_cmd() tpm: Don't return a status from external bios measurement functions tpm: No need to check the return status of measurements tpm: Don't call tpm_set_failure() from tpm_log_extend_event() tpm: Don't use 16bit BIOS return codes in build_and_send_cmd() tpm: Don't use 16bit BIOS return codes in tpm_log_event() tpm: Don't use 16bit BIOS return codes in tpmhw_* functions tpm: Don't use 16bit BIOS return codes in TPM menu functions usb: Remove usbdev->slotid field coreboot: Check for unaligned cbfs header resume: Make KVM soft reboot loop detection more flexible post: Always set HaveRunPost prior to setting any other global variable kbd: Don't treat scancode and asciicode as separate values kbd: Refactor capslock and numlock handling ehci: Only delay UHCI/OHCI port scan until after EHCI setup completes usb: Eliminate USB controller setup thread pci: Add helper functions for internal driver BAR handling ahci: Convert to new PCI BAR helper functions ata: Convert to new PCI BAR helper functions esp-scsi: Convert to new PCI BAR helper functions lsi-scsi: Convert to new PCI BAR helper functions megasas: Convert to new PCI BAR helper functions pvscsi: Convert to new PCI BAR helper functions sdcard: Convert to new PCI BAR helper functions ehci: Convert to new PCI BAR helper functions ohci: Convert to new PCI BAR helper functions uhci: Convert to new PCI BAR helper functions xhci: Convert to new PCI BAR helper functions virtio: Convert to new PCI BAR helper functions pci: Consistently set pci->have_drivers for devices with internal drivers pci: Implement '%pP' printf handler for 'struct pci_device' pointers pci: Move code in pci.c that is specific to pciinit.c to pciinit.c pci: Split low-level pci code from higher-level 'struct pci_device' code scsi: Always use MAXDESCSIZE when building drive description block: Move drive setup to new function block_setup() tpm: Unify tpm_fill_hash()/tpm_log_extend_event() and use in BIOS interface docs: Note release date of 1.9.1 build: fix .text section address alignment tpm: Write logs in TPM 2 format mpt-scsi: Declare 'int i' outside of for loop for older compilers block: Move send_disk_op() from block.c to disk.c disk: Avoid stack_hop() path if already on the extra stack optionroms: Drop support for CONFIG_OPTIONROMS_DEPLOYED shadow: Batch PCI config writes virtio: Use threads when scanning for virtio devices scsi: Launch a thread when scanning for drives in the scsi drivers docs: Note release date of 1.9.2 usb-xhci: Remove unused const variables tcgbios: Remove unused const variable vgabios: Remove special case of dh==0xff in handle_1013() vgabios: Don't check for special case of page==0xff on external calls vgabios: Simplify set_cursor_pos() docs: Note release date of 1.9.3 vgabios: Simplify scroll logic blockcmd: CMD_SCSI op is only used in 32bit mode swcursor: Move swcursor code from vgafb.c to new file swcursor.c swcursor: Concentrate swcursor logic in swcursor.c vgafb: Move header definitions from vgabios.h to new file vgafb.h vgainit: Move video param setup to stdvga_build_video_param() vgautil: Add new header file with misc function and variable definitions vgautil: Move generic definitions from stdvga.h to vgautil.h vgautil: Move definitions from cbvga.h and clext.h to vgautil.h version: Update header files now that version.c is not auto generated checkstack: Handle conditional checks at start of functions tpm: Append to TPM2 log the hashes used for PCR extension ps2: Remove stale check for timeout warning on reset pic: The default hardware interrupt handlers should not take a parameter kbd: Implement 101-key keyboard keycode mapping kbd: Implement extended keycode mappings for keypad-enter and keypad-/ kbd: Suppress keys without mappings kbd: Merge bda->kbd_flag0 and bda->kbd_flag1 kbd: Extract out shift flag setting into new function kbd: Move checking for special keys in __process_keys() into switch kbd: Ignore fake shift keys usb-hid: Generate Ctrl+Break and Alt+SysReq keys kbd: Generate interrupt events for SysReq, PrtScr, and Break post: Map int 0x05 to entry point kbd: Move extended and release events out of special key detection switch build: Be sure to also include out/*.d in Makefile smp: consolidate CPU APIC ID detection and accounting build: Add -fno-pie to the gcc flags when available docs: Note v1.10.0 release Marcel Apfelbaum (2): fw/pci: do not automatically allocate IO region for PCIe bridges fw/pci: add Q35 S3 support Matt DeVillier (1): sdcard: skip detection of PCI sdhci controllers if etc/sdcard used Paolo Bonzini (1): smp: restore MSRs on S3 resume Piotr Król (1): docs: fix various typos and inconsistency Roger Pau Monne (1): build: fix typo in buildversion.py Stefan Berger (34): tpm: Temporarily deactivate the TPM in case of failure tpm: Refactor function building TPM commands tpm: Refactor the parameters being passed to tpm_extend_acpi_log tpm: Refactor hash_log_event BIOS interface function tpm: Refactor hash_log_extend_event tpm: fix compiler warning with older gcc versions tpm: Drop code using the TPM for sha1 tpm: Set timeouts and durations to microsecond values tpm: Cache all log related pointers in tpm_state tpm: Refactor pass_through_to_tpm tpm: Rename remaining interrupt functions tpm: Remove check for working TPM from TPM interrupt handler tpm: Check length parameter of the array tpm: Add a menu for TPM configuration tpm: Copy digest into HashLogExentEvent response tpm: Move assert_physical_presence and dependencies tpm: Add support for harware physical presence tpm: Rework the assertion of physical presence tpm: Remove usage of PP_CMD_ENABLE from all but one place tpm: Do not set TPM in failure mode if menu command fails tpm: Extend TPM TIS with TPM 2 support. tpm: Factor out tpm_extend tpm: Prepare code for TPM 2 functions tpm: Implement tpm20_startup and tpm20_s3_resume tpm: Implement tpm20_set_timeouts tpm: Implement tpm20_prepboot tpm: Implement tpm20_extend tpm: Implement tpm20_menu tpm: Implement TPM 2's tpm_set_failure part tpm: Filter TPM commands in passthrough API tpm: Retrieve the PCR Bank configuration tpm: Restructure tpm20_extend to use buffer and take hash as parameter tpm: Refactor tpml_digest_values_sha1 structure tpm: Extend tpm20_extend to support extending to multiple PCR banks Zheng Bao (1): splash: Skip the RGB555 mode Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-10-27Merge remote-tracking branch 'remotes/rth/tags/pull-atomic-20161026' into ↵Peter Maydell
staging cmpxchg emulation of atomics, v8 # gpg: Signature made Wed 26 Oct 2016 16:30:03 BST # gpg: using RSA key 0xAD1270CC4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC 16A4 AD12 70CC 4DD0 279B * remotes/rth/tags/pull-atomic-20161026: (37 commits) target-alpha: Emulate LL/SC using cmpxchg helpers target-alpha: Introduce MMU_PHYS_IDX target-arm: remove EXCP_STREX + cpu_exclusive_{test, info} linux-user: remove handling of aarch64's EXCP_STREX linux-user: remove handling of ARM's EXCP_STREX target-arm: emulate aarch64's LL/SC using cmpxchg helpers target-arm: emulate SWP with atomic_xchg helper target-arm: emulate LL/SC using cmpxchg helpers target-arm: Rearrange aa32 load and store functions tests: add atomic_add-bench target-i386: remove helper_lock() target-i386: emulate XCHG using atomic helper target-i386: emulate LOCK'ed BTX ops using atomic helpers target-i386: emulate LOCK'ed XADD using atomic helper target-i386: emulate LOCK'ed NEG using cmpxchg helper target-i386: emulate LOCK'ed NOT using atomic helper target-i386: emulate LOCK'ed INC using atomic helper target-i386: emulate LOCK'ed OP instructions using atomic helpers target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers tcg: Emit barriers with parallel_cpus ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>