[Qemu-devel] [PATCH v2.5 00/10] block: incremental backup transactions

2015-04-17 Thread John Snow
. 09: Fallout from removing the code motion patch, new forward declaration. 10: Fallout from the rebase. There are some more changes that need to happen to #10, primarily a bit more refactoring after the changes made to how images are checked. On 03/27/2015 03:19 PM, John Snow wrote: requ

[Qemu-devel] [PATCH v6 20/21] iotests: add incremental backup failure recovery test

2015-04-17 Thread John Snow
Test the failure case for incremental backups. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/124 | 57 ++ tests/qemu-iotests/124.out | 4 ++-- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/tests/qemu

Re: [Qemu-devel] While testing `drive-backup` with 'dirty-bitmap' syc mode via QMP. . .

2015-04-21 Thread John Snow
Kashyap Chamarthy sent me a question asking for some clarifications on testing my incremental backup series. I responded off-list but he has asked me to reproduce my answer for the archives :) On 04/21/2015 08:35 AM, Kashyap Chamarthy wrote: Hi John, I would have asked this question on #qemu

[Qemu-devel] [PATCH 0/5] scripts: qmp-shell: add transaction support

2015-04-21 Thread John Snow
iderations: (1) Try not to disrupt the existing design of the qmp-shell. The existing API is not disturbed. (2) Pick a "magic token" such that it could not be confused for legitimate QMP/JSON syntax. Parentheses are used for this purpose. John Snow (5): scripts: qmp-shell: r

[Qemu-devel] [PATCH 3/5] scripts: qmp-shell: allow single-quotes in JSON expressions

2015-04-21 Thread John Snow
As a convenience for the user, replace any single quotes given with double quotes so that the data will deserialize correctly via json.loads(). Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts

[Qemu-devel] [PATCH 1/5] scripts: qmp-shell: refactor helpers

2015-04-21 Thread John Snow
Refactor the qmp-shell command line processing function into two components. This will be used to allow sub-expressions, which will assist us in adding transactional support to qmp-shell. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 24 +--- 1 file changed, 13

[Qemu-devel] [PATCH 2/5] scripts: qmp-shell: add support for [] expressions

2015-04-21 Thread John Snow
uot;:{...}}] Add support for arrays. CAVEAT: The parser is still extremely rudimentary and does not expect to find spaces in {} nor [] expressions. This patch does not improve this functionality. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 ++ 1 file changed, 2 insertions(+) diff

[Qemu-devel] [PATCH 5/5] scripts: qmp-shell: Add verbose flag

2015-04-21 Thread John Snow
Add a verbose flag that shows the QMP command that was constructed, to allow for later copy/pasting, reference, debugging, etc. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/qmp/qmp-shell b

[Qemu-devel] [PATCH 4/5] scripts: qmp-shell: add transaction subshell

2015-04-21 Thread John Snow
ode=drive0 name=bitmap2 TRANS> block-dirty-bitmap-add node=drive0 name=bitmap3 TRANS> ) As a one-liner, with just one transation action: (QEMU) transaction( block-dirty-bitmap-add node=drive0 name=bitmap0 ) Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 43

Re: [Qemu-devel] [PATCH 2/5] scripts: qmp-shell: add support for [] expressions

2015-04-22 Thread John Snow
On 04/22/2015 10:28 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: qmp-shell currently allows you to describe values as JSON expressions: key={"key":{"key2":"val"}} But it does not currently support arrays, which are needed for serializing

Re: [Qemu-devel] [PATCH 3/5] scripts: qmp-shell: allow single-quotes in JSON expressions

2015-04-22 Thread John Snow
On 04/22/2015 10:34 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: As a convenience for the user, replace any single quotes given with double quotes so that the data will deserialize correctly via json.loads(). Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1

Re: [Qemu-devel] [PATCH 4/5] scripts: qmp-shell: add transaction subshell

2015-04-22 Thread John Snow
On 04/22/2015 10:48 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: Add a special processing mode to craft transactions. By entering "transaction(" the shell will enter a special mode where each subsequent command will be saved as a transaction instead of exec

Re: [Qemu-devel] [PATCH 3/5] scripts: qmp-shell: allow single-quotes in JSON expressions

2015-04-22 Thread John Snow
On 04/22/2015 10:34 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: As a convenience for the user, replace any single quotes given with double quotes so that the data will deserialize correctly via json.loads(). Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1

[Qemu-devel] [PATCH v2 4/4] scripts: qmp-shell: Add verbose flag

2015-04-22 Thread John Snow
Add a verbose flag that shows the QMP command that was constructed, to allow for later copy/pasting, reference, debugging, etc. Signed-off-by: John Snow Reviewed-by: Eric Blake --- scripts/qmp/qmp-shell | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread John Snow
ing to the correct type. As a consequence of the above, the key=val parsing is also improved to give better error messages if a key=val token is not provided. CAVEAT: The parser is still extremely rudimentary and does not expect to find spaces in {} nor [] expressions. This patch does not improv

