[Qemu-devel] [PATCH 18/19] qtest/ahci: Assert sector size in identify test

2015-01-30 Thread John Snow
-off-by: John Snow --- tests/ahci-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 9207e73..cae94b5 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -678,6 +678,7 @@ static void ahci_test_identify(AHCIQState *ahci) uint16_t buff

[Qemu-devel] [PATCH 15/19] libqos/ahci: add ahci_io

2015-01-30 Thread John Snow
will be transmitted to guest memory prior to the block operation. Now that we have all the syntactic sugar functions in place for AHCI, we can convert the identify test to be very, very short. Signed-off-by: John Snow --- tests/ahci-test.c | 63

Re: [Qemu-devel] [PATCH v11 00/13] block: Incremental backup series

2015-01-30 Thread John Snow
e have a strong reason for why we want to maintain the unused BDS parameter for some of these functions? (Like making sure a caller HAS a BDS before they call these functions?) Thanks, --js On 12.01.2015 19:30, John Snow wrote: Welcome to version 11. I hope you are enjoying our regular news

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix buffer overflow in inet_parse()

2015-01-30 Thread John Snow
char host[64]; +char host[65]; char port[33]; int to; int pos; You don't really need reviews for trivial, right? *shrug* Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH RESEND 03/50] hw/block/fdc: Implement tray status

