[PATCH v9 01/10] acpi: bios-tables-test: show more context on asl diffs

2020-06-17 Thread Gerd Hoffmann
Makes it easier to create good commit messages from the logs. Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index b482f76c03d4..c315156858f4 10064

[PATCH v9 04/10] floppy: move cmos_get_fd_drive_type() from pc

2020-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Acked-by: John Snow --- include/hw/block/fdc.h | 1 + include/hw/i386/pc.h | 1 - hw/block/fdc.c | 26 +- hw/i386/pc.c | 25 - 4 files changed, 26 insertions(+)

[PATCH v9 05/10] acpi: move aml builder code for i8042 (kbd+mouse) device

2020-06-17 Thread Gerd Hoffmann
DSDT change: isa device order changes in case MI1 (ipmi) is present. 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 +++

[PATCH v9 10/10] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.

2020-06-17 Thread Gerd Hoffmann
Seems to be unused. ich9 DSDT changes: Scope (_SB.PCI0) { Device (ISA) { Name (_ADR, 0x001F) // _ADR: Address OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C) -OperationRegion (LPCD, PCI_Config, 0x80, 0x02) -Field (L

[PATCH v9 03/10] floppy: make isa_fdc_get_drive_max_chs static

2020-06-17 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 Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé Acked-by: John Snow --- include/hw/block/fdc.h | 2 -- hw/block/fdc.c | 4 ++-- 2 files changed,

[PATCH v9 02/10] acpi: move aml builder code for floppy device

2020-06-17 Thread Gerd Hoffmann
DSDT change: isa device order changes in case MI1 (ipmi) is present. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/block/fdc.c | 83 hw/i386/acpi-build.c| 83 stubs/cmos.c

[PATCH v9 07/10] acpi: simplify build_isa_devices_aml()

2020-06-17 Thread Gerd Hoffmann
x86 machines can have a single ISA bus only. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c in

[PATCH v9 00/10] acpi: i386 tweaks

2020-06-17 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 v9 09/10] acpi: drop build_piix4_pm()

2020-06-17 Thread Gerd Hoffmann
The _SB.PCI0.PX13.P13C opregion (holds isa device enable bits) is not used any more, remove it from DSDT. piix4 DSDT changes: Scope (_SB.PCI0) { -Device (PX13) -{ -Name (_ADR, 0x00010003) // _ADR: Address -OperationRegion (P13C, PCI_Config, Zero,

[PATCH v9 06/10] acpi: factor out fw_cfg_add_acpi_dsdt()

2020-06-17 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 v9 08/10] acpi: drop serial/parallel enable bits from dsdt

2020-06-17 Thread Gerd Hoffmann
The _STA methods for COM+LPT used to reference them, but that isn't the case any more. piix4 DSDT changes: Scope (_SB.PCI0) { Device (ISA) { Name (_ADR, 0x0001) // _ADR: Address OperationRegion (P40C, PCI_Config, 0x60, 0x04) -

Re: [PATCH v9 00/10] acpi: i386 tweaks

2020-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200617071138.11159-1-kra...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v9 00/10] acpi: i386 tweaks Type: series Message-id: 20200617071138.11159-1-kra...@redhat.com === TE

Re: [PATCH v9 01/10] acpi: bios-tables-test: show more context on asl diffs

2020-06-17 Thread Philippe Mathieu-Daudé
On 6/17/20 9:11 AM, Gerd Hoffmann wrote: > Makes it easier to create good commit messages from the logs. > > Signed-off-by: Gerd Hoffmann > --- > tests/qtest/bios-tables-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/

Re: [PATCH v9 00/10] acpi: i386 tweaks

2020-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200617071138.11159-1-kra...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v9 00/10] acpi: i386 tweaks Type: series Message-id: 20200617071138.11159-1-kra...@redhat.com === TE

Re: [PATCH v9 00/10] acpi: i386 tweaks

2020-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200617071138.11159-1-kra...@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 export

Re: [PATCH v9 02/10] acpi: move aml builder code for floppy device

2020-06-17 Thread Thomas Huth
On 17/06/2020 09.11, Gerd Hoffmann wrote: > DSDT change: isa device order changes in case MI1 (ipmi) is present. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Igor Mammedov > --- > hw/block/fdc.c | 83 > hw/i386/acpi-build.c| 83

