Re: [Qemu-block] [Qemu-devel] [PATCH v6 00/14] Add support for io_uring

2019-07-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190719133530.28688-1-mehta.aar...@gmail.com/ Hi, This series failed build test on s390x 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: [Qemu-block] [Qemu-devel] [PATCH v6 00/14] Add support for io_uring

2019-07-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190719133530.28688-1-mehta.aar...@gmail.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

[Qemu-block] [PULL 1/1] nbd: Initialize reply on failure

2019-07-19 Thread Eric Blake
We've had two separate reports of different callers running into use of uninitialized data if s->quit is set (one detected by gcc -O3, another by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' in the wrong order. Rather than chasing down which callers need to pre-initialize repl

Re: [Qemu-block] [PATCH for-4.1 v2] nbd: Initialize reply on failure

2019-07-19 Thread Philippe Mathieu-Daudé
On 7/19/19 7:20 PM, Eric Blake wrote: > We've had two separate reports of different callers running into use > of uninitialized data if s->quit is set (one detected by gcc -O3, > another by valgrind), due to checking 'nbd_reply_is_simple(reply) || > s->quit' in the wrong order. Rather than chasing

[Qemu-block] [PATCH for-4.1 v2] nbd: Initialize reply on failure

2019-07-19 Thread Eric Blake
We've had two separate reports of different callers running into use of uninitialized data if s->quit is set (one detected by gcc -O3, another by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' in the wrong order. Rather than chasing down which callers need to pre-initialize repl

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: Initialize reply on failure

2019-07-19 Thread Philippe Mathieu-Daudé
On 7/19/19 7:15 PM, Eric Blake wrote: > On 7/19/19 10:03 AM, Eric Blake wrote: >> We've had two separate reports of a caller running into use of >> uninitialized data if s->quit is set (one detected by gcc -O3, another >> by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' >> in t

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: Initialize reply on failure

2019-07-19 Thread Eric Blake
On 7/19/19 10:03 AM, Eric Blake wrote: > We've had two separate reports of a caller running into use of > uninitialized data if s->quit is set (one detected by gcc -O3, another > by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' > in the wrong order. Rather than chasing down whi

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: Initialize reply on failure

2019-07-19 Thread Eric Blake
On 7/19/19 10:03 AM, Eric Blake wrote: > We've had two separate reports of a caller running into use of > uninitialized data if s->quit is set (one detected by gcc -O3, another > by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' > in the wrong order. Rather than chasing down whi

[Qemu-block] [PATCH v5 5/6] iotests: extended timeout under Valgrind

2019-07-19 Thread Andrey Shinkevich
As the iotests run longer under the Valgrind, the QEMU_COMM_TIMEOUT is to be increased in the test cases 028, 183 and 192 when running under the Valgrind. Suggested-by: Roman Kagan Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/028 | 6 +-

[Qemu-block] [PATCH v5 3/6] iotests: Add casenotrun report to bash tests

2019-07-19 Thread Andrey Shinkevich
The new function _casenotrun() is to be invoked if a test case cannot be run for some reason. The user will be notified by a message passed to the function. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/common.rc | 7 +++ 1 file changed, 7 insertions(+) d

[Qemu-block] [PATCH v5 4/6] iotests: Valgrind fails with nonexistent directory

2019-07-19 Thread Andrey Shinkevich
The Valgrind uses the exported variable TMPDIR and fails if the directory does not exist. Let us exclude such a test case from being run under the Valgrind and notify the user of it. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/051 | 4 1 file changed, 4

[Qemu-block] [PATCH v5 0/6] Allow Valgrind checking all QEMU processes

2019-07-19 Thread Andrey Shinkevich
In the current implementation of the QEMU bash iotests, only qemu-io processes may be run under the Valgrind, which is a useful tool for finding memory usage issues. Let's allow the common.rc bash script runing all the QEMU processes, such as qemu-kvm, qemu-img, qemu-ndb and qemu-vxhs, under the Va

[Qemu-block] [PATCH v5 6/6] iotests: extend sleeping time under Valgrind

2019-07-19 Thread Andrey Shinkevich
To synchronize the time when QEMU is running longer under the Valgrind, increase the sleeping time in the test 247. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/247 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test

[Qemu-block] [PATCH v5 1/6] iotests: allow Valgrind checking all QEMU processes

2019-07-19 Thread Andrey Shinkevich
With the '-valgrind' option, let all the QEMU processes be run under the Valgrind tool. The Valgrind own parameters may be set with its environment variable VALGRIND_OPTS, e.g. VALGRIND_OPTS="--leak-check=yes" ./check -qcow2 -valgrind or they may be listed in the Valgrind checked file ./.valgrindr

[Qemu-block] [PATCH v5 2/6] iotests: exclude killed processes from running under Valgrind

