Re: [PATCH v5 3/7] qcow: Tolerate backing_fmt=, but warn on backing_fmt=raw

2020-05-05 Thread Kevin Wolf
Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > qcow has no space in the metadata to store a backing format, and there > are existing qcow images backed both by raw or by other formats > (usually qcow) images, reliant on probing to tell the difference. > While we don't recommend the creation o

Re: [PATCH v5 4/7] qcow2: Deprecate use of qemu-img amend to change backing file

2020-05-05 Thread Kevin Wolf
Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > The use of 'qemu-img amend' to change qcow2 backing files is not > tested very well. In particular, our implementation has a bug where > if a new backing file is provided without a format, then the prior > format is blindly reused, even if this

Re: [PATCH 5/6] block/nvme: Align block pages queue to host page size

2020-05-05 Thread Laurent Vivier
On 04/05/2020 11:46, Philippe Mathieu-Daudé wrote: > In nvme_create_queue_pair() we create a page list using > qemu_blockalign(), then map it with qemu_vfio_dma_map(): > > q->prp_list_pages = qemu_blockalign0(bs, s->page_size * NVME_QUEUE_SIZE); > r = qemu_vfio_dma_map(s->vfio, q->prp_list_pag

Re: [PATCH v5 7/7] qemu-img: Deprecate use of -b without -F

2020-05-05 Thread Kevin Wolf
Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > Creating an image that requires format probing of the backing image is > inherently unsafe (we've had several CVEs over the years based on > probes leaking information to the guest on a subsequent boot, although > these days tools like libvirt ar

Re: [PATCH v2] Fix iotest 153

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504131959.9533-1-mlevi...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #

Re: [PATCH v2] Fix iotest 153

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504131959.9533-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200504131959.9533-1-mlevi...@redhat.com Subject: [PATCH v2] Fix iotest 153 Type: series === TEST SCRI

Re: [PATCH v2] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504142308.10446-1-be...@igalia.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200504142308.10446-1-be...@igalia.com Subject: [PATCH v2] qcow2: Avoid integer wraparound in qcow2_co_tr

Re: [PATCH 5/6] block/nvme: Align block pages queue to host page size

2020-05-05 Thread Laurent Vivier
On 05/05/2020 10:00, Laurent Vivier wrote: > On 04/05/2020 11:46, Philippe Mathieu-Daudé wrote: >> In nvme_create_queue_pair() we create a page list using >> qemu_blockalign(), then map it with qemu_vfio_dma_map(): >> >> q->prp_list_pages = qemu_blockalign0(bs, s->page_size * NVME_QUEUE_SIZE); >>

Re: [PULL v2 0/4] Block patches

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504151438.362702-1-stefa...@redhat.com/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit t

Re: [PULL v2 0/4] Block patches

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504151438.362702-1-stefa...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN =

Re: [PULL v2 0/4] Block patches

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504151438.362702-1-stefa...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ==

Re: [PULL v2 0/4] Block patches

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504151438.362702-1-stefa...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash ex

Re: [PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504155217.10325-1-be...@igalia.com/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that h

Re: [PATCH v5 7/7] qemu-img: Deprecate use of -b without -F

2020-05-05 Thread Peter Krempa
On Tue, May 05, 2020 at 10:11:03 +0200, Kevin Wolf wrote: > Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > > Creating an image that requires format probing of the backing image is > > inherently unsafe (we've had several CVEs over the years based on > > probes leaking information to the guest

Re: [PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-05 Thread Kevin Wolf
Am 04.05.2020 um 19:07 hat Alberto Garcia geschrieben: > On Mon 04 May 2020 06:01:19 PM CEST, Eric Blake wrote: > >> +_supported_fmt qcow2 > >> +_supported_proto file > > > > Do we have to limit it to qcow2 and file? Yes, it's testing a bugfix > > for qcow2, but are there other formats that it doe

Re: [PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-05 Thread Kevin Wolf
Am 05.05.2020 um 10:54 hat Kevin Wolf geschrieben: > Am 04.05.2020 um 19:07 hat Alberto Garcia geschrieben: > > On Mon 04 May 2020 06:01:19 PM CEST, Eric Blake wrote: > > >> +_supported_fmt qcow2 > > >> +_supported_proto file > > > > > > Do we have to limit it to qcow2 and file? Yes, it's testing

Re: [PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-05 Thread Alberto Garcia
On Tue 05 May 2020 10:54:12 AM CEST, Kevin Wolf wrote: > But I think there is a more important problem with the test: It seems > to pass even with old binaries that don't have the fix. Is this only > on my system or do you get the same? With old binaries when qcow2_cluster_zeroize() is called it r

Re: [PATCH v2] Fix iotest 153

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200504131959.9533-1-mlevi...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash expor

Re: [PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-05 Thread Kevin Wolf
Am 05.05.2020 um 11:16 hat Alberto Garcia geschrieben: > On Tue 05 May 2020 10:54:12 AM CEST, Kevin Wolf wrote: > > But I think there is a more important problem with the test: It seems > > to pass even with old binaries that don't have the fix. Is this only > > on my system or do you get the same?

Re: [PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-05 Thread Philippe Mathieu-Daudé
On 5/5/20 7:48 AM, Klaus Jensen wrote: From: Klaus Jensen Changes since v5 No functional changes, just updated Reviewed-by tags. Also, I screwed up the CC list when sending v4. Philippe and Keith, please add a Reviewed-by to * "nvme: factor out pmr setup" and * "do cmb/

Re: [PATCH 0/6] vmdk: Fix zero cluster handling

2020-05-05 Thread Kevin Wolf
Am 30.04.2020 um 15:30 hat Kevin Wolf geschrieben: > What I was really investigating is why 055 was so slow. I couldn't solve > that, but instead I found out that our VMDK code for zero clusters and > write_zeroes was completely broken. Apart from segfaults when zero > clusters were actually enable

Re: [PATCH 5/6] block/nvme: Align block pages queue to host page size

2020-05-05 Thread Philippe Mathieu-Daudé
On 5/5/20 10:23 AM, Laurent Vivier wrote: On 05/05/2020 10:00, Laurent Vivier wrote: On 04/05/2020 11:46, Philippe Mathieu-Daudé wrote: In nvme_create_queue_pair() we create a page list using qemu_blockalign(), then map it with qemu_vfio_dma_map(): q->prp_list_pages = qemu_blockalign0(bs, s

Re: [PATCH v2 3/4] backup: Make sure that source and target size match

2020-05-05 Thread Kevin Wolf
Am 30.04.2020 um 20:21 hat Vladimir Sementsov-Ogievskiy geschrieben: > 30.04.2020 17:27, Kevin Wolf wrote: > > Since the introduction of a backup filter node in commit 00e30f05d, the > > backup block job crashes when the target image is smaller than the > > source image because it will try to write

Re: [PATCH v2 0/4] backup: Make sure that source and target size match

2020-05-05 Thread Kevin Wolf
Am 30.04.2020 um 16:27 hat Kevin Wolf geschrieben: > v2: > - Fixed iotest 283 > - Corrected commit message for patch 3 [Vladimir] > - Fixed permissions for the source node, too > - Refactored the test case to avoid some duplication [Vladimir] Thanks for the review, applied to the block branch. Ke

Re: [PATCH v23 0/4] implement zstd cluster compression method

2020-05-05 Thread Max Reitz
On 30.04.20 12:19, Denis Plotnikov wrote: > v23: >Undecided: whether to add zstd(zlib) compression > details to the qcow2 spec >03: tighten assertion on zstd decompression [Eric] >04: use _rm_test_img appropriately [Max] Thanks, applied to my block branch: https://git.xa

Re: [PATCH v4 0/5] block-copy: use aio-task-pool

2020-05-05 Thread Max Reitz
On 29.04.20 15:08, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > v4 > 01: add Max's r-b > 04: move variable definition to the top of the block, add Max's r-b > 05: - change error-codes in block_copy_task_run(), document them > and be more accurate about error code in block_copy_dirty_clu

Re: [PATCH v3 03/33] block: Add BdrvChildRole and BdrvChildRoleBits

2020-05-05 Thread Kevin Wolf
Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: > This mask will supplement BdrvChildClass when it comes to what role (or > combination of roles) a child takes for its parent. It consists of > BdrvChildRoleBits values (which is an enum). > > Because empty enums are not allowed, let us just star

[PATCH v4 04/13] acpi: serial: don't use _STA method

2020-05-05 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00 (absent

[PATCH v4 00/13] acpi: i386 tweaks

2020-05-05 Thread Gerd Hoffmann
First batch of microvm patches, some generic acpi stuff. Split the acpi-build.c monster, specifically split the pc and q35 and pci bits into a separate file which we can skip building at some point in the future. v2 changes: leave acpi-build.c largely as-is, move useful bits to other places to all

[PATCH v4 11/13] acpi: simplify build_isa_devices_aml()

2020-05-05 Thread Gerd Hoffmann
x86 machines can have a single ISA bus only. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index cb3913d2ee76..1922868f3401 100644 --- a/hw/i386/acpi-build.c +

[PATCH v4 02/13] acpi: move aml builder code for rtc device

2020-05-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 17 - hw/rtc/mc146818rtc.c | 22 ++ 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 2e15f6848e7e..0bfa2dd23fcc 100644 --- a/hw/i386/acpi-b

[PATCH v4 01/13] qtest: allow DSDT acpi table changes

2020-05-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8bf4..6a052c50447a 100644 --- a/tests/qtest/

[PATCH v4 06/13] acpi: parallel: don't use _STA method

2020-05-05 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00 (absent

[PATCH v4 12/13] acpi: drop serial/parallel enable bits from dsdt

2020-05-05 Thread Gerd Hoffmann
The _STA methods for COM+LPT used to reference them, but that isn't the case any more. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1922868f3401..765409a90eb6 10

[PATCH v4 10/13] acpi: factor out fw_cfg_add_acpi_dsdt()

2020-05-05 Thread Gerd Hoffmann
Add helper function to add fw_cfg device, also move code to hw/i386/fw_cfg.c. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- hw/i386/fw_cfg.h | 1 + hw/i386/acpi-build.c | 24 +--- hw/i386/fw_cfg.c | 28 +

[PATCH v4 03/13] acpi: rtc: use a single crs range

2020-05-05 Thread Gerd Hoffmann
Use a single io range for _CRS instead of two, following what real hardware does. Signed-off-by: Gerd Hoffmann --- hw/rtc/mc146818rtc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index 2104e0aa3b14..47fafcfb7c1d 100644 --- a

[PATCH v4 09/13] acpi: move aml builder code for i8042 (kbd+mouse) device

2020-05-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 39 --- hw/input/pckbd.c | 31 +++ 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/hw/i386/

[PATCH v4 13/13] floppy: make isa_fdc_get_drive_max_chs static

2020-05-05 Thread Gerd Hoffmann
acpi aml generator needs this, but it is in floppy code now so we can make the function static. Signed-off-by: Gerd Hoffmann --- include/hw/block/fdc.h | 2 -- hw/block/fdc.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/block/fdc.h b/include/hw/bloc

[PATCH v4 08/13] acpi: move aml builder code for floppy device

2020-05-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/block/fdc.c | 83 hw/i386/acpi-build.c | 83 stubs/cmos.c | 7 stubs/Makefile.objs | 1 + 4 files changed, 91 insertions(

[PATCH v4 05/13] acpi: move aml builder code for serial device

2020-05-05 Thread Gerd Hoffmann
The code uses the isa_serial_io array to figure what the device uid is. Side effect is that acpi antries are not limited to port 1+2 any more, we'll also get entries for ports 3+4. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/char/serial-isa.c | 32

[PATCH v4 07/13] acpi: move aml builder code for parallel device

2020-05-05 Thread Gerd Hoffmann
Also adds support for multiple LPT devices. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/char/parallel.c | 32 hw/i386/acpi-build.c | 23 --- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/hw/char/paralle

Re: [PATCH v3 03/33] block: Add BdrvChildRole and BdrvChildRoleBits

2020-05-05 Thread Max Reitz
On 05.05.20 13:19, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> This mask will supplement BdrvChildClass when it comes to what role (or >> combination of roles) a child takes for its parent. It consists of >> BdrvChildRoleBits values (which is an enum). >> >> Because em

Re: [PATCH v23 0/4] implement zstd cluster compression method

2020-05-05 Thread Max Reitz
On 05.05.20 12:26, Max Reitz wrote: > On 30.04.20 12:19, Denis Plotnikov wrote: >> v23: >>Undecided: whether to add zstd(zlib) compression >> details to the qcow2 spec >>03: tighten assertion on zstd decompression [Eric] >>04: use _rm_test_img appropriately [Max] > > Than

Re: [PATCH v5 06/18] nvme: refactor nvme_addr_read

2020-05-05 Thread Maxim Levitsky
On Tue, 2020-05-05 at 07:52 +0200, Klaus Jensen wrote: > On May 5 07:48, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Pull the controller memory buffer check to its own function. The check > > will be used on its own in later patches. > > > > Signed-off-by: Klaus Jensen > > Reviewed-by:

Re: [PATCH v3 03/33] block: Add BdrvChildRole and BdrvChildRoleBits

2020-05-05 Thread Kevin Wolf
Am 05.05.2020 um 13:59 hat Max Reitz geschrieben: > On 05.05.20 13:19, Kevin Wolf wrote: > > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: > >> This mask will supplement BdrvChildClass when it comes to what role (or > >> combination of roles) a child takes for its parent. It consists of > >> B

[PULL 04/24] iotests: replace mutable list default args

2020-05-05 Thread Max Reitz
From: John Snow It's bad hygiene: if we modify this list, it will be modified across all invocations. (Remaining bad usages are fixed in a subsequent patch which changes the function signature anyway.) Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max Reitz Messag

[PULL 03/24] iotests: ignore import warnings from pylint

2020-05-05 Thread Max Reitz
From: John Snow The right way to solve this is to come up with a virtual environment infrastructure that sets all the paths correctly, and/or to create installable python modules that can be imported normally. That's hard, so just silence this error for now. Reviewed-by: Philippe Mathieu-Daudé

[PULL 02/24] iotests: don't use 'format' for drive_add

2020-05-05 Thread Max Reitz
From: John Snow It shadows (with a different type) the built-in format. Use something else. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max Reitz Message-Id: <2020033114.11581-3-js...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/q

[PULL 06/24] iotests: alphabetize standard imports

2020-05-05 Thread Max Reitz
From: John Snow I had to fix a merge conflict, so do this tiny harmless thing while I'm here. Signed-off-by: John Snow Reviewed-by: Max Reitz Message-Id: <2020033114.11581-7-js...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- tests

[PULL 12/24] iotest 258: use script_main

2020-05-05 Thread Max Reitz
From: John Snow Since this one is nicely factored to use a single entry point, use script_main to run the tests. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max Reitz Message-Id: <2020033114.11581-13-js...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: M

[PULL 13/24] iotests: Mark verify functions as private

2020-05-05 Thread Max Reitz
From: John Snow Mark the verify functions as "private" with a leading underscore, to discourage their use. Update type signatures while we're here. (Also, make pending patches not yet using the new entry points fail in a very obvious way.) Signed-off-by: John Snow Message-Id: <2020033114.1

[PULL 09/24] iotests: limit line length to 79 chars

2020-05-05 Thread Max Reitz
From: John Snow 79 is the PEP8 recommendation. This recommendation works well for reading patch diffs in TUI email clients. Signed-off-by: John Snow Reviewed-by: Max Reitz Message-Id: <2020033114.11581-10-js...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/qemu-

[PULL 18/24] block: Comment cleanups

2020-05-05 Thread Max Reitz
From: Eric Blake It's been a while since we got rid of the sector-based bdrv_read and bdrv_write (commit 2e11d756); let's finish the job on a few remaining comments. Signed-off-by: Eric Blake Message-Id: <20200428213807.776655-1-ebl...@redhat.com> Reviewed-by: Alberto Garcia Signed-off-by: Max

[PULL 17/24] qcow2: Tweak comment about bitmaps vs. resize

2020-05-05 Thread Max Reitz
From: Eric Blake Our comment did not actually match the code. Rewrite the comment to be less sensitive to any future changes to qcow2-bitmap.c that might implement scenarios that we currently reject. Signed-off-by: Eric Blake Reviewed-by: Max Reitz Message-Id: <20200428192648.749066-4-ebl...@

[PULL 08/24] iotests: touch up log function signature

2020-05-05 Thread Max Reitz
From: John Snow Representing nested, recursive data structures in mypy is notoriously difficult; the best we can reliably do right now is denote the leaf types as "Any" while describing the general shape of the data. Regardless, this fully annotates the log() function. Typing notes: TypeVar is

[PULL 05/24] iotests: add pylintrc file

2020-05-05 Thread Max Reitz
From: John Snow This allows others to get repeatable results with pylint. If you run `pylint iotests.py`, you should see a 100% pass. Signed-off-by: John Snow Reviewed-by: Max Reitz Message-Id: <2020033114.11581-6-js...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- te

[PULL 01/24] iotests: do a light delinting

2020-05-05 Thread Max Reitz
From: John Snow This doesn't fix everything in here, but it does help clean up the pylint report considerably. This should be 100% style changes only; the intent is to make pylint more useful by working on establishing a baseline for iotests that we can gate against in the future. Signed-off-by

[PULL 07/24] iotests: drop pre-Python 3.4 compatibility code

2020-05-05 Thread Max Reitz
From: John Snow We no longer need to accommodate <3.4, drop this code. (The lines were > 79 chars and it stood out.) Signed-off-by: John Snow Reviewed-by: Max Reitz Message-Id: <2020033114.11581-8-js...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/qemu-iotests/

[PULL 00/24] Block patches

2020-05-05 Thread Max Reitz
The following changes since commit 5375af3cd7b8adcc10c18d8083b7be63976c9645: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-05-04 15:51:09 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-2020-05-05 for you

[PULL 10/24] iotests: add hmp helper with logging

2020-05-05 Thread Max Reitz
From: John Snow Minor cleanup for HMP functions; helps with line length and consolidates HMP helpers through one implementation function. Although we are adding a universal toggle to turn QMP logging on or off, many existing callers to hmp functions don't expect that output to be logged, which c

Re: [PULL v2 0/4] Block patches

2020-05-05 Thread Peter Maydell
On Mon, 4 May 2020 at 16:15, Stefan Hajnoczi wrote: > > The following changes since commit 9af638cc1f665712522608c5d6b8c03d8fa67666: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200504' into staging (2020-05-04 > 13:37:17 +0100) > > are available in the Git repos

[PULL 15/24] block: Add blk_new_with_bs() helper

2020-05-05 Thread Max Reitz
From: Eric Blake There are several callers that need to create a new block backend from an existing BDS; make the task slightly easier with a common helper routine. Suggested-by: Max Reitz Signed-off-by: Eric Blake Message-Id: <20200424190903.522087-2-ebl...@redhat.com> [mreitz: Set @ret only

[PULL 11/24] iotests: add script_initialize

2020-05-05 Thread Max Reitz
From: John Snow Like script_main, but doesn't require a single point of entry. Replace all existing initialization sections with this drop-in replacement. This brings debug support to all existing script-style iotests. Signed-off-by: John Snow Reviewed-by: Max Reitz Message-Id: <202003311

[PULL 19/24] Fix iotest 153

2020-05-05 Thread Max Reitz
From: Maxim Levitsky Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o "" but this test uses it. Since this test only tries to do a dry-run run of qemu-img amend, replace the -o "" with dummy -o "size=$size". Fixes: f62514b3def5fb2acbef64d0e053c0c31fa45aff Signed-off-by:

[PULL 14/24] iotests: use python logging for iotests.log()

2020-05-05 Thread Max Reitz
From: John Snow We can turn logging on/off globally instead of per-function. Remove use_log from run_job, and use python logging to turn on diffable output when we run through a script entry point. iotest 245 changes output order due to buffering reasons. An extended note on python logging: A

[PULL 20/24] block/block-copy: rename in-flight requests to tasks

2020-05-05 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We are going to use aio-task-pool API and extend in-flight request structure to be a successor of AioTask, so rename things appropriately. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20200429130847.28124-2-vsement...@virtuo

[PULL 22/24] block/block-copy: add state pointer to BlockCopyTask

2020-05-05 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We are going to use aio-task-pool API, so we'll need state pointer in BlockCopyTask anyway. Add it now and use where possible. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20200429130847.28124-4-vsement...@virtuozzo.com> Sig

[PULL 16/24] qcow2: Allow resize of images with internal snapshots

2020-05-05 Thread Max Reitz
From: Eric Blake We originally refused to allow resize of images with internal snapshots because the v2 image format did not require the tracking of snapshot size, making it impossible to safely revert to a snapshot with a different size than the current view of the image. But the snapshot size

[PULL 23/24] block/block-copy: refactor task creation

2020-05-05 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Instead of just relying on the comment "Called only on full-dirty region" in block_copy_task_create() let's move initial dirty area search directly to block_copy_task_create(). Let's also use effective bdrv_dirty_bitmap_next_dirty_area instead of looping through

[PULL 21/24] block/block-copy: alloc task on each iteration

2020-05-05 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We are going to use aio-task-pool API, so tasks will be handled in parallel. We need therefore separate allocated task on each iteration. Introduce this logic now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20200429130847.

[PULL 24/24] block/block-copy: use aio-task-pool API

2020-05-05 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Run block_copy iterations in parallel in aio tasks. Changes: - BlockCopyTask becomes aio task structure. Add zeroes field to pass it to block_copy_do_copy - add call state - it's a state of one call of block_copy(), shared between parallel tasks. Fo

Re: [PATCH v3 03/33] block: Add BdrvChildRole and BdrvChildRoleBits

2020-05-05 Thread Max Reitz
On 05.05.20 14:54, Kevin Wolf wrote: > Am 05.05.2020 um 13:59 hat Max Reitz geschrieben: >> On 05.05.20 13:19, Kevin Wolf wrote: >>> Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: [...] +/* Useful combination of flags */ +BDRV_CHILD_IMAGE= BDRV_CHILD_DATA +

Re: [PATCH v4 02/13] acpi: move aml builder code for rtc device

2020-05-05 Thread Igor Mammedov
On Tue, 5 May 2020 13:38:32 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/i386/acpi-build.c | 17 - > hw/rtc/mc146818rtc.c | 22 ++ > 2 files changed, 22 insertions(+), 17 deletions(-) > > diff --git a/hw

Re: [PATCH v4 03/13] acpi: rtc: use a single crs range

2020-05-05 Thread Igor Mammedov
On Tue, 5 May 2020 13:38:33 +0200 Gerd Hoffmann wrote: > Use a single io range for _CRS instead of two, > following what real hardware does. > > Signed-off-by: Gerd Hoffmann > --- > hw/rtc/mc146818rtc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/hw/rtc/mc1468

Re: [PATCH v4 11/13] acpi: simplify build_isa_devices_aml()

2020-05-05 Thread Igor Mammedov
On Tue, 5 May 2020 13:38:41 +0200 Gerd Hoffmann wrote: > x86 machines can have a single ISA bus only. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/i386/acpi-build.c | 15 +-- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/hw/i386/

Re: [PATCH v4 02/13] acpi: move aml builder code for rtc device

2020-05-05 Thread Philippe Mathieu-Daudé
On 5/5/20 1:38 PM, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 17 - hw/rtc/mc146818rtc.c | 22 ++ 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 2e15f6848

Re: [PATCH v4 11/13] acpi: simplify build_isa_devices_aml()

2020-05-05 Thread Philippe Mathieu-Daudé
On 5/5/20 1:38 PM, Gerd Hoffmann wrote: x86 machines can have a single ISA bus only. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i

Re: [PATCH v3 03/33] block: Add BdrvChildRole and BdrvChildRoleBits

2020-05-05 Thread Kevin Wolf
Am 05.05.2020 um 15:20 hat Max Reitz geschrieben: > On 05.05.20 14:54, Kevin Wolf wrote: > > When you're the author, the meaning of everything is clear to you. :-) > > > > In case of doubt, I would be more explicit so that the comment gives a > > clear guideline for which role to use in which scen

Re: [PATCH v4 12/13] acpi: drop serial/parallel enable bits from dsdt

2020-05-05 Thread Igor Mammedov
On Tue, 5 May 2020 13:38:42 +0200 Gerd Hoffmann wrote: > The _STA methods for COM+LPT used to reference them, > but that isn't the case any more. > > Signed-off-by: Gerd Hoffmann > --- > hw/i386/acpi-build.c | 23 --- > 1 file changed, 23 deletions(-) > > diff --git a/hw/

Re: [PATCH v4 07/13] acpi: move aml builder code for parallel device

2020-05-05 Thread Philippe Mathieu-Daudé
Hi Gerd, On 5/5/20 1:38 PM, Gerd Hoffmann wrote: Also adds support for multiple LPT devices. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/char/parallel.c | 32 hw/i386/acpi-build.c | 23 --- 2 files changed, 32 inser

Re: [PATCH v4 13/13] floppy: make isa_fdc_get_drive_max_chs static

2020-05-05 Thread Igor Mammedov
On Tue, 5 May 2020 13:38:43 +0200 Gerd Hoffmann wrote: > acpi aml generator needs this, but it is in floppy code now > so we can make the function static. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > include/hw/block/fdc.h | 2 -- > hw/block/fdc.c | 4 ++-- >

Re: [PATCH v4 05/13] acpi: move aml builder code for serial device

2020-05-05 Thread Philippe Mathieu-Daudé
On 5/5/20 1:38 PM, Gerd Hoffmann wrote: The code uses the isa_serial_io array to figure what the device uid is. Side effect is that acpi antries are not limited to port 1+2 any more, we'll also get entries for ports 3+4. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/char/ser

Re: [PATCH] iotests/055: Use cache.no-flush for vmdk target

2020-05-05 Thread Eric Blake
On 5/5/20 1:46 AM, Kevin Wolf wrote: 055 uses the backup block job to create a compressed backup of an $IMGFMT image with both qcow2 and vmdk targets. However, cluster allocation in vmdk is very slow because it flushes the image file after each L2 update. There is no reason why we need this leve

[PATCH] qcow2: Fix preallocation on block devices

2020-05-05 Thread Max Reitz
Calling bdrv_getlength() to get the pre-truncate file size will not really work on block devices, because they have always the same length, and trying to write beyond it will fail with a rather cryptic error message. Instead, we should use qcow2_get_last_cluster() and bdrv_getlength() only as a fa

Re: Backup of vm disk images

2020-05-05 Thread Anders Östling
Thanks Peter and Stefan for enlightening me! On Mon, May 4, 2020 at 9:58 AM Peter Krempa wrote: > > One thing to note though is that the backup integration is not entirely > finished in libvirt and thus in a 'tech-preview' state. Some > interactions corrupt the state for incremental backups. >

Re: [PATCH v5 3/7] qcow: Tolerate backing_fmt=, but warn on backing_fmt=raw

2020-05-05 Thread Eric Blake
On 5/5/20 2:35 AM, Kevin Wolf wrote: Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: qcow has no space in the metadata to store a backing format, and there are existing qcow images backed both by raw or by other formats (usually qcow) images, reliant on probing to tell the difference. While w

Re: [PATCH 5/6] block/nvme: Align block pages queue to host page size

2020-05-05 Thread Philippe Mathieu-Daudé
On 5/4/20 11:46 AM, Philippe Mathieu-Daudé wrote: In nvme_create_queue_pair() we create a page list using qemu_blockalign(), then map it with qemu_vfio_dma_map(): q->prp_list_pages = qemu_blockalign0(bs, s->page_size * NVME_QUEUE_SIZE); r = qemu_vfio_dma_map(s->vfio, q->prp_list_pages,

[PATCH v5 10/31] qcow2: Add offset_to_sc_index()

2020-05-05 Thread Alberto Garcia
For a given offset, return the subcluster number within its cluster (i.e. with 32 subclusters per cluster it returns a number between 0 and 31). Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.h | 5 + 1 file changed, 5 inserti

[PATCH v5 18/31] qcow2: Handle QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC

2020-05-05 Thread Alberto Garcia
When dealing with subcluster types there is a new value called QCOW2_SUBCLUSTER_UNALLOCATED_ALLOC that has no equivalent in QCow2ClusterType. This patch handles that value in all places where subcluster types are processed. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Vladi

[PATCH v5 03/31] qcow2: Add calculate_l2_meta()

2020-05-05 Thread Alberto Garcia
handle_alloc() creates a QCowL2Meta structure in order to update the image metadata and perform the necessary copy-on-write operations. This patch moves that code to a separate function so it can be used from other places. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2-cl

[PATCH v5 08/31] qcow2: Add dummy has_subclusters() function

2020-05-05 Thread Alberto Garcia
This function will be used by the qcow2 code to check if an image has subclusters or not. At the moment this simply returns false. Once all patches needed for subcluster support are ready then QEMU will be able to create and read images with subclusters and this function will return the actual val

[PATCH v5 24/31] qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2()

2020-05-05 Thread Alberto Garcia
The L2 bitmap needs to be updated after each write to indicate what new subclusters are now allocated. This needs to happen even if the cluster was already allocated and the L2 entry was otherwise valid. In some cases however a write operation doesn't need change the L2 bitmap (because all affecte

[PATCH v5 11/31] qcow2: Add offset_into_subcluster() and size_to_subclusters()

2020-05-05 Thread Alberto Garcia
Like offset_into_cluster() and size_to_clusters(), but for subclusters. Signed-off-by: Alberto Garcia --- block/qcow2.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/qcow2.h b/block/qcow2.h index e68febb15b..8b1ed1cbcf 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -53

[PATCH v5 02/31] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()

2020-05-05 Thread Alberto Garcia
qcow2_get_cluster_offset() takes an (unaligned) guest offset and returns the (aligned) offset of the corresponding cluster in the qcow2 image. In practice none of the callers need to know where the cluster starts so this patch makes the function calculate and return the final host offset directly.

[PATCH v5 01/31] qcow2: Make Qcow2AioTask store the full host offset

2020-05-05 Thread Alberto Garcia
The file_cluster_offset field of Qcow2AioTask stores a cluster-aligned host offset. In practice this is not very useful because all users(*) of this structure need the final host offset into the cluster, which they calculate using host_offset = file_cluster_offset + offset_into_cluster(s, offse

[PATCH v5 20/31] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-05-05 Thread Alberto Garcia
The logic of this function remains pretty much the same, except that it uses count_contiguous_subclusters(), which combines the logic of count_contiguous_clusters() / count_contiguous_clusters_unallocated() and checks individual subclusters. Signed-off-by: Alberto Garcia --- block/qcow2.h

[PATCH v5 07/31] qcow2: Document the Extended L2 Entries feature

2020-05-05 Thread Alberto Garcia
Subcluster allocation in qcow2 is implemented by extending the existing L2 table entries and adding additional information to indicate the allocation status of each subcluster. This patch documents the changes to the qcow2 format and how they affect the calculation of the L2 cache size. Signed-of

[PATCH v5 27/31] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-05-05 Thread Alberto Garcia
This works now at the subcluster level and pwrite_zeroes_alignment is updated accordingly. qcow2_cluster_zeroize() is turned into qcow2_subcluster_zeroize() with the following changes: - The request can now be subcluster-aligned. - The cluster-aligned body of the request is still zeroized

[PATCH v5 21/31] qcow2: Add subcluster support to zero_in_l2_slice()

2020-05-05 Thread Alberto Garcia
The QCOW_OFLAG_ZERO bit that indicates that a cluster reads as zeroes is only used in standard L2 entries. Extended L2 entries use individual 'all zeroes' bits for each subcluster. This must be taken into account when updating the L2 entry and also when deciding that an existing entry does not nee

[PATCH v5 15/31] qcow2: Add qcow2_cluster_is_allocated()

2020-05-05 Thread Alberto Garcia
This helper function tells us if a cluster is allocated (that is, there is an associated host offset for it). Signed-off-by: Alberto Garcia --- block/qcow2.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/qcow2.h b/block/qcow2.h index be7816a3b8..b5db8d2f36 100644 --- a/block/qc

  1   2   >