[Qemu-devel] [PATCH v2 1/4] scripts: qmp-shell: refactor helpers

2015-04-22 Thread John Snow
Refactor the qmp-shell command line processing function into two components. This will be used to allow sub-expressions, which will assist us in adding transactional support to qmp-shell. Signed-off-by: John Snow Reviewed-by: Eric Blake --- scripts/qmp/qmp-shell | 24

[Qemu-devel] [PATCH v2 3/4] scripts: qmp-shell: add transaction subshell

2015-04-22 Thread John Snow
hich shell mode you are in. Signed-off-by: John Snow Reviewed-by: Eric Blake --- scripts/qmp/qmp-shell | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 4cdcb6c..3fffe15 100755 --- a/

[Qemu-devel] [PATCH v2 0/4] scripts: qmp-shell: add transaction support

2015-04-22 Thread John Snow
: - Remove wholesale replacement of single quotes, in favor of try blocks that attempt to parse as pure JSON, then as Python. - Factored out the value parser block to accomplish the above. - Allow both true/True and false/False for values. - Fix typo in patch 3 cover letter. (was patch

Re: [Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread John Snow
On 04/22/2015 12:21 PM, John Snow wrote: This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use "True" or "False" literals instead of JSON's lowercased 'true' and 'fals

Re: [Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread John Snow
On 04/22/2015 01:18 PM, Eric Blake wrote: On 04/22/2015 10:21 AM, John Snow wrote: This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use "True" or "False" literals instead of JSON

Re: [Qemu-devel] [PATCH v2 0/4] scripts: qmp-shell: add transaction support

2015-04-22 Thread John Snow
On 04/22/2015 12:21 PM, John Snow wrote: The qmp-shell is a little rudimentary, but it can be hacked to give us some transactional support without too much difficulty. (1) Prep. (2) Add support for serializing json arrays (3) Allow users to use 'single quotes' instead of "do

Re: [Qemu-devel] [PATCH v6 12/21] qmp: Add dirty bitmap status field in query-block

2015-04-22 Thread John Snow
On 04/22/2015 06:18 PM, Eric Blake wrote: On 04/17/2015 05:50 PM, John Snow wrote: Add the "frozen" status booleans, to inform clients when a bitmap is occupied doing a task. Signed-off-by: Fam Zheng Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi R

[Qemu-devel] [PATCH v3 02/10] iotests: add transactional incremental backup test

2015-04-22 Thread John Snow
Test simple usage cases for using transactions to create and synchronize incremental backups. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 54 ++ tests/qemu-iotests/124.out | 4 ++-- 2 files changed, 56 insertions(+), 2 deletions

[Qemu-devel] [PATCH v3 04/10] block: re-add BlkTransactionState

2015-04-22 Thread John Snow
us more efficiently delete items in arbitrary order, which will be more important in the future when some actions will expire at the end of the transaction, but others may persist until all callbacks triggered by the transaction are recollected. Signed-off-by: John Snow Reviewed-by: Max Reitz

[Qemu-devel] [PATCH v3 09/10] block: drive_backup transaction callback support

2015-04-22 Thread John Snow
. (4) backup_transaction_complete will perform the final cleanup on the backup job. (5) In the case of transaction cancellation, drive_backup_cb is still responsible for cleaning up the mess we may have already made. Signed-off-by: John Snow --- block/backup.c| 9

[Qemu-devel] [PATCH v3 00/10] block: incremental backup transactions

2015-04-22 Thread John Snow
do_drive_backup() Forward declarations removed. 10: Rebased on top of drastically modified #05. Phrasing: "BackupBlockJob" instead of "BackupJob" in comments. 11: Removed extra parameters to wait_incremental() in test_transaction_failure() John Snow (10): qap

[Qemu-devel] [PATCH v3 03/10] block: rename BlkTransactionState and BdrvActionOps

2015-04-22 Thread John Snow
sactions operate. This patch changes only comments and names, and should not affect behavior in any way. Signed-off-by: John Snow Reviewed-by: Max Reitz --- blockdev.c | 114 ++--- 1 file changed, 64 insertions(+), 50 deletions(-) diff

[Qemu-devel] [PATCH v3 06/10] block: add refcount to Job object

2015-04-22 Thread John Snow
If we want to get at the job after the life of the job, we'll need a refcount for this object. This may occur for example if we wish to inspect the actions taken by a particular job after a transactional group of jobs runs, and further actions are required. Signed-off-by: John Snow Review

[Qemu-devel] [PATCH v3 07/10] block: add delayed bitmap successor cleanup

2015-04-22 Thread John Snow
un to backup_complete. Signed-off-by: John Snow Reviewed-by: Max Reitz --- block.c | 65 ++- block/backup.c| 20 ++-- include/block/block.h | 10 3 files changed, 70 insertions(+), 25 deletions(-) diff --git a/bl

[Qemu-devel] [PATCH v3 01/10] qapi: Add transaction support to block-dirty-bitmap operations

2015-04-22 Thread John Snow
alongside a full backup to accomplish a clean synchronization point. Signed-off-by: Fam Zheng Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- blockdev.c | 100 +++ docs/bitmaps.md | 2 +- qapi-schema.json | 6

[Qemu-devel] [PATCH v3 05/10] block: add transactional callbacks feature

2015-04-22 Thread John Snow
s. Signed-off-by: John Snow --- blockdev.c | 183 +++-- 1 file changed, 179 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index 2ab63ed..31ccb1b 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1240,6 +1240,8 @@ type

[Qemu-devel] [PATCH v3 10/10] iotests: 124 - transactional failure test

2015-04-22 Thread 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. Signed-off-by: John Snow --- tests/qemu-iotests/124 | 120

[Qemu-devel] [PATCH v3 08/10] qmp: Add an implementation wrapper for qmp_drive_backup

2015-04-22 Thread John Snow
We'd like to be able to specify the callback given to backup_start manually in the case of transactions, so split apart qmp_drive_backup into an implementation and a wrapper. Switch drive_backup_prepare to use the new wrapper, but don't overload the callback and closure yet. Signed-of

[Qemu-devel] [PATCH v3 1/4] scripts: qmp-shell: refactor helpers

2015-04-23 Thread John Snow
Refactor the qmp-shell command line processing function into two components. This will be used to allow sub-expressions, which will assist us in adding transactional support to qmp-shell. Signed-off-by: John Snow Reviewed-by: Eric Blake --- scripts/qmp/qmp-shell | 24

[Qemu-devel] [PATCH v3 4/4] scripts: qmp-shell: Add verbose flag

2015-04-23 Thread John Snow
Add a verbose flag that shows the QMP command that was constructed, to allow for later copy/pasting, reference, debugging, etc. Signed-off-by: John Snow Reviewed-by: Eric Blake --- scripts/qmp/qmp-shell | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a

[Qemu-devel] [PATCH v3 0/4] scripts: qmp-shell: add transaction support

2015-04-23 Thread John Snow
lues. - Fix typo in patch 3 cover letter. (was patch 4.) John Snow (4): scripts: qmp-shell: refactor helpers scripts: qmp-shell: Expand support for QMP expressions scripts: qmp-shell: add transaction subshell scripts: qmp-shell: Add verbose

[Qemu-devel] [PATCH v3 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-23 Thread John Snow
ing to the correct type. As a consequence of the above, the key=val parsing is also improved to give better error messages if a key=val token is not provided. CAVEAT: The parser is still extremely rudimentary and does not expect to find spaces in {} nor []

[Qemu-devel] [PATCH v3 3/4] scripts: qmp-shell: add transaction subshell

2015-04-23 Thread John Snow
hich shell mode you are in. Signed-off-by: John Snow Reviewed-by: Eric Blake --- scripts/qmp/qmp-shell | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index e7b40eb..c9e4439 100755 --- a/

Re: [Qemu-devel] [Qemu-block] [PATCH v6 00/21] block: transactionless incremental backup series

2015-04-23 Thread John Snow
On 04/23/2015 09:19 AM, Stefan Hajnoczi wrote: On Fri, Apr 17, 2015 at 07:49:48PM -0400, John Snow wrote: === v6: === 01: s/underlaying/underlying/ Removed a reference to 'disabled' bitmaps. Touching up inconsistent list indentation. Added FreeBSD Documentati

Re: [Qemu-devel] [PATCH v3 0/4] scripts: qmp-shell: add transaction support

2015-04-23 Thread John Snow
On 04/23/2015 10:34 AM, John Snow wrote: The qmp-shell is a little rudimentary, but it can be hacked to give us some transactional support without too much difficulty. (1) Prep. (2) Add support for serializing json arrays (3) Allow users to use 'single quotes' instead of "do

Re: [Qemu-devel] [Qemu-block] [PATCH v6 00/21] block: transactionless incremental backup series

2015-04-23 Thread John Snow
On 04/23/2015 03:18 PM, Eric Blake wrote: On 04/23/2015 08:41 AM, John Snow wrote: I know I said "primarily to be difficult" but I was just being facetious. I didn't find the GPL2+ to be suitable for documentation, strictly, so I went to read up on the documentation licens

Re: [Qemu-devel] [PATCH v2] qmp-commands.hx: Update the supported 'transaction' operations

2015-04-24 Thread John Snow
On 04/24/2015 04:32 AM, Kashyap Chamarthy wrote: Although the canonical source of reference for QMP commands is qapi-schema.json, for consistency's sake, update qmp-commands.hx to state the list of supported transactionable operations, namely: drive-backup blockdev-backup blockd

Re: [Qemu-devel] [PATCH v2] qmp-commands.hx: Update the supported 'transaction' operations

2015-04-24 Thread John Snow
On 04/24/2015 12:20 PM, Kashyap Chamarthy wrote: On Fri, Apr 24, 2015 at 11:52:00AM -0400, John Snow wrote: On 04/24/2015 04:32 AM, Kashyap Chamarthy wrote: [. . .] These: block-dirty-bitmap-add block-dirty-bitmap-clear Aren't merged yet, so it might be a little conf

Re: [Qemu-devel] [PATCH v2 2/5] libqos: Allow calling guest_free on NULL pointer

2015-04-24 Thread John Snow
locator); Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v2 1/5] tests: Link libqos virtio object to virtio-scsi-test

2015-04-24 Thread John Snow
-console-test.o Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH] qemu-options: trivial spelling fix (messsage)

2015-04-27 Thread John Snow
On 04/27/2015 10:49 AM, Eric Blake wrote: On 04/27/2015 02:13 AM, Michael Tokarev wrote: Signed-off-by: Michael Tokarev --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake But while at it... diff --git a/qemu-options.hx b/qemu-options.hx

Re: [Qemu-devel] [PATCH] vmdk: Widen before shifting 32 bit header field

2015-04-27 Thread John Snow
o_cpu(header.l1dir_offset) << 9, + (int64_t)le32_to_cpu(header.l1dir_offset) << 9, 0, le32_to_cpu(header.l1dir_size), 4096, Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v3 0/4] scripts: qmp-shell: add transaction support

