[Qemu-devel] [PATCH 08/14] qtest/ahci: finalize AHCIQState consolidation

2015-01-12 Thread John Snow
Move barsize, ahci_fingerprint and capabilities registers into the AHCIQState object, removing global ahci-related state from the ahci-test.c file. More churn, less globals. Signed-off-by: John Snow --- tests/ahci-test.c | 80 + tests

[Qemu-devel] [PATCH 02/14] qtest/ahci: Create ahci.h

2015-01-12 Thread John Snow
Extract defines and other information to ahci.h, to be shared with other tests if they so please. At the very least, reduce clutter in the test file itself. Signed-off-by: John Snow --- tests/ahci-test.c | 319 +-- tests/libqos/ahci.h | 352

[Qemu-devel] [PATCH 11/14] libqos/ahci: Functional register helpers

2015-01-12 Thread John Snow
se the new functions defined in the ahci.h header. Signed-off-by: John Snow --- tests/ahci-test.c | 25 ++--- tests/libqos/ahci.h | 63 + 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/tests/ahci-test.c b/tests/a

[Qemu-devel] [PATCH 13/14] qtest/ahci: Bookmark FB and CLB pointers

2015-01-12 Thread John Snow
Instead of re-querying the AHCI device for the FB and CLB buffers, save the pointer we gave to the device during initialization and reference these values instead. Signed-off-by: John Snow --- tests/ahci-test.c | 42 -- tests/libqos/ahci.h | 6

[Qemu-devel] [PATCH 09/14] qtest/ahci: remove pcibus global

2015-01-12 Thread John Snow
Rely on the PCI Device's bus pointer instead. One less global to worry about. Signed-off-by: John Snow --- tests/ahci-test.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index c41c7d9..1981b6a 100644 --- a/tests

[Qemu-devel] [PATCH 03/14] libqos: create libqos.c

2015-01-12 Thread John Snow
ahci-test, because it still relies on pc architecture specific code in libqos. The next two patches will reorganize the code to be more general. Signed-off-by: John Snow --- tests/Makefile| 2 +- tests/ahci-test.c | 95 +-- tests/libqos/ahc

[Qemu-devel] [PATCH 12/14] qtest/ahci: remove getter/setter macros

2015-01-12 Thread John Snow
These macros were a bad idea: They relied upon certain arguments being present locally with a specific name. With the endgoal being to factor out AHCI helper functions outside of the test file itself, these have to be replaced by more explicit helper setter/getter functions. Signed-off-by: John

[Qemu-devel] [PATCH 14/14] libqos/ahci: create libqos/ahci.c

2015-01-12 Thread John Snow
, functionalizing and isolating the code assists future AHCI tests that exercise Q35 migration. Signed-off-by: John Snow --- tests/Makefile | 3 +- tests/ahci-test.c | 225 --- tests/libqos/ahci.c | 270

Re: [Qemu-devel] [PATCH 01/14] libqos: Split apart pc_alloc_init

2015-01-13 Thread John Snow
On 01/13/2015 03:54 AM, Marc Marí wrote: El Mon, 12 Jan 2015 22:34:26 -0500 John Snow escribió: Move the list-specific initialization over into malloc.c, to keep all of the list implementation details within the same file. The allocation and freeing of these structures are now both back

Re: [Qemu-devel] [PATCH 9/9] block-migration: add named dirty bitmaps migration

2015-01-13 Thread John Snow
rage level. Paolo On 12.01.2015 22:09, Paolo Bonzini wrote: On 12/01/2015 18:31, John Snow wrote: How do you track which parts of the disk have been acted upon (e.g. mirrored in the case of the drive-mirror command), so that they have become 0? Hm... so your question here is, "What happe

Re: [Qemu-devel] [PATCH v10 06/13] block: Add bdrv_copy_dirty_bitmap and bdrv_clear_dirty_bitmap

2015-01-13 Thread John Snow
On 01/13/2015 04:54 AM, Vladimir Sementsov-Ogievskiy wrote: Hmm, can't find it in v11 Best regards, Vladimir I changed approach and instead of copying bitmaps to be used with the incremental backup, I lock them in place. So copy isn't used anymore in my set, so the name of the patch change