[PATCH v2 1/3] block: Add bdrv_co_get_lba_status

2020-06-17 Thread Lin Ma
The get lba status wrapper based on the bdrv_block_status. The following patches will add GET LBA STATUS 16 support for scsi emulation layer. Signed-off-by: Lin Ma --- block/io.c| 43 +++ include/block/block_int.h | 5 + 2 files changed, 4

[PATCH v2 2/3] block: Add GET LBA STATUS support

2020-06-17 Thread Lin Ma
Signed-off-by: Lin Ma --- block/block-backend.c | 38 ++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 40 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 6936b25c83..6d08dd5e0d 100644 --- a/block/block-backend.c +

[PATCH v2 0/3] Add Support for GET LBA STATUS 16 command in scsi emulation

2020-06-17 Thread Lin Ma
v2->v1: Follow Claudio's suggestions and the docker test result, Fix the dereferencing 'void *' pointer issues and the coding style issues. In this current design, The GET LBA STATUS parameter data only contains an eight-byte header + one LBA status descriptor. How to test: host:~ # qemu-system-

[PATCH v2 3/3] scsi-disk: Add support for the GET LBA STATUS 16 command

2020-06-17 Thread Lin Ma
Signed-off-by: Lin Ma --- hw/scsi/scsi-disk.c| 90 ++ include/block/accounting.h | 1 + include/scsi/constants.h | 1 + 3 files changed, 92 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 387503e11b..9e3002ddaf 100644 ---

Re: [PATCH] block: file-posix: Fail unmap with NO_FALLBACK on block device

2020-06-17 Thread Kevin Wolf
Am 16.06.2020 um 22:01 hat Nir Soffer geschrieben: > On Tue, Jun 16, 2020 at 8:39 PM Nir Soffer wrote: > > > > On Tue, Jun 16, 2020 at 6:32 PM Kevin Wolf wrote: > > > > > > Am 15.06.2020 um 21:32 hat Nir Soffer geschrieben: > > > > We can zero 2.3 g/s: > > > > > > > > # time blkdiscard -z test-lv

[PATCH 1/5] iotests.py: Add skip_for_formats() decorator

2020-06-17 Thread Max Reitz
Sometimes, we want to skip some test methods for certain formats. This decorator allows that. Signed-off-by: Max Reitz --- tests/qemu-iotests/118| 7 +++ tests/qemu-iotests/iotests.py | 13 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iot

[PATCH 2/5] iotests/041: Skip test_small_target for qed

2020-06-17 Thread Max Reitz
qed does not support shrinking images, so the test_small_target method should be skipped to keep 041 passing. Fixes: 16cea4ee1c8e5a69a058e76f426b2e17974d8d7d Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/041 b/tests/q

[PATCH 3/5] iotests/292: data_file is unsupported

2020-06-17 Thread Max Reitz
Fixes: e4d7019e1a81c61de6a925c3ac5bb6e62ea21b29 Signed-off-by: Max Reitz --- tests/qemu-iotests/292 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/292 b/tests/qemu-iotests/292 index a2de27cca4..83ab19231d 100755 --- a/tests/qemu-iotests/292 +++ b/tests/qemu-iotests/29

[PATCH 4/5] iotests/229: data_file is unsupported

2020-06-17 Thread Max Reitz
Fixes: d89ac3cf305b28c024a76805a84d75c0ee1e786f Signed-off-by: Max Reitz --- tests/qemu-iotests/229 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/229 b/tests/qemu-iotests/229 index 99acb55ebb..89a5359f32 100755 --- a/tests/qemu-iotests/229 +++ b/tests/qemu-iotests/229

[PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Max Reitz
Hi, Thomas’s report (https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00791.html) has given me a nice excuse to write this series. There are some iotests that have recently start to fail in rarely exercised test environments (qed, qcow2 with data_file, qcow2 v2), and this series fixes

[PATCH 5/5] iotests/{190,291}: compat=0.10 is unsupported

2020-06-17 Thread Max Reitz
Fixes: 5d72c68b49769c927e90b78af6d90f6a384b26ac Fixes: cf2d1203dcfc2bf964453d83a2302231ce77f2dc Signed-off-by: Max Reitz --- tests/qemu-iotests/190 | 2 ++ tests/qemu-iotests/291 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/qemu-iotests/190 b/tests/qemu-iotests/190 index fe630918e

Re: [PATCH v2 0/3] Add Support for GET LBA STATUS 16 command in scsi emulation

2020-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200617102019.29652-1-...@suse.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 export ARCH

Re: [PATCH RFC v2 1/5] block: add bitmap-populate job

2020-06-17 Thread Kevin Wolf
Am 16.06.2020 um 22:02 hat Eric Blake geschrieben: > On 6/16/20 2:46 PM, Eric Blake wrote: > > > > > +BlockJob *bitpop_job_create( > > > > > > +    if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP_SOURCE, errp)) { > > > > +        return NULL; > > > > +    } > > > > > > What does thi

Re: [PATCH v9 02/10] acpi: move aml builder code for floppy device

2020-06-17 Thread Gerd Hoffmann
On Wed, Jun 17, 2020 at 10:40:24AM +0200, Thomas Huth wrote: > On 17/06/2020 09.11, Gerd Hoffmann wrote: > > DSDT change: isa device order changes in case MI1 (ipmi) is present. > > > > Signed-off-by: Gerd Hoffmann > > Reviewed-by: Igor Mammedov > > --- > > hw/block/fdc.c | 83

Re: [PATCH] iotests: Fix 051 output after qdev_init_nofail() removal

2020-06-17 Thread Max Reitz
On 16.06.20 17:49, Philippe Mathieu-Daudé wrote: > Commit 96927c744 replaced qdev_init_nofail() call by > isa_realize_and_unref() which has a different error > message. Update the test output accordingly. > > Gitlab CI error after merging b77b5b3dc7: > https://gitlab.com/qemu-project/qemu/-/jobs/5

Re: [PATCH v9 02/10] acpi: move aml builder code for floppy device

2020-06-17 Thread Thomas Huth
On 17/06/2020 13.31, Gerd Hoffmann wrote: > On Wed, Jun 17, 2020 at 10:40:24AM +0200, Thomas Huth wrote: >> On 17/06/2020 09.11, Gerd Hoffmann wrote: >>> DSDT change: isa device order changes in case MI1 (ipmi) is present. >>> >>> Signed-off-by: Gerd Hoffmann >>> Reviewed-by: Igor Mammedov >>> --

Re: [PATCH 1/5] iotests.py: Add skip_for_formats() decorator

2020-06-17 Thread Thomas Huth
On 17/06/2020 12.48, Max Reitz wrote: > Sometimes, we want to skip some test methods for certain formats. This > decorator allows that. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/118| 7 +++ > tests/qemu-iotests/iotests.py | 13 + > 2 files changed, 16 inse

Re: [PATCH 2/5] iotests/041: Skip test_small_target for qed

2020-06-17 Thread Thomas Huth
On 17/06/2020 12.48, Max Reitz wrote: > qed does not support shrinking images, so the test_small_target method > should be skipped to keep 041 passing. > > Fixes: 16cea4ee1c8e5a69a058e76f426b2e17974d8d7d > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/041 | 2 ++ > 1 file changed, 2 insert

Re: [PATCH 1/2] iotests: Make _filter_img_create more active

2020-06-17 Thread Maxim Levitsky
On Tue, 2020-06-16 at 15:17 +0200, Max Reitz wrote: > Right now, _filter_img_create just filters out everything that looks > format-dependent, and applies some filename filters. That means that we > have to add another filter line every time some format gets a new > creation option. This can be a

Re: [PATCH 2/2] iotests: filter few more luks specific create options

2020-06-17 Thread Maxim Levitsky
On Tue, 2020-06-16 at 15:17 +0200, Max Reitz wrote: > From: Maxim Levitsky > > This allows more tests to be able to have same output on both qcow2 luks > encrypted images > and raw luks images > > Signed-off-by: Maxim Levitsky > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/087.out

