[PULL 2/3] docs: Consistent typography for options of qemu-nbd

2022-03-21 Thread Eric Blake
Prefer the :option:`--name` form when cross-referencing other options from the qemu-nbd documentation. Signed-off-by: Eric Blake Message-Id: <20220314203818.3681277-2-ebl...@redhat.com> Reviewed-by: Daniel P. Berrangé --- docs/tools/qemu-nbd.rst | 12 ++-- 1 file changed, 6

[PULL 3/3] block/nbd.c: Fixed IO request coroutine not being wakeup when kill NBD server

2022-03-21 Thread Eric Blake
From: Rao Lei During the IO stress test, the IO request coroutine has a probability that is can't be awakened when the NBD server is killed. The GDB stack is as follows: (gdb) bt 0 0x7f2ff990cbf6 in __ppoll (fds=0x55575de85000, nfds=1, timeout=, sigmask=0x0) at

Re: [PATCH v5 18/18] iotests: make qemu_img_log and img_info_log raise on error

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 04:16:18PM -0400, John Snow wrote: > Add a `check: bool = True` parameter to both functions and make their > qemu_img() invocations raise on error by default. > > users of img_info_log: > 206, 207, 210, 211, 212, 213, 237, 242, 266, 274, 302 > > users of qemu_img_log: >

Re: [PATCH v5 17/18] iotests: remove qemu_img_pipe_and_status()

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 04:16:17PM -0400, John Snow wrote: > With the exceptional 'create' calls removed in the prior commit, change > qemu_img_log() and img_info_log() to call qemu_img() directly > instead. > > For now, allow these calls to qemu-img to return non-zero on the basis > that any

[PATCH 10/10] python: rename 'aqmp-tui' to 'qmp-tui'

2022-03-21 Thread John Snow
This is the last vestige of the "aqmp" moniker surviving in the tree; remove it. Signed-off-by: John Snow Reviewed-by: Beraldo Leal --- python/qemu/qmp/{aqmp_tui.py => qmp_tui.py} | 12 ++-- python/setup.cfg| 6 +++--- 2 files changed, 9 insertions(+), 9

[PATCH 09/10] python: rename qemu.aqmp to qemu.qmp

2022-03-21 Thread John Snow
Now that we are fully switched over to the new QMP library, move it back over the old namespace. This is being done primarily so that we may upload this package simply as "qemu.qmp" without introducing confusion over whether or not "aqmp" is a new protocol or not. The trade-off is increased

[PATCH 07/10] python: remove the old QMP package

2022-03-21 Thread John Snow
Thank you for your service! Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/PACKAGE.rst | 4 +- python/README.rst | 2 +- python/qemu/qmp/README.rst | 9 - python/qemu/qmp/__init__.py | 396

Re: [PATCH v2 0/4] iotests: finalize switch to async QMP

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022 at 4:33 PM John Snow wrote: > > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-qmp-legacy-switch-pt1b > CI: https://gitlab.com/jsnow/qemu/-/pipelines/495951187 > > This series isolates the iotests-centric changes required to switch to > the new QMP library. It doesn't

[PATCH 05/10] python/aqmp: fully separate from qmp.QEMUMonitorProtocol

2022-03-21 Thread John Snow
After this patch, qemu.aqmp.legacy.QEMUMonitorProtocol no longer inherits from qemu.qmp.QEMUMonitorProtocol. To do this, several inherited methods need to be explicitly re-defined. (Licensing: This is copying and modifying GPLv2-only code into a GPLv2-only file.) Signed-off-by: John Snow

[PATCH 04/10] python/aqmp: take QMPBadPortError and parse_address from qemu.qmp

2022-03-21 Thread John Snow
Shift these definitions over from the qmp package to the async qmp package. (Licensing: this is a lateral move, from GPLv2 (only) to GPLv2 (only)) Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/qemu/aqmp/aqmp_tui.py | 3 +--

[PATCH 02/10] python/aqmp: relicense as GPLv2+

2022-03-21 Thread John Snow
I am the sole author of all of the async QMP code (python/qemu/aqmp) with the following exceptions: python/qemu/aqmp/qmp_shell.py and python/qemu/aqmp/legacy.py were written by Luiz Capitulino (et al) and are already licensed separately as GPLv2 (only). aqmp_tui.py was written by Niteesh Babu G

[PATCH 08/10] python: re-enable pylint duplicate-code warnings

