Re: [PATCH v3] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2022-01-17 Thread Philippe Mathieu-Daudé via
On 1/17/22 13:51, Philippe Mathieu-Daudé wrote: > From: Philippe Mathieu-Daudé > > Since commit 292e13142d2, dma_buf_rw() returns a MemTxResult type. > Do not discard it, return it to the caller. Pass the previously > returned value (the QEMUSGList residual size, which was rarely used) > as an

Re: [PATCH v3 00/10] hw/dma: Use dma_addr_t type definition when relevant

2022-01-17 Thread Philippe Mathieu-Daudé via
On 1/11/22 19:42, Philippe Mathieu-Daudé wrote: > Philippe Mathieu-Daudé (10): > stubs: Restrict fw_cfg to system emulation > hw/nvram: Restrict fw_cfg QOM interface to sysemu and tools > hw/pci: Restrict pci-bus stub to sysemu > hw/pci: Document pci_dma_map() > hw/dma: Remove

[PATCH] hw/sd: Correct the CURRENT_STATE bits in SPI-mode response

2022-01-17 Thread frank . chang
From: Frank Chang In SPI-mode, type B ("cleared on valid command") clear condition is not supported, and as the "In idle state" bit in SPI-mode has type A ("according to current state") clear condition, the CURRENT_STATE bits in an SPI-mode response should be the SD card's state after the

