[Qemu-devel] [PULL 15/15] log: add "-d trace:PATTERN"

2015-11-10 Thread Stefan Hajnoczi
From: Paolo Bonzini This is a bit easier to use than "-trace" if you are also enabling other kinds of logging. It is also more discoverable for experienced QEMU users, and accessible from user-mode emulators. Signed-off-by: Paolo Bonzini Signed-off-by: Denis V. Lunev Acked-by: Christian Bornt

Re: [Qemu-devel] [PATCH v2] target-arm: Clean up DISAS_UPDATE usage in AArch32 translation code

2015-11-10 Thread Peter Maydell
On 9 November 2015 at 19:37, Sergey Fedorov wrote: > AArch32 translation code does not distinguish between DISAS_UPDATE and > DISAS_JUMP. Thus, we cannot use any of them without first updating PC in > CPU state. Furthermore, it is too complicated to update PC in CPU state > before PC gets updated

[Qemu-devel] [PULL 6/7] hw/arm/virt: error_report cleanups

2015-11-10 Thread Peter Maydell
From: Andrew Jones Signed-off-by: Andrew Jones Reviewed-by: Markus Armbruster Message-id: 1446909925-12201-1-git-send-email-drjo...@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/virt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --gi

[Qemu-devel] [PULL 1/7] target-arm: Fix gdb singlestep handling in arm_debug_excp_handler()

2015-11-10 Thread Peter Maydell
From: Sergey Fedorov Do not raise a CPU exception if no CPU breakpoint has fired, since singlestep is also done by generating a debug internal exception. This fixes a bug with singlestepping in gdbstub. Signed-off-by: Sergey Fedorov Message-id: 1446726361-18328-1-git-send-email-serge.f...@gmail

[Qemu-devel] [PULL 7/7] target-arm: Clean up DISAS_UPDATE usage in AArch32 translation code

2015-11-10 Thread Peter Maydell
From: Sergey Fedorov AArch32 translation code does not distinguish between DISAS_UPDATE and DISAS_JUMP. Thus, we cannot use any of them without first updating PC in CPU state. Furthermore, it is too complicated to update PC in CPU state before PC gets updated in disas context. So it is hardly pos

[Qemu-devel] [PULL 3/7] arm: boot: Add secure_board_setup flag

2015-11-10 Thread Peter Maydell
From: Peter Crosthwaite Add a flag that when set, will cause the primary CPU to start in secure mode, even if the overall boot is non-secure. This is useful for when there is a board-setup blob that needs to run from secure mode, but device and secondary CPU init should still be done as-normal fo

[Qemu-devel] [PULL 5/7] arm: highbank: Implement PSCI and dummy monitor

2015-11-10 Thread Peter Maydell
From: Peter Crosthwaite Firstly, enable monitor mode and PSCI, both of which are features of this board. In addition to PSCI, this board also uses SMC for cache maintenance ops. This means we need a secure monitor to catch these and nop them. Use the ARM boot board-setup feature to implement thi

[Qemu-devel] [PULL 2/7] hw/intc/arm_gic: Remove the definition of NUM_CPU

2015-11-10 Thread Peter Maydell
From: Wei Huang arm_gic.c retrieves CPU number using either NUM_CPU(s) or s->num_cpu. Such mixed-uses make source code inconsistent. This patch removes NUM_CPU(s), which was defined for MPCore tweak long ago, and instead favors s->num_cpu. The source is more consistent after this small tweak. Re

[Qemu-devel] [PULL 4/7] arm: highbank: Defeature CPU override

2015-11-10 Thread Peter Maydell
From: Peter Crosthwaite This board should not support CPU model override. This allows for easier patching of the board with being able to rely on the CPU type being correct. Reviewed-by: Peter Maydell Signed-off-by: Peter Crosthwaite Message-id: 471a61e049c7ca6e82f5ef6668889a1d518c7e00.144700

[Qemu-devel] [PULL 0/7] target-arm queue

2015-11-10 Thread Peter Maydell
.git tags/pull-target-arm-20151110 for you to fetch changes up to 577bf808958d06497928c639efaa473bf8c5e099: target-arm: Clean up DISAS_UPDATE usage in AArch32 translation code (2015-11-10 13:37:33 +) target-arm queue: *