2022-03-21 Thread John Snow
With the old library gone, there's nothing duplicated in the tree, so the warning suppression can be removed. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal --- python/setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/python/setup.cfg

[PATCH 03/10] python: temporarily silence pylint duplicate-code warnings

2022-03-21 Thread John Snow
The next several commits copy some code from qemu.qmp to qemu.aqmp, then delete qemu.qmp. In the interim, to prevent test failures, the duplicate code detection needs to be silenced to prevent bisect problems with CI testing. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH 06/10] python/aqmp: copy qmp docstrings to qemu.aqmp.legacy

2022-03-21 Thread John Snow
Copy the docstrings out of qemu.qmp, adjusting them as necessary to more accurately reflect the current state of this class. (Licensing: This is copying and modifying GPLv2-only licensed docstrings into a GPLv2-only file.) Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH 01/10] python/aqmp: add explicit GPLv2 license to legacy.py

2022-03-21 Thread John Snow
The legacy.py module is heavily based on the QMP module by Luiz Capitulino (et al) which is licensed as explicit GPLv2-only. The async QMP package is currently licensed similarly, but I intend to relicense the async package to the more flexible GPLv2+. In preparation for that change, make the

[PATCH 00/10] Python: Remove synchronous QMP library

2022-03-21 Thread John Snow
Based-On: <20220321203315.909411-1-js...@redhat.com> GitLab: https://gitlab.com/jsnow/qemu/-/tree/python-qmp-legacy-switch-pt1c CI: https://gitlab.com/jsnow/qemu/-/pipelines/497561638 This series finalizes swapping out the old QMP library for the new one. It's been through about two release

[PATCH v5 18/18] iotests: make qemu_img_log and img_info_log raise on error

2022-03-21 Thread John Snow
Add a `check: bool = True` parameter to both functions and make their qemu_img() invocations raise on error by default. users of img_info_log: 206, 207, 210, 211, 212, 213, 237, 242, 266, 274, 302 users of qemu_img_log: 044, 209, 274, 302, 304 iotests 242 and 266 need to use check=False for

[PATCH v2 4/4] iotests: switch to AQMP

2022-03-21 Thread John Snow
iotests is already using async QMP, but to finalize the switchover we only need to update any remaining import paths to rely solely on the new library instead. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal Acked-by: Hanna Reitz ---

[PATCH v2 3/4] iotests/mirror-top-perms: switch to AQMP

2022-03-21 Thread John Snow
We don't have to maintain compatibility with both QMP libraries anymore, so we can just remove the old exception. While we're here, take advantage of the extra fields present in the VMLaunchFailure exception that machine.py now raises. (Note: I'm leaving the logging suppression here unchanged. I

Re: [PATCH v2] MAINTAINERS: change Vladimir's email address

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 11:31:18PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 21.03.2022 23:12, Eric Blake wrote: > > On Thu, Mar 17, 2022 at 11:24:28AM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > 17.03.2022 00:36, Eric Blake wrote: > > > > On Wed, Mar 16, 2022 at 12:27:02PM +0300,

[PATCH v2 0/4] iotests: finalize switch to async QMP

2022-03-21 Thread John Snow
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-qmp-legacy-switch-pt1b CI: https://gitlab.com/jsnow/qemu/-/pipelines/495951187 This series isolates the iotests-centric changes required to switch to the new QMP library. It doesn't do a whole lot! This is a re-send just being sent for the

[PATCH v2 2/4] scripts/bench-block-job: switch to AQMP

2022-03-21 Thread John Snow
For this commit, we only need to remove accommodations for the synchronous QMP library. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal Acked-by: Hanna Reitz --- scripts/simplebench/bench_block_job.py | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v2 1/4] python/machine: permanently switch to AQMP

2022-03-21 Thread John Snow
Remove the QEMU_PYTHON_LEGACY_QMP environment variable, making the switch from sync qmp to async qmp permanent. Update exceptions and import paths as necessary. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal Acked-by: Hanna Reitz ---

Re: [PATCH v2] MAINTAINERS: change Vladimir's email address

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
21.03.2022 23:12, Eric Blake wrote: On Thu, Mar 17, 2022 at 11:24:28AM +0300, Vladimir Sementsov-Ogievskiy wrote: 17.03.2022 00:36, Eric Blake wrote: On Wed, Mar 16, 2022 at 12:27:02PM +0300, Vladimir Sementsov-Ogievskiy wrote: Old vsement...@virtuozzo.com is not accessible anymore.