2019-07-19 Thread Andrey Shinkevich
The Valgrind tool fails to manage its termination when QEMU raises the signal SIGKILL in the multi-threaded process. The bug has been reported to the Valgrind maintainers and was registered as Bug 409141. Let's exclude such test cases from running under the Valgrind until new release of it bec

Re: [Qemu-block] [PATCH-for-4.1 v7 1/1] hw/block/pflash_cfi01: Add missing DeviceReset() handler

2019-07-19 Thread Philippe Mathieu-Daudé
Hi Laszlo, On 7/18/19 9:35 PM, Philippe Mathieu-Daudé wrote: > On 7/18/19 8:38 PM, Laszlo Ersek wrote: >> On 07/18/19 17:03, Laszlo Ersek wrote: >>> On 07/18/19 12:48, Philippe Mathieu-Daudé wrote: To avoid incoherent states when the machine resets (see but report [...]>>> (3) Using OVMF IA32

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: Initialize reply on failure

2019-07-19 Thread Eric Blake
On 7/19/19 10:53 AM, Philippe Mathieu-Daudé wrote: >> if (ret < 0) { >> +memset(reply, 0, sizeof *reply); > > I never had problem with sizeof without parenthesis, but here I find it > not easy to review. Holdover from my work on GNU coding style projects: the rationale is that you c

Re: [Qemu-block] [PATCH v6 13/14] qemu-nbd: adds option for aio engines

2019-07-19 Thread Eric Blake
On 7/19/19 8:35 AM, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > qemu-nbd.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > Missing a patch to qemu-nbd.texi to document this. > diff --git a/qemu-nbd.c b/qemu-nbd.c > index a8cb39e510..e5a71b3501 100644 > --

Re: [Qemu-block] [PATCH v6 14/14] qemu-iotest: enable testing with qemu-io aio options

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:30PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > tests/qemu-iotests/check | 14 +- > tests/qemu-iotests/common.rc | 10 ++ > 2 files changed, 23 insertions(+), 1 deletion(-) So far this patch affects qemu-io only. That

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: Initialize reply on failure

2019-07-19 Thread Philippe Mathieu-Daudé
On 7/19/19 5:03 PM, Eric Blake wrote: > We've had two separate reports of a caller running into use of > uninitialized data if s->quit is set (one detected by gcc -O3, another > by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' > in the wrong order. Rather than chasing down whic

Re: [Qemu-block] [PATCH v6 02/14] qapi/block-core: add option for io_uring

2019-07-19 Thread Eric Blake
On 7/19/19 8:35 AM, Aarushi Mehta wrote: > Only enumerates option for devices that support it > > Signed-off-by: Aarushi Mehta > Reviewed-by: Stefan Hajnoczi > --- > qapi/block-core.json | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/qapi/block-core.json b/qapi/blo

Re: [Qemu-block] [PATCH v4 7/7] block/nbd: NBDReply is used being uninitialized

2019-07-19 Thread Andrey Shinkevich
On 19/07/2019 17:44, Eric Blake wrote: > On 7/19/19 9:34 AM, Eric Blake wrote: >> On 7/19/19 4:40 AM, Andrey Shinkevich wrote: >>> In case nbd_co_receive_one_chunk() fails in >>> nbd_reply_chunk_iter_receive(), 'NBDReply reply' parameter is used in >>> the check nbd_reply_is_simple() without bein

Re: [Qemu-block] [Qemu-devel] [PATCH v6 11/14] qemu-io: adds option to use aio engine

2019-07-19 Thread Daniel P . Berrangé
On Fri, Jul 19, 2019 at 04:41:15PM +0100, Stefan Hajnoczi wrote: > On Fri, Jul 19, 2019 at 07:05:27PM +0530, Aarushi Mehta wrote: > > Use -i AIOMODE instead of -k. > > > > Signed-off-by: Aarushi Mehta > > --- > > qemu-io.c | 25 - > > 1 file changed, 16 insertions(+), 9 d

Re: [Qemu-block] [PATCH v6 12/14] qemu-img: adds option to use aio engine

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:28PM +0530, Aarushi Mehta wrote: > Use -i AIOMODE instead of -n. > > Signed-off-by: Aarushi Mehta > --- > qemu-img.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 79983772de..b7a962afff 100644 >

Re: [Qemu-block] [PATCH v4 7/7] block/nbd: NBDReply is used being uninitialized

2019-07-19 Thread Andrey Shinkevich
On 19/07/2019 18:15, Eric Blake wrote: > On 7/19/19 10:00 AM, Andrey Shinkevich wrote: >> >> >> On 19/07/2019 17:44, Eric Blake wrote: >>> On 7/19/19 9:34 AM, Eric Blake wrote: On 7/19/19 4:40 AM, Andrey Shinkevich wrote: > In case nbd_co_receive_one_chunk() fails in > nbd_reply_chun

Re: [Qemu-block] [PATCH v6 13/14] qemu-nbd: adds option for aio engines

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:29PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > qemu-nbd.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-block] [PATCH v6 11/14] qemu-io: adds option to use aio engine

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:27PM +0530, Aarushi Mehta wrote: > Use -i AIOMODE instead of -k. > > Signed-off-by: Aarushi Mehta > --- > qemu-io.c | 25 - > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/qemu-io.c b/qemu-io.c > index f64eca6940..3cee062

Re: [Qemu-block] [PATCH v6 10/14] block/io_uring: adds userspace completion polling

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:26PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > block/io_uring.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-block] [PATCH v6 07/14] blockdev: accept io_uring as option

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:23PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > blockdev.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-block] [PATCH v6 09/14] block: add trace events for io_uring

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:25PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > --- > block/io_uring.c | 22 +++--- > block/trace-events | 12 > 2 files changed, 31 insertions(+), 3 deletions(-) Trace events don't need to be a separate patch, but th