2015-04-28 Thread John Snow
On 04/28/2015 12:17 PM, Kashyap Chamarthy wrote: On Thu, Apr 23, 2015 at 06:23:31PM +0200, Kashyap Chamarthy wrote: On Thu, Apr 23, 2015 at 10:34:57AM -0400, John Snow wrote: The qmp-shell is a little rudimentary, but it can be hacked to give us some transactional support without too much

[Qemu-devel] [PATCH] qmp-commands: Fix typo

2015-04-28 Thread John Snow
Just a trivial patch to correct a QMP example in qmp-commands.hx. Signed-off-by: John Snow --- qmp-commands.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 213508f..d4a837c 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx

Re: [Qemu-devel] [PATCH v5 0/4] configure: clang 3.5.0 build fixes

2015-04-28 Thread John Snow
On 03/30/2015 11:10 AM, Stefan Hajnoczi wrote: On Wed, Mar 25, 2015 at 06:57:35PM -0400, John Snow wrote: QEMU does not compile cleanly under clang 3.5.0. These patches eliminate the avalanche of warnings and make the build usable. The result is that you *should* be able to use clang 3.5.0

Re: [Qemu-devel] [PATCH v5 0/4] configure: clang 3.5.0 build fixes

2015-04-28 Thread John Snow
On 04/28/2015 03:32 PM, John Snow wrote: On 03/30/2015 11:10 AM, Stefan Hajnoczi wrote: On Wed, Mar 25, 2015 at 06:57:35PM -0400, John Snow wrote: QEMU does not compile cleanly under clang 3.5.0. These patches eliminate the avalanche of warnings and make the build usable. The result is

Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions

2015-04-28 Thread John Snow
On 04/28/2015 04:57 PM, Mark Cave-Ayland wrote: On 17/03/15 07:23, Alexander Graf wrote: On 09.03.15 23:24, Mark Cave-Ayland wrote: This patchset attempts to separate out the IDE/ATAPI logic from the unaligned DMA access logic for macio which provides the following benefits: 1) Reduced code

[Qemu-devel] [PULL 04/10] qtest/ahci: Add simple flush test

2015-04-28 Thread John Snow
Signed-off-by: John Snow Message-id: 1426018503-821-2-git-send-email-js...@redhat.com --- tests/ahci-test.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 6686242..4a5c788 100644 --- a/tests/ahci-test.c +++ b

[Qemu-devel] [PULL 00/10] Ide patches

2015-04-28 Thread John Snow
Ed Maste (1): qtest: Add assertion that required environment variable is set Hervé Poussineau (1): fdc: remove sparc sun4m mutations John Snow (8): qtest/ahci: add qcow2 support to ahci-test qtest/ahci: test different disk sectors qtest/ahci: Add simple flush test qtest/ahci: Allow o

[Qemu-devel] [PULL 01/10] fdc: remove sparc sun4m mutations

2015-04-28 Thread John Snow
ation routine still works. Signed-off-by: Hervé Poussineau Tested-by: Mark Cave-Ayland Message-id: 1426351846-6497-1-git-send-email-hpous...@reactos.org Signed-off-by: John Snow --- hw/block/fdc.c | 17 - 1 file changed, 17 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/

[Qemu-devel] [PULL 08/10] libqos: add blkdebug_prepare_script