[PATCH v5 14/18] iotests: remove remaining calls to qemu_img_pipe()

2022-03-21 Thread John Snow
As part of moving all python iotest invocations of qemu-img onto a single qemu_img() implementation, remove a few lingering uses of qemu_img_pipe() from outside of iotests.py itself. Several cases here rely on the knowledge that qemu_img_pipe() suppresses *all* output on a successful case when

[PATCH v5 12/18] iotests: replace unchecked calls to qemu_img_pipe()

2022-03-21 Thread John Snow
qemu_img_pipe() discards the return code from qemu-img in favor of returning just its output. Some tests using this function don't save, log, or check the output either, though, which is unsafe. Replace all of these calls with a checked version. Tests affected are 194, 202, 203, 234, 262, and

[PATCH v5 17/18] iotests: remove qemu_img_pipe_and_status()

2022-03-21 Thread John Snow
With the exceptional 'create' calls removed in the prior commit, change qemu_img_log() and img_info_log() to call qemu_img() directly instead. For now, allow these calls to qemu-img to return non-zero on the basis that any unusual output will be logged anyway. The very next commit begins to

[PATCH v5 15/18] iotests: use qemu_img() in has_working_luks()

2022-03-21 Thread John Snow
Admittedly a mostly lateral move, but qemu_img() is essentially the replacement for qemu_img_pipe_and_status(). It will give slightly better diagnostics on crash. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 18 +- 1 file changed, 9

[PATCH v5 07/18] iotests: use qemu_img_json() when applicable

2022-03-21 Thread John Snow
qemu_img_json() gives better diagnostic information on failure. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[PATCH v5 16/18] iotests: replace qemu_img_log('create', ...) calls

2022-03-21 Thread John Snow
qemu_img_log() calls into qemu_img_pipe(), which always removes output for 'create' commands on success anyway. Replace all of these calls to the simpler qemu_img_create(...) which doesn't log, but raises a detailed exception object on failure instead. Blank lines are removed from output files

[PATCH v5 13/18] iotests/149: Remove qemu_img_pipe() call

2022-03-21 Thread John Snow
qemu_img_pipe calls blank their output when the command being run is a 'create' call and the command succeeds. Thus, the normative output for this command in iotest 149 is to print a blank line. We can remove the logging from this invocation and use a checked invocation, but we still need to

[PATCH v5 03/18] iotests: Remove explicit checks for qemu_img() == 0

2022-03-21 Thread John Snow
qemu_img() returning zero ought to be the rule, not the exception. Remove all explicit checks against the condition in preparation for making non-zero returns an Exception. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz --- tests/qemu-iotests/163

[PATCH v5 10/18] iotests: add qemu_img_map() function

2022-03-21 Thread John Snow
Add a qemu_img_map() function by analogy with qemu_img_measure(), qemu_img_check(), and qemu_img_info() that all return JSON information. Replace calls to qemu_img_pipe('map', '--output=json', ...) with this new function, which provides better diagnostic information on failure. Note: The output

[PATCH v5 11/18] iotests: change supports_quorum to use qemu_img