Re: [Qemu-devel] [PATCH v10 06/13] block: Add bdrv_copy_dirty_bitmap and bdrv_clear_dirty_bitmap

2015-01-13 Thread John Snow
On 01/13/2015 11:43 AM, Vladimir Sementsov-Ogievskiy wrote: No, I'm saying about adding comment about using size in sectors and granularity in bytes in BdrvDirtyBitmap structure. I'm sorry, I misunderstood. It's at the end of the series, as a fixup patch. On 10.01.2015 0

Re: [Qemu-devel] [PATCH 4/9] hbitmap: store / restore

2015-01-13 Thread John Snow
On 01/13/2015 07:59 AM, Vladimir Sementsov-Ogievskiy wrote: Best regards, Vladimir On 09.01.2015 00:21, John Snow wrote: On 12/11/2014 09:17 AM, Vladimir Sementsov-Ogievskiy wrote: Functions to store / restore HBitmap. HBitmap should be saved to linear bitmap format independently of

Re: [Qemu-devel] [PATCH v11 08/13] block: Add bitmap successors

2015-01-13 Thread John Snow
On 01/13/2015 04:24 AM, Fam Zheng wrote: On Mon, 01/12 11:31, John Snow wrote: A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to be created just prior to a sensitive operation (e.g. Incremental Backup) that can either succeed or fail, but during the course of which we

Re: [Qemu-devel] [PATCH v11 09/13] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-01-13 Thread John Snow
On 01/13/2015 04:37 AM, Fam Zheng wrote: On Mon, 01/12 11:31, John Snow wrote: 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 conditio

Re: [Qemu-devel] [PATCH v11 13/13] block: BdrvDirtyBitmap miscellaneous fixup

2015-01-13 Thread John Snow
unctions when I prepare a V12. If it's easy I will do it. Thanks! --js On 12.01.2015 19:31, John Snow wrote: (1) granularity type consistency: Update the granularity to be uint64_t in all places. This value is always in bytes. (2) Some documentation for the fields within BdrvDirtyBitmap.

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

2015-01-13 Thread John Snow
Minor update to the github version of this patchset that brings it inline with the recent block pull into master. It also drops a duplicate patch that has since made it upstream. Not re-posting yet to allow time for review and critique. --js On 01/12/2015 11:30 AM, John Snow wrote: Welcome

Re: [Qemu-devel] [PATCH] block: update string sizes for filename, backing_file, exact_filename

2015-01-13 Thread John Snow
On 01/13/2015 12:03 PM, Jeff Cody wrote: The string field entries 'filename', 'backing_file', and 'exact_filename' in the BlockDriverState struct are defined as 1024 bytes. However, most places that use these values accept a maximum of PATH_MAX bytes. This patch makes the BlockDriverStruct fi

Re: [Qemu-devel] [PATCH 6/9] block-migration: tiny refactoring

2015-01-14 Thread John Snow
On 01/14/2015 07:26 AM, Vladimir Sementsov-Ogievskiy wrote: On 09.01.2015 00:23, John Snow wrote: On 12/11/2014 09:17 AM, Vladimir Sementsov-Ogievskiy wrote: Add blk_create and blk_free to remove code duplicates. Otherwise, duplicates will rise in the following patches because of

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

2015-01-16 Thread John Snow
On 01/16/2015 10:36 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps wit

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

2015-01-16 Thread John Snow
On 01/16/2015 11:51 AM, Max Reitz wrote: On 2015-01-16 at 11:48, John Snow wrote: On 01/16/2015 10:36 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandator

Re: [Qemu-devel] [PATCH v11 07/13] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2015-01-16 Thread John Snow
On 01/16/2015 11:28 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng Signed

Re: [Qemu-devel] [PATCH 2/2] atapi migration: Throw recoverable error to avoid recovery