2015-04-28 Thread John Snow
Pull this helper out of ide-test and into libqos, to be shared with ahci-test. Signed-off-by: John Snow Message-id: 1426018503-821-6-git-send-email-js...@redhat.com --- tests/ide-test.c | 23 +-- tests/libqos/libqos.c | 22 ++ tests/libqos/libqos.h

[Qemu-devel] [PULL 02/10] qtest/ahci: add qcow2 support to ahci-test

2015-04-28 Thread John Snow
This will enable the testing of high offsets without wasting a lot of disk space, and does not impact the previous tests. mkimg and mkqcow2 are added to libqos for other tests. Signed-off-by: John Snow Acked-by: Stefan Hajnoczi Message-id: 1426274523-22661-2-git-send-email-js...@redhat.com

[Qemu-devel] [PULL 06/10] libqtest: add qmp_eventwait

2015-04-28 Thread John Snow
Allow the user to poll until a desired interrupt occurs. Signed-off-by: John Snow Message-id: 1426018503-821-4-git-send-email-js...@redhat.com --- tests/ide-test.c | 11 +-- tests/libqtest.c | 16 tests/libqtest.h | 20 3 files changed, 37

[Qemu-devel] [PULL 07/10] libqtest: add qmp_async

2015-04-28 Thread John Snow
it is convenient to leave the responses in the stream. Signed-off-by: John Snow Message-id: 1426018503-821-5-git-send-email-js...@redhat.com --- tests/libqtest.c | 30 +- tests/libqtest.h | 27 +++ 2 files changed, 56 insertions(+), 1 deletion(-)

[Qemu-devel] [PULL 10/10] qtest: Add assertion that required environment variable is set

2015-04-28 Thread John Snow
From: Ed Maste Signed-off-by: Ed Maste Reviewed-by: John Snow Message-id: 1427911244-22565-1-git-send-email-ema...@freebsd.org Signed-off-by: John Snow --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index 659a3c7..a525dc5 100644

[Qemu-devel] [PULL 05/10] qtest/ahci: Allow override of default CLI options

2015-04-28 Thread John Snow
Signed-off-by: John Snow Message-id: 1426018503-821-3-git-send-email-js...@redhat.com --- tests/ahci-test.c| 67 tests/libqos/libqos-pc.c | 5 tests/libqos/libqos-pc.h | 1 + 3 files changed, 51 insertions(+), 22 deletions(-) diff

[Qemu-devel] [PULL 09/10] qtest/ahci: add flush retry test

2015-04-28 Thread John Snow
Signed-off-by: John Snow Message-id: 1426018503-821-7-git-send-email-js...@redhat.com --- tests/ahci-test.c | 44 1 file changed, 44 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index cd7d2ce..7c23bb2 100644 --- a/tests/ahci

[Qemu-devel] [PULL 03/10] qtest/ahci: test different disk sectors

2015-04-28 Thread John Snow
Test sector offset 0, 1, and the last sector(s) in LBA28 and LBA48 modes. Signed-off-by: John Snow Acked-by: Stefan Hajnoczi Message-id: 1426274523-22661-3-git-send-email-js...@redhat.com --- tests/ahci-test.c | 68 +++-- tests/libqos/ahci.c

[Qemu-devel] [PATCH v4 3/4] scripts: qmp-shell: add transaction subshell

2015-04-29 Thread John Snow
hich shell mode you are in. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 7f2c554..1df2ca7 100755 --- a/scripts/qmp/qmp-shell +

[Qemu-devel] [PATCH v4 0/4] scripts: qmp-shell: add transaction support

2015-04-29 Thread John Snow
=== - Squash patches 2 & 3: - Remove wholesale replacement of single quotes, in favor of try blocks that attempt to parse as pure JSON, then as Python. - Factored out the value parser block to accomplish the above. - Allow both true/True and false/False for values. - Fix typo in patch

