[PULL 13/15] block-backend: drop INT_MAX restriction from blk_check_byte_request()

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy blk_check_bytes_request is called from blk_co_do_preadv, blk_co_do_pwritev_part, blk_co_do_pdiscard and blk_co_copy_range before (maybe) calling throttle_group_co_io_limits_intercept() (which has int64_t argument) and then calling corresponding bdrv_co_

[PULL 10/15] block-backend: convert blk_co_copy_range to int64_t bytes

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Function is updated so that parameter type becomes wider, so all callers should be OK with it. Look at blk_co_copy_range() itself: bytes is passed only to blk_check_byte_request() and bdrv_co_copy_range(), which already have int64_t bytes parameter, so we are

[PULL 08/15] block-backend: drop blk_prw, use block-coroutine-wrapper

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Let's drop hand-made coroutine wrappers and use coroutine wrapper generation like in block/io.c. Now, blk_foo() functions are written in same way as blk_co_foo() ones, but wrap blk_do_foo() instead of blk_co_do_foo(). Signed-off-by: Vladimir

[PULL 09/15] block-backend: convert blk_foo wrappers to use int64_t bytes parameter

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Convert blk_pdiscard, blk_pwrite_compressed, blk_pwrite_zeroes. These are just wrappers for functions with int64_t argument, so allow passing int64_t as well. Parameter type becomes wider so all callers should be OK with it. Note that requests exceeding

[PULL 02/15] block-backend: blk_check_byte_request(): int64_t bytes

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Rename size and make it int64_t to correspond to modern block layer, which always uses int64_t for offset and bytes (not in blk layer yet, which is a task for following commits). All callers pass int or unsigned int. So, for bytes in [0, INT_MAX] nothing is

[PULL 04/15] block-backend: convert blk_co_pwritev_part to int64_t bytes

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We convert blk_do_pwritev_part() and some wrappers: blk_co_pwritev_part(), blk_co_pwritev(), blk_co_pwrite_zeroes(). All functions are converted so that the parameter type becomes wider, so all callers should be OK with it. Look at blk_do_pwritev_part() body:

[PULL 12/15] block-backend: blk_pread, blk_pwrite: rename count parameter to bytes

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy To be consistent with declarations in include/sysemu/block-backend.h. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20211006131718.214235-12-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- block/block-backend.c |

[PULL 01/15] qcow2: Silence clang -m32 compiler warning

2021-10-15 Thread Eric Blake
From: Hanna Reitz With -m32, size_t is generally only a uint32_t. That makes clang complain that in the assertion assert(qiov->size <= INT64_MAX); the range of the type of qiov->size (size_t) is too small for any of its values to ever exceed INT64_MAX. Cast qiov->size to uint64_t to

[PULL 07/15] block-coroutine-wrapper.py: support BlockBackend first argument

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20211006131718.214235-7-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- scripts/block-coroutine-wrapper.py | 12 ++-- block/coroutines.h | 3

[PULL 11/15] block-backend: convert blk_aio_ functions to int64_t bytes paramter

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy 1. Convert bytes in BlkAioEmAIOCB: aio->bytes is only passed to already int64_t interfaces, and set in blk_aio_prwv, which is updated here. 2. For all updated functions the parameter type becomes wider so callers are safe. 3. In blk_aio_prwv we only

[PULL 06/15] block-backend: rename _do_ helper functions to _co_do_

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy This is a preparation to the following commit, to use automatic coroutine wrapper generation. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20211006131718.214235-6-vsement...@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake ---

[PULL 03/15] block-backend: make blk_co_preadv() 64bit

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy For both updated functions, the type of bytes becomes wider, so all callers should be OK with it. blk_co_preadv() only passes its arguments to blk_do_preadv(). blk_do_preadv() passes bytes to: - trace_blk_co_preadv, which is updated too -

[PULL 05/15] block-backend: convert blk_co_pdiscard to int64_t bytes