2015-01-16 Thread John Snow
sfer_func that tells us what + * we're trying to do. + */ +if (s->end_transfer_func == ide_atapi_cmd) { +ide_atapi_dma_restart(s); +} } } I think this workaround is sensible until we develop a more precise fix. Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v11 09/13] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-01-16 Thread John Snow
On 01/16/2015 12:52 PM, Max Reitz wrote: On 2015-01-12 at 11:31, John Snow wrote: 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 con

Re: [Qemu-devel] [PATCH v11 08/13] block: Add bitmap successors

2015-01-16 Thread John Snow
On 01/13/2015 04:24 AM, Fam Zheng wrote: On Mon, 01/12 11:31, John Snow wrote: A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to be created just prior to a sensitive operation (e.g. Incremental Backup) that can either succeed or fail, but during the course of which we

Re: [Qemu-devel] [PATCH v2] qemu-iotests: Fix supported_oses check

2015-01-16 Thread John Snow
On 01/16/2015 08:23 AM, Stefan Hajnoczi wrote: On Fri, Jan 16, 2015 at 09:38:42AM +0800, Fam Zheng wrote: There is a bug in the recently added sys.platform test, and we no longer run python tests, because "linux2" is the value to compare here. So do a prefix match. According to python doc [1],

Re: [Qemu-devel] [PATCH] bios-tables-test: split piix4 and q35 tests

2015-01-19 Thread John Snow
i/piix4/tcg", test_acpi_piix4_tcg); +qtest_add_func("acpi/q35/tcg", test_acpi_q35_tcg); } ret = g_test_run(); unlink(disk); Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 11/14] libqos/ahci: Functional register helpers

2015-01-19 Thread John Snow
On 01/19/2015 12:09 PM, Paolo Bonzini wrote: On 13/01/2015 04:34, John Snow wrote: Introduce a set of "static inline" register helpers that are intended to replace the current set of macros with more functional versions that are better suited to inclusion in libqos than porcel

Re: [Qemu-devel] [PATCH 14/14] libqos/ahci: create libqos/ahci.c

2015-01-19 Thread John Snow
On 01/19/2015 12:15 PM, Paolo Bonzini wrote: On 13/01/2015 04:34, John Snow wrote: +tests/ahci-test$(EXESUF): tests/ahci-test.o $(libqos-pc-obj-y) \ + tests/libqos/ahci.o Why not add this to libqos-pc-obj-y or libqos-obj-y? No strong reason, it's just that

[Qemu-devel] [PATCH v2 01/15] libqos: Split apart pc_alloc_init

2015-01-19 Thread John Snow
Move the list-specific initialization over into malloc.c, to keep all of the list implementation details within the same file. The allocation and freeing of these structures are now both back within the same layer. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/libqos/malloc

[Qemu-devel] [PATCH v2 00/15] ahci-test preliminary refactoring

2015-01-19 Thread John Snow
ahci.o with libqos-obj-pc-y instead of only ahci-test * ahci.o is pc-only for now. John Snow (15): libqos: Split apart pc_alloc_init qtest/ahci: Create ahci.h libqos: create libqos.c libqos: add qtest_vboot libqos: add alloc_init_flags libqos: Update QGuestAllocator to be opaque libqo

[Qemu-devel] [PATCH v2 06/15] libqos: Update QGuestAllocator to be opaque

2015-01-19 Thread John Snow
-by: John Snow --- tests/libqos/malloc-pc.c | 2 +- tests/libqos/malloc.c| 61 tests/libqos/malloc.h| 22 +++-- 3 files changed, 50 insertions(+), 35 deletions(-) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c

[Qemu-devel] [PATCH v2 05/15] libqos: add alloc_init_flags

2015-01-19 Thread John Snow
Allow a generic interface to alloc_init_flags, not just through pc_alloc_init_flags. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/libqos/malloc-pc.c | 4 +--- tests/libqos/malloc.c| 8 tests/libqos/malloc.h| 2 ++ 3 files changed, 11 insertions(+), 3 deletions

[Qemu-devel] [PATCH v2 09/15] qtest/ahci: finalize AHCIQState consolidation