Re: [Qemu-block] [PATCH v6 08/14] block/file-posix.c: extend to use io_uring

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:24PM +0530, Aarushi Mehta wrote: > Signed-off-by: Aarushi Mehta > Reviewed-by: Maxim Levitsky > --- > block/file-posix.c | 99 -- > 1 file changed, 79 insertions(+), 20 deletions(-) Reviewed-by: Stefan Hajnoczi signatu

Re: [Qemu-block] [PATCH v4 7/7] block/nbd: NBDReply is used being uninitialized

2019-07-19 Thread Eric Blake
On 7/19/19 10:00 AM, Andrey Shinkevich wrote: > > > On 19/07/2019 17:44, Eric Blake wrote: >> On 7/19/19 9:34 AM, Eric Blake wrote: >>> On 7/19/19 4:40 AM, Andrey Shinkevich wrote: In case nbd_co_receive_one_chunk() fails in nbd_reply_chunk_iter_receive(), 'NBDReply reply' parameter is

Re: [Qemu-block] [PATCH v6 04/14] block/io_uring: implements interfaces for io_uring

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:20PM +0530, Aarushi Mehta wrote: > diff --git a/block.c b/block.c > index 29e931e217..4aa3500ad8 100644 > --- a/block.c > +++ b/block.c > @@ -844,6 +844,28 @@ static BlockdevDetectZeroesOptions > bdrv_parse_detect_zeroes(QemuOpts *opts, > return detect_zeroes; >

Re: [Qemu-block] [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place

2019-07-19 Thread Eric Blake
On 7/19/19 8:14 AM, Philippe Mathieu-Daudé wrote: > Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2: > > qobject/json-parser.c: In function ‘parse_literal’: > qobject/json-parser.c:492:24: error: this statement may fall through > [-Werror=implicit-fallthrough=] > 492 |

Re: [Qemu-block] [PATCH] nbd: Initialize reply on failure

2019-07-19 Thread Andrey Shinkevich
On 19/07/2019 18:03, Eric Blake wrote: > We've had two separate reports of a caller running into use of > uninitialized data if s->quit is set (one detected by gcc -O3, another > by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' > in the wrong order. Rather than chasing down w

[Qemu-block] [PATCH] nbd: Initialize reply on failure

2019-07-19 Thread Eric Blake
We've had two separate reports of a caller running into use of uninitialized data if s->quit is set (one detected by gcc -O3, another by valgrind), due to checking 'nbd_reply_is_simple(reply) || s->quit' in the wrong order. Rather than chasing down which callers need to pre-initialize reply, it's e

Re: [Qemu-block] [PATCH v6 02/14] qapi/block-core: add option for io_uring

2019-07-19 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 07:05:18PM +0530, Aarushi Mehta wrote: > Only enumerates option for devices that support it > > Signed-off-by: Aarushi Mehta > Reviewed-by: Stefan Hajnoczi > --- > qapi/block-core.json | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/qapi/bloc

Re: [Qemu-block] [PATCH v2] nbd: fix uninitialized variable warning

2019-07-19 Thread Eric Blake
On 7/16/19 5:07 AM, Marc-André Lureau wrote: > ../block/nbd.c: In function 'nbd_co_request': > ../block/nbd.c:745:8: error: 'local_reply.type' may be used uninitialized in > this function [-Werror=maybe-uninitialized] > if (chunk->type == NBD_REPLY_TYPE_NONE) { > ^ > ../block/nbd.c:71

Re: [Qemu-block] [PATCH v4 7/7] block/nbd: NBDReply is used being uninitialized

2019-07-19 Thread Eric Blake
On 7/19/19 9:34 AM, Eric Blake wrote: > On 7/19/19 4:40 AM, Andrey Shinkevich wrote: >> In case nbd_co_receive_one_chunk() fails in >> nbd_reply_chunk_iter_receive(), 'NBDReply reply' parameter is used in >> the check nbd_reply_is_simple() without being initialized. The iotest >> 083 does not pass

Re: [Qemu-block] [PATCH v4 7/7] block/nbd: NBDReply is used being uninitialized

2019-07-19 Thread Andrey Shinkevich
On 19/07/2019 17:34, Eric Blake wrote: > On 7/19/19 4:40 AM, Andrey Shinkevich wrote: >> In case nbd_co_receive_one_chunk() fails in >> nbd_reply_chunk_iter_receive(), 'NBDReply reply' parameter is used in >> the check nbd_reply_is_simple() without being initialized. The iotest >> 083 does not pa

Re: [Qemu-block] [PATCH v4 7/7] block/nbd: NBDReply is used being uninitialized

2019-07-19 Thread Eric Blake
On 7/19/19 4:40 AM, Andrey Shinkevich wrote: > In case nbd_co_receive_one_chunk() fails in > nbd_reply_chunk_iter_receive(), 'NBDReply reply' parameter is used in > the check nbd_reply_is_simple() without being initialized. The iotest > 083 does not pass under the Valgrind: $./check -nbd -valgrind

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Set read-zeroes on in null block driver for Valgrind

2019-07-19 Thread Andrey Shinkevich
On 19/07/2019 03:14, John Snow wrote: > > > On 7/15/19 12:06 PM, Andrey Shinkevich wrote: >> The Valgrind tool reports about the uninitialised buffer 'buf' >> instantiated on the stack of the function guess_disk_lchs(). >> Pass 'read-zeroes=on' to the null block driver to make it deterministic.

[Qemu-block] [PULL 13/13] iotests: Test quitting with job on throttled node

2019-07-19 Thread Kevin Wolf
From: Max Reitz When qemu quits, all throttling should be ignored. That means, if there is a mirror job running from a throttled node, it should be cancelled immediately and qemu close without blocking. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/218 | 55 ++

[Qemu-block] [PULL 11/13] iotests: Test commit with a filter on the chain

2019-07-19 Thread Kevin Wolf
From: Max Reitz Before the previous patches, the first case resulted in a failed assertion (which is noted as qemu receiving a SIGABRT in the test output), and the second usually triggered a segmentation fault. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/040

[Qemu-block] [PULL 08/13] tests: Extend commit by drained_end test

2019-07-19 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 36 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 3503ce3b69..03fa1142a1 100644 --- a/t

[Qemu-block] [PULL 07/13] block: Do not poll in bdrv_do_drained_end()

2019-07-19 Thread Kevin Wolf
From: Max Reitz We should never poll anywhere in bdrv_do_drained_end() (including its recursive callees like bdrv_drain_invoke()), because it does not cope well with graph changes. In fact, it has been written based on the postulation that no graph changes will happen in it. Instead, the caller

[Qemu-block] [PULL 10/13] iotests: Add @has_quit to vm.shutdown()

2019-07-19 Thread Kevin Wolf
From: Max Reitz If a test has issued a quit command already (which may be useful to do explicitly because the test wants to show its effects), QEMUMachine.shutdown() should not do so again. Otherwise, the VM may well return an ECONNRESET which will lead QEMUMachine.shutdown() to killing it, whic

[Qemu-block] [PULL 09/13] block: Loop unsafely in bdrv*drained_end()

2019-07-19 Thread Kevin Wolf
From: Max Reitz The graph must not change in these loops (or a QLIST_FOREACH_SAFE would not even be enough). We now ensure this by only polling once in the root bdrv_drained_end() call, so we can drop the _SAFE suffix. Doing so makes it clear that the graph must not change. Signed-off-by: Max

[Qemu-block] [PULL 02/13] block: Introduce BdrvChild.parent_quiesce_counter

2019-07-19 Thread Kevin Wolf
From: Max Reitz Commit 5cb2737e925042e6c7cd3fb0b01313950b03cddf laid out why bdrv_do_drained_end() must decrement the quiesce_counter after bdrv_drain_invoke(). It did not give a very good reason why it has to happen after bdrv_parent_drained_end(), instead only claiming symmetry to bdrv_do_drai

[Qemu-block] [PULL 12/13] vl: Drain before (block) job cancel when quitting

2019-07-19 Thread Kevin Wolf
From: Max Reitz If the main loop cancels all block jobs while the block layer is not drained, this cancelling may not happen instantaneously. We can start a drained section before vm_shutdown(), which entails another bdrv_drain_all(); this nested bdrv_drain_all() will thus be a no-op, basically.

[Qemu-block] [PULL 05/13] block: Make bdrv_parent_drained_[^_]*() static

2019-07-19 Thread Kevin Wolf
From: Max Reitz These functions are not used outside of block/io.c, there is no reason why they should be globally available. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- include/block/block.h | 18 -- block/io.c| 8 2 files changed, 4 insertion

[Qemu-block] [PULL 06/13] tests: Lock AioContexts in test-block-iothread

2019-07-19 Thread Kevin Wolf
From: Max Reitz When changing a node's AioContext, the caller must acquire the old AioContext (unless it currently runs in that old context). Therefore, unless the node currently is in the main context, we always have to acquire the old context around calls that may change a node's AioContext.

[Qemu-block] [PULL 04/13] block: Add @drained_end_counter

2019-07-19 Thread Kevin Wolf
From: Max Reitz Callers can now pass a pointer to an integer that bdrv_drain_invoke() (and its recursive callees) will increment for every bdrv_drain_invoke_entry() operation they schedule. bdrv_drain_invoke_entry() in turn will decrement it once it has invoked BlockDriver.bdrv_co_drain_end(). W

[Qemu-block] [PULL 00/13] Block layer patches

2019-07-19 Thread Kevin Wolf
The following changes since commit 0274f45bdef73283f2c213610f11d4e5dcba43b6: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging (2019-07-19 09:44:43 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstrea

[Qemu-block] [PULL 01/13] iotests: Set read-zeroes on in null block driver for Valgrind

2019-07-19 Thread Kevin Wolf
From: Andrey Shinkevich The Valgrind tool reports about the uninitialised buffer 'buf' instantiated on the stack of the function guess_disk_lchs(). Pass 'read-zeroes=on' to the null block driver to make it deterministic. The output of the tests 051, 186 and 227 now includes the parameter 'read-ze

[Qemu-block] [PULL 03/13] tests: Add job commit by drained_end test

2019-07-19 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 119 1 file changed, 119 insertions(+) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 12e2ecf517..3503ce3b69 100644 --- a/tests/test-

[Qemu-block] [PATCH v6 12/14] qemu-img: adds option to use aio engine

2019-07-19 Thread Aarushi Mehta
Use -i AIOMODE instead of -n. Signed-off-by: Aarushi Mehta --- qemu-img.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 79983772de..b7a962afff 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4192,7 +4192,7 @@ static int img_bench(int a

[Qemu-block] [PATCH v6 08/14] block/file-posix.c: extend to use io_uring

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Maxim Levitsky --- block/file-posix.c | 99 -- 1 file changed, 79 insertions(+), 20 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 4479cc7ab4..4aa42f826f 100644 --- a/block/file-posix.

[Qemu-block] [PATCH v6 11/14] qemu-io: adds option to use aio engine

2019-07-19 Thread Aarushi Mehta
Use -i AIOMODE instead of -k. Signed-off-by: Aarushi Mehta --- qemu-io.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index f64eca6940..3cee06248e 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -130,7 +130,7 @@ static void open_h

[Qemu-block] [PATCH v6 09/14] block: add trace events for io_uring

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- block/io_uring.c | 22 +++--- block/trace-events | 12 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/block/io_uring.c b/block/io_uring.c index e8dbc388a6..e9c1dc1dc7 100644 --- a/block/io_uring.c +++ b/block/io_urin

[Qemu-block] [PATCH v6 10/14] block/io_uring: adds userspace completion polling

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- block/io_uring.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/block/io_uring.c b/block/io_uring.c index e9c1dc1dc7..de2a037151 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -237,6 +237,21 @@ static void qemu_lurin

[Qemu-block] [PATCH v6 14/14] qemu-iotest: enable testing with qemu-io aio options

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- tests/qemu-iotests/check | 14 +- tests/qemu-iotests/common.rc | 10 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index f925606cc5..2bc5bc62e2 100755 --- a/tests/qemu-

[Qemu-block] [PATCH v6 13/14] qemu-nbd: adds option for aio engines

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- qemu-nbd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index a8cb39e510..e5a71b3501 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -135,7 +135,7 @@ static void usage(const char *name) "

[Qemu-block] [PATCH v6 07/14] blockdev: accept io_uring as option

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- blockdev.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/blockdev.c b/blockdev.c index 4d141e9a1f..695b3a803b 100644 --- a/blockdev.c +++ b/blockdev.c @@ -383,13 +383,9 @@ static void extract_common_blockdev_options(QemuOpts *op

[Qemu-block] [PATCH v6 06/14] util/async: add aio interfaces for io_uring

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- util/async.c | 36 1 file changed, 36 insertions(+) diff --git a/util/async.c b/util/async.c index 8d2105729c..2e0a5e20ac 100644 --- a/util/async.c +++ b/util/async.c @@ -276,6 +276,14 @@ aio_ctx_

[Qemu-block] [PATCH v6 02/14] qapi/block-core: add option for io_uring

2019-07-19 Thread Aarushi Mehta
Only enumerates option for devices that support it Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- qapi/block-core.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 0d43d4f37c..0a3d4ae7d2 100644 --- a/qapi

[Qemu-block] [PATCH v6 04/14] block/io_uring: implements interfaces for io_uring

2019-07-19 Thread Aarushi Mehta
Aborts when sqe fails to be set as sqes cannot be returned to the ring. Adds slow path for short reads for older kernels Signed-off-by: Aarushi Mehta Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 7 + block.c | 22 +++ block/Makefile.objs | 3 + block/io_

[Qemu-block] [PATCH v6 05/14] stubs: add stubs for io_uring interface

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 1 + stubs/Makefile.objs | 1 + stubs/io_uring.c| 32 3 files changed, 34 insertions(+) create mode 100644 stubs/io_uring.c diff --git a/MAINTAINERS b/MAINTAINERS index 65

[Qemu-block] [PATCH v6 03/14] block/block: add BDRV flag for io_uring

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- include/block/block.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/block.h b/include/block/block.h index 734c9d2f76..40bd93cd0f 100644 --- a/include/block/block.h +++ b/include/block/b

[Qemu-block] [PATCH v6 01/14] configure: permit use of io_uring

2019-07-19 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- configure | 27 +++ 1 file changed, 27 insertions(+) diff --git a/configure b/configure index eb635c3b9a..b0e2e2158e 100755 --- a/configure +++ b/configure @@ -370,6 +370,7 @@ xen=

[Qemu-block] [PATCH v6 00/14] Add support for io_uring

2019-07-19 Thread Aarushi Mehta
This patch series adds support for the newly developed io_uring Linux AIO interface. Linux io_uring is faster than Linux's AIO asynchronous I/O code, offers efficient buffered asynchronous I/O support, the ability to do I/O without performing a system call via polled I/O, and other efficiency enha

Re: [Qemu-block] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment

2019-07-19 Thread Peter Maydell
On Fri, 19 Jul 2019 at 14:14, Philippe Mathieu-Daudé wrote: > > GCC9 is confused by this comment when building with CFLAG > -Wimplicit-fallthrough=2: > > hw/block/pflash_cfi02.c: In function ‘pflash_write’: > hw/block/pflash_cfi02.c:574:16: error: this statement may fall through > [-Werror=im

Re: [Qemu-block] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: Move switch 'fall through' comment to correct place

2019-07-19 Thread Peter Maydell
On Fri, 19 Jul 2019 at 14:14, Philippe Mathieu-Daudé wrote: > > Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2: > > CC hw/dma/omap_dma.o > hw/dma/omap_dma.c: In function ‘omap_dma_write’: > hw/dma/omap_dma.c:1532:12: error: this statement may fall through > [-Werr

Re: [Qemu-block] [PATCH 0/2] vl: Drain before (block) job cancel when quitting

2019-07-19 Thread Kevin Wolf
Am 13.06.2019 um 00:08 hat Max Reitz geschrieben: > Quitting qemu should lead to qemu exiting pretty much immediately. That > means if you have a block job running on a throttled block node, the > node should ignore its throttling and the job should be cancelled > immediately. > > Unfortunately,

[Qemu-block] [PATCH-for-4.1? 6/7] vl: Rewrite a fall through comment

2019-07-19 Thread Philippe Mathieu-Daudé
GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: vl.c: In function ‘qemu_ref_timedate’: vl.c:773:15: error: this statement may fall through [-Werror=implicit-fallthrough=] 773 | value -= rtc_realtime_clock_offset; | ~~^~~~

Re: [Qemu-block] [PATCH v3 00/10] block: Delay poll when ending drained sections

2019-07-19 Thread Kevin Wolf
Am 19.07.2019 um 11:26 hat Max Reitz geschrieben: > Hi, > > This series: > > (1) Keeps patch 1, as the previous series, and > > (2) Decides whether all *drained_end* functions should poll or not; as > proposed by Kevin, all that should not poll now get a > @drained_end_counter pointer, w

[Qemu-block] [PATCH-for-4.1? 5/7] target/ppc: Rewrite a fall through comment

2019-07-19 Thread Philippe Mathieu-Daudé
GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: target/ppc/mmu_helper.c: In function ‘dump_mmu’: target/ppc/mmu_helper.c:1349:12: error: this statement may fall through [-Werror=implicit-fallthrough=] 1349 | if (ppc64_v3_radix(env_archcpu(env)))

[Qemu-block] [PATCH-for-4.1? 7/7] spapr_events: Rewrite a fall through comment

2019-07-19 Thread Philippe Mathieu-Daudé
GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: CC ppc64-softmmu/hw/ppc/spapr_rtc.o hw/ppc/spapr_events.c: In function ‘rtas_event_log_to_source’: hw/ppc/spapr_events.c:312:12: error: this statement may fall through [-Werror=implicit-fallthrough=]

[Qemu-block] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: Move switch 'fall through' comment to correct place

2019-07-19 Thread Philippe Mathieu-Daudé
Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2: CC hw/dma/omap_dma.o hw/dma/omap_dma.c: In function ‘omap_dma_write’: hw/dma/omap_dma.c:1532:12: error: this statement may fall through [-Werror=implicit-fallthrough=] 1532 | if (s->model <= omap_dma_3_1)

[Qemu-block] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment

2019-07-19 Thread Philippe Mathieu-Daudé
GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: hw/block/pflash_cfi02.c: In function ‘pflash_write’: hw/block/pflash_cfi02.c:574:16: error: this statement may fall through [-Werror=implicit-fallthrough=] 574 | if (boff == 0x55 && cmd == 0x98

[Qemu-block] [PATCH-for-4.1? 4/7] hw/ipmi: Rewrite a fall through comment

2019-07-19 Thread Philippe Mathieu-Daudé
GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: hw/ipmi/ipmi_bmc_extern.c: In function ‘addchar’: hw/ipmi/ipmi_bmc_extern.c:178:12: error: this statement may fall through [-Werror=implicit-fallthrough=] 178 | ch |= 0x10; | ~~~^~~

[Qemu-block] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9

2019-07-19 Thread Philippe Mathieu-Daudé
Trivial patches, simply rewrite the comment or move it around. Reported by Stefan here: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg01970.html Regards, Phil. Philippe Mathieu-Daudé (7): json: Move switch 'fall through' comment to correct place hw/dma/omap_dma: Move switch 'fall

[Qemu-block] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place

2019-07-19 Thread Philippe Mathieu-Daudé
Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2: qobject/json-parser.c: In function ‘parse_literal’: qobject/json-parser.c:492:24: error: this statement may fall through [-Werror=implicit-fallthrough=] 492 | case JSON_INTEGER: { |^

Re: [Qemu-block] [Qemu-devel] BDRV request fragmentation and vitio-blk write submission guarantees

2019-07-19 Thread Evgeny Yakovlev
On 19.07.2019 13:17, Stefan Hajnoczi wrote: On Thu, Jul 18, 2019 at 04:44:17PM +0300, Евгений Яковлев wrote: Hi everyone, We're currently working on implementing a qemu BDRV format driver which we are using with virtio-blk devices. I have a question concerning BDRV request fragmentation and vi

Re: [Qemu-block] Discussion: redundant process during hotplug and missed process during unplug

2019-07-19 Thread Michael S. Tsirkin
On Fri, Jul 19, 2019 at 02:35:14AM +, Zhangbo (Oscar) wrote: > Hi All: > I have 2 questions about (un)hotplug on pcie-root-port. > First Question (hotplug failure because of redundant PCI_EXP_LNKSTA_DLLLA bit > set): > during VM boot, qemu sets PCI_EXP_LNKSTA_DLLLA according to this proces

Re: [Qemu-block] [PATCH v5] LUKS: support preallocation

2019-07-19 Thread Max Reitz
On 16.07.19 18:19, Maxim Levitsky wrote: > preallocation=off and preallocation=metadata > both allocate luks header only, and preallocation=falloc/full > is passed to underlying file. > > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534951 > > Signed-off-by: Maxim Levitsky > --- > > This

Re: [Qemu-block] [Qemu-devel] BDRV request fragmentation and vitio-blk write submission guarantees

2019-07-19 Thread Stefan Hajnoczi
On Thu, Jul 18, 2019 at 04:44:17PM +0300, Евгений Яковлев wrote: > Hi everyone, > > We're currently working on implementing a qemu BDRV format driver which we > are using with virtio-blk devices. > > I have a question concerning BDRV request fragmentation and virtio-blk write > request submission

Re: [Qemu-block] [QEMU] [PATCH v5 0/8] Add Qemu to SeaBIOS LCHS interface

2019-07-19 Thread Sam Eiderman
Well, this patch introduces 3 command line parameters (“lcyls”, “lheads”, “lsecs”) to “scsi-hd” “ide-hd” and “virtio-pci-blk” so this somehow has something to do with block. This patch also adds fw_cfg interface to send these parameters to SeaBIOS. "scripts/get_maintainer.pl -f hw/nvram/fw_cfg.

Re: [Qemu-block] [PATCH v4 0/3] Few bugfixes for userspace nvme driver

2019-07-19 Thread Max Reitz
On 16.07.19 18:30, Maxim Levitsky wrote: > This is reduced version of patch series for userspace nvme driver, > that only includes the bugfixes I made. > > Best regards, > Maxim Levitsky > > Maxim Levitsky (3): > block/nvme: fix doorbell stride > block/nvme: support larger that 512 byte

[Qemu-block] [PATCH v4 0/7] Allow Valgrind checking all QEMU processes

2019-07-19 Thread Andrey Shinkevich
In the current implementation of the QEMU bash iotests, only qemu-io processes may be run under the Valgrind, which is a useful tool for finding memory usage issues. Let's allow the common.rc bash script runing all the QEMU processes, such as qemu-kvm, qemu-img, qemu-ndb and qemu-vxhs, under the Va

[Qemu-block] [PATCH v4 5/7] iotests: extended timeout under Valgrind

2019-07-19 Thread Andrey Shinkevich
As the iotests run longer under the Valgrind, the QEMU_COMM_TIMEOUT is to be increased in the test cases 028, 183 and 192 when running under the Valgrind. Suggested-by: Roman Kagan Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/028 | 6 +-

[Qemu-block] [PATCH v4 7/7] block/nbd: NBDReply is used being uninitialized

2019-07-19 Thread Andrey Shinkevich
In case nbd_co_receive_one_chunk() fails in nbd_reply_chunk_iter_receive(), 'NBDReply reply' parameter is used in the check nbd_reply_is_simple() without being initialized. The iotest 083 does not pass under the Valgrind: $./check -nbd -valgrind 083. The alternative solution is to swap the operands

[Qemu-block] [PATCH v4 3/7] iotests: Add casenotrun report to bash tests

2019-07-19 Thread Andrey Shinkevich
The new function _casenotrun() is to be invoked if a test case cannot be run for some reason. The user will be notified by a message passed to the function. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/common.rc | 7 +++ 1 file changed, 7 insertions(+) d

[Qemu-block] [PATCH v4 2/7] iotests: exclude killed processes from running under Valgrind

2019-07-19 Thread Andrey Shinkevich
The Valgrind tool fails to manage its termination when QEMU raises the signal SIGKILL in the multi-threaded process. The bug has been reported to the Valgrind maintainers and was registered as Bug 409141. Let's exclude such test cases from running under the Valgrind until new release of it bec

[Qemu-block] [PATCH v4 1/7] iotests: allow Valgrind checking all QEMU processes

2019-07-19 Thread Andrey Shinkevich
With the '-valgrind' option, let all the QEMU processes be run under the Valgrind tool. The Valgrind own parameters may be set with its environment variable VALGRIND_OPTS, e.g. VALGRIND_OPTS="--leak-check=yes" ./check -qcow2 -valgrind or they may be listed in the Valgrind checked file ./.valgrindr

[Qemu-block] [PATCH v4 6/7] iotests: extend sleeping time under Valgrind

2019-07-19 Thread Andrey Shinkevich
To synchronize the time when QEMU is running longer under the Valgrind, increase the sleeping time in the test 247. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/247 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test

[Qemu-block] [PATCH v4 4/7] iotests: Valgrind fails with nonexistent directory

2019-07-19 Thread Andrey Shinkevich
The Valgrind uses the exported variable TMPDIR and fails if the directory does not exist. Let us exclude such a test case from being run under the Valgrind and notify the user of it. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/051 | 4 1 file changed, 4

[Qemu-block] [PATCH v3 09/10] iotests: Add @has_quit to vm.shutdown()

2019-07-19 Thread Max Reitz
If a test has issued a quit command already (which may be useful to do explicitly because the test wants to show its effects), QEMUMachine.shutdown() should not do so again. Otherwise, the VM may well return an ECONNRESET which will lead QEMUMachine.shutdown() to killing it, which then turns into

[Qemu-block] [PATCH v3 08/10] block: Loop unsafely in bdrv*drained_end()

2019-07-19 Thread Max Reitz
The graph must not change in these loops (or a QLIST_FOREACH_SAFE would not even be enough). We now ensure this by only polling once in the root bdrv_drained_end() call, so we can drop the _SAFE suffix. Doing so makes it clear that the graph must not change. Signed-off-by: Max Reitz --- block/

[Qemu-block] [PATCH v3 10/10] iotests: Test commit with a filter on the chain

2019-07-19 Thread Max Reitz
Before the previous patches, the first case resulted in a failed assertion (which is noted as qemu receiving a SIGABRT in the test output), and the second usually triggered a segmentation fault. Signed-off-by: Max Reitz --- tests/qemu-iotests/040 | 40 +-

  1   2   >