2015-01-30 Thread John Snow
{"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}} === aio=native without O_DIRECT === @@ -27,7 +26,6 @@ QMP_VERSION {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}} === Encrypted image === @@ -40,7 +38,6 @@ QMP_VERSION {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}} Testing: QMP_VERSION @@ -49,7 +46,6 @@ QMP_VERSION {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}} === Missing driver === @@ -62,6 +58,5 @@ QMP_VERSION {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}} *** done Since I am fated to care more about floppy disks than I have in the past: Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 04/19] libqos/ahci: Add command header helpers

2015-02-02 Thread John Snow
On 02/02/2015 05:27 AM, Paolo Bonzini wrote: On 30/01/2015 19:41, John Snow wrote: +/* Set the #cx'th command of port #px. */ +void ahci_set_command_header(AHCIQState *ahci, uint8_t px, + uint8_t cx, AHCICommandHeader *cmd) +{ +uint64_t ba = ahci->

Re: [Qemu-devel] [PATCH 13/19] libqos/ahci: add ahci command size setters

2015-02-02 Thread John Snow
On 02/02/2015 05:35 AM, Paolo Bonzini wrote: On 30/01/2015 19:42, John Snow wrote: +void ahci_command_set_sizes(AHCICommand *cmd, uint64_t xbytes, +unsigned prd_size) +{ +/* Each PRD can describe up to 4MiB, and must not be odd. */ +g_assert_cmphex

Re: [Qemu-devel] [PATCH 17/19] qtest/ahci: Add a macro bootup routine

2015-02-02 Thread John Snow
On 02/02/2015 05:37 AM, Paolo Bonzini wrote: On 30/01/2015 19:42, John Snow wrote: +/** + * Boot and fully enable the HBA device. + * @see ahci_boot, ahci_pci_enable and ahci_hba_enable. + */ +static AHCIQState *ahci_macro_bootup(void) Ugly name... I would just leave out this patch

Re: [Qemu-devel] [PATCH 04/19] libqos/ahci: Add command header helpers

2015-02-02 Thread John Snow
On 02/02/2015 05:25 AM, Paolo Bonzini wrote: On 30/01/2015 19:41, John Snow wrote: +/* Construct our Command Header (set_command_header handles endianness.) */ +memset(&cmd, 0x00, sizeof(cmd)); +cmd.flags = 5; /* reg_h2d_fis is 5 double-words long */ +cmd.flags = 0

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-02-02 Thread John Snow
On 02/02/2015 05:10 AM, Markus Armbruster wrote: Kevin Wolf writes: Am 30.01.2015 um 18:04 hat John Snow geschrieben: On 01/30/2015 09:32 AM, Kevin Wolf wrote: Am 21.01.2015 um 10:34 hat Markus Armbruster geschrieben: I'm afraid I forgot much of the discussion we had before the

[Qemu-devel] [PATCH v2 05/19] libqos/ahci: Add ahci_port_check_error helper

2015-02-03 Thread John Snow
ahci_port_check_error checks a given port's error registers and asserts that everything from the port-level view is still OK. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 8 +--- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h

[Qemu-devel] [PATCH v2 14/19] libqos/ahci: add ahci command size setters

2015-02-03 Thread John Snow
Adds setters for size, prd_size and both via set_sizes. Signed-off-by: John Snow --- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h | 5 + 2 files changed, 27 insertions(+) diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c index d1e511a..60849ea 100644 --- a

[Qemu-devel] [PATCH v2 02/19] libqos/ahci: Add ahci_port_clear helper

2015-02-03 Thread John Snow
Add a helper that assists in clearing out potentially old error and FIS information from an AHCI port's data structures. This ensures we always start with a blank slate for interrupt and FIS receipt information. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c

[Qemu-devel] [PATCH v2 01/19] libqos/ahci: Add ahci_port_select helper

2015-02-03 Thread John Snow
This helper identifies which port of the AHCI HBA has a device we may run tests on. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 19 ++- tests/libqos/ahci.c | 27 +++ tests/libqos/ahci.h | 1 + 3 files changed, 30

[Qemu-devel] [PATCH v2 15/19] libqos/ahci: Add ahci_guest_io

2015-02-03 Thread John Snow
ahci_guest_io is a shorthand function that will, in one shot, execute a data command on the guest to the specified guest buffer location, in the requested amount. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/libqos/ahci.c | 15 +++ tests/libqos/ahci.h | 2 ++ 2

[Qemu-devel] [PATCH v2 04/19] libqos/ahci: Add command header helpers

2015-02-03 Thread John Snow
t not its DMA buffer! Lastly, the command table pointer fields (dba and dbau) are merged into a single 64bit value to make managing 64bit tests simpler. Signed-off-by: John Snow --- tests/ahci-test.c | 43 -- tests/libqos/ahci.c

[Qemu-devel] [PATCH v2 00/19] qtest/ahci: add dma test

2015-02-03 Thread John Snow
(...for now...) (--) Retested entire stack of patches on F20/PPC. ~John John Snow (19): libqos/ahci: Add ahci_port_select helper libqos/ahci: Add ahci_port_clear helper qtest/ahci: rename 'Command' to 'CommandHeader' libqos/ahci: Add command header helpers lib

[Qemu-devel] [PATCH v2 07/19] libqos/ahci: Add port_check_nonbusy helper

2015-02-03 Thread John Snow
A simple helper that asserts a given port is not busy processing any commands via the TFD, Command Issue and SACT registers. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 1 + tests/libqos/ahci.c | 18 ++ tests/libqos/ahci.h | 1 + 3 files

[Qemu-devel] [PATCH v2 03/19] qtest/ahci: rename 'Command' to 'CommandHeader'

2015-02-03 Thread John Snow
rename the "b1" and "b2" fields to be a unified uint16_t named "flags." Signed-off-by: John Snow --- tests/ahci-test.c | 8 tests/libqos/ahci.h | 7 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-tes

[Qemu-devel] [PATCH v2 08/19] libqos/ahci: Add cmd response sanity check helpers

2015-02-03 Thread John Snow
structure is added for the PIO Setup FIS type. Existing FIS types (H2D and D2H) have had their members renamed slightly to condense reserved members into fewer fields; and LBA fields are now represented by arrays of 8 byte chunks instead of independent variables. Signed-off-by: John Snow Reviewed

[Qemu-devel] [PATCH v2 17/19] libqos/ahci: Add ahci_clean_mem

2015-02-03 Thread John Snow
Clean up guest memory being used in ahci_clean_mem, to be called during ahci_shutdown. With all guest memory leaks removed, add an option to the allocator to throw an assertion if a leak occurs. This test adds some sanity to both the AHCI library and the allocator. Signed-off-by: John Snow

[Qemu-devel] [PATCH v2 10/19] qtest/ahci: add ahci_write_fis

2015-02-03 Thread John Snow
Similar to ahci_set_command_header, add a helper that takes an in-memory representation of a command FIS and writes it to guest memory, handling endianness as-needed. Signed-off-by: John Snow --- tests/ahci-test.c | 2 +- tests/libqos/ahci.c | 10 ++ tests/libqos/ahci.h | 1 + 3

[Qemu-devel] [PATCH v2 09/19] qtest/ahci: Demagic ahci tests.

2015-02-03 Thread John Snow
te to hand-pick, one-by-one, which preprocessor definitions are useful per-each test. These definitions include: ATA Command Mnemonics Current expected AHCI sector size FIS magic bytes REG_H2D_FIS flags Command Header flags Signed-off-by: John Snow --- tests/ahci-test.c | 12 ++--

[Qemu-devel] [PATCH v2 06/19] libqos/ahci: Add ahci_port_check_interrupts helper

2015-02-03 Thread John Snow
ff-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 13 ++--- tests/libqos/ahci.c | 14 ++ tests/libqos/ahci.h | 2 ++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index a3e8f12..32b6be3 100644 --- a/

[Qemu-devel] [PATCH v2 18/19] qtest/ahci: Assert sector size in identify test

2015-02-03 Thread John Snow
-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 3a0131a..f595b96 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -663,6 +663,7 @@ static void ahci_test_identify

[Qemu-devel] [PATCH v2 11/19] libqos/ahci: Add ide cmd properties

2015-02-03 Thread John Snow
Add a structure that defines some properties of various IDE commands. These will be used to simplify the interface to the libqos AHCI calls, lessening the redundancy of specifying and respecifying properties of commands to various helper functions. Signed-off-by: John Snow --- tests/libqos

[Qemu-devel] [PATCH v2 19/19] qtest/ahci: Adding simple dma read-write test

2015-02-03 Thread John Snow
Adds a test case for AHCI wherein we write a 4K block of a changing pattern to sector 0, then read back that 4K and compare the transmit and receive buffers. Signed-off-by: John Snow --- tests/ahci-test.c | 55 +++ 1 file changed, 55

[Qemu-devel] [PATCH v2 16/19] libqos/ahci: add ahci_io

2015-02-03 Thread John Snow
will be transmitted to guest memory prior to the block operation. Now that we have all the syntactic sugar functions in place for AHCI, we can convert the identify test to be very, very short. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 63

[Qemu-devel] [PATCH v2 13/19] libqos/ahci: add ahci command verify

2015-02-03 Thread John Snow
Helps to verify that a command completed successfully. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 16 ++-- tests/libqos/ahci.c | 12 tests/libqos/ahci.h | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/tests

[Qemu-devel] [PATCH v2 12/19] libqos/ahci: add ahci command functions

2015-02-03 Thread John Snow
the command header with sane values. command_table_init - Initialize the command table with sane values. Signed-off-by: John Snow --- tests/ahci-test.c | 73 +-- tests/libqos/ahci.c | 202 tests/libqos/ahci.h | 15 3

Re: [Qemu-devel] [PATCH 0/8] block: persistent dirty bitmaps (RFC)

2015-02-04 Thread John Snow
On 02/04/2015 10:07 AM, Vladimir Sementsov-Ogievskiy wrote: On 13.01.2015 20:02, Vladimir Sementsov-Ogievskiy wrote: The bitmaps are saved into qcow2 file format. It provides both 'internal' and 'external' dirty bitmaps feature: - for qcow2 drives we can store bitmaps in the same file - fo

Re: [Qemu-devel] [PATCH v2 10/19] qtest/ahci: add ahci_write_fis

2015-02-05 Thread John Snow
On 02/05/2015 08:29 AM, Stefan Hajnoczi wrote: On Tue, Feb 03, 2015 at 04:46:30PM -0500, John Snow wrote: Similar to ahci_set_command_header, add a helper that takes an in-memory representation of a command FIS and writes it to guest memory, handling endianness as-needed. Signed-off-by: John

[Qemu-devel] [PATCH v3 01/19] libqos/ahci: Add ahci_port_select helper

2015-02-05 Thread John Snow
This helper identifies which port of the AHCI HBA has a device we may run tests on. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 19 ++- tests/libqos/ahci.c | 27 +++ tests/libqos/ahci.h | 1 + 3 files changed, 30

[Qemu-devel] [PATCH v3 00/19] qtest/ahci: add dma test

2015-02-05 Thread John Snow
fer to zeroes between IO calls, just to make sure. (--) Removed the ahci_macro_boot function patch (...for now...) (--) Retested entire stack of patches on F20/PPC. ~John John Snow (19): libqos/ahci: Add ahci_port_select helper libqos/ahci: Add ahci_port_clear helper qtest/ahci: rename

[Qemu-devel] [PATCH v3 06/19] libqos/ahci: Add ahci_port_check_interrupts helper

2015-02-05 Thread John Snow
ff-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 13 ++--- tests/libqos/ahci.c | 14 ++ tests/libqos/ahci.h | 2 ++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index a3e8f12..32b6be3 100644 --- a/

[Qemu-devel] [PATCH v3 04/19] libqos/ahci: Add command header helpers

2015-02-05 Thread John Snow
t not its DMA buffer! Lastly, the command table pointer fields (dba and dbau) are merged into a single 64bit value to make managing 64bit tests simpler. Signed-off-by: John Snow --- tests/ahci-test.c | 43 -- tests/libqos/ahci.c

[Qemu-devel] [PATCH v3 03/19] qtest/ahci: rename 'Command' to 'CommandHeader'

2015-02-05 Thread John Snow
rename the "b1" and "b2" fields to be a unified uint16_t named "flags." Reviewed-by: Stefan Hajnoczi Signed-off-by: John Snow --- tests/ahci-test.c | 8 tests/libqos/ahci.h | 7 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/

[Qemu-devel] [PATCH v3 02/19] libqos/ahci: Add ahci_port_clear helper

2015-02-05 Thread John Snow
Add a helper that assists in clearing out potentially old error and FIS information from an AHCI port's data structures. This ensures we always start with a blank slate for interrupt and FIS receipt information. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c

[Qemu-devel] [PATCH v3 05/19] libqos/ahci: Add ahci_port_check_error helper

2015-02-05 Thread John Snow
ahci_port_check_error checks a given port's error registers and asserts that everything from the port-level view is still OK. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 8 +--- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h

[Qemu-devel] [PATCH v3 07/19] libqos/ahci: Add port_check_nonbusy helper

2015-02-05 Thread John Snow
A simple helper that asserts a given port is not busy processing any commands via the TFD, Command Issue and SACT registers. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 1 + tests/libqos/ahci.c | 18 ++ tests/libqos/ahci.h | 1 + 3 files

[Qemu-devel] [PATCH v3 14/19] libqos/ahci: add ahci command size setters

2015-02-05 Thread John Snow
Adds setters for size, prd_size and both via set_sizes. Reviewed-by: Stefan Hajnoczi Signed-off-by: John Snow --- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h | 4 2 files changed, 26 insertions(+) diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c index

[Qemu-devel] [PATCH v3 08/19] libqos/ahci: Add cmd response sanity check helpers

2015-02-05 Thread John Snow
structure is added for the PIO Setup FIS type. Existing FIS types (H2D and D2H) have had their members renamed slightly to condense reserved members into fewer fields; and LBA fields are now represented by arrays of 8 byte chunks instead of independent variables. Signed-off-by: John Snow Reviewed

[Qemu-devel] [PATCH v3 13/19] libqos/ahci: add ahci command verify

2015-02-05 Thread John Snow
Helps to verify that a command completed successfully. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 16 ++-- tests/libqos/ahci.c | 15 +++ tests/libqos/ahci.h | 1 + 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/tests

[Qemu-devel] [PATCH v3 16/19] libqos/ahci: add ahci_io

2015-02-05 Thread John Snow
will be transmitted to guest memory prior to the block operation. Now that we have all the syntactic sugar functions in place for AHCI, we can convert the identify test to be very, very short. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 63

[Qemu-devel] [PATCH v3 17/19] libqos/ahci: Add ahci_clean_mem

2015-02-05 Thread John Snow
Clean up guest memory being used in ahci_clean_mem, to be called during ahci_shutdown. With all guest memory leaks removed, add an option to the allocator to throw an assertion if a leak occurs. This test adds some sanity to both the AHCI library and the allocator. Signed-off-by: John Snow

[Qemu-devel] [PATCH v3 11/19] libqos/ahci: Add ide cmd properties

2015-02-05 Thread John Snow
: John Snow --- tests/libqos/ahci.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c index ac32849..fa40ee3 100644 --- a/tests/libqos/ahci.c +++ b/tests/libqos/ahci.c @@ -34,6 +34,45 @@ #include "hw/pci/pci_

[Qemu-devel] [PATCH v3 09/19] qtest/ahci: Demagic ahci tests.

2015-02-05 Thread John Snow
te to hand-pick, one-by-one, which preprocessor definitions are useful per-each test. These definitions include: ATA Command Mnemonics Current expected AHCI sector size FIS magic bytes REG_H2D_FIS flags Command Header flags Reviewed-by: Stefan Hajnoczi Signed-off-by: John Snow --- tests/ahci-t

[Qemu-devel] [PATCH v3 18/19] qtest/ahci: Assert sector size in identify test

2015-02-05 Thread John Snow
-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 3a0131a..f595b96 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -663,6 +663,7 @@ static void ahci_test_identify

[Qemu-devel] [PATCH v3 15/19] libqos/ahci: Add ahci_guest_io

2015-02-05 Thread John Snow
ahci_guest_io is a shorthand function that will, in one shot, execute a data command on the guest to the specified guest buffer location, in the requested amount. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/libqos/ahci.c | 15 +++ tests/libqos/ahci.h | 2 ++ 2

[Qemu-devel] [PATCH v3 12/19] libqos/ahci: add ahci command functions

2015-02-05 Thread John Snow
the command header with sane values. command_table_init - Initialize the command table with sane values. Reviewed-by: Stefan Hajnoczi Signed-off-by: John Snow --- tests/ahci-test.c | 73 +-- tests/libqos/ahci.c | 202

[Qemu-devel] [PATCH v3 10/19] qtest/ahci: add ahci_write_fis

2015-02-05 Thread John Snow
Similar to ahci_set_command_header, add a helper that takes an in-memory representation of a command FIS and writes it to guest memory, handling endianness as-needed. Signed-off-by: John Snow --- tests/ahci-test.c | 2 +- tests/libqos/ahci.c | 14 ++ tests/libqos/ahci.h | 3

[Qemu-devel] [PATCH v3 19/19] qtest/ahci: Adding simple dma read-write test

2015-02-05 Thread John Snow
Adds a test case for AHCI wherein we write a 4K block of a changing pattern to sector 0, then read back that 4K and compare the transmit and receive buffers. Reviewed-by: Stefan Hajnoczi Signed-off-by: John Snow --- tests/ahci-test.c | 55

[Qemu-devel] [PATCH] blkdebug: fix "once" rule

2015-02-05 Thread John Snow
seen to have output that shows multiple failure messages. After this patch, the error messages tend to be smaller and less severe, but the injection can still be seen to be working. Patch the expected output to expect the smaller error messages. Signed-off-by: John Snow --- block/blkdebug.c

Re: [Qemu-devel] [PATCH] blkdebug: fix "once" rule

2015-02-05 Thread John Snow
On 02/05/2015 06:43 PM, Max Reitz wrote: On 2015-02-05 at 18:15, John Snow wrote: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an "active list" of rules to b

Re: [Qemu-devel] [PATCH v11 12/13] qemu-iotests: Add tests for drive-backup sync=dirty-bitmap

2015-02-06 Thread John Snow
On 02/06/2015 09:23 AM, Vladimir Sementsov-Ogievskiy wrote: On 12.01.2015 19:31, John Snow wrote: From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: John Snow --- tests/qemu-iotests/056| 33 ++--- tests/qemu-iotests/056.out| 4 ++-- tests

[Qemu-devel] [PATCH v2] blkdebug: fix "once" rule

2015-02-06 Thread John Snow
s severe, but the injection can still be seen to be working. I have patched the expected output to expect the smaller error messages. V2: - Remove only the offending "once" rule from the active list instead of clearing the entire active list. Signed-off-by: John Snow --- blo

Re: [Qemu-devel] [PATCH v2] blkdebug: fix "once" rule

2015-02-06 Thread John Snow
On 02/06/2015 04:15 PM, Max Reitz wrote: On 2015-02-06 at 13:23, John Snow wrote: Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an "active list" o

[Qemu-devel] [PATCH v3] blkdebug: fix "once" rule

2015-02-06 Thread John Snow
s severe, but the injection can still be seen to be working. I have patched the expected output to expect the smaller error messages. Signed-off-by: John Snow --- V3: - Fix interaction of "immediately" and "once" rule - Remembered that my patch sending script does not wor

[Qemu-devel] [PATCH v12 00/17] block: incremental backup series

2015-02-09 Thread John Snow
n-list. V12: - Changed authorship from Fam Zheng to John Snow on most patches - 02: Fix the error_setg leak in bdrv_dirty_bitmap_lookup - Fix error phrasing in bdrv_dirty_bitmap_lookup - Renamed "node-ref" to "node" for QMP commands. - 03: Granularity helper no lon

[Qemu-devel] [PATCH v12 01/17] qapi: Add optional field "name" to block dirty bitmap

2015-02-09 Thread John Snow
bdrv_find_dirty_bitmap to find a dirty bitmap by name, will be used later when other QMP commands want to reference dirty bitmap by name. Add bdrv_dirty_bitmap_make_anon. This unsets the name of dirty bitmap. Signed-off-by: Fam Zheng Signed-off-by: John Snow Reviewed-by: Max Reitz --- block.c

[Qemu-devel] [PATCH v12 06/17] block: Add bitmap successors

2015-02-09 Thread John Snow
QMP transactions that enable/disable bitmaps have extra error checking surrounding them that prevent modifying bitmaps that are frozen. Signed-off-by: John Snow --- block.c | 104 +- blockdev.c| 22 +++ include/b

[Qemu-devel] [PATCH v12 09/17] qapi: Add transaction support to block-dirty-bitmap operations

2015-02-09 Thread John Snow
her a bitmap clear and a full block backup. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- blockdev.c | 155 +++ qapi-schema.json | 6 ++- 2 files changed, 160 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c

[Qemu-devel] [PATCH v12 02/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-02-09 Thread John Snow
o block-core.json will be re-used in future patches in this series, see: 'qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}' Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 20 ++ block/mirror.c| 10

[Qemu-devel] [PATCH v12 03/17] block: Introduce bdrv_dirty_bitmap_granularity()

2015-02-09 Thread John Snow
This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Small adjustments are made to ensure that granularity-- in bytes-- is handled consistently as a uint64_t throughout the code. Signed-off-by: John Snow --- block.c

[Qemu-devel] [PATCH v12 07/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-02-09 Thread John Snow
For "dirty-bitmap" sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of "top" sync mode. Signed-off-by: Fam Zheng Signed-off-by: Joh

[Qemu-devel] [PATCH v12 04/17] hbitmap: add hbitmap_merge

2015-02-09 Thread John Snow
running speed for particularly sparse bitmaps by using iterators, but the running time for dense maps will be worse. We present the simpler solution first, and we can refine it later if needed. Signed-off-by: John Snow --- include/qemu/hbitmap.h | 11 +++ util/hbitmap.c | 32

[Qemu-devel] [PATCH v12 11/17] block: add BdrvDirtyBitmap documentation

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 3c0989c..e065694 100644 --- a/block.c +++ b/block.c @@ -60,11 +60,11 @@ * or enabled. A frozen bitmap can only abdicate() or reclaim(). */ struct

[Qemu-devel] [PATCH v12 10/17] qmp: Add dirty bitmap status fields in query-block

2015-02-09 Thread John Snow
Adds the "disabled" and "frozen" status booleans. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 2 ++ qapi/block-core.json | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index ad33d96..3c0989c

[Qemu-devel] [PATCH v12 13/17] iotests: add invalid input incremental backup tests

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112 | 89 ++ tests/qemu-iotests/112.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 95 insertions(+) create mode 100644 tests/qemu-iotests/112 create mode 100644 tests/qemu-iotests

[Qemu-devel] [PATCH v12 05/17] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- block.c | 25 + blockdev.c| 40 include/block/block.h | 3 +++ qapi/block-core.json | 28 qmp-commands.hx | 10 ++ 5 files changed

[Qemu-devel] [PATCH v12 15/17] iotests: add transactional incremental backup test

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112 | 45 + tests/qemu-iotests/112.out | 4 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112 index 31431ad..7d1a6ec 100644 --- a

[Qemu-devel] [PATCH v12 12/17] block: Ensure consistent bitmap function prototypes

2015-02-09 Thread John Snow
We often don't need the BlockDriverState for functions that operate on bitmaps. Remove it. Signed-off-by: John Snow --- block.c | 13 ++--- block/backup.c| 2 +- block/mirror.c| 23 ++- blockdev.c| 2 +- include/

[Qemu-devel] [PATCH v12 17/17] iotests: add incremental backup failure recovery test

2015-02-09 Thread John Snow
To test the failure case, we modify iotests.py to allow us to specify that we'd like to allow failures when we wait for block job events. Signed-off-by: John Snow --- tests/qemu-iotests/112| 55 ++- tests/qemu-iotests/112.out| 4 ++--

[Qemu-devel] [PATCH v12 08/17] qmp: add block-dirty-bitmap-clear

2015-02-09 Thread John Snow
Add bdrv_clear_dirty_bitmap and a matching QMP command, qmp_block_dirty_bitmap_clear that enables a user to reset the bitmap attached to a drive. This allows us to reset a bitmap in the event of a full drive backup. Signed-off-by: John Snow --- block.c | 7 +++ blockdev.c

[Qemu-devel] [PATCH v12 14/17] iotests: add simple incremental backup case

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112| 120 +- tests/qemu-iotests/112.out| 4 +- tests/qemu-iotests/iotests.py | 18 --- 3 files changed, 133 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu

[Qemu-devel] [PATCH v12 16/17] blkdebug: fix "once" rule

2015-02-09 Thread John Snow
s severe, but the injection can still be seen to be working. I have patched the expected output to expect the smaller error messages. Signed-off-by: John Snow --- block/blkdebug.c | 6 -- tests/qemu-iotests/026.out | 24 2 files changed, 8 insertions

Re: [Qemu-devel] [PATCH v2 16/17] ahci: Recompute cur_cmd on migrate post load

2015-02-10 Thread John Snow
On 02/10/2015 04:56 AM, Stefan Hajnoczi wrote: On Tue, Dec 16, 2014 at 08:36:06PM -0500, John Snow wrote: When the AHCI HBA device is migrated, all of the information that led to the request being created is stored in the AHCIDevice structures, except for pointers into guest data where return

Re: [Qemu-devel] [PATCH v12 00/17] block: incremental backup series

2015-02-10 Thread John Snow
On 02/09/2015 08:35 PM, John Snow wrote: Welcome to the "incremental backup" newsletter, where we discuss exciting developments in non-redundant backup technology. This patchset enables the in-memory part of the incremental backup feature. There are two series on the mailing l

[Qemu-devel] [PATCH v3 07/17] ide: remove restart_cb callback

2015-02-10 Thread John Snow
From: Paolo Bonzini With restarts now handled by ide_restart_cb and the IDEDMAOps.restart_dma() member, remove the old restart_cb callback. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 5 - hw/ide/core.c | 5 - hw/ide/internal.h | 1 - hw/ide

[Qemu-devel] [PATCH v3 05/17] ide: pass IDEBus to the restart_cb

2015-02-10 Thread John Snow
From: Paolo Bonzini Pass the containing IDEBus to the restart_cb instead of the more specific BMDMAState child. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 2 +- hw/ide/pci.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v3 03/17] ide: introduce ide_register_restart_cb

2015-02-10 Thread John Snow
From: Paolo Bonzini A helper is added that registers the IDEDMAOp .restart_cb() via qemu_add_vm_change_state_handler instead of requiring each HBA to register the callback themselves. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/cmd646.c | 3 +-- hw/ide/core.c | 5

[Qemu-devel] [PATCH v3 00/17] ide: rerror/werror migration fixes for IDE/ISA and AHCI

2015-02-10 Thread John Snow
the comment in patch #15 - Added assertion that the busy_slot variable is within range John Snow (3): ahci: Migrate IDEStatus ahci: Recompute cur_cmd on migrate post load qtest/ide: Test flush / retry for ISA and PCI Paolo Bonzini (14): ide: start extracting ide_restart_dma out of bmdma_rest

[Qemu-devel] [PATCH v3 02/17] ide: prepare to move restart to common code

2015-02-10 Thread John Snow
From: Paolo Bonzini This patch adds the restart_dma callback and adjusts the ide_restart_dma function to utilize this callback to call the BMDMA-specific restart code instead of statically executing BMDMA-specific code. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide

[Qemu-devel] [PATCH v3 04/17] ide: do not use BMDMA in restart callback

2015-02-10 Thread John Snow
From: Paolo Bonzini Whenever an error stops the VM, ide_handle_rw_error does "s->bus->dma->unit = s->unit". So we can just use idebus_active_if. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 dele

[Qemu-devel] [PATCH v3 08/17] ide: replace set_unit callback with more IDEBus state

2015-02-10 Thread John Snow
From: Paolo Bonzini Start moving the initial state of the current request to IDEBus, so that AHCI can use it. The set_unit callback is not used anymore once this is done. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 7 --- hw/ide/core.c | 6

[Qemu-devel] [PATCH v3 14/17] ahci: Migrate IDEStatus

2015-02-10 Thread John Snow
e the placeholder error code from initialization time. Reviewed-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 1 + hw/ide/internal.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index bc6d5ce..3f4fc77 100644 --- a/hw/ide/ahci.c +++ b/h

[Qemu-devel] [PATCH v3 16/17] ahci: Recompute cur_cmd on migrate post load

2015-02-10 Thread John Snow
he cur_cmd pointer post-migration, we can utilize the busy_slot index to figure out where the command header we are still processing is. This allows a machine in a halted state from rerror=stop or werror=stop to be migrated and resume operations without issue. Signed-off-by: John Snow --- hw/ide/

[Qemu-devel] [PATCH v3 06/17] ide: move restart callback to common code

2015-02-10 Thread John Snow
IDEDMAOps.restart_cb() member. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 80 ++- hw/ide/internal.h | 2 ++ hw/ide/pci.c | 79 -- hw/ide/pci.h | 1 - 4 files

[Qemu-devel] [PATCH v3 09/17] ide: place initial state of the current request to IDEBus

2015-02-10 Thread John Snow
From: Paolo Bonzini This moves more common restarting logic to the core IDE code. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 6 ++ hw/ide/internal.h | 2 ++ hw/ide/pci.c | 15 ++- hw/ide/pci.h | 5 ++--- 4 files changed, 16

[Qemu-devel] [PATCH v3 01/17] ide: start extracting ide_restart_dma out of bmdma_restart_dma

2015-02-10 Thread John Snow
From: Paolo Bonzini This patch begins refactoring the restart dma functions out of bmdma to be shared with AHCI and other future IDE HBA implementations. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/pci.c | 30 +++--- 1 file changed, 19 insertions

[Qemu-devel] [PATCH v3 17/17] qtest/ide: Test flush / retry for ISA and PCI

2015-02-10 Thread John Snow
This patch adds tests for werror and rerror functionality for the PCI and ISA ide buses. Tests for the AHCI device are to be included at a later date after requisite patches have been merged upstream to support needed functionality by the tests. Signed-off-by: Paolo Bonzini Signed-off-by: John

[Qemu-devel] [PATCH v3 12/17] ide: make more functions static

2015-02-10 Thread John Snow
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 12 hw/ide/internal.h | 4 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index ff28db0..ef52f35 100644 --- a/hw/ide/core.c +++ b

[Qemu-devel] [PATCH v3 15/17] ahci: add support for restarting non-queued commands

2015-02-10 Thread John Snow
will restart the operation and command list processing will proceed after the erroring command has been completed. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/ahci.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw

[Qemu-devel] [PATCH v3 10/17] ide: migrate initial request state via IDEBus

2015-02-10 Thread John Snow
1 callback would return true if error_status != 0 and the bus is PATA; the v2 callback would return true if error_status != 0 and the bus is AHCI. Forward migration keeps working. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/core.c | 5 - 1 file changed, 4 insertions(+),

[Qemu-devel] [PATCH v3 13/17] ide: support PIO restart for the ISA controller

2015-02-10 Thread John Snow
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/isa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index b084162..5eb35c2 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -74,7 +74,8 @@ static void

[Qemu-devel] [PATCH v3 11/17] ide: commonize io_buffer_index initialization

2015-02-10 Thread John Snow
setting it there is not appropriate. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow --- hw/ide/atapi.c | 3 +-- hw/ide/core.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 1bf8b34..950e311 100644 --- a/hw/ide/atapi.c +++ b/hw

Re: [Qemu-devel] [2.4 PATCH v3 16/19] hbitmap: truncate tests

2015-03-17 Thread John Snow
On 03/17/2015 10:53 AM, Max Reitz wrote: On 2015-03-13 at 14:30, John Snow wrote: The general approach is to set bits close to the boundaries of where we are truncating and ensure that everything appears to have gone OK. We test growing and shrinking by different amounts: - Less than the

Re: [Qemu-devel] [2.4 PATCH v3 15/19] block: Resize bitmaps on bdrv_truncate

2015-03-17 Thread John Snow
On 03/17/2015 09:50 AM, Max Reitz wrote: On 2015-03-13 at 14:30, John Snow wrote: Signed-off-by: John Snow --- block.c| 18 + include/qemu/hbitmap.h | 10 ++ util/hbitmap.c | 52 ++ 3 files

Re: [Qemu-devel] [PATCH] raw-posix: Deprecate host floppy passthrough

2015-03-17 Thread John Snow
On 03/17/2015 12:02 PM, Markus Armbruster wrote: Raise your hand if you have a physical floppy drive in a computer you've powered on in 2015. Okay, I see we got a few weirdos in the audience. That's okay, weirdos are welcome here. May I introduce to you my reference Q35 machine: http://i.i

Re: [Qemu-devel] [2.4 PATCH v3 16/19] hbitmap: truncate tests

2015-03-17 Thread John Snow
On 03/17/2015 01:28 PM, Max Reitz wrote: On 2015-03-17 at 13:21, John Snow wrote: On 03/17/2015 10:53 AM, Max Reitz wrote: On 2015-03-13 at 14:30, John Snow wrote: The general approach is to set bits close to the boundaries of where we are truncating and ensure that everything appears to

<    1   2   3   4   5   6   7   8   9   10   >