2015-01-19 Thread John Snow
Move barsize, ahci_fingerprint and capabilities registers into the AHCIQState object, removing global ahci-related state from the ahci-test.c file. More churn, less globals. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 80

[Qemu-devel] [PATCH v2 04/15] libqos: add qtest_vboot

2015-01-19 Thread John Snow
Add a va_list variant of the qtest_boot function. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/libqos/libqos.c | 25 +++-- tests/libqos/libqos.h | 1 + 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/tests/libqos/libqos.c b/tests/libqos

[Qemu-devel] [PATCH v2 03/15] libqos: create libqos.c

2015-01-19 Thread John Snow
ahci-test, because it still relies on pc architecture specific code in libqos. The next two patches will reorganize the code to be more general. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile| 2 +- tests/ahci-test.

[Qemu-devel] [PATCH v2 02/15] qtest/ahci: Create ahci.h

2015-01-19 Thread John Snow
Extract defines and other information to ahci.h, to be shared with other tests if they so please. At the very least, reduce clutter in the test file itself. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 319 +-- tests

[Qemu-devel] [PATCH v2 08/15] qtest/ahci: Store hba_base in AHCIQState

2015-01-19 Thread John Snow
*hba_base/(AHCIQState *ahci/' # Replace (ahci->dev, hba_base) calls with unified parameter 's/(ahci->dev, &\?hba_base)/(ahci)/' # Replace calls to PCI config space using "ahci" with "ahci->dev" 's/qpci_config_\(read\|write\)\(.\)(ahc

[Qemu-devel] [PATCH v2 10/15] qtest/ahci: remove pcibus global

2015-01-19 Thread John Snow
Rely on the PCI Device's bus pointer instead. One less global to worry about. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 96

[Qemu-devel] [PATCH v2 12/15] libqos/ahci: Functional register helpers

2015-01-19 Thread John Snow
se the new functions defined in the ahci.h header. Signed-off-by: John Snow --- tests/ahci-test.c | 25 ++--- tests/libqos/ahci.h | 63 + 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/tests/ahci-test.c b/tests/a

[Qemu-devel] [PATCH v2 11/15] qtest/ahci: remove guest_malloc global

2015-01-19 Thread John Snow
Make helper routines rely on the earmarked guest allocator object with AHCIQState/QOSSTate instead. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci

[Qemu-devel] [PATCH v2 07/15] libqos: add pc specific interface

2015-01-19 Thread John Snow
-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile | 6 +++--- tests/ahci-test.c| 4 ++-- tests/libqos/libqos-pc.c | 24 tests/libqos/libqos-pc.h | 9 + tests/libqos/libqos.c| 16 +--- tests/libqos/libqos.h| 10

[Qemu-devel] [PATCH v2 15/15] libqos/ahci: create libqos/ahci.c

2015-01-19 Thread John Snow
, functionalizing and isolating the code assists future AHCI tests that exercise Q35 migration. For now, libqos/ahci.o will be PC-only, but can be expanded into something arch-agnostic in the future, if needed. Signed-off-by: John Snow --- tests/Makefile | 1 + tests/ahci-test.c | 225

[Qemu-devel] [PATCH v2 13/15] qtest/ahci: remove getter/setter macros

2015-01-19 Thread John Snow
These macros were a bad idea: They relied upon certain arguments being present locally with a specific name. With the endgoal being to factor out AHCI helper functions outside of the test file itself, these have to be replaced by more explicit helper setter/getter functions. Signed-off-by: John

[Qemu-devel] [PATCH v2 14/15] qtest/ahci: Bookmark FB and CLB pointers

2015-01-19 Thread John Snow
Instead of re-querying the AHCI device for the FB and CLB buffers, save the pointer we gave to the device during initialization and reference these values instead. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/ahci-test.c | 42 -- tests

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

2015-01-19 Thread John Snow
On 01/19/2015 05:08 AM, Markus Armbruster wrote: John Snow writes: On 01/16/2015 10:36 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be u

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

2015-01-20 Thread John Snow
On 01/20/2015 03:26 AM, Markus Armbruster wrote: John Snow writes: On 01/19/2015 05:08 AM, Markus Armbruster wrote: John Snow writes: On 01/16/2015 10:36 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng The new command pair is added to manage user

Re: [Qemu-devel] [PATCH 9/9] block-migration: add named dirty bitmaps migration

2015-01-20 Thread John Snow
On 01/17/2015 12:17 PM, Vladimir Sementsov-Ogievskiy wrote: Best regards, Vladimir On 09.01.2015 01:05, John Snow wrote: CCing migration maintainers, feedback otherwise in-line. On 12/11/2014 09:17 AM, Vladimir Sementsov-Ogievskiy wrote: Just migrate parts of dirty bitmaps, corresponding

Re: [Qemu-devel] [PATCH v2 2/6] block: vmdk - move string allocations from stack to the heap

2015-01-20 Thread John Snow
snprintf(desc_line, BUF_SIZE, desc_extent_line, size / BDRV_SECTOR_SIZE, desc_filename); g_string_append(ext_desc_lines, desc_line); } @@ -2007,6 +2012,13 @@ exit: g_free(backing_file); g_free(fmt); g_free(desc); +g_free(path); +g_free(prefix); +g_free(postfix); +g_free(desc_line); +g_free(ext_filename); +g_free(desc_filename); +g_free(parent_desc_line); g_string_free(ext_desc_lines, true); return ret; } Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v2 1/6] block: vmdk - make ret variable usage clear