2021-10-15 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy We updated blk_do_pdiscard() and its wrapper blk_co_pdiscard(). Both functions are updated so that the parameter type becomes wider, so all callers should be OK with it. Look at blk_do_pdiscard(): bytes is passed only to blk_check_byte_request() and

Re: [PULL 37/40] monitor: Tidy up find_device_state()

2021-10-15 Thread Richard Henderson
On 10/15/21 4:08 AM, Christian Borntraeger wrote: Am 13.10.21 um 11:07 schrieb Paolo Bonzini: From: Markus Armbruster Commit 6287d827d4 "monitor: allow device_del to accept QOM paths" extended find_device_state() to accept QOM paths in addition to qdev IDs.  This added a checked conversion

Re: [PATCH 04/15] pcie: Add callback preceding SR-IOV VFs update

2021-10-15 Thread Michael S. Tsirkin
On Fri, Oct 15, 2021 at 06:24:14PM +0200, Lukasz Maniak wrote: > On Wed, Oct 13, 2021 at 05:10:35AM -0400, Michael S. Tsirkin wrote: > > On Tue, Oct 12, 2021 at 06:06:46PM +0200, Lukasz Maniak wrote: > > > On Tue, Oct 12, 2021 at 03:25:12AM -0400, Michael S. Tsirkin wrote: > > > > On Thu, Oct 07,

Re: [PATCH 04/15] pcie: Add callback preceding SR-IOV VFs update

2021-10-15 Thread Lukasz Maniak
On Wed, Oct 13, 2021 at 05:10:35AM -0400, Michael S. Tsirkin wrote: > On Tue, Oct 12, 2021 at 06:06:46PM +0200, Lukasz Maniak wrote: > > On Tue, Oct 12, 2021 at 03:25:12AM -0400, Michael S. Tsirkin wrote: > > > On Thu, Oct 07, 2021 at 06:23:55PM +0200, Lukasz Maniak wrote: > > > > PCIe devices

Re: iotest 030 SIGSEGV

2021-10-15 Thread Vladimir Sementsov-Ogievskiy
15.10.2021 12:38, Paolo Bonzini wrote: On 14/10/21 18:14, Vladimir Sementsov-Ogievskiy wrote: iotest 30 failing is a long story.. And as I understand the main source of all these crashes is that we do diffreent graph modifications simultaneously from parallel block jobs. In past I sent RFC

Re: [PATCH v2 00/15] qdev: Add JSON -device

2021-10-15 Thread Kevin Wolf
Am 08.10.2021 um 15:34 hat Kevin Wolf geschrieben: > It's still a long way until we'll have QAPIfied devices, but there are > some improvements that we can already make now to make the future switch > easier. > > One important part of this is having code paths without QemuOpts, which > we want to

Re: [PATCH 4/4] configure: remove dead EXESUF variable

2021-10-15 Thread Philippe Mathieu-Daudé
On 10/15/21 15:36, Paolo Bonzini wrote: > On 15/10/21 14:38, Philippe Mathieu-Daudé wrote: >> On 10/15/21 12:07, Paolo Bonzini wrote: >>> Signed-off-by: Paolo Bonzini >>> --- >>>   .gitlab-ci.d/crossbuild-template.yml | 2 +- >>>   configure    | 3 --- >>>   2 files

Re: [PATCH 4/4] configure: remove dead EXESUF variable

2021-10-15 Thread Paolo Bonzini
On 15/10/21 14:38, Philippe Mathieu-Daudé wrote: On 10/15/21 12:07, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/crossbuild-template.yml | 2 +- configure| 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) Maybe squash in patch #2 or

Re: [PATCH v2 00/15] qdev: Add JSON -device

2021-10-15 Thread Peter Krempa
On Fri, Oct 08, 2021 at 15:34:27 +0200, Kevin Wolf wrote: > It's still a long way until we'll have QAPIfied devices, but there are > some improvements that we can already make now to make the future switch > easier. > > One important part of this is having code paths without QemuOpts, which > we

Re: [PATCH 4/4] configure: remove dead EXESUF variable