Re: [Qemu-devel] [PATCH QEMU-XEN v5 7/9] xen: Use stable library interfaces when they are available.

2015-11-10 Thread Stefano Stabellini
On Mon, 9 Nov 2015, Ian Campbell wrote: > In Xen 4.7 we are refactoring parts libxenctrl into a number of > separate libraries which will provide backward and forward API and ABI > compatiblity. > > Specifically libxenevtchn, libxengnttab and libxenforeignmemory. > > Previous patches have already

Re: [Qemu-devel] [PATCH QEMU-XEN v5 3/9] xen: Switch to libxengnttab interface for compat shims.

2015-11-10 Thread Stefano Stabellini
On Mon, 9 Nov 2015, Ian Campbell wrote: > In Xen 4.7 we are refactoring parts libxenctrl into a number of > separate libraries which will provide backward and forward API and ABI > compatiblity. > > One such library will be libxengnttab which provides access to grant > tables. > > In preparation

[Qemu-devel] [PULL v2 08/40] blockdev: Add blockdev-insert-medium

2015-11-10 Thread Kevin Wolf
From: Max Reitz And a helper function for that, which directly takes a pointer to the BDS to be inserted instead of its node-name (which will be used for implementing 'change' using blockdev-insert-medium). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 56 +

[Qemu-devel] [PULL v2 04/40] block: Add functions for inheriting a BBRS

2015-11-10 Thread Kevin Wolf
From: Max Reitz In order to open a BDS which inherits a BB's root state, blk_get_open_flags_from_root_state() is used to inquire the flags to be passed to bdrv_open(), and blk_apply_root_state() is used to apply the remaining state after the BDS has been opened. Signed-off-by: Max Reitz Signed-

[Qemu-devel] [PULL v2 05/40] blockdev: Add blockdev-open-tray

2015-11-10 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 36 qapi/block-core.json | 32 qmp-commands.hx | 48 3 files changed, 116 in

[Qemu-devel] [PULL v2 01/40] block: Don't call blk_bs() twice in bdrv_lookup_bs()

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia Signed-off-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index e9f40dc..eb8158a 100644 --- a/block.c +++ b/block.c @@ -2683,12 +2683,12 @@ BlockDriverState *bdrv_lookup_b

[Qemu-devel] [PULL v2 22/40] commit: reopen overlay_bs before base

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia 'block-commit' needs write access to two different nodes of the chain: - 'base', because that's where the data is written to. - the overlay of 'top', because it needs to update the backing file string to point to 'base' after the operation. Both images have to be opened i

[Qemu-devel] [PULL v2 03/40] block: Make bdrv_states public

2015-11-10 Thread Kevin Wolf
From: Max Reitz When inserting a BDS tree into a BB, we will need to add the root BDS to this list. Since we will want to do that in the blockdev-insert-medium implementation in blockdev.c, we will need access to it there. This patch is not exactly elegant, but bdrv_states will be removed in the

[Qemu-devel] [PULL v2 19/40] block: support passing 'backing': '' to 'blockdev-add'

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia Passing an empty string allows opening an image but not its backing file. This was already described in the API documentation, only the implementation was missing. This is useful for creating snapshots using images opened with blockdev-add, since they are not supposed to hav

[Qemu-devel] [PULL v2 02/40] block: Add blk_remove_bs()

2015-11-10 Thread Kevin Wolf
From: Max Reitz This function removes the BlockDriverState associated with the given BlockBackend from that BB and sets the BDS pointer in the BB to NULL. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/block-backend.c | 12 include/sysemu/block-backend.h |

[Qemu-devel] [PULL v2 00/40] Block layer patches

2015-11-10 Thread Kevin Wolf
The following changes since commit a8b4f9585a0bf5186fca793ce2c5d754cd8ec49a: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-10' into staging (2015-11-10 09:39:24 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you t

[Qemu-devel] [PULL v2 06/40] blockdev: Add blockdev-close-tray

2015-11-10 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockdev.c | 23 +++ qapi/block-core.json | 16 qmp-commands.hx | 35 +++ 3 files changed, 74 insertions(+) diff