2015-01-20 Thread John Snow
if (matches == 4) { flat_offset = 0; } else { error_setg(errp, "Invalid extent lines:\n%s", p); return -EINVAL; } - } else if (ret != 4) { +} else if (matches != 4) { error_setg(errp, "Invalid extent lines:\n%s", p); return -EINVAL; } Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v2 3/6] block: qapi - move string allocation from stack to the heap

2015-01-20 Thread John Snow
ame_format = g_strdup(bs->backing_format); info->has_backing_filename_format = true; } +g_free(backing_filename2); } ret = bdrv_query_snapshot_info_list(bs, &info->snapshots, &err); Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v2 6/6] block: update string sizes for filename, backing_file, exact_filename

2015-01-20 Thread John Snow
g_num_sectors < 0) { -char backing_name[1024]; +char backing_name[PATH_MAX]; bdrv_get_backing_filename(bs, backing_name, sizeof(backing_name)); error_report("Could not get size of '%s': %s", Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v2 4/6] block: move string allocation from stack to the heap

2015-01-20 Thread John Snow
-EACCES; +goto exit; } } @@ -2307,6 +2308,8 @@ ro_cleanup: bdrv_reopen(bs->backing_hd, open_flags & ~BDRV_O_RDWR, NULL); } +exit: +g_free(filename); return ret; } Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v2 5/6] block: mirror - change string allocation to 2-bytes

2015-01-20 Thread John Snow
024]; +char backing_filename[2]; /* we only need 2 characters because we are only + checking for a NULL string */ int ret = 0; int n; Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-11-03 Thread John Snow
lper commands.") On 09/18/2014 07:43 PM, John Snow wrote: The original version of the AHCI test base which is now staged for being merged, processes the ahci_identify test in a monolithic fashion. In authoring new tests, it became necessary and obvious as to how the operation of this de

Re: [Qemu-devel] the need for if=none for -drive?

2014-11-03 Thread John Snow
On 11/02/2014 02:21 AM, Michael Tokarev wrote: All "modern" 2-way drive/device specifications need to explicitly specify if=none for the drive for it to not be used in the default ide bus implicitly. Which behave like this? I am reasonably sheltered in the IDE and S/ATA lands. But how abo

Re: [Qemu-devel] [block PATCH v2 0/3] AHCI device fixes

2014-11-03 Thread John Snow
On 11/03/2014 07:35 AM, Paolo Bonzini wrote: On 31/10/2014 21:03, John Snow wrote: - Adjust the prepare_buf() callback to return, simply, the number of bytes it was able to prepare, or -1 on error. This resolves an ambiguity around the nature of its return code meaning "no se