[Qemu-devel] [PATCH v4 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-29 Thread John Snow
erting to the correct type. As a consequence of the above, the key=val parsing is also improved to give better error messages if a key=val token is not provided. CAVEAT: The parser is still extremely rudimentary and does not expect to find spaces in {} nor [] expressions. This patch does not improv

[Qemu-devel] [PATCH v4 1/4] scripts: qmp-shell: refactor helpers

2015-04-29 Thread John Snow
Refactor the qmp-shell command line processing function into two components. This will be used to allow sub-expressions, which will assist us in adding transactional support to qmp-shell. Signed-off-by: John Snow Reviewed-by: Eric Blake --- scripts/qmp/qmp-shell | 24

[Qemu-devel] [PATCH v4 4/4] scripts: qmp-shell: Add verbose flag

2015-04-29 Thread John Snow
show all the necessary conversions that were performed on the input, illustrating that "True" was transformed back into "true", literal values are now escaped with "" instead of '', and so on. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 24

Re: [Qemu-devel] [PATCH v4 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-29 Thread John Snow
On 04/29/2015 03:25 PM, Eric Blake wrote: On 04/29/2015 01:14 PM, John Snow wrote: This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use "True", "False" and "None" literals ins

[Qemu-devel] [RFC] Differential Backups

2015-04-29 Thread John Snow
This is a feature that should be very easy to add on top of the existing incremental feature, since it's just a difference in how the bitmap is treated: Incremental - Links to the last incremental (managed by libvirt) - Clears the bitmap after creation Differential: - Links to the last full ba

Re: [Qemu-devel] [PATCH] Do not emulate a floppy drive when -nodefaults

2015-05-14 Thread John Snow
On 05/14/2015 10:07 AM, Michael S. Tsirkin wrote: > On Thu, May 14, 2015 at 02:02:04PM +0200, Markus Armbruster wrote: >> Correct. >> >> Here's how I think it should be done: >> >> * Create a machine option to control the FDC >> >> This is a machine-specific option. It should only exist for ma

Re: [Qemu-devel] [PATCH] qemu-iotests: Make debugging python tests easier

2015-05-15 Thread John Snow
On 05/15/2015 01:26 AM, Fam Zheng wrote: > Adding "-d" option. The output goes to "tee" so it appears in your > console. Also, raise the verbosity of unnitest runner. > > When testing a topic branch, it's possible that a bug introduced by a > code change makes the python test case hang, with deb

Re: [Qemu-devel] [PATCH] qemu-iotests: Make debugging python tests easier

2015-05-18 Thread John Snow
On 05/17/2015 09:32 PM, Fam Zheng wrote: > On Fri, 05/15 13:48, John Snow wrote: >> >> >> On 05/15/2015 01:26 AM, Fam Zheng wrote: >>> Adding "-d" option. The output goes to "tee" so it appears in your >>> console. Also, raise the verbos

Re: [Qemu-devel] [Qemu-block] [PATCH v4 08/11] qmp: Add an implementation wrapper for qmp_drive_backup

2015-05-18 Thread John Snow
On 05/18/2015 10:42 AM, Stefan Hajnoczi wrote: > On Mon, May 11, 2015 at 07:04:23PM -0400, John Snow wrote: >> @@ -2900,9 +2917,16 @@ void qmp_drive_backup(const char *device, >> const char *target, } } >> >> +/* If we are not supplied with callback overrid

Re: [Qemu-devel] [PATCH v4 09/11] block: drive_backup transaction callback support

2015-05-18 Thread John Snow
On 05/18/2015 11:35 AM, Stefan Hajnoczi wrote: > On Mon, May 11, 2015 at 07:04:24PM -0400, John Snow wrote: >> +static void drive_backup_cb(BlkActionState *common) +{ + >> BlkActionCallbackData *cb_data = common->cb_data; + >> BlockDriverState *bs = cb_data->op

Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions

2015-05-18 Thread John Snow
s(-) > I haven't been able to produce meaningful debug info for the problem this patchset tries to help highlight (yet?), but it is an improvement nonetheless, so given that it doesn't appear to make anything worse, and this version is much nicer to follow, I'll stage this for the IDE branch. Acked-by: John Snow

Re: [Qemu-devel] [PATCH v4 11/11] qmp-commands.hx: Update the supported 'transaction' operations

2015-05-19 Thread John Snow
On 05/19/2015 11:30 AM, Kashyap Chamarthy wrote: > On Mon, May 18, 2015 at 06:22:22PM +0200, Max Reitz wrote: >> On 12.05.2015 01:04, John Snow wrote: >>> From: Kashyap Chamarthy >>> >>> Although the canonical source of reference for QMP commands is >>

Re: [Qemu-devel] [PATCH v2 4/4] tests: Use qtest_add_data_func() consistently

2015-05-19 Thread John Snow
On 05/19/2015 08:35 AM, Andreas Färber wrote: > Am 27.03.2015 um 19:46 schrieb John Snow: >> On 03/26/2015 11:41 AM, Andreas Färber wrote: >>> Am 25.03.2015 um 23:14 schrieb John Snow: >>>> On 03/25/2015 02:20 PM, Andreas Färber wrote: >>>>> Replace

Re: [Qemu-devel] [PATCH RFC for-2.3? 5/8] fdb: Move FDCtrlISABus to header

2015-05-19 Thread John Snow
On 05/19/2015 09:02 AM, Andreas Färber wrote: > Am 31.03.2015 um 03:38 schrieb John Snow: >> You probably meant 'fdc' ! >> >> On 03/29/2015 01:53 PM, Andreas Färber wrote: >>> To be used for embedding the device. >>> >>> Add gtk-doc priv

Re: [Qemu-devel] [PATCH 0/8] fdc: Clean up and fix command processing

2015-05-19 Thread John Snow
On 05/19/2015 11:35 AM, Kevin Wolf wrote: > This series fixes the real bug that caused CVE-2015-3456, and does some > cleanup in the FIFO access functions to make the command processing more > obvious. > > Kevin Wolf (8): > fdc: Rename fdctrl_reset_fifo() to fdctrl_to_command_phase() > fdc:

Re: [Qemu-devel] [PATCH 2/8] fdc: Rename fdctrl_set_fifo() to fdctrl_to_result_phase()

2015-05-19 Thread John Snow
->fifo[1]; > fdctrl->fifo[2] = 0; > fdctrl->fifo[3] = 0; > -fdctrl_set_fifo(fdctrl, 4); > +fdctrl_to_result_phase(fdctrl, 4); > } else { > fdctrl_to_command_phase(fdctrl); > } > @@ -1870,7 +1871,7 @@ static void > fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direct > /* ERROR */ > fdctrl->fifo[0] = 0x80 | > (cur_drv->head << 2) | GET_CUR_DRV(fdctrl); > -fdctrl_set_fifo(fdctrl, 1); > +fdctrl_to_result_phase(fdctrl, 1); > } > } > > Similar bike-shedding comment here to match patch #1, but that won't stop this: Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 1/8] fdc: Rename fdctrl_reset_fifo() to fdctrl_to_command_phase()