2022-03-21 Thread John Snow
Similar to other recent changes: use the qemu_img() invocation that supports throwing loud, nasty exceptions when it fails for surprising reasons. (Why would "--help" ever fail? I don't know, but eliminating *all* calls to qemu-img that do not go through qemu_img() is my goal, so qemu_img_pipe()

[PATCH v5 08/18] iotests: add qemu_img_info()

2022-03-21 Thread John Snow
Add qemu_img_info() by analogy with qemu_img_measure() and qemu_img_check(). Modify image_size() to use this function instead to take advantage of the better diagnostic information on failure provided (ultimately) by qemu_img(). Signed-off-by: John Snow Reviewed-by: Hanna Reitz ---

[PATCH v5 04/18] iotests: make qemu_img raise on non-zero rc by default

2022-03-21 Thread John Snow
re-write qemu_img() as a function that will by default raise a VerboseProcessException (extended from CalledProcessException) on non-zero return codes. This will produce a stack trace that will show the command line arguments and return code from the failed process run. Users that want something

[PATCH v5 09/18] iotests/remove-bitmap-from-backing: use qemu_img_info()

2022-03-21 Thread John Snow
This removes two more usages of qemu_img_pipe() and replaces them with calls to qemu_img(), which provides better diagnostic information on failure. Signed-off-by: John Snow Reviewed-by: Hanna Reitz --- tests/qemu-iotests/tests/remove-bitmap-from-backing | 6 +++--- 1 file changed, 3

[PATCH v5 06/18] iotests: add qemu_img_json()

2022-03-21 Thread John Snow
qemu_img_json() is a new helper built on top of qemu_img() that tries to pull a valid JSON document out of the stdout stream. In the event that the return code is negative (the program crashed), or the code is greater than zero and did not produce valid JSON output, the VerboseProcessError raised

[PATCH v5 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread John Snow
V5 hotfix: - Quote the subprocess.CompletedProcess[str] type annotations, Python 3.6 chokes on them at runtime :( - Reduce line length in the text decoration fn, even though check-patch still doesn't like it. - Reflow docstring for qemu_img.* V5 CI:

[PATCH v5 02/18] python/utils: add VerboseProcessError

2022-03-21 Thread John Snow
This adds an Exception that extends the Python stdlib subprocess.CalledProcessError. The difference is that the str() method of this exception also adds the stdout/stderr logs. In effect, if this exception goes unhandled, Python will print the output in a visually distinct wrapper to the terminal

[PATCH v5 05/18] iotests: fortify compare_images() against crashes

2022-03-21 Thread John Snow
Fortify compare_images() to be more discerning about the status codes it receives. If qemu_img() returns an exit code that implies it didn't actually perform the comparison, treat that as an exceptional circumstance and force the caller to be aware of the peril. If a negative test is desired

[PATCH v5 01/18] python/utils: add add_visual_margin() text decoration utility

2022-03-21 Thread John Snow
>>> print(add_visual_margin(msg, width=72, name="Commit Message")) ┏━ Commit Message ━━ ┃ add_visual_margin() takes a chunk of text and wraps it in a visual ┃ container that force-wraps to a specified width. An optional title ┃ label may be

Re: [PATCH v2] MAINTAINERS: change Vladimir's email address

2022-03-21 Thread Eric Blake
On Thu, Mar 17, 2022 at 11:24:28AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 17.03.2022 00:36, Eric Blake wrote: > > On Wed, Mar 16, 2022 at 12:27:02PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > Old vsement...@virtuozzo.com is not accessible anymore. > > > > > > Signed-off-by:

Re: [PATCH 15/15] iotests: make qemu_io_log() check return codes by default

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022 at 2:22 PM Eric Blake wrote: > > On Fri, Mar 18, 2022 at 04:36:55PM -0400, John Snow wrote: > > Just like qemu_img_log(), upgrade qemu_io_log() to enforce a return code > > of zero by default. > > > > Affected tests: 242 245 255 274 303 307 nbd-reconnect-on-open > > > >

Re: [PATCH 14/15] iotests: remove qemu_io_silent() and qemu_io_silent_check().

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022 at 2:16 PM Eric Blake wrote: > > On Fri, Mar 18, 2022 at 04:36:54PM -0400, John Snow wrote: > > Like qemu-img, qemu-io returning 0 should be the norm and not the > > exception. Remove all calls to qemu_io_silent that just assert the > > return code is zero (That's every last

Re: [PATCH 15/15] iotests: make qemu_io_log() check return codes by default

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:55PM -0400, John Snow wrote: > Just like qemu_img_log(), upgrade qemu_io_log() to enforce a return code > of zero by default. > > Affected tests: 242 245 255 274 303 307 nbd-reconnect-on-open > > Signed-off-by: John Snow > --- > tests/qemu-iotests/iotests.py

Re: [PATCH 14/15] iotests: remove qemu_io_silent() and qemu_io_silent_check().

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:54PM -0400, John Snow wrote: > Like qemu-img, qemu-io returning 0 should be the norm and not the > exception. Remove all calls to qemu_io_silent that just assert the > return code is zero (That's every last call, as it turns out), and > replace them with a normal

Re: [PATCH 13/15] iotests: remove qemu_io_pipe_and_status()

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:53PM -0400, John Snow wrote: > I know we just added it, sorry. This is done in favor of qemu_io() which > *also* returns the console output and status, but with more robust error > handling on failure. > > Signed-off-by: John Snow > --- >

Re: [PATCH 12/15] iotests/migration-permissions: use assertRaises() for qemu_io() negative test

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:52PM -0400, John Snow wrote: > Modify this test to use assertRaises for its negative testing of > qemu_io. If the exception raised does not match the one we tell it to > expect, we get *that* exception unhandled. If we get no exception, we > get a unittest assertion

Re: [PULL for-7.0 0/2] Block patches

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 14:44, Stefan Hajnoczi wrote: > > On Thu, Mar 17, 2022 at 06:36:36PM +, Peter Maydell wrote: > > On Thu, 17 Mar 2022 at 16:57, Stefan Hajnoczi wrote: > > > > > > The following changes since commit > > > 1d60bb4b14601e38ed17384277aa4c30c57925d3: > > > > > > Merge tag

Re: [PATCH 10/15] iotests/245: fixup

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:50PM -0400, John Snow wrote: > (Merge with prior patch.) > > Signed-off-by: John Snow > --- > tests/qemu-iotests/242 | 2 +- > tests/qemu-iotests/245 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > Okay, now that I've looked at the fixups, and played

Re: [PATCH v3 0/4] Improve integration of iotests in the meson test harness

2022-03-21 Thread Thomas Huth
On 21/03/2022 17.14, Hanna Reitz wrote: On 23.02.22 10:38, Thomas Huth wrote: Though "make check-block" is currently already run via the meson test runner, it still looks like an oddball in the output of "make check". It would be nicer if the iotests would show up like the other tests suites.

[PULL 6/8] hw/sd/sdhci: Honor failed DMA transactions

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé DMA transactions might fail. The DMA API returns a MemTxResult, indicating such failures. Do not ignore it. On failure, raise the ADMA error flag and eventually triggering an IRQ (see spec chapter 1.13.5: "ADMA2 States"). Signed-off-by: Philippe Mathieu-Daudé

[PULL 5/8] tests/qtest/intel-hda-test: Add reproducer for issue #542

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Include the qtest reproducer provided by Alexander Bulekov in https://gitlab.com/qemu-project/qemu/-/issues/542. Without the previous commit, we get: $ make check-qtest-i386 ... Running test tests/qtest/intel-hda-test AddressSanitizer:DEADLYSIGNAL

[PULL 8/8] tests/qtest/fuzz-sdcard-test: Add reproducer for OSS-Fuzz (Issue 29225)

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Include the qtest reproducer provided by Alexander Bulekov in https://gitlab.com/qemu-project/qemu/-/issues/451. Without the previous commit, we get: $ make check-qtest-i386 ... Running test qtest-i386/fuzz-sdcard-test ==447470==ERROR: AddressSanitizer:

[PULL 7/8] hw/sd/sdhci: Prohibit DMA accesses to devices

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé The issue reported by OSS-Fuzz produces the following backtrace: ==447470==ERROR: AddressSanitizer: heap-buffer-overflow READ of size 1 at 0x6152a080 thread T0 #0 0x71766d47 in sdhci_read_dataport hw/sd/sdhci.c:474:18 #1 0x7175f139 in sdhci_read

[PULL 3/8] hw/audio/intel-hda: Do not ignore DMA overrun errors

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Per the "High Definition Audio Specification" manual (rev. 1.0a), section "3.3.30 Offset 5Dh: RIRBSTS - RIRB Status": Response Overrun Interrupt Status (RIRBOIS): Hardware sets this bit to a 1 when an overrun occurs in the RIRB. An interrupt may be generated

[PULL 4/8] hw/audio/intel-hda: Restrict DMA engine to memories (not MMIO devices)

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Issue #542 reports a reentrancy problem when the DMA engine accesses the HDA controller I/O registers. Fix by restricting the DMA engine to memories regions (forbidding MMIO devices such the HDA controller). Reported-by: OSS-Fuzz (Issue 28435) Reported-by: Alexander

[PULL 2/8] softmmu/physmem: Introduce MemTxAttrs::memory field and MEMTX_ACCESS_ERROR

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Add the 'memory' bit to the memory attributes to restrict bus controller accesses to memories. Introduce flatview_access_allowed() to check bus permission before running any bus transaction. Have read/write accessors return MEMTX_ACCESS_ERROR if an access is

[PULL 0/8] Fix CVE-2021-3611 and heap overflow in sdhci code

2022-03-21 Thread Thomas Huth
The following changes since commit 2058fdbe81e2985c226a026851dd26b146d3395c: Merge tag 'fixes-20220318-pull-request' of git://git.kraxel.org/qemu into staging (2022-03-19 11:28:54 +) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2022-03-21

[PULL 1/8] softmmu/physmem: Simplify flatview_write and address_space_access_valid

2022-03-21 Thread Thomas Huth
From: Philippe Mathieu-Daudé Remove unuseful local 'result' variables. Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20211215182421.418374-3-phi...@redhat.com>

Re: [PATCH 06/15] iotests: rebase qemu_io() on top of qemu_tool()

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022, 11:29 AM Eric Blake wrote: > On Fri, Mar 18, 2022 at 04:36:46PM -0400, John Snow wrote: > > Rework qemu_io() to be analogous to qemu_img(); a function that requires > > a return code of zero by default unless disabled explicitly. > > > > Tests that use qemu_io(): > > 030

Re: comparison of coroutine backends

2022-03-21 Thread Daniel P . Berrangé
On Fri, Mar 18, 2022 at 09:48:37AM +0100, Paolo Bonzini wrote: > Hi all, > > based on the previous discussions here is a comparison of the various > possibilities for implementing coroutine backends in QEMU and the > respective advantages and disadvantages. > > I'm adding a third possibility for

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Thomas Huth
On 21/03/2022 14.11, Hanna Reitz wrote: On 21.03.22 10:17, Thomas Huth wrote: On 21/03/2022 10.06, Hanna Reitz wrote: On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not

Re: [PATCH] tests/qemu-iotests/testrunner: Supply a test plan in TAP mode

2022-03-21 Thread Hanna Reitz
On 23.02.22 10:58, Thomas Huth wrote: Quoting the TAP specification: "The plan tells how many tests will be run [...]. It’s a check that the test file hasn’t stopped prematurely." That's a good idea of course, so let's support that in the iotest testrunner, too. Signed-off-by: Thomas Huth ---

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread Hanna Reitz
On 21.03.22 17:23, John Snow wrote: On Mon, Mar 21, 2022, 11:50 AM Hanna Reitz wrote: On 21.03.22 14:14, Hanna Reitz wrote: > On 18.03.22 22:14, John Snow wrote: >> On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: >>> On 18.03.22 00:49, John Snow wrote: Hiya!

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022, 11:50 AM Hanna Reitz wrote: > On 21.03.22 14:14, Hanna Reitz wrote: > > On 18.03.22 22:14, John Snow wrote: > >> On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: > >>> On 18.03.22 00:49, John Snow wrote: > Hiya! > > This series effectively replaces

Re: [PATCH v3 0/4] Improve integration of iotests in the meson test harness

2022-03-21 Thread Hanna Reitz
On 23.02.22 10:38, Thomas Huth wrote: Though "make check-block" is currently already run via the meson test runner, it still looks like an oddball in the output of "make check". It would be nicer if the iotests would show up like the other tests suites. My original plan was to add each iotests

Re: [PATCH 05/15] iotests: create generic qemu_tool() function

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022, 11:13 AM Eric Blake wrote: > On Fri, Mar 18, 2022 at 04:36:45PM -0400, John Snow wrote: > > reimplement qemu_img() in terms of qemu_tool() in preparation for doing > > the same with qemu_io(). > > > > Signed-off-by: John Snow > > --- > > tests/qemu-iotests/iotests.py | 37

Re: [PATCH v3 3/4] tests/qemu-iotests: Move the bash and sanitizer checks to meson.build

2022-03-21 Thread Hanna Reitz
On 23.02.22 10:38, Thomas Huth wrote: We want to get rid of check-block.sh in the long run, so let's move the checks for the bash version and sanitizers from check-block.sh into the meson.build file instead. Signed-off-by: Thomas Huth --- tests/check-block.sh | 26

Re: [PATCH v4 10/18] iotests: add qemu_img_map() function

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022, 10:24 AM Eric Blake wrote: > On Thu, Mar 17, 2022 at 07:49:29PM -0400, John Snow wrote: > > Add a qemu_img_map() function by analogy with qemu_img_measure(), > > qemu_img_check(), and qemu_img_info() that all return JSON information. > > > > Replace calls to

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
09.03.2022 16:26, Emanuele Giuseppe Esposito wrote: Am 02/03/2022 um 12:07 schrieb Vladimir Sementsov-Ogievskiy: 01.03.2022 17:21, Emanuele Giuseppe Esposito wrote: This serie tries to provide a proof of concept and a clear explanation on why we need to use drains (and more precisely

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread Hanna Reitz
On 21.03.22 14:14, Hanna Reitz wrote: On 18.03.22 22:14, John Snow wrote: On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: On 18.03.22 00:49, John Snow wrote: Hiya! This series effectively replaces qemu_img_pipe_and_status() with a rewritten function named qemu_img() that raises an

Re: [PATCH 06/15] iotests: rebase qemu_io() on top of qemu_tool()

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:46PM -0400, John Snow wrote: > Rework qemu_io() to be analogous to qemu_img(); a function that requires > a return code of zero by default unless disabled explicitly. > > Tests that use qemu_io(): > 030 040 041 044 055 056 093 124 129 132 136 148 149 151 152 163 165

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
09.03.2022 16:26, Emanuele Giuseppe Esposito wrote: Am 02/03/2022 um 12:07 schrieb Vladimir Sementsov-Ogievskiy: 01.03.2022 17:21, Emanuele Giuseppe Esposito wrote: This serie tries to provide a proof of concept and a clear explanation on why we need to use drains (and more precisely

Re: [PATCH 05/15] iotests: create generic qemu_tool() function

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:45PM -0400, John Snow wrote: > reimplement qemu_img() in terms of qemu_tool() in preparation for doing > the same with qemu_io(). > > Signed-off-by: John Snow > --- > tests/qemu-iotests/iotests.py | 37 +++ > 1 file changed, 24

Re: [PATCH 04/15] iotests/040: Don't check image pattern on zero-length image

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:44PM -0400, John Snow wrote: > qemu-io fails on read/write with zero-length raw images, so skip these > when running the zero-length image tests. On my first read, I wondered what we accomplish by rejecting zero-length reads on a zero-length image, and whether

Re: [PULL for-7.0 0/2] Block patches

2022-03-21 Thread Stefan Hajnoczi
On Thu, Mar 17, 2022 at 06:36:36PM +, Peter Maydell wrote: > On Thu, 17 Mar 2022 at 16:57, Stefan Hajnoczi wrote: > > > > The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3: > > > > Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu > > into

Re: [PATCH v4 10/18] iotests: add qemu_img_map() function

2022-03-21 Thread Eric Blake
On Thu, Mar 17, 2022 at 07:49:29PM -0400, John Snow wrote: > Add a qemu_img_map() function by analogy with qemu_img_measure(), > qemu_img_check(), and qemu_img_info() that all return JSON information. > > Replace calls to qemu_img_pipe('map', '--output=json', ...) with this > new function, which

Re: [PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Yongji Xie
On Mon, Mar 21, 2022 at 9:25 PM Eric Blake wrote: > > On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote: > > This implements a VDUSE block backends based on > > the libvduse library. We can use it to export the BDSs > > for both VM and container (host) usage. > > > > The new command-line

Re: [PATCH 03/15] iotests: Don't check qemu_io() output for specific error strings

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:43PM -0400, John Snow wrote: > A forthcoming commit updates qemu_io() to raise an exception on non-zero > return by default, and changes its return type. > > In preparation, simplify some calls to qemu_io() that assert that > specific error message strings do not

Re: [PATCH 02/15] iotests/163: Fix broken qemu-io invocation

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:42PM -0400, John Snow wrote: > The 'read' commands to qemu-io were malformed, and this invocation only > worked by coincidence because the error messages were identical. Oops. > > There's no point in checking the patterning of the reference image, so > just check the

Re: [PULL for-7.0 1/2] aio-posix: fix build failure io_uring 2.2

2022-03-21 Thread Stefan Hajnoczi
On Thu, Mar 17, 2022 at 05:14:20PM +, Daniel P. Berrangé wrote: > On Thu, Mar 17, 2022 at 04:57:42PM +, Stefan Hajnoczi wrote: > > From: Haiyue Wang > > > > The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit": > >

Re: [PATCH v4 06/18] iotests: add qemu_img_json()

2022-03-21 Thread Eric Blake
On Thu, Mar 17, 2022 at 07:49:25PM -0400, John Snow wrote: > qemu_img_json() is a new helper built on top of qemu_img() that tries to > pull a valid JSON document out of the stdout stream. > > In the event that the return code is negative (the program crashed), or > the code is greater than zero

Re: [PATCH 01/15] iotests: replace calls to log(qemu_io(...)) with qemu_io_log()

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:41PM -0400, John Snow wrote: > This makes these callsites a little simpler, but the real motivation is > a forthcoming commit will change the return type of qemu_io(), so removing > users of the return value now is helpful. > > Signed-off-by: John Snow > ---

Re: [PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote: > This implements a VDUSE block backends based on > the libvduse library. We can use it to export the BDSs > for both VM and container (host) usage. > > The new command-line syntax is: > > $ qemu-storage-daemon \ > --blockdev

Re: [PATCH v2 2/3] qapi: nbd-export: allow select bitmaps by node/name pair

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 02:50:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > +++ b/qapi/block-export.json > > > @@ -6,6 +6,7 @@ > > > ## > > > { 'include': 'sockets.json' } > > > +{ 'include': 'block-core.json' } > > > > Hmm. Does this extra inclusion negatively impact

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread Hanna Reitz
On 18.03.22 22:14, John Snow wrote: On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: On 18.03.22 00:49, John Snow wrote: Hiya! This series effectively replaces qemu_img_pipe_and_status() with a rewritten function named qemu_img() that raises an exception on non-zero return code by default.

[PATCH] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2022-03-21 Thread Lu Gao
Block Size Register bits [14:12] is SDMA Buffer Boundary, it is missed in register write, but it is needed in SDMA transfer. e.g. it will be used in sdhci_sdma_transfer_multi_blocks to calculate boundary_ variables. Missing this field will cause wrong operation for different SDMA Buffer Boundary

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Hanna Reitz
On 21.03.22 10:17, Thomas Huth wrote: On 21/03/2022 10.06, Hanna Reitz wrote: On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not logged to the console anymore. To get

Re: [PATCH v5 14/15] docs: Add documentation for SR-IOV and Virtualization Enhancements

2022-03-21 Thread Lukasz Maniak
On Tue, Mar 01, 2022 at 01:23:18PM +0100, Klaus Jensen wrote: > On Feb 17 18:45, Lukasz Maniak wrote: > > Signed-off-by: Lukasz Maniak > > Please add a short commit description as well. Otherwise, Klaus, Sorry I forgot to add the description in v6 aka v7, been really busy recently. I am going

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
17.03.2022 00:55, Emanuele Giuseppe Esposito wrote: Am 09/03/2022 um 14:26 schrieb Emanuele Giuseppe Esposito: Next, I have a problem in mind, that in past lead to a lot of iotest 30 failures. Next there were different fixes and improvements, but the core problem (as far as I understand) is

Re: [PATCH v2 2/3] qapi: nbd-export: allow select bitmaps by node/name pair

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
17.03.2022 00:28, Eric Blake wrote: On Tue, Mar 15, 2022 at 12:32:25AM +0300, Vladimir Sementsov-Ogievskiy wrote: From: Vladimir Sementsov-Ogievskiy Hi all! Current logic of relying on search through backing chain is not safe neither convenient. Sometimes it leads to necessity of extra

Re: comparison of coroutine backends

2022-03-21 Thread Stefan Hajnoczi
On Fri, Mar 18, 2022 at 09:48:37AM +0100, Paolo Bonzini wrote: > Hi all, > > based on the previous discussions here is a comparison of the various > possibilities for implementing coroutine backends in QEMU and the > respective advantages and disadvantages. > > I'm adding a third possibility for

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Thomas Huth
On 21/03/2022 10.06, Hanna Reitz wrote: On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not logged to the console anymore. To get this working again, we need to run the

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Hanna Reitz
On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not logged to the console anymore. To get this working again, we need to run the meson test runner with "--print-errorlogs"

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-21 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 04:15:33PM +0100, Peter Lieven wrote: Am 18.03.2022 um 17:47 schrieb Stefano Garzarella : On Fri, Mar 18, 2022 at 04:48:18PM +0100, Peter Lieven wrote: Am 18.03.2022 um 09:25 schrieb Stefano Garzarella : On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-21 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 02:23:18PM +0100, Ilya Dryomov wrote: On Sat, Mar 19, 2022 at 1:40 PM Ilya Dryomov wrote: On Fri, Mar 18, 2022 at 9:25 AM Stefano Garzarella wrote: > > On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven wrote: > > > > > >> Am 17.03.2022 um 17:26 schrieb Stefano

[PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Xie Yongji
This implements a VDUSE block backends based on the libvduse library. We can use it to export the BDSs for both VM and container (host) usage. The new command-line syntax is: $ qemu-storage-daemon \ --blockdev file,node-name=drive0,filename=test.img \ --export

[PATCH v3 3/6] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-03-21 Thread Xie Yongji
VDUSE [1] is a linux framework that makes it possible to implement software-emulated vDPA devices in userspace. This adds a library as a subproject to help implementing VDUSE backends in QEMU. [1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html Signed-off-by: Xie Yongji ---

  1   2   >