Re: [PATCH v3] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2022-01-17 Thread Peter Xu
On Mon, Jan 17, 2022 at 01:51:30PM +0100, Philippe Mathieu-Daudé wrote: > From: Philippe Mathieu-Daudé > > Since commit 292e13142d2, dma_buf_rw() returns a MemTxResult type. > Do not discard it, return it to the caller. Pass the previously > returned value (the QEMUSGList residual size, which

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-17 Thread John Snow
On Mon, Jan 17, 2022 at 3:49 PM Peter Maydell wrote: > > On Mon, 17 Jan 2022 at 20:35, John Snow wrote: > > > Can you please try applying this temporary patch and running `./check > > -qcow2 040 041` until you see a breakage and show me the output from > > that? > > With this temporary patch the

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-17 Thread Peter Maydell
On Mon, 17 Jan 2022 at 20:35, John Snow wrote: > Can you please try applying this temporary patch and running `./check > -qcow2 040 041` until you see a breakage and show me the output from > that? With this temporary patch the VM doesn't launch at all:

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-17 Thread Peter Maydell
On Mon, 17 Jan 2022 at 20:35, John Snow wrote: > > On Mon, Jan 17, 2022 at 5:05 AM Kevin Wolf wrote: > > > > Am 10.01.2022 um 16:55 hat Peter Maydell geschrieben: > > > Just saw this failure of iotests in a netbsd VM > This trace says that we timed out while awaiting a connection from > QEMU

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-17 Thread John Snow
On Mon, Jan 17, 2022 at 5:05 AM Kevin Wolf wrote: > > Am 10.01.2022 um 16:55 hat Peter Maydell geschrieben: > > Just saw this failure of iotests in a netbsd VM (the in-tree > > tests/vm stuff). Pretty sure it's an intermittent as the > > pulreq being tested has nothing io or block related. > > >

Re: [PATCH v3 23/31] iotests: switch to AQMP

2022-01-17 Thread John Snow
On Fri, Jan 14, 2022 at 2:13 PM Eric Blake wrote: > > On Mon, Jan 10, 2022 at 06:29:02PM -0500, John Snow wrote: > > Simply import the type defition from the new location. > > definition > ACK > > > > Signed-off-by: John Snow > > Reviewed-by: Vladimir Sementsov-Ogievskiy > > Reviewed-by:

Re: [PATCH 1/2] block/io: Update BSC only if want_zero is true

2022-01-17 Thread Nir Soffer
On Mon, Jan 17, 2022 at 6:26 PM Hanna Reitz wrote: > > We update the block-status cache whenever we get new information from a > bdrv_co_block_status() call to the block driver. However, if we have > passed want_zero=false to that call, it may flag areas containing zeroes > as data, and so we

Re: [PATCH 2/2] iotests/block-status-cache: New test

2022-01-17 Thread Nir Soffer
On Mon, Jan 17, 2022 at 6:26 PM Hanna Reitz wrote: > > Add a new test to verify that want_zero=false block-status calls do not > pollute the block-status cache for want_zero=true calls. > > We check want_zero=true calls and their results using `qemu-img map` > (over NBD), and want_zero=false

Re: [PATCH 2/4] build: make check-block a meson test

2022-01-17 Thread Paolo Bonzini
On 1/17/22 11:09, Thomas Huth wrote: +  qemu_iotests_formats = { +    'raw': 'quick', +    'qcow2': 'slow', +    'qed': 'thorough', +    'vmdk': 'thorough', +    'vpc': 'thorough' +  } I think the default behavior for "quick" should be to test with qcow2 - most iotests require that format

Re: [PATCH 0/2] block/io: Update BSC only if want_zero is true

2022-01-17 Thread Hanna Reitz
Forgot to CC qemu-stable. On 17.01.22 17:26, Hanna Reitz wrote: Hi, As reported by Nir (https://lists.nongnu.org/archive/html/qemu-block/2022-01/msg00292.html) there’s a problem with the block-status cache, namely that it is updated when want_zero is false, but we return the result later even

[PATCH 0/2] block/io: Update BSC only if want_zero is true

2022-01-17 Thread Hanna Reitz
Hi, As reported by Nir (https://lists.nongnu.org/archive/html/qemu-block/2022-01/msg00292.html) there’s a problem with the block-status cache, namely that it is updated when want_zero is false, but we return the result later even when the caller now passes want_zero=true. In the worst case, the

[PATCH 2/2] iotests/block-status-cache: New test

2022-01-17 Thread Hanna Reitz
Add a new test to verify that want_zero=false block-status calls do not pollute the block-status cache for want_zero=true calls. We check want_zero=true calls and their results using `qemu-img map` (over NBD), and want_zero=false calls also using `qemu-img map` over NBD, but using the

[PATCH 1/2] block/io: Update BSC only if want_zero is true

2022-01-17 Thread Hanna Reitz
We update the block-status cache whenever we get new information from a bdrv_co_block_status() call to the block driver. However, if we have passed want_zero=false to that call, it may flag areas containing zeroes as data, and so we would update the block-status cache with wrong information.

Re: [PATCH V2 for-6.2 2/2] block/rbd: workaround for ceph issue #53784

2022-01-17 Thread Stefano Garzarella
On Thu, Jan 13, 2022 at 03:44:26PM +0100, Peter Lieven wrote: librbd had a bug until early 2022 that affected all versions of ceph that supported fast-diff. This bug results in reporting of incorrect offsets if the offset parameter to rbd_diff_iterate2 is not object aligned. This patch works

Re: Inconsistent block status reply in qemu-nbd in qemu-img-6.2.0

2022-01-17 Thread Hanna Reitz
On 17.01.22 12:38, Kevin Wolf wrote: Am 17.01.2022 um 10:55 hat Hanna Reitz geschrieben: On 17.01.22 10:52, Kevin Wolf wrote: Am 17.01.2022 um 09:46 hat Hanna Reitz geschrieben: On 16.01.22 19:09, Nir Soffer wrote: On Sun, Jan 16, 2022 at 1:17 PM Nir Soffer wrote: Some of our tests started

Re: [PATCH v3] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2022-01-17 Thread Philippe Mathieu-Daudé via
On 1/17/22 13:51, Philippe Mathieu-Daudé wrote: > From: Philippe Mathieu-Daudé > > Since commit 292e13142d2, dma_buf_rw() returns a MemTxResult type. > Do not discard it, return it to the caller. Pass the previously > returned value (the QEMUSGList residual size, which was rarely used) > as an

[PATCH v3] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2022-01-17 Thread Philippe Mathieu-Daudé via
From: Philippe Mathieu-Daudé Since commit 292e13142d2, dma_buf_rw() returns a MemTxResult type. Do not discard it, return it to the caller. Pass the previously returned value (the QEMUSGList residual size, which was rarely used) as an optional argument. With this new API, SCSIRequest::residual

Re: [PATCH v3 08/19] block/reqlist: add reqlist_wait_all()

2022-01-17 Thread Nikta Lapshin
On 12/22/21 20:40, Vladimir Sementsov-Ogievskiy wrote: Add function to wait for all intersecting requests. To be used in the further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/reqlist.h | 8 block/reqlist.c | 8 2 files changed, 16

Re: [PATCH v3 07/19] block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()

2022-01-17 Thread Vladimir Sementsov-Ogievskiy
17.01.2022 13:06, Nikta Lapshin wrote: On 12/22/21 20:40, Vladimir Sementsov-Ogievskiy wrote: Add a convenient function similar with bdrv_block_status() to get status of dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 2 ++

Re: Inconsistent block status reply in qemu-nbd in qemu-img-6.2.0

2022-01-17 Thread Kevin Wolf
Am 17.01.2022 um 10:55 hat Hanna Reitz geschrieben: > On 17.01.22 10:52, Kevin Wolf wrote: > > Am 17.01.2022 um 09:46 hat Hanna Reitz geschrieben: > > > On 16.01.22 19:09, Nir Soffer wrote: > > > > On Sun, Jan 16, 2022 at 1:17 PM Nir Soffer wrote: > > > > > Some of our tests started to fail since

Re: [PATCH v3 04/19] block/copy-before-write: add bitmap open parameter

2022-01-17 Thread Vladimir Sementsov-Ogievskiy
14.01.2022 20:47, Hanna Reitz wrote: On 22.12.21 18:40, Vladimir Sementsov-Ogievskiy wrote: This brings "incremental" mode to copy-before-write filter: user can specify bitmap so that filter will copy only "dirty" areas. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   qapi/block-core.json   

Re: [PATCH 2/4] build: make check-block a meson test

2022-01-17 Thread Thomas Huth
On 15/01/2022 23.21, Paolo Bonzini wrote: "meson test" can be asked to run tests verbosely; this makes it usable also for qemu-iotests's own harness, and it lets "make check-block" reuse mtest2make.py's infrastructure to find and build test dependencies. Adjust check-block.sh to use the

Re: Inconsistent block status reply in qemu-nbd in qemu-img-6.2.0

2022-01-17 Thread Nir Soffer
On Mon, Jan 17, 2022 at 10:46 AM Hanna Reitz wrote: > > On 16.01.22 19:09, Nir Soffer wrote: > > On Sun, Jan 16, 2022 at 1:17 PM Nir Soffer wrote: > >> Some of our tests started to fail since qemu-img 6.2.0 released. > >> > >> Here is an example failure: > >> > >> $ truncate -s1g

Re: [PATCH v3 07/19] block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()

2022-01-17 Thread Nikta Lapshin
On 12/22/21 20:40, Vladimir Sementsov-Ogievskiy wrote: Add a convenient function similar with bdrv_block_status() to get status of dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 11 +++

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-17 Thread Kevin Wolf
Am 10.01.2022 um 16:55 hat Peter Maydell geschrieben: > Just saw this failure of iotests in a netbsd VM (the in-tree > tests/vm stuff). Pretty sure it's an intermittent as the > pulreq being tested has nothing io or block related. > > > TEST iotest-qcow2: 036 > TEST iotest-qcow2: 037 >

Re: Inconsistent block status reply in qemu-nbd in qemu-img-6.2.0

2022-01-17 Thread Hanna Reitz
On 17.01.22 10:52, Kevin Wolf wrote: Am 17.01.2022 um 09:46 hat Hanna Reitz geschrieben: On 16.01.22 19:09, Nir Soffer wrote: On Sun, Jan 16, 2022 at 1:17 PM Nir Soffer wrote: Some of our tests started to fail since qemu-img 6.2.0 released. Here is an example failure: $ truncate -s1g

Re: Inconsistent block status reply in qemu-nbd in qemu-img-6.2.0

2022-01-17 Thread Kevin Wolf
Am 17.01.2022 um 09:46 hat Hanna Reitz geschrieben: > On 16.01.22 19:09, Nir Soffer wrote: > > On Sun, Jan 16, 2022 at 1:17 PM Nir Soffer wrote: > > > Some of our tests started to fail since qemu-img 6.2.0 released. > > > > > > Here is an example failure: > > > > > > $ truncate -s1g

Re: [PATCH v2 2/4] scripts/qapi/commands: gen_commands(): add add_trace_points argument

2022-01-17 Thread Kevin Wolf
Am 17.01.2022 um 09:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > 12.01.2022 13:50, Stefan Hajnoczi wrote: > > On Tue, Jan 11, 2022 at 07:32:52PM -0500, John Snow wrote: > > > On Tue, Jan 11, 2022 at 6:53 PM John Snow wrote: > > > > > > > > On Thu, Dec 23, 2021 at 6:08 AM Vladimir

Re: [PATCH v2 3/4] scripts/qapi-gen.py: add --add-trace-points option

2022-01-17 Thread Vladimir Sementsov-Ogievskiy
12.01.2022 03:38, John Snow wrote: On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy wrote: Add and option to generate trace points. We should generate both trace points and trace-events files for further trace point code generation. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: Inconsistent block status reply in qemu-nbd in qemu-img-6.2.0

2022-01-17 Thread Hanna Reitz
On 16.01.22 19:09, Nir Soffer wrote: On Sun, Jan 16, 2022 at 1:17 PM Nir Soffer wrote: Some of our tests started to fail since qemu-img 6.2.0 released. Here is an example failure: $ truncate -s1g /data/scratch/empty-1g.raw $ qemu-nbd -r -t -e8 -k /tmp/nbd.sock -A -f raw

Re: [PATCH v2 2/4] scripts/qapi/commands: gen_commands(): add add_trace_points argument

2022-01-17 Thread Vladimir Sementsov-Ogievskiy
10.01.2022 19:22, Stefan Hajnoczi wrote: On Thu, Dec 23, 2021 at 12:07:54PM +0100, Vladimir Sementsov-Ogievskiy wrote: Add possibility to generate trace points for each qmp command. We should generate both trace points and trace-events file, for further trace point code generation.

Re: [PATCH v2 2/4] scripts/qapi/commands: gen_commands(): add add_trace_points argument

2022-01-17 Thread Vladimir Sementsov-Ogievskiy
12.01.2022 13:50, Stefan Hajnoczi wrote: On Tue, Jan 11, 2022 at 07:32:52PM -0500, John Snow wrote: On Tue, Jan 11, 2022 at 6:53 PM John Snow wrote: On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy wrote: Add possibility to generate trace points for each qmp command. We