2015-05-19 Thread John Snow
rv->sect, 1); > } > -fdctrl_reset_fifo(fdctrl); > +fdctrl_to_command_phase(fdctrl); > /* Raise Interrupt */ > fdctrl->status0 |= FD_SR0_SEEK; > fdctrl_raise_irq(fdctrl); > @@ -1905,7 +1905,7 @@ static void fdctrl_handle_relative_seek_out(FDCtrl > *fdctrl, int direction) > fd_seek(cur_drv, cur_drv->head, > cur_drv->track - fdctrl->fifo[2], cur_drv->sect, 1); > } > -fdctrl_reset_fifo(fdctrl); > +fdctrl_to_command_phase(fdctrl); > /* Raise Interrupt */ > fdctrl->status0 |= FD_SR0_SEEK; > fdctrl_raise_irq(fdctrl); > why 'to' instead of 'start' or 'init'? It seems weird to describe it in a third-party descriptive way instead of with the imperative. Bike-shedding aside: Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl->phase

2015-05-19 Thread John Snow
/block/fdc.c > +++ b/hw/block/fdc.c [snip] Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 4/8] fdc: Use phase in fdctrl_write_data()

2015-05-19 Thread John Snow
hw/block/fdc.c | 67 > ++ > 1 file changed, 39 insertions(+), 28 deletions(-) > > diff --git a/hw/block/fdc.c b/hw/block/fdc.c > index 4d4868e..a13e0ce 100644 > --- a/hw/block/fdc.c > +++ b/hw/block/fdc.c [snip] Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 5/8] fdc: Code cleanup in fdctrl_write_data()

2015-05-19 Thread John Snow
*/ > +/* We have all parameters now, execute the command */ > fdctrl->phase = FD_PHASE_EXECUTION; > + > if (fdctrl->data_state & FD_STATE_FORMAT) { > fdctrl_format_sector(fdctrl); > break; > } > > -pos = command_to_handler[fdctrl->fifo[0] & 0xff]; > -FLOPPY_DPRINTF("treat %s command\n", handlers[pos].name); > -(*handlers[pos].handler)(fdctrl, handlers[pos].direction); > +cmd = get_command(fdctrl->fifo[0]); > +FLOPPY_DPRINTF("Calling handler for '%s'\n", cmd->name); > +cmd->handler(fdctrl, cmd->direction); > } > break; > > Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 8/8] fdc-test: Test state for existing cases more thoroughly

2015-05-19 Thread John Snow
sertions(+) > > diff --git a/tests/fdc-test.c b/tests/fdc-test.c > index 3c6c83c..416394f 100644 > --- a/tests/fdc-test.c > +++ b/tests/fdc-test.c [snip] Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 6/8] fdc: Disentangle phases in fdctrl_read_data()

2015-05-19 Thread John Snow
; fdctrl_reset_irq(fdctrl); > } > +break; > + > +case FD_PHASE_COMMAND: > +default: > +abort(); > } > + > +retval = fdctrl->fifo[pos]; > FLOPPY_DPRINTF("data register: 0x%02x\n", retval); > > return retval; > Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 7/8] fdc: Fix MSR.RQM flag

2015-05-19 Thread John Snow
On 05/19/2015 11:36 AM, Kevin Wolf wrote: > The RQM bit in MSR should be set whenever the guest is supposed to > access the FIFO, and it should be cleared in all other cases. This is > important so the guest can't continue writing/reading the FIFO beyond > the length that it's suppossed to access

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl->phase

2015-05-19 Thread John Snow
On 05/19/2015 04:44 PM, Peter Maydell wrote: > On 19 May 2015 at 16:35, Kevin Wolf wrote: >> The floppy controller spec describes three different controller phases, >> which are currently not explicitly modelled in our emulation. Instead, >> each phase is represented by a combination of flags in

Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions

2015-05-19 Thread John Snow
On 05/19/2015 04:50 PM, Mark Cave-Ayland wrote: > On 18/05/15 20:54, John Snow wrote: > >> On 03/09/2015 06:24 PM, Mark Cave-Ayland wrote: >>> This patchset attempts to separate out the IDE/ATAPI logic from the >>> unaligned >>> DMA access logic for maci

Re: [Qemu-devel] [PATCH 0/1] ahci: do not remap clb/fis unconditionally

2015-05-19 Thread John Snow
On 05/18/2015 05:57 AM, Stefan Hajnoczi wrote: > On Tue, May 12, 2015 at 06:36:12PM -0400, John Snow wrote: >> This continues the IOMMU fix from 2.3, where we should not >> attempt to remap the CLB or FIS RX buffers if the AHCI device is >> currently running. >> >&

Re: [Qemu-devel] [PATCH] qapi: add dirty bitmap status

2015-05-19 Thread John Snow
On 05/12/2015 04:06 PM, Eric Blake wrote: > On 05/12/2015 01:53 PM, John Snow wrote: >> Bitmaps can be in a handful of different states with potentially >> more to come as we tool around with migration and persistence patches. >> >> Instead of having a bunch of boole

Re: [Qemu-devel] [PATCH v4 06/11] block: add refcount to Job object

2015-05-19 Thread John Snow
On 05/18/2015 11:45 AM, Stefan Hajnoczi wrote: > On Mon, May 11, 2015 at 07:04:21PM -0400, John Snow wrote: >> If we want to get at the job after the life of the job, >> we'll need a refcount for this object. >> >> This may occur for example if we wish to i

Re: [Qemu-devel] [PATCH v4 11/11] qmp-commands.hx: Update the supported 'transaction' operations

2015-05-20 Thread John Snow
On 05/20/2015 07:12 AM, Kashyap Chamarthy wrote: > On Tue, May 19, 2015 at 11:37:32AM -0400, John Snow wrote: >>> On Mon, May 18, 2015 at 06:22:22PM +0200, Max Reitz wrote: >>>> On 12.05.2015 01:04, John Snow wrote: > > [. . .] > >>>>> diff --git

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl->phase

2015-05-20 Thread John Snow
On 05/20/2015 05:24 AM, Peter Maydell wrote: > On 20 May 2015 at 09:43, Kevin Wolf wrote: >> Am 20.05.2015 um 10:06 hat Peter Maydell geschrieben: >>> That handles migration, which is good. But I still think that >>> storing the same information in two places in the device >>> state (phase field

Re: [Qemu-devel] [PATCH 7/8] fdc: Fix MSR.RQM flag

2015-05-20 Thread John Snow
On 05/20/2015 04:14 AM, Kevin Wolf wrote: > Am 19.05.2015 um 22:40 hat John Snow geschrieben: >> >> >> On 05/19/2015 11:36 AM, Kevin Wolf wrote: >>> The RQM bit in MSR should be set whenever the guest is supposed to >>> access the FIFO, and it should

Re: [Qemu-devel] [PATCH 6/8] fdc: Disentangle phases in fdctrl_read_data()

2015-05-20 Thread John Snow
On 05/20/2015 04:25 AM, Kevin Wolf wrote: > Am 19.05.2015 um 22:40 hat John Snow geschrieben: >> >> >> On 05/19/2015 11:36 AM, Kevin Wolf wrote: >>> This commit makes similar improvements as have already been made to the >>> write function: Instead of rely

Re: [Qemu-devel] [PATCH 1/3] migration: Remove duplicated assignement of SETUP status

2015-05-20 Thread John Snow
On 05/20/2015 11:58 AM, Eric Blake wrote: > On 05/20/2015 09:35 AM, Juan Quintela wrote: >> We assign the MIGRATION_STATUS_SETUP status in two places. Just >> in sucession. Just remove the second one. > > s/sucession/succession/ > Also s/assignement/assignment/ in the subject. > Where's the

Re: [Qemu-devel] [PATCH v5 00/12] Dirty bitmaps migration

2015-05-21 Thread John Snow
roach might be simpler on the block layer, but I would be rather upset if he scrapped his entire series for the second time for another approach that also didn't get accepted. --js >> On 13.05.2015 18:29, Vladimir Sementsov-Ogievskiy wrote: >>> These patches provide

Re: [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22

2015-05-21 Thread John Snow
On 05/13/2015 05:33 AM, Paolo Bonzini wrote: > > > On 13/05/2015 00:18, John Snow wrote: >> As discussed during the QEMU 2.3 development freeze. >> >> == >> For convenience, this branch is available at: >> https://github.com/jnsnow/qemu.git branch glib-v

<    5   6   7   8   9   10   11   12   13   14   >