2021-10-15 Thread Philippe Mathieu-Daudé
On 10/15/21 12:07, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > .gitlab-ci.d/crossbuild-template.yml | 2 +- > configure| 3 --- > 2 files changed, 1 insertion(+), 4 deletions(-) Maybe squash in patch #2 or place as #3 mentioning "the previous commit"?

Re: Storage controller access to data

2021-10-15 Thread Kevin Wolf
Am 12.10.2021 um 19:52 hat Nada Lachtar geschrieben: > I’m working on a project that requires me to read the data being sent > to storage and it to a file for analysis. To be more specific, I’m > trying to analyze the data in the phase of being written to the > storage disk, thus, I’m trying to

Re: [PULL 37/40] monitor: Tidy up find_device_state()

2021-10-15 Thread Christian Borntraeger
Am 13.10.21 um 11:07 schrieb Paolo Bonzini: From: Markus Armbruster Commit 6287d827d4 "monitor: allow device_del to accept QOM paths" extended find_device_state() to accept QOM paths in addition to qdev IDs. This added a checked conversion to TYPE_DEVICE at the end, which duplicates the

[PATCH 4/4] configure: remove dead EXESUF variable

2021-10-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/crossbuild-template.yml | 2 +- configure| 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml index 10d22dcf6c..87cb8b7518

[PATCH 3/4] check-block: replace -makecheck with TAP output

2021-10-15 Thread Paolo Bonzini
Let "meson test" take care of showing the results of the individual tests, consistently with other output from "make check V=1". Use TAP comments so that the environment is included in the logs. Signed-off-by: Paolo Bonzini --- tests/check-block.sh | 6 ++--

[RFC PATCH 0/4] Replace custom test harness with "meson test"

2021-10-15 Thread Paolo Bonzini
Hi all, Starting with Meson 0.57, "meson test" has all features of QEMU's makefile-based harness and more. In particular, some features that were added to reach feature parity are: * print reproducer command line for each failed test right below the test * keep the output of multiple (non-TAP)

[PATCH 1/4] build: use "meson test" as the test harness

2021-10-15 Thread Paolo Bonzini
"meson test" starting with version 0.57 is just as capable and easy to use as QEMU's own TAP driver. All existing options for "make check" work. The only required code change involves how to mark "slow" tests. scripts/mtest2make.py is changed to invoke "meson test" using a trick similar to how

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

2021-10-15 Thread Paolo Bonzini
"meson test" supports can be asked to run tests verbosely. This makes it usable also for qemu-iotests's own harness. This lets "make check-block" reuse mtest2make.py's infrastructure to find and build test dependencies. In the future, it will also enable producing TAP output, for consistency

Re: [PATCH v3 02/25] include/block/block: split header into I/O and global state API

2021-10-15 Thread Emanuele Giuseppe Esposito
diff --git a/include/block/block-common.h b/include/block/block-common.h new file mode 100644 index 00..4f1fd8de21 --- /dev/null +++ b/include/block/block-common.h @@ -0,0 +1,389 @@ +#ifndef BLOCK_COMMON_H +#define BLOCK_COMMON_H As a new file, it probably deserves a copyright/license

Re: iotest 030 SIGSEGV

2021-10-15 Thread Paolo Bonzini
On 14/10/21 18:14, Vladimir Sementsov-Ogievskiy wrote: iotest 30 failing is a long story.. And as I understand the main source of all these crashes is that we do diffreent graph modifications simultaneously from parallel block jobs. In past I sent RFC series with global mutext, to fix a

Re: [PATCH v2 09/15] softmmu/qdev-monitor: add error handling in qdev_set_id

2021-10-15 Thread Kevin Wolf
Am 13.10.2021 um 23:37 hat Eric Blake geschrieben: > On Wed, Oct 13, 2021 at 03:10:38PM +0200, Damien Hedde wrote: > > > > @@ -691,7 +703,13 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error > > > > **errp) > > > > } > > > > } > > > > -qdev_set_id(dev,