[Qemu-devel] [PATCH 0/5] ahci: fis decomposition improvements

2014-11-03 Thread John Snow
d" "ahci: Check cmd_fis[1] more explicitly" "ahci: factor out FIS decomposition" John Snow (5): ahci: add is_ncq predicate helper AHCI: Fix FIS decomposition ahci: Reorder error cases in handle_cmd ahci: Check cmd_fis[1] more explicitly ahci: factor out FIS d

[Qemu-devel] [PATCH 1/5] ahci: add is_ncq predicate helper

2014-11-03 Thread John Snow
summarized in a small list in section 13.6.3.1 and again in 13.6.3.2. Not all of these NCQ commands are currently supported, so the error pathways are adjusted slightly to be more informative in the case they are encountered. Signed-off-by: John Snow --- hw/ide/ahci.c | 28

[Qemu-devel] [PATCH 2/5] ahci: Fix FIS decomposition

2014-11-03 Thread John Snow
r does not even currently depend on or require 0x01 as mandatory. Signed-off-by: John Snow --- hw/ide/ahci.c | 64 --- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 722ac4a..d

[Qemu-devel] [PATCH 3/5] ahci: Reorder error cases in handle_cmd

2014-11-03 Thread John Snow
d, and the debug print of the command fis is cleaned up with its size corrected. Signed-off-by: John Snow --- hw/ide/ahci.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index d162959..3671be1 100644 --- a/hw/ide/ahci.

[Qemu-devel] [PATCH 5/5] ahci: factor out FIS decomposition from handle_cmd

2014-11-03 Thread John Snow
are of no particular interest in handle_cmd. This patch keeps the receipt of FIS packets and the decomposition thereof separated to two different functions. Signed-off-by: John Snow --- hw/ide/ahci.c | 169 ++ 1 file changed, 86 insertions

[Qemu-devel] [PATCH 4/5] ahci: Check cmd_fis[1] more explicitly

2014-11-03 Thread John Snow
Instead of checking for a known byte, inspect the fields of this byte explicitly to produce more meaningful error messages and improve the readability of this section. Signed-off-by: John Snow --- hw/ide/ahci.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions

Re: [Qemu-devel] [PATCH v2] libqos: Convert malloc-pc allocator to a generic allocator

2014-11-05 Thread John Snow
ite and it behaves perfectly well. Reviewed-by: John Snow

[Qemu-devel] [PATCH] ahci: Fix byte count regression for ATAPI/PIO

2014-11-10 Thread John Snow
n up the sglist. The byte count is maintained by forcing size to be 0. Signed-off-by: John Snow --- hw/ide/ahci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 61dbed1..1f3f951 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1089,6 +1089,7

Re: [Qemu-devel] [PATCH 0/2] ahci: small cleanups

2014-11-13 Thread John Snow
magic numbers with constants hw/ide/ahci.c | 24 +++- hw/ide/ahci.h | 5 - 2 files changed, 15 insertions(+), 14 deletions(-) Thanks! Reviewed-by: John Snow