Re: [PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200617104822.27525-1-mre...@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 export

Re: [PATCH 1/7] block/nvme: poll queues without q->lock

2020-06-17 Thread Stefan Hajnoczi
On Fri, May 29, 2020 at 09:49:31AM +0200, Sergio Lopez wrote: > On Thu, May 28, 2020 at 04:23:50PM +0100, Stefan Hajnoczi wrote: > > On Mon, May 25, 2020 at 10:07:13AM +0200, Sergio Lopez wrote: > > > On Tue, May 19, 2020 at 06:11:32PM +0100, Stefan Hajnoczi wrote: > > > > A lot of CPU time is spen

Re: [PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Kevin Wolf
Am 17.06.2020 um 12:48 hat Max Reitz geschrieben: > Hi, > > Thomas’s report > (https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00791.html) > has given me a nice excuse to write this series. > > There are some iotests that have recently start to fail in rarely > exercised test environm

Re: [PATCH] iotests: Add copyright line in qcow2.py

2020-06-17 Thread Kevin Wolf
Am 09.06.2020 um 22:59 hat Eric Blake geschrieben: > The file qcow2.py was originally contributed in 2012 by Kevin Wolf, > but was not given traditional boilerplate headers at the time. The > missing license was just rectified (commit 16306a7b39) using the > project-default GPLv2+, but as Vladimir

[PATCH v2 0/7] block/nvme: support nested aio_poll()

2020-06-17 Thread Stefan Hajnoczi
v2: * Reword comment in Patch 1 explainin why its safe not to hold q->lock [Sergio] * Fix s/unwiedly/unwieldy/ typo in the Patch 6 commit description [Philippe] This series allows aio_poll() to work from I/O request completion callbacks. QEMU block drivers are supposed to support this because so

[PATCH v2 3/7] block/nvme: don't access CQE after moving cq.head

2020-06-17 Thread Stefan Hajnoczi
Do not access a CQE after incrementing q->cq.head and releasing q->lock. It is unlikely that this causes problems in practice but it's a latent bug. The reason why it should be safe at the moment is that completion processing is not re-entrant and the CQ doorbell isn't written until the end of nvm

[PATCH v2 1/7] block/nvme: poll queues without q->lock

2020-06-17 Thread Stefan Hajnoczi
A lot of CPU time is spent simply locking/unlocking q->lock during polling. Check for completion outside the lock to make q->lock disappear from the profile. Signed-off-by: Stefan Hajnoczi --- block/nvme.c | 12 1 file changed, 12 insertions(+) diff --git a/block/nvme.c b/block/nvm

[PATCH v2 2/7] block/nvme: drop tautologous assertion

2020-06-17 Thread Stefan Hajnoczi
nvme_process_completion() explicitly checks cid so the assertion that follows is always true: if (cid == 0 || cid > NVME_QUEUE_SIZE) { ... continue; } assert(cid <= NVME_QUEUE_SIZE); Signed-off-by: Stefan Hajnoczi Reviewed-by: Sergio Lopez Reviewed-by: Philippe Mathieu-Daudé

[PATCH v2 7/7] block/nvme: support nested aio_poll()

2020-06-17 Thread Stefan Hajnoczi
QEMU block drivers are supposed to support aio_poll() from I/O completion callback functions. This means completion processing must be re-entrant. The standard approach is to schedule a BH during completion processing and cancel it at the end of processing. If aio_poll() is invoked by a callback f

[PATCH v2 5/7] block/nvme: clarify that free_req_queue is protected by q->lock

2020-06-17 Thread Stefan Hajnoczi
Existing users access free_req_queue under q->lock. Document this. Signed-off-by: Stefan Hajnoczi Reviewed-by: Sergio Lopez Reviewed-by: Philippe Mathieu-Daudé --- block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nvme.c b/block/nvme.c index 8e60882af3..426

[PATCH v2 4/7] block/nvme: switch to a NVMeRequest freelist

2020-06-17 Thread Stefan Hajnoczi
There are three issues with the current NVMeRequest->busy field: 1. The busy field is accidentally accessed outside q->lock when request submission fails. 2. Waiters on free_req_queue are not woken when a request is returned early due to submission failure. 2. Finding a free request involves

[PATCH v2 6/7] block/nvme: keep BDRVNVMeState pointer in NVMeQueuePair

2020-06-17 Thread Stefan Hajnoczi
Passing around both BDRVNVMeState and NVMeQueuePair is unwieldy. Reduce the number of function arguments by keeping the BDRVNVMeState pointer in NVMeQueuePair. This will come in handly when a BH is introduced in a later patch and only one argument can be passed to it. Signed-off-by: Stefan Hajnocz

Re: [PATCH v3] block: Factor out bdrv_run_co()

2020-06-17 Thread Stefan Hajnoczi
On Thu, May 28, 2020 at 08:38:04PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 28.05.2020 18:17, Stefan Hajnoczi wrote: > > On Wed, May 20, 2020 at 05:49:01PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > We have a few bdrv_*() functions that can either spawn a new coroutine > > > and wait

Re: [PATCH 1/2] iotests: Make _filter_img_create more active

2020-06-17 Thread Max Reitz
On 17.06.20 13:46, Maxim Levitsky wrote: > On Tue, 2020-06-16 at 15:17 +0200, Max Reitz wrote: >> Right now, _filter_img_create just filters out everything that looks >> format-dependent, and applies some filename filters. That means that we >> have to add another filter line every time some forma

Re: [PATCH 1/2] iotests: Make _filter_img_create more active

2020-06-17 Thread Maxim Levitsky
On Wed, 2020-06-17 at 15:50 +0200, Max Reitz wrote: > On 17.06.20 13:46, Maxim Levitsky wrote: > > On Tue, 2020-06-16 at 15:17 +0200, Max Reitz wrote: > > > Right now, _filter_img_create just filters out everything that looks > > > format-dependent, and applies some filename filters. That means th

[PATCH v2] qcow2: Fix preallocation on images with unaligned sizes

2020-06-17 Thread Alberto Garcia
When resizing an image with qcow2_co_truncate() using the falloc or full preallocation modes the code assumes that both the old and new sizes are cluster-aligned. There are two problems with this: 1) The calculation of how many clusters are involved does not always get the right result.

Re: [PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Max Reitz
On 17.06.20 14:52, Kevin Wolf wrote: > Am 17.06.2020 um 12:48 hat Max Reitz geschrieben: >> Hi, >> >> Thomas’s report >> (https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00791.html) >> has given me a nice excuse to write this series. >> >> There are some iotests that have recently start

Re: [PATCH v2] rbd: Use RBD fast-diff for querying actual allocation

2020-06-17 Thread Yi Li
ping ? On 6/11/20, Yi Li wrote: > Since Ceph version Infernalis (9.2.0) the new fast-diff mechanism > of RBD allows for querying actual rbd image usage. > > Prior to this version there was no easy and fast way to query how > much allocation a RBD image had inside a Ceph cluster. > > To use the fa

Re: [PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Kevin Wolf
Am 17.06.2020 um 16:11 hat Max Reitz geschrieben: > On 17.06.20 14:52, Kevin Wolf wrote: > > Am 17.06.2020 um 12:48 hat Max Reitz geschrieben: > >> Hi, > >> > >> Thomas’s report > >> (https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00791.html) > >> has given me a nice excuse to write th

Re: [PATCH 0/5] iotests: Some fixes for rarely run cases

2020-06-17 Thread Max Reitz
On 17.06.20 16:19, Kevin Wolf wrote: > Am 17.06.2020 um 16:11 hat Max Reitz geschrieben: >> On 17.06.20 14:52, Kevin Wolf wrote: >>> Am 17.06.2020 um 12:48 hat Max Reitz geschrieben: Hi, Thomas’s report (https://lists.nongnu.org/archive/html/qemu-block/2020-06/msg00791.html) >>>

Re: [PATCH 1/2] iotests: Make _filter_img_create more active

2020-06-17 Thread Max Reitz
On 17.06.20 16:02, Maxim Levitsky wrote: > On Wed, 2020-06-17 at 15:50 +0200, Max Reitz wrote: >> On 17.06.20 13:46, Maxim Levitsky wrote: >>> On Tue, 2020-06-16 at 15:17 +0200, Max Reitz wrote: Right now, _filter_img_create just filters out everything that looks format-dependent, and app

Re: [PATCH v2] qcow2: Fix preallocation on images with unaligned sizes

2020-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200617140036.20311-1-be...@igalia.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 export

Re: [PATCH v2 1/4] Introduce yank feature

2020-06-17 Thread Stefan Hajnoczi
On Thu, May 21, 2020 at 04:48:06PM +0100, Daniel P. Berrangé wrote: > On Thu, May 21, 2020 at 05:42:41PM +0200, Lukas Straub wrote: > > On Thu, 21 May 2020 16:03:35 +0100 > > Stefan Hajnoczi wrote: > > > > > On Wed, May 20, 2020 at 11:05:39PM +0200, Lukas Straub wrote: > > > > +void yank_generic_

Re: [PATCH v4 0/4] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-06-17 Thread Stefan Hajnoczi
On Sat, Jun 06, 2020 at 09:30:38PM +0200, Lukas Straub wrote: > On Mon, 25 May 2020 17:44:12 +0200 > Lukas Straub wrote: > > > Hello Everyone, > > In many cases, if qemu has a network connection (qmp, migration, chardev, > > etc.) > > to some other server and that server dies or hangs, qemu hang

[PULL 06/43] qcow2: Tweak comments on qcow2_get_persistent_dirty_bitmap_size

2020-06-17 Thread Kevin Wolf
From: Eric Blake For now, we don't have persistent bitmaps in any other formats, but that might not be true in the future. Make it obvious that our incoming parameter is not necessarily a qcow2 image, and therefore is limited to just the bdrv_dirty_bitmap_* API calls (rather than probing into qc

[PULL 00/43] Block layer patches

2020-06-17 Thread Kevin Wolf
The following changes since commit 5c24bce3056ff209a1ecc50ff4b7e65b85ad8e74: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-plugin-160620-2' into staging (2020-06-16 14:57:15 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstre

[PULL 01/43] hw/ide: Make IDEDMAOps handlers take a const IDEDMA pointer

2020-06-17 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Handlers don't need to modify the IDEDMA structure. Make it const. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200512194917.15807-1-phi...@redhat.com> Acked-by: John Snow Signed-off-by: Kevin Wolf --- include/hw/ide/internal.h | 12 ++-- hw/ide/a

[PULL 02/43] icount: make dma reads deterministic

2020-06-17 Thread Kevin Wolf
From: Pavel Dovgalyuk Windows guest sometimes makes DMA requests with overlapping target addresses. This leads to the following structure of iov for the block driver: addr size1 addr size2 addr size3 It means that three adjacent disk blocks should be read into the same memory buffer. Windows do

[PULL 04/43] virtio-blk: On restart, process queued requests in the proper context

2020-06-17 Thread Kevin Wolf
From: Sergio Lopez On restart, we were scheduling a BH to process queued requests, which would run before starting up the data plane, leading to those requests being assigned and started on coroutines on the main context. This could cause requests to be wrongly processed in parallel from differe

[PULL 09/43] hw/block/nvme: remove superfluous breaks

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen These break statements was left over when commit 3036a626e9ef ("nvme: add Get/Set Feature Timestamp support") was merged. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-

[PULL 12/43] hw/block/nvme: refactor nvme_addr_read

2020-06-17 Thread Kevin Wolf
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: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-7-...@irr

[PULL 05/43] block: Refactor subdirectory recursion during make

2020-06-17 Thread Kevin Wolf
From: Eric Blake Rather than listing block/monitor from the top-level Makefile.objs, we should instead list monitor from block/Makefile.objs. Suggested-by: Kevin Wolf Fixes: bb4e58c613 Signed-off-by: Eric Blake Message-Id: <20200608173339.3244211-1-ebl...@redhat.com> Signed-off-by: Kevin Wolf

[PULL 03/43] virtio-blk: Refactor the code that processes queued requests

2020-06-17 Thread Kevin Wolf
From: Sergio Lopez Move the code that processes queued requests from virtio_blk_dma_restart_bh() to its own, non-static, function. This will allow us to call it from the virtio_blk_data_plane_start() in a future patch. Signed-off-by: Sergio Lopez Message-Id: <20200603093240.40489-2-...@redhat.c

[PULL 11/43] hw/block/nvme: use constants in identify

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-6-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- include/block/nvme.h | 8 hw/block/nvme.c | 8

[PULL 07/43] hw/block/nvme: fix pci doorbell size calculation

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen The size of the BAR is 0x1000 (main registers) + 8 bytes for each queue. Currently, the size of the BAR is calculated like so: n->reg_size = pow2ceil(0x1004 + 2 * (n->num_queues + 1) * 4); Since the 'num_queues' parameter already accounts for the admin queue, this should

[PULL 10/43] hw/block/nvme: move device parameters to separate struct

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Move device configuration parameters to separate struct to make it explicit what is configurable and what is set internally. Signed-off-by: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Message-Id: <20200609190333.

[PULL 18/43] hw/block/nvme: factor out block backend setup

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-13-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 13 ++--- 1 file changed, 10 insertions(+),

[PULL 14/43] hw/block/nvme: add max_ioqpairs device parameter

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen The num_queues device paramater has a slightly confusing meaning because it accounts for the admin queue pair which is not really optional. Secondly, it is really a maximum value of queues allowed. Add a new max_ioqpairs parameter that only accounts for I/O queue pairs, but ke

[PULL 15/43] hw/block/nvme: remove redundant cmbloc/cmbsz members

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-10-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.h | 2 -- hw/block/nvme.c | 7 ++- 2 files changed,

[PULL 20/43] hw/block/nvme: factor out namespace setup

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-15-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 46 ++

[PULL 13/43] hw/block/nvme: fix pin-based interrupt behavior

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen First, since the device only supports MSI-X or pin-based interrupt, if MSI-X is not enabled, it should not accept interrupt vectors different from 0 when creating completion queues. Secondly, the irq_status NvmeCtrl member is meant to be compared to the INTMS register, so it s

[PULL 19/43] hw/block/nvme: add namespace helpers

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Introduce some small helpers to make the next patches easier on the eye. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-14-...@irrelevant.dk> Signed-off-by: Kevin Wolf

[PULL 08/43] hw/block/nvme: rename trace events to pci_nvme

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Change the prefix of all nvme device related trace events to 'pci_nvme' to not clash with trace events from the nvme block driver. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <202006091903

[PULL 27/43] hw/block/nvme: add msix_qsize parameter

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Decouple the requested maximum number of ioqpairs (param max_ioqpairs) from the number of MSI-X interrupt vectors by introducing a new msix_qsize parameter and initialize MSI-X with that. This allows emulating a device that has fewer vectors than I/O queue pairs and also allows

[PULL 16/43] hw/block/nvme: factor out property/constraint checks

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-11-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 48 ++--

[PULL 26/43] hw/block/nvme: Verify msix_vector_use() returned value

2020-06-17 Thread Kevin Wolf
From: Philippe Mathieu-Daudé msix_vector_use() returns -EINVAL on error. Assert it won't. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200609190333.59390-21-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PULL 23/43] hw/block/nvme: factor out pmr setup

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200609190333.59390-18-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 95 ++--- 1 file changed, 51 inse

[PULL 24/43] hw/block/nvme: do cmb/pmr init as part of pci init

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200609190333.59390-19-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PULL 28/43] hw/block/nvme: verify msix_init_exclusive_bar() return value

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Pass an Error to msix_init_exclusive_bar() and check it. Signed-off-by: Klaus Jensen Message-Id: <20200609190333.59390-23-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/b

[PULL 40/43] iotests/292: data_file is unsupported

2020-06-17 Thread Kevin Wolf
From: Max Reitz Fixes: e4d7019e1a81c61de6a925c3ac5bb6e62ea21b29 Signed-off-by: Max Reitz Message-Id: <20200617104822.27525-4-mre...@redhat.com> Signed-off-by: Kevin Wolf --- tests/qemu-iotests/292 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/292 b/tests/qemu-iote

[PULL 30/43] virtio-blk: store opt_io_size with correct size

2020-06-17 Thread Kevin Wolf
From: Roman Kagan The width of opt_io_size in virtio_blk_config is 32bit. However, it's written with virtio_stw_p; this may result in value truncation, and on big-endian systems with legacy virtio in completely bogus readings in the guest. Use the appropriate accessor to store it. Signed-off-b

[PULL 17/43] hw/block/nvme: factor out device state setup

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-12-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 22 +- 1 file changed, 13 inser

[PULL 21/43] hw/block/nvme: factor out pci setup

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-16-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 30 ++ 1 file changed,

[PULL 25/43] hw/block/nvme: factor out controller identify setup

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-20-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 49 ++--

[PULL 22/43] hw/block/nvme: factor out cmb setup

2020-06-17 Thread Kevin Wolf
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch Message-Id: <20200609190333.59390-17-...@irrelevant.dk> Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 43 --- 1 f

[PULL 39/43] iotests/041: Skip test_small_target for qed

2020-06-17 Thread Kevin Wolf
From: Max Reitz qed does not support shrinking images, so the test_small_target method should be skipped to keep 041 passing. Fixes: 16cea4ee1c8e5a69a058e76f426b2e17974d8d7d Signed-off-by: Max Reitz Message-Id: <20200617104822.27525-3-mre...@redhat.com> Tested-by: Thomas Huth Signed-off-by: Ke

[PULL 32/43] qdev-properties: blocksize: use same limits in code and description

2020-06-17 Thread Kevin Wolf
From: Roman Kagan Make it easier (more visible) to maintain the limits on the blocksize properties in sync with the respective description, by using macros both in the code and in the description. Signed-off-by: Roman Kagan Reviewed-by: Eric Blake Message-Id: <20200528225516.1676602-4-rvka...@

[PULL 34/43] qdev-properties: make blocksize accept size suffixes

2020-06-17 Thread Kevin Wolf
From: Roman Kagan It appears convenient to be able to specify physical_block_size and logical_block_size using common size suffixes. Teach the blocksize property setter to interpret them. Also express the upper and lower limits in the respective units. Signed-off-by: Roman Kagan Reviewed-by:

[PULL 29/43] .gitignore: Ignore storage-daemon files

2020-06-17 Thread Kevin Wolf
From: Roman Bolshakov The files are generated. Fixes: 2af282ec51a ("qemu-storage-daemon: Add --monitor option") Cc: Kevin Wolf Signed-off-by: Roman Bolshakov Message-Id: <20200612105830.17082-1-r.bolsha...@yadro.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signe

[PULL 38/43] iotests.py: Add skip_for_formats() decorator

2020-06-17 Thread Kevin Wolf
From: Max Reitz Sometimes, we want to skip some test methods for certain formats. This decorator allows that. Signed-off-by: Max Reitz Message-Id: <20200617104822.27525-2-mre...@redhat.com> Tested-by: Thomas Huth Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 16 +

[PULL 41/43] iotests/229: data_file is unsupported

2020-06-17 Thread Kevin Wolf
From: Max Reitz Fixes: d89ac3cf305b28c024a76805a84d75c0ee1e786f Signed-off-by: Max Reitz Message-Id: <20200617104822.27525-5-mre...@redhat.com> Signed-off-by: Kevin Wolf --- tests/qemu-iotests/229 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/229 b/tests/qemu-iotest

[PULL 36/43] qdev-properties: add getter for size32 and blocksize

2020-06-17 Thread Kevin Wolf
From: Roman Kagan Add getter for size32, and use it for blocksize, too. In its human-readable branch, it reports approximate size in human-readable units next to the exact byte value, like the getter for 64bit size does. Adjust the expected test output accordingly. Signed-off-by: Roman Kagan

[PULL 31/43] block: consolidate blocksize properties consistency checks

2020-06-17 Thread Kevin Wolf
From: Roman Kagan Several block device properties related to blocksize configuration must be in certain relationship WRT each other: physical block must be no smaller than logical block; min_io_size, opt_io_size, and discard_granularity must be a multiple of a logical block. To ensure these requ

Re: [PATCH v4 2/4] block/nbd.c: Add yank feature

2020-06-17 Thread Stefan Hajnoczi
On Mon, May 25, 2020 at 05:44:26PM +0200, Lukas Straub wrote: > @@ -1395,6 +1407,15 @@ static int nbd_client_reopen_prepare(BDRVReopenState > *state, > return 0; > } > > +static void nbd_yank(void *opaque) > +{ > +BlockDriverState *bs = opaque; > +BDRVNBDState *s = (BDRVNBDState *)b

  1   2   >