[Qemu-devel] [PULL v2 21/40] block: add tests for the 'blockdev-snapshot' command

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Signed-off-by: Kevin Wolf --- tests/qemu-iotests/085 | 102 ++--- tests/qemu-iotests/085.out | 34 ++- 2 files changed, 128 insertions(+),

[Qemu-devel] [PULL v2 16/40] iotests: Add test for change-related QMP commands

2015-11-10 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/118 | 720 + tests/qemu-iotests/118.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 726 insertions(+) create mode 100755 tests/qemu-iotes

[Qemu-devel] [PULL v2 09/40] blockdev: Implement eject with basic operations

2015-11-10 Thread Kevin Wolf
From: Max Reitz Implement 'eject' by calling blockdev-open-tray and blockdev-remove-medium. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 0f2a7e2..1624297 100644 -

[Qemu-devel] [PULL v2 20/40] block: add a 'blockdev-snapshot' QMP command

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia One of the limitations of the 'blockdev-snapshot-sync' command is that it does not allow passing BlockdevOptions to the newly created snapshots, so they are always opened using the default values. Extending the command to allow passing options is not a practical solution bec

[Qemu-devel] [PULL v2 18/40] block: rename BlockdevSnapshot to BlockdevSnapshotSync

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia We will introduce the 'blockdev-snapshot' command that will require its own struct for the parameters, so we need to rename this one in order to avoid name clashes. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf Revie

[Qemu-devel] [PULL v2 11/40] block: Inquire tray state before tray-moved events