Re: [Qemu-devel] [PATCH v6 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-11-17 Thread John Snow
On 11/07/2014 10:16 AM, Vladimir Sementsov-Ogievskiy wrote: from [PATCH v6 02/10] +void qmp_block_dirty_bitmap_remove(const char *device, const char *name, + Error **errp) +{ +BlockDriverState *bs; +BdrvDirtyBitmap *bitmap; + +bs = bdrv_find(device

Re: [Qemu-devel] [PATCH v6 00/10] block: Incremental backup series

2014-11-18 Thread John Snow
c. Maybe, save some of bitmap levels on timer while vm is running and save the last level on shutdown? CC qemu-devel - ok. Best regards, Vladimir On 18.11.2014 02:46, John Snow wrote: On 11/13/2014 08:54 AM, Vladimir Sementsov-Ogievskiy wrote: Hi I'd just like to start working on per

[Qemu-devel] qmp-commands.hx and inherited types (Was: Re: [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove)

2014-11-18 Thread John Snow
On 11/07/2014 08:00 AM, Eric Blake wrote: On 10/30/2014 04:22 AM, Fam Zheng wrote: [snip] +++ b/qapi/block-core.json @@ -865,6 +865,61 @@ '*on-target-error': 'BlockdevOnError' } } ## +# @BlockDirtyBitmap +# +# @device: name of device which the bitmap is tracking +# +# @name

Re: [Qemu-devel] [PATCH v6 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-19 Thread John Snow
On 11/07/2014 07:24 AM, Vladimir Sementsov-Ogievskiy wrote: +if (!name || name[0] == '\0') { Isn't is better to move "name[0] == '\0'" check to bdrv_create_dirty_bitmap, near existed name checking? Hm, OK, but then we still need to check for the presence of a name in these functions, so

Re: [Qemu-devel] [PATCH v6 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-21 Thread John Snow
On 11/04/2014 06:03 AM, Max Reitz wrote: On 2014-10-30 at 04:22, Fam Zheng wrote: This adds three qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any

Re: [Qemu-devel] configure options of qemu

2014-11-25 Thread John Snow
On 11/23/2014 09:49 PM, li wrote: Hi all, Thank you for your time to read this email, is there anyone can tell me the options qemu was configured when it was released? I configured it by myself and found that there was a audio latency problem, but the qemu in the repository doesn't have this pr

[Qemu-devel] [2.3 PATCH v7 10/10] qemu-iotests: Add tests for drive-backup sync=dirty-bitmap

2014-11-25 Thread John Snow
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-iotests/iotests.py | 8 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a

[Qemu-devel] [2.3 PATCH v7 00/10] block: Incremental backup series

2014-11-25 Thread John Snow
This is the in memory part of the incremental backup feature. With the added commands, we can create a bitmap on a block backend, from which point of time all the writes are tracked by the bitmap, marking sectors as dirty. Later, we call drive-backup and pass the bitmap to it, to do an incrementa

[Qemu-devel] [2.3 PATCH v7 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-11-25 Thread John Snow
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 35 +++ include/block/block.h | 4 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index ea4c8d8..9582550 100644 --- a/block.c

[Qemu-devel] [2.3 PATCH v7 03/10] block: Introduce bdrv_dirty_bitmap_granularity()

2014-11-25 Thread John Snow
From: Fam Zheng This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Signed-off-by: Fam Zheng Reviewed-by: Benoit Canet Signed-off-by: John Snow --- block.c | 9 +++-- include/block/block.h | 2 ++ 2

[Qemu-devel] [2.3 PATCH v7 01/10] qapi: Add optional field "name" to block dirty bitmap

2014-11-25 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 --- block-migration.c | 2

[Qemu-devel] [2.3 PATCH v7 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-25 Thread John Snow
From: Fam Zheng This adds three qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any write. Signed-off-by: Fam Zheng Signed-off-by: John

[Qemu-devel] [2.3 PATCH v7 06/10] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2014-11-25 Thread John Snow
From: Fam Zheng This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 15 + blockdev.c

[Qemu-devel] [2.3 PATCH v7 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-25 Thread John Snow
es 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 | 19 block/mirror.c| 10 +--- blockdev.c

[Qemu-devel] [2.3 PATCH v7 04/10] hbitmap: Add hbitmap_copy

2014-11-25 Thread John Snow
From: Fam Zheng This makes a deep copy of an HBitmap. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- include/qemu/hbitmap.h | 8 util/hbitmap.c | 16 2 files changed, 24 insertions(+) diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h

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

2014-11-25 Thread John Snow
or sync=dirty-bitmap: - reset: backup job makes a copy of bitmap and resets the original one. - consume: backup job makes the original anonymous (invisible to user) and releases it after use. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c |

[Qemu-devel] [2.3 PATCH v7 09/10] qmp: Add dirty bitmap 'enabled' field in query-block

2014-11-25 Thread John Snow
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 1 + qapi/block-core.json | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index cf93148..3acf289 100644 --- a/block.c +++ b/block.c @@ -5404,6 +5404,7

Re: [Qemu-devel] [2.3 PATCH v7 00/10] block: Incremental backup series

2014-11-25 Thread John Snow
On 11/25/2014 02:46 PM, John Snow wrote: This is the in memory part of the incremental backup feature. With the added commands, we can create a bitmap on a block backend, from which point of time all the writes are tracked by the bitmap, marking sectors as dirty. Later, we call drive-backup

Re: [Qemu-devel] [2.3 PATCH v7 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-26 Thread John Snow
On 11/26/2014 07:19 AM, Max Reitz wrote: On 2014-11-25 at 20:46, John Snow wrote: From: Fam Zheng The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps wit

[Qemu-devel] [PATCH v8 09/10] qmp: Add dirty bitmap 'enabled' field in query-block

2014-11-26 Thread John Snow
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 1 + qapi/block-core.json | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index e341844..3ad1af3 100644 --- a/block.c +++ b/block.c @@ -5404,6 +5404,7

[Qemu-devel] [PATCH v8 00/10] block: Incremental backup series

2014-11-26 Thread John Snow
This is the in memory part of the incremental backup feature. With the added commands, we can create a bitmap on a block backend, from which point of time all the writes are tracked by the bitmap, marking sectors as dirty. Later, we call drive-backup and pass the bitmap to it, to do an incrementa

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

2014-11-26 Thread John Snow
ck/mirror. The types added to 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 | 19 ++ b

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

2014-11-26 Thread John Snow
or sync=dirty-bitmap: - reset: backup job makes a copy of bitmap and resets the original one. - consume: backup job makes the original anonymous (invisible to user) and releases it after use. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c |

[Qemu-devel] [PATCH v8 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-11-26 Thread John Snow
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 35 +++ include/block/block.h | 4 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index c851a03..40cb9cf 100644 --- a/block.c

[Qemu-devel] [PATCH v8 04/10] hbitmap: Add hbitmap_copy

2014-11-26 Thread John Snow
From: Fam Zheng This makes a deep copy of an HBitmap. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- include/qemu/hbitmap.h | 8 util/hbitmap.c | 16 2 files changed, 24 insertions(+) diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h

[Qemu-devel] [PATCH v8 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-26 Thread John Snow
From: Fam Zheng This adds three qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any write. Signed-off-by: Fam Zheng Signed-off-by: John

[Qemu-devel] [PATCH v8 06/10] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2014-11-26 Thread John Snow
From: Fam Zheng This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 15 + blockdev.c

[Qemu-devel] [PATCH v8 03/10] block: Introduce bdrv_dirty_bitmap_granularity()

2014-11-26 Thread John Snow
From: Fam Zheng This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 9 +++-- include/block/block.h | 2 ++ 2 files changed, 9 insertions

[Qemu-devel] [PATCH v8 10/10] qemu-iotests: Add tests for drive-backup sync=dirty-bitmap

2014-11-26 Thread John Snow
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-iotests/iotests.py | 8 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a

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

2014-11-26 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 --- block-migration.c | 2

Re: [Qemu-devel] [PATCH v8 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-12-01 Thread John Snow
On 11/27/2014 04:41 AM, Max Reitz wrote: On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps wit

[Qemu-devel] [PATCH v9 06/10] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2014-12-01 Thread John Snow
From: Fam Zheng This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng Signed-off-by: John Snow Reviewed-by: Max Reitz --- block.c | 15

[Qemu-devel] [PATCH v9 03/10] block: Introduce bdrv_dirty_bitmap_granularity()

2014-12-01 Thread John Snow
From: Fam Zheng This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Signed-off-by: Fam Zheng Signed-off-by: John Snow Reviewed-by: Max Reitz --- block.c | 9 +++-- include/block/block.h | 2 ++ 2 files

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

2014-12-01 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

<    3   4   5   6   7   8   9   10   11   12   >