2015-11-10 Thread Kevin Wolf
From: Max Reitz blk_dev_change_media_cb() is called for all potential tray movements; however, it is possible to request closing the tray but nothing actually happening (on a floppy disk drive without a medium). Thus, the actual tray status should be inquired before sending a tray-moved event (a

[Qemu-devel] [PULL v2 24/40] qcow2: avoid misaligned 64bit bswap

2015-11-10 Thread Kevin Wolf
From: John Snow If we create a buffer directly on the stack by using 12 bytes, there's no guarantee the 64bit value we want to swap will be aligned, which could cause errors with undefined behavior. Spotted with clang -fsanitize=undefined and observed in iotests 15, 26, 44, 115 and 121. Signed-

[Qemu-devel] [PULL v2 27/40] throttle: Use bs->throttle_state instead of bs->io_limits_enabled

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia There are two ways to check for I/O limits in a BlockDriverState: - bs->throttle_state: if this pointer is not NULL, it means that this BDS is member of a throttling group, its ThrottleTimers structure has been initialized and its I/O limits are ready to be applied. - b

[Qemu-devel] [PULL v2 26/40] throttle: Check for pending requests in throttle_group_unregister_bs()

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia throttle_group_unregister_bs() removes a BlockDriverState from its throttling group and destroys the timers. This means that there must be no pending throttled requests at that point (because it would be impossible to complete them), so the caller has to drain them first. At

[Qemu-devel] [PULL v2 07/40] blockdev: Add blockdev-remove-medium

2015-11-10 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 51 +++ qapi/block-core.json | 16 qmp-commands.hx | 45 + 3 files changed, 112 insert

[Qemu-devel] [PULL v2 28/40] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia This addresses scenarios like this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename': 'new.qcow2',

[Qemu-devel] [PULL v2 30/40] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia This test checks that it is not possible to create a snapshot if the requested overlay node is a BDS which does not support backing images. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/085 | 12 +++- t

[Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2015-11-10 Thread Kevin Wolf
From: Max Reitz Implement 'change' on block devices by calling blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium (a variation of that which does not need a node-name) and blockdev-close-tray. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 178

[Qemu-devel] [PULL v2 36/40] mirror: block all operations on the target image during the job

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia There's nothing preventing the target image from being used by other operations during the 'drive-mirror' job, so we should block them all until the job is done. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 82b88fd04cde918a08a6f9a4ab85626d7fd7b502.1446

[Qemu-devel] [PULL v2 12/40] qmp: Introduce blockdev-change-medium

2015-11-10 Thread Kevin Wolf
From: Max Reitz Introduce a new QMP command 'blockdev-change-medium' which is intended to replace the 'change' command for block devices. The existing function qmp_change_blockdev() is accordingly renamed to qmp_blockdev_change_medium(). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf ---

[Qemu-devel] [PULL v2 34/40] qemu-iotests: fix cleanup of background processes

2015-11-10 Thread Kevin Wolf
From: Jeff Cody Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash subshell, in order to catch segfaults. Unfortunately, this means the process PID cannot be captured via '$!'. We stopped killing qemu and qemu-nbd processes, leaving a lot of orphaned, running qemu processes

[Qemu-devel] [PULL v2 33/40] qemu-io: Correct error messages

2015-11-10 Thread Kevin Wolf
From: John Snow Reported-by: Max Reitz Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- qemu-io-cmds.c | 53 ++--- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/qemu-io-cm

[Qemu-devel] [PULL v2 37/40] block: Add blk_get_refcnt()

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia This function returns the reference count of a given BlockBackend. For convenience, it returns 0 if the BlockBackend pointer is NULL. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: dfdd8a17dbe3288842840636d2cfe5bb895abcb0.1446475331.git.be...@igalia.com

[Qemu-devel] [PULL v2 31/40] qemu-io: fix cvtnum lval types

2015-11-10 Thread Kevin Wolf
From: John Snow cvtnum() returns int64_t: we should not be storing this result inside of an int. In a few cases, we need an extra sprinkling of error handling where we expect to pass this number on towards a function that expects something smaller than int64_t. Reported-by: Max Reitz Signed-of

[Qemu-devel] [PULL v2 13/40] hmp: Use blockdev-change-medium for change command

2015-11-10 Thread Kevin Wolf
From: Max Reitz Use separate code paths for the two overloaded functions of the 'change' HMP command, and invoke the 'blockdev-change-medium' QMP command if used on a block device (by calling qmp_blockdev_change_medium()). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wol

[Qemu-devel] [PULL v2 35/40] qemu-iotests: fix -valgrind option for check

2015-11-10 Thread Kevin Wolf
From: Jeff Cody Commit 934659c switched the iotests to run qemu-io from a bash subshell, in order to catch segfaults. This method is incompatible with the current valgrind_qemu_io() bash function. Move the valgrind usage into the exec subshell in _qemu_io_wrapper(), while making sure the origin

[Qemu-devel] [PULL v2 38/40] block: Add 'x-blockdev-del' QMP command

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia This command is still experimental, hence the name. This is the companion to 'blockdev-add'. It allows deleting a BlockBackend with its associated BlockDriverState tree, or a BlockDriverState that is not attached to any backend. In either case, the command fails if the refe

[Qemu-devel] [PULL 00/44] Block patches

2015-11-10 Thread Stefan Hajnoczi
The following changes since commit a8b4f9585a0bf5186fca793ce2c5d754cd8ec49a: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-10' into staging (2015-11-10 09:39:24 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request f

[Qemu-devel] [PULL v2 40/40] qcow2: Fix qcow2_get_cluster_offset() for zero clusters

2015-11-10 Thread Kevin Wolf
When searching for contiguous zero clusters, we only need to check the cluster type. Before this patch, an increasing offset (L2E_OFFSET_MASK) was expected, so that the function never returned more than a single zero cluster in practice. This patch fixes it to actually return as many contiguous zer

[Qemu-devel] [PULL v2 15/40] hmp: Add read-only-mode option to change command

2015-11-10 Thread Kevin Wolf
From: Max Reitz Expose the new read-only-mode option of 'blockdev-change-medium' for the 'change' HMP command. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- hmp-commands.hx | 20 +--- hmp.c | 22 +- 2 files change

[Qemu-devel] [PULL 11/44] iotests: add transactional incremental backup test

2015-11-10 Thread Stefan Hajnoczi
From: John Snow Test simple usage cases for using transactions to create and synchronize incremental backups. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1446765200-3

[Qemu-devel] [PULL 02/44] block: Track flush requests

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Both bdrv_flush and bdrv_aio_flush eventually call bdrv_co_flush, add tracked_request_begin and tracked_request_end pair in that function so that all flush requests are now tracked. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Message-id: 1447064214-29930-3-git-send-email-f

[Qemu-devel] [PULL 03/44] block: Track discard requests

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Both bdrv_discard and bdrv_aio_discard will call into bdrv_co_discard, so add tracked_request_begin/end calls around the loop. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Message-id: 1447064214-29930-4-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- blo

[Qemu-devel] [PULL v2 14/40] blockdev: read-only-mode for blockdev-change-medium

2015-11-10 Thread Kevin Wolf
From: Max Reitz Add an option to qmp_blockdev_change_medium() which allows changing the read-only status of the block device whose medium is changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently of the driv

[Qemu-devel] [PULL 13/44] backup: Extract dirty bitmap handling as a separate function

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng This will be reused by the coming new transactional completion code. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id: 1446765200-3054-5-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/backup

[Qemu-devel] [PULL 05/44] block: Add ioctl parameter fields to BlockRequest

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng The two fields that will be used by ioctl handling code later are added as union, because it's used exclusively by ioctl code which dosn't need the four fields in the other struct of the union. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Message-id: 1447064214-29930-6-git-

[Qemu-devel] [PULL 06/44] block: Emulate bdrv_ioctl with bdrv_aio_ioctl and track both

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Currently all drivers that support .bdrv_aio_ioctl also implement .bdrv_ioctl redundantly. To track ioctl requests in block layer it is easier if we unify the two paths, because we'll need to run it in a coroutine, as required by tracked_request_begin. While we're at it, use .bdr

[Qemu-devel] [PULL v2 17/40] block: check for existing device IDs in external_snapshot_prepare()

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia The 'snapshot-node-name' parameter of blockdev-snapshot-sync allows setting the node name of the image that is going to be created. Before creating the image, external_snapshot_prepare() checks that the name is not already being used. The check is however incomplete since it

[Qemu-devel] [PULL 12/44] block: rename BlkTransactionState and BdrvActionOps

2015-11-10 Thread Stefan Hajnoczi
From: John Snow These structures are misnomers, somewhat. (1) BlockTransactionState is not state for a transaction, but is rather state for a single transaction action. Rename it "BlkActionState" to be more accurate. (2) The BdrvActionOps describes operations for the BlkActionState,

[Qemu-devel] [PULL 10/44] qapi: Add transaction support to block-dirty-bitmap operations

2015-11-10 Thread Stefan Hajnoczi
From: John Snow This adds two qmp commands to transactions. block-dirty-bitmap-add allows you to create a bitmap simultaneously alongside a new full backup to accomplish a clean synchronization point. block-dirty-bitmap-clear allows you to reset a bitmap back to as-if it were new, which can als

[Qemu-devel] [PULL 07/44] block: Drop BlockDriver.bdrv_ioctl

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Now the callback is not used any more, drop the field along with all implementations in block drivers, which are iscsi and raw. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Message-id: 1447064214-29930-8-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- bl

[Qemu-devel] [PULL v2 23/40] qemu-iotests: Test the reopening of overlay_bs in 'block-commit'

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia The 'block-commit' command needs the overlay image of 'top' to be opened in read-write mode in order to update the backing file string. If 'top' is not the active layer or its backing file then its overlay needs to be reopened during the block job. This is a test case for th

[Qemu-devel] [PULL 14/44] blockjob: Introduce reference count and fix reference to job->bs

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Add reference count to block job, meanwhile move the ownership of the reference to job->bs from the caller (which is released in two completion callbacks) to the block job itself. It is necessary for block_job_complete_sync to work, because block job shouldn't live longer than its

[Qemu-devel] [PULL v2 29/40] block: Remove inner quotation marks in iotest 085

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia This patch removes the inner quotation marks in all cases like this: cmd=" ... "${variable}" ... " Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/085 | 16 1 file changed, 8 insertions(+), 8 del

[Qemu-devel] [PULL 16/44] blockjob: Add "completed" and "ret" in BlockJob

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng They are set when block_job_completed is called. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id: 1446765200-3054-8-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- blockjob.c | 3 +++

[Qemu-devel] [PULL 18/44] block: Add block job transactions

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Sometimes block jobs must execute as a transaction group. Finishing jobs wait until all other jobs are ready to complete successfully. Failure or cancellation of one job cancels the other jobs in the group. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: F

[Qemu-devel] [PULL 17/44] blockjob: Simplify block_job_finish_sync

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng With job->completed and job->ret to replace BlockFinishData. Signed-off-by: Fam Zheng Signed-off-by: John Snow Message-id: 1446765200-3054-9-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- blockjob.c | 28 +++- 1 file changed, 7 inse

[Qemu-devel] [PULL 15/44] blockjob: Add .commit and .abort block job actions

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Fam Zheng Signed-off-by: John Snow Message-id: 1446765200-3054-7-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- include/block/blockjob.h | 20 1 file changed, 20 insertions(

[Qemu-devel] [PULL 20/44] block: Add BlockJobTxn support to backup_run

2015-11-10 Thread Stefan Hajnoczi
From: John Snow Allow a BlockJobTxn to be passed into backup_run, which will allow the job to join a transactional group if present. Propagate this new parameter outward into new QMP helper functions in blockdev.c to allow transaction commands to pass forward their BlockJobTxn object in a forthc

[Qemu-devel] [PULL v2 25/40] qemu-img: add check for zero-length job len

2015-11-10 Thread Kevin Wolf
From: John Snow The mirror job doesn't update its total length until it has already started running, so we should translate a zero-length job-len as meaning 0%. Otherwise, we may get divide-by-zero faults. Signed-off-by: John Snow Reviewed-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by:

[Qemu-devel] [PULL 19/44] block/backup: Rely on commit/abort for cleanup

2015-11-10 Thread Stefan Hajnoczi
From: John Snow Switch over to the new .commit/.abort handlers for cleaning up incremental bitmaps. [split up from a patch originally by Stefan and Fam. --js] Signed-off-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Signed-off-by: John Snow Signed-off-by: John Snow Message-id: 1446765200-305

[Qemu-devel] [PULL 22/44] iotests: 124 - transactional failure test

2015-11-10 Thread Stefan Hajnoczi
From: John Snow Use a transaction to request an incremental backup across two drives. Coerce one of the jobs to fail, and then re-run the transaction. Verify that no bitmap data was lost due to the partial transaction failure. To support the 'err-cancel' QMP argument name it's necessary for tra

[Qemu-devel] [PULL 26/44] block: define 'clock_type' for the accounting code

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Its value is still QEMU_CLOCK_REALTIME, but having it in a variable will allow us to change its value easily in the future when running in qtest mode. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Message-id: 547485eb841cf9e3b2770c96539ae9ae5996e214.144604483

[Qemu-devel] [PULL 21/44] block: add transactional properties

2015-11-10 Thread Stefan Hajnoczi
From: John Snow Add both transactional properties to the QMP transactional interface, and add the BlockJobTxn that we create as a result of the err-cancel property to the BlkActionState structure. [split up from a patch originally by Stefan and Fam. --js] Signed-off-by: Stefan Hajnoczi Signed-o

[Qemu-devel] [PULL v2 39/40] iotests: Add tests for the x-blockdev-del command

2015-11-10 Thread Kevin Wolf
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 57c3b0d4d0c73ddadd19e5bded9492c359cc4568.1446475331.git.be...@igalia.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- tests/qemu-iotests/139 | 414 + tests/qemu-iotests/139.o

[Qemu-devel] [PULL 31/44] block: Compute minimum, maximum and average I/O latencies

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia This patch keeps track of the minimum, maximum and average latencies of I/O operations during a certain interval of time. The values are exposed in the BlockDeviceTimedStats structure. An option to define the intervals to collect these statistics will be added in a separate

[Qemu-devel] [PULL 23/44] tests: add BlockJobTxn unit test

2015-11-10 Thread Stefan Hajnoczi
The BlockJobTxn unit test verifies that both single jobs and pairs of jobs behave as a transaction group. Either all jobs complete successfully or the group is cancelled. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Fam Zheng Signed-off-by: John

[Qemu-devel] [PULL 35/44] block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia This patch switches to QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode, and makes the latency of the operation constant. This way we can perform tests on the accounting code with reproducible results. Signed-off-by: Alberto Garcia Message-id: 35ed0501450fa572684e9

[Qemu-devel] [PULL 29/44] block: Add statistics for failed and invalid I/O operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia This patch adds the block_acct_failed() and block_acct_invalid() functions to allow keeping track of failed and invalid I/O operations. The number of failed and invalid operations is exposed in BlockDeviceStats. We don't keep track of the time spent on invalid operations be

[Qemu-devel] [PULL 01/44] block: Add more types for tracked request

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng We'll track more request types besides read and write, change the boolean field to an enum. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Message-id: 1447064214-29930-2-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/io.c| 9 +--

[Qemu-devel] [PULL 32/44] block: Add average I/O queue depth to BlockDeviceTimedStats

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia This patch adds two new fields to BlockDeviceTimedStats that track the average number of pending read and write requests for a block device. The values are calculated for the period of time defined for that interval. Signed-off-by: Alberto Garcia Message-id: fd31fef53e271

[Qemu-devel] [PULL 30/44] block: Allow configuring whether to account failed and invalid ops

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia This patch adds two options, "stats-account-invalid" and "stats-account-failed", that can be used to decide whether invalid and failed I/O operations must be used when collecting statistics for latency and last access time. Signed-off-by: Alberto Garcia Reviewed-by: Stefan

[Qemu-devel] [PULL 42/44] macio: Account for failed operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: ee6f4fde6a7c1071ca96d4ddd53e4934ff812fcd.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- hw/ide/macio.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/ide/macio.c b/hw/ide/m

[Qemu-devel] [PULL 44/44] block: Update copyright of the accounting code

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 80a2278e3ec2dafd5daab20a7cb2d6a9b83371e4.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- block/accounting.c | 1 + include/block/accounting.h | 1 + 2 files changed, 2 insertions(+) diff --git a/block/a

[Qemu-devel] [PULL v2 32/40] qemu-io: Check for trailing chars

2015-11-10 Thread Kevin Wolf
From: John Snow Make sure there's not trailing garbage, e.g. "64k-whatever-i-want-here" Reported-by: Max Reitz Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- qemu-io-cmds.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

[Qemu-devel] [PULL 04/44] iscsi: Emulate commands in iscsi_aio_ioctl as iscsi_ioctl

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng iscsi_ioctl emulates SG_GET_VERSION_NUM and SG_GET_SCSI_ID. Now that bdrv_ioctl() will be emulated with .bdrv_aio_ioctl, replicate the logic into iscsi_aio_ioctl to make them consistent. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Message-id: 1447064214-29930-5-git-send-em

[Qemu-devel] [PULL 34/44] qemu-io: Account for failed, invalid and flush operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 78a7662a8636e55991737ece50003a2dc5a5f3e0.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- qemu-io-cmds.c | 9 + 1 file changed, 9 insertions(+) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 6e5d1e4.

[Qemu-devel] [PATCH 04/10] snapshot: create bdrv_all_goto_snapshot helper

2015-11-10 Thread Denis V. Lunev
to switch to snapshot on all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev Reviewed-by: Greg Kurz CC: Juan Quintela CC: Stefan Hajnoczi CC: Kevin Wolf --- block/snapshot.c | 20 include/block/snapshot.h | 1 + migrat

[Qemu-devel] [PULL 40/44] atapi: Account for failed and invalid operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 59dee4e2921b0c79d41c49b67dfb93d32db9f7f9.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- hw/ide/atapi.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/id

[Qemu-devel] [PULL 09/44] qed: Implement .bdrv_drain

2015-11-10 Thread Stefan Hajnoczi
From: Fam 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. In compliance to the bdrv_drain semantics we should make sure it remains deleted once .bdrv_drain is called. We cannot reuse qed_need_check_ti

[Qemu-devel] [PULL 37/44] nvme: Account for failed and invalid operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 678dc67da229759d404b44f7cc2bf5ed8bf8ad14.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- hw/block/nvme.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block

[Qemu-devel] [PULL 43/44] scsi-disk: Account for failed operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 0ead7b0e59c22926e033ca12725e3a31985ec46b.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- hw/scsi/scsi-disk.c | 46 +++--- 1 file changed, 31 insertions(+), 15 deletions(-)

[Qemu-devel] [PATCH 02/10] snapshot: return error code from bdrv_snapshot_delete_by_id_or_name

2015-11-10 Thread Denis V. Lunev
this will make code better in the next patch Signed-off-by: Denis V. Lunev CC: Juan Quintela CC: Stefan Hajnoczi CC: Kevin Wolf --- block/snapshot.c | 7 --- include/block/snapshot.h | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/block/snapshot.c b/bloc

[Qemu-devel] [PULL 08/44] block: Introduce BlockDriver.bdrv_drain callback

2015-11-10 Thread Stefan Hajnoczi
From: Fam Zheng Drivers can have internal request sources that generate IO, like the need_check_timer in QED. Since we want quiesced periods that contain nested event loops in block layer, we need to have a way to disable such event sources. Block drivers must implement the "bdrv_drain" callback

[Qemu-devel] [PATCH 01/10] snapshot: create helper to test that block drivers supports snapshots

2015-11-10 Thread Denis V. Lunev
The patch enforces proper locking for this operation. Signed-off-by: Denis V. Lunev Reviewed-by: Greg Kurz CC: Juan Quintela CC: Stefan Hajnoczi CC: Kevin Wolf --- block/snapshot.c | 24 include/block/snapshot.h | 8 migration/savevm.c | 17 ++

[Qemu-devel] [PULL 36/44] iotests: Add test for the block device statistics

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 0fb8501bbf3666b3d5d3f67fa899729c88f21baf.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/136 | 349 + tests/qemu-iotests/136.out | 5 + tests/

[Qemu-devel] [PULL 25/44] ide: Account for write operations correctly

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Message-id: 2e71323c0875c2b66a8ae9545e0c013af8d4.1446044837.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- hw/ide/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/cor

[Qemu-devel] [PULL 00/57] Migration pull (take 2)

2015-11-10 Thread Juan Quintela
-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-10' into staging (2015-11-10 09:39:24 +) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20151110 for you to fetch changes up to 15b3b8eaae8dbcc903bb164311ea0066c77536a7:

[Qemu-devel] [PULL 39/44] xen_disk: Account for failed and invalid operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: e0cbb96cb0e1f86c37c7ce332efdf02b57b9d365.1446044838.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- hw/block/xen_disk.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/hw/block/x

[Qemu-devel] [PATCH for 2.5 v7 0/10] dataplane snapshot fixes

2015-11-10 Thread Denis V. Lunev
with test while /bin/true ; do virsh snapshot-create rhel7 sleep 10 virsh snapshot-delete rhel7 --current done with enabled iothreads on a running VM leads to a lot of troubles: hangs, asserts, errors. Anyway, I think that the construction like assert(aio_contex

[Qemu-devel] [PULL 24/44] xen_disk: Account for flush operations

2015-11-10 Thread Stefan Hajnoczi
From: Alberto Garcia Currently both BLKIF_OP_WRITE and BLKIF_OP_FLUSH_DISKCACHE are being accounted as write operations. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Message-id: 7a2a14e3ac62027aa6267a6c02abc70717be9c0a.1446044837.git.be...@igalia.com Signed-off-by: Stefan Hajnoc

[Qemu-devel] [PATCH 05/10] snapshot: create bdrv_all_find_snapshot helper

2015-11-10 Thread Denis V. Lunev
to check that snapshot is available for all loaded block drivers. The ability to switch to snapshot is verified separately using bdrv_all_can_snapshot. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev CC: Juan Quintela CC: Stefan Hajnoczi CC: Kevin Wolf --- block/snapshot

[Qemu-devel] [PULL 14/57] Rename save_live_complete to save_live_complete_precopy

2015-11-10 Thread Juan Quintela
From: "Dr. David Alan Gilbert" In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the 'complete's to make the difference obvious. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Reviewed-by: Jua

<    1   2   3   4   5   6   >