Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-02 Thread Eric Blake
On 6/2/20 9:07 PM, Richard Henderson wrote: On 6/2/20 6:36 PM, Eric Blake wrote: --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -176,11 +176,9 @@ extern unsigned long reserved_va; * avoid setting bits at the top of guest addresses that might need * to be used for tags. */

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-02 Thread Richard Henderson
On 6/2/20 6:36 PM, Eric Blake wrote: > --- a/include/exec/cpu-all.h > +++ b/include/exec/cpu-all.h > @@ -176,11 +176,9 @@ extern unsigned long reserved_va; > * avoid setting bits at the top of guest addresses that might need > * to be used for tags. > */ > -#if

[PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-02 Thread Eric Blake
I'm not aware of any immediate bugs in qemu where a second runtime evalution of the arguments to MIN() or MAX() causes a problem, but proactively preventing such abuse is easier than falling prey to an unintended case down the road. At any rate, here's the conversation that sparked the current

[PATCH 7/7] python/qemu: add mypy to pipenv

2020-06-02 Thread John Snow
0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 37

[PATCH 6/7] python/qemu: Add flake8 to pipenv

2020-06-02 Thread John Snow
Versions older than 3.6.0 do not appear to work with either pylint 2.5.0 or the type hint syntax in general. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 39 ++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git

[PATCH 4/7] python/qemu: Add pipenv support

2020-06-02 Thread John Snow
pipenv is a tool used for managing virtual environments with precisely specified dependencies. It is separate from the dependencies listed in setup.py, which are (by 'best practices') not supposed to be pinned. Note that pipenv is not required to install or use this module; this is just a

[PATCH 1/7] python/qemu: create qemu.lib module

2020-06-02 Thread John Snow
move python/qemu/*.py to python/qemu/core/*.py. To create a namespace package, the 'qemu' directory itself shouldn't have module files in it. Thus, these files will go under a 'lib' package directory instead. Bolster the core/__init__.py file a little bit, Make the top-level classes and

[PATCH 5/7] python/qemu: add pylint to pipenv

2020-06-02 Thread John Snow
A bug in pylint 2.5.1 and 2.5.2 causes false positives for relative imports. This version is pinned at 2.5.0 until a fix is available. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 123 2 files changed, 124

[PATCH 0/7] python: create installable package

2020-06-02 Thread John Snow
Based-on: 20200602214528.12107-1-js...@redhat.com This series factors the python/qemu directory as an installable module. As a developer, you can install this to your virtual environment and then always have access to the classes contained within without needing to wrangle python import path

[PATCH 3/7] python/qemu: add README.rst

2020-06-02 Thread John Snow
Add a short readme that explains the package hierarchy, which will be visible while browsing the source on e.g. gitlab/github. Signed-off-by: John Snow --- python/qemu/README.rst | 8 1 file changed, 8 insertions(+) create mode 100644 python/qemu/README.rst diff --git

[PATCH 2/7] python/qemu: formalize as package

2020-06-02 Thread John Snow
NB: I am choosing Python 3.6 here. Although our minimum requirement is 3.5, this code is used only by iotests (so far) under which we have been using a minimum version of 3.6. 3.6 is being preferred here for variable type hint capability, which enables us to use mypy for this package. RFC: This

Re: [PATCH v2 00/16] python: add mypy support to python/qemu

2020-06-02 Thread John Snow
On 6/2/20 5:51 PM, Eric Blake wrote: > On 6/2/20 4:45 PM, John Snow wrote: >> Requires: 20200602194844.15258-1-js...@redhat.com > > I don't know if patchew understand that, or if it requires: > > Based-on: 20200602194844.15258-1-js...@redhat.com > >> >> This series is extracted from my

[PATCH v2 15/16] iotests.py: Adjust HMP kwargs typing

2020-06-02 Thread John Snow
mypy wants to ensure there's consistency between the kwargs arguments types and any unspecified keyword arguments. In this case, conv_keys is a bool, but the remaining keys are Any type. Mypy (correctly) infers the **kwargs type to be **Dict[str, str], which is not compatible with conv_keys: bool.

[PATCH v2 16/16] python/qemu: Add mypy type annotations

2020-06-02 Thread John Snow
These should all be purely annotations with no changes in behavior at all. You need to be in the python folder, but you should be able to confirm that these annotations are correct (or at least self-consistent) by running `mypy --strict qemu`. Signed-off-by: John Snow --- python/qemu/accel.py

[PATCH v2 14/16] python/qemu: make 'args' style arguments immutable

2020-06-02 Thread John Snow
These arguments don't need to be mutable and aren't really used as such. Clarify their types as immutable and adjust code to match where necessary. In general, It's probably best not to accept a user-defined mutable object and store it as internal object state unless there's a strong

Re: [PATCH v2 00/16] python: add mypy support to python/qemu

2020-06-02 Thread Eric Blake
On 6/2/20 4:45 PM, John Snow wrote: Requires: 20200602194844.15258-1-js...@redhat.com I don't know if patchew understand that, or if it requires: Based-on: 20200602194844.15258-1-js...@redhat.com This series is extracted from my larger series that attempted to bundle our python module as

[PATCH v2 13/16] python/machine.py: fix _popen access

2020-06-02 Thread John Snow
As always, Optional[T] causes problems with unchecked access. Add a helper that asserts the pipe is present before we attempt to talk with it. Signed-off-by: John Snow --- python/qemu/machine.py | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git

[PATCH v2 07/16] python/machine.py: Fix monitor address typing

2020-06-02 Thread John Snow
Prior to this, it's difficult for mypy to intuit what the concrete type of the monitor address is; it has difficulty inferring the type across two variables. Create _monitor_address as a property that always returns a valid address to simply static type analysis. To preserve our ability to clean

[PATCH v2 09/16] python/machine.py: Don't modify state in _base_args()

2020-06-02 Thread John Snow
Don't append to the _remove_files list during _base_args; instead do so during _launch. Rework _base_args as a @property to help facilitate this impression. This has the additional benefit of making the type of _console_address easier to analyze statically. Signed-off-by: John Snow ---

[PATCH v2 12/16] python/machine.py: Add _qmp access shim

2020-06-02 Thread John Snow
Like many other Optional[] types, it's not always a given that this object will be set. Wrap it in a type-shim that raises a meaningful error and will always return a concrete type. Signed-off-by: John Snow --- python/qemu/machine.py | 12 +--- 1 file changed, 9 insertions(+), 3

[PATCH v2 11/16] python/machine.py: use qmp.command

2020-06-02 Thread John Snow
machine.py and qmp.py both do the same thing here; refactor machine.py to use qmp.py's functionality more directly. Signed-off-by: John Snow --- python/qemu/machine.py | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/python/qemu/machine.py

[PATCH v2 10/16] python/machine.py: Handle None events in event_wait

2020-06-02 Thread John Snow
If the timeout is 0, we can get None back. Handle this explicitly. Signed-off-by: John Snow --- python/qemu/machine.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 2f12cebde40..a835b7550da 100644 ---

[PATCH v2 08/16] python/machine.py: reorder __init__

2020-06-02 Thread John Snow
Put the init arg handling all at the top, and mostly in order (deviating when one is dependent on another), and put what is effectively runtime state declaration at the bottom. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/machine.py | 29

[PATCH v2 05/16] python/qmp.py: add casts to JSON deserialization

2020-06-02 Thread John Snow
mypy and python type hints are not powerful enough to properly describe JSON messages in Python 3.6. The best we can do, generally, is describe them as Dict[str, Any]. Add casts to coerce this type for static analysis; but do NOT enforce this type at runtime in any way. Note: Python 3.8 adds a

[PATCH v2 04/16] python/qmp.py: Do not return None from cmd_obj

2020-06-02 Thread John Snow
This makes typing the qmp library difficult, as it necessitates wrapping Optional[] around the type for every return type up the stack. At some point, it becomes difficult to discern or remember why it's None instead of the expected object. Use the python exception system to tell us exactly why

[PATCH v2 06/16] python/qmp.py: add QMPProtocolError

2020-06-02 Thread John Snow
In the case that we receive a reply but are unable to understand it, use this exception name to indicate that case. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/qemu/qmp.py

[PATCH v2 02/16] iotests.py: use qemu.qmp type aliases

2020-06-02 Thread John Snow
iotests.py should use the type definitions from qmp.py instead of its own. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[PATCH v2 00/16] python: add mypy support to python/qemu

2020-06-02 Thread John Snow
Requires: 20200602194844.15258-1-js...@redhat.com This series is extracted from my larger series that attempted to bundle our python module as an installable module. These fixes don't require that, so they are being sent first as I think there's less up for debate in here. This requires my

[PATCH v2 03/16] python/qmp.py: re-absorb MonitorResponseError

2020-06-02 Thread John Snow
When I initially split this out, I considered this more of a machine error than a QMP protocol error, but I think that's misguided. Move this back to qmp.py and name it QMPResponseError. Convert qmp.command() to use this exception type. Signed-off-by: John Snow Reviewed-by: Philippe

[PATCH v2 01/16] python/qmp.py: Define common types

2020-06-02 Thread John Snow
Define some common types that we'll need to annotate a lot of other functions going forward. Signed-off-by: John Snow --- python/qemu/qmp.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/python/qemu/qmp.py b/python/qemu/qmp.py index e64b6b5faa7..8388c7b6030 100644 ---

Re: [PATCH v3 6/6] iotests: Dump QCOW2 image metadata in JSON format with qcow2.py

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 16:48, Andrey Shinkevich wrote: Represent QCOW2 metadata dumping with qcow2.py script in JSON format { "QCOW2_header_extensions": [ { "Header_extension": "Feature table", "magic": "0x6803f857", "length": 192,

Re: [PATCH v3 5/6] iotests: Dump bitmap table entries serialized in QCOW2 image

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 16:48, Andrey Shinkevich wrote: Add bitmap table info to the QCOW2 metadata dump with qcow2.py. Bitmap name bitmap-1 ... itmap tabletypeoffset size 0 serialized 0xa 65536 1 all-zeroes 0x0

Re: [PATCH v3 4/6] iotests: Dump bitmap directory info with qcow2.py

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 16:48, Andrey Shinkevich wrote: Read and dump entries from the bitmap directory of QCOW2 image with the script qcow2.py. Header extension: Bitmaps ... Bitmap name bitmap-1 flag auto bitmap_table_offset 0xf bitmap_table_size

Re: [PATCH RFC 26/32] python//machine.py: use qmp.command

2020-06-02 Thread John Snow
On 6/2/20 6:26 AM, Kevin Wolf wrote: > I think I prefer the explicit Dict[str, Any] because it doesn't end up > duplicating the default value, but I just wanted to mention that this > option exists, too. Oh, I see what's going on here now! Thanks, that's very helpful! In this case, for now, I

Re: [PATCH v3 3/6] iotests: dump bitmap extension data with qcow2.py

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 16:48, Andrey Shinkevich wrote: Add bitmap header extension data, if any, to the dump in qcow2.py. Header extension: Bitmaps magic 0x23852875 length24 nb_bitmaps2 reserved320 bitmap_directory_size

Re: [PATCH v3 2/6] iotests: move check for printable data to QcowHeaderExtension class

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 16:48, Andrey Shinkevich wrote: Let us differ binary data type from string one for the extension data variable and keep the string as the QcowHeaderExtension class member in the script qcow2.py. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best

Re: [PATCH v3 1/6] iotests: Add extension names to qcow2.py dump

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 16:48, Andrey Shinkevich wrote: Header extension: Feature table magic 0x6803f857 length192 data The change incurs modification of the output in 031, 036 and 061 test cases. Signed-off-by: Andrey Shinkevich ---

Re: [PATCH v3 6/6] iotests: Dump QCOW2 image metadata in JSON format with qcow2.py

2020-06-02 Thread Eric Blake
On 6/1/20 8:48 AM, Andrey Shinkevich wrote: Represent QCOW2 metadata dumping with qcow2.py script in JSON format { "QCOW2_header_extensions": [ { "Header_extension": "Feature table", "magic": "0x6803f857", "length": 192,

Re: [PATCH v3 5/6] iotests: Dump bitmap table entries serialized in QCOW2 image

2020-06-02 Thread Eric Blake
On 6/1/20 8:48 AM, Andrey Shinkevich wrote: Add bitmap table info to the QCOW2 metadata dump with qcow2.py. Bitmap name bitmap-1 ... itmap tabletypeoffset size Missed a character from the paste 0 serialized 0xa 65536

Re: [PATCH v3 4/6] iotests: Dump bitmap directory info with qcow2.py

2020-06-02 Thread Eric Blake
On 6/1/20 8:48 AM, Andrey Shinkevich wrote: Read and dump entries from the bitmap directory of QCOW2 image with the script qcow2.py. Header extension: Bitmaps ... Bitmap name bitmap-1 flag auto bitmap_table_offset 0xf bitmap_table_size

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
02.06.2020 20:01, Vladimir Sementsov-Ogievskiy wrote: 02.06.2020 19:38, Max Reitz wrote: On 02.06.20 18:16, Vladimir Sementsov-Ogievskiy wrote: 02.06.2020 18:46, Max Reitz wrote: On 02.06.20 16:43, Vladimir Sementsov-Ogievskiy wrote: 01.11.2019 18:25, Max Reitz wrote: Sorry for being late,

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
02.06.2020 19:38, Max Reitz wrote: On 02.06.20 18:16, Vladimir Sementsov-Ogievskiy wrote: 02.06.2020 18:46, Max Reitz wrote: On 02.06.20 16:43, Vladimir Sementsov-Ogievskiy wrote: 01.11.2019 18:25, Max Reitz wrote: Sorry for being late, I have some comments Uh, well.  Reasonable, but I

Re: [PATCH RFC 03/32] python//machine.py: remove bare except

2020-06-02 Thread John Snow
On 6/2/20 7:01 AM, Kevin Wolf wrote: > Am 14.05.2020 um 07:53 hat John Snow geschrieben: >> Catch only the timeout error; if there are other problems, allow the >> stack trace to be visible. >> >> Signed-off-by: John Snow > > Having a visible stack trace is nice, but don't we still want to

Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module

2020-06-02 Thread John Snow
On 6/2/20 6:08 AM, Kevin Wolf wrote: > Am 14.05.2020 um 07:53 hat John Snow geschrieben: >> move python/qemu/*.py to python/qemu/lib/*.py. >> >> To create a namespace package, the 'qemu' directory itself shouldn't >> have module files in it. Thus, these files will go under a 'lib' package >>

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Max Reitz
On 02.06.20 18:16, Vladimir Sementsov-Ogievskiy wrote: > 02.06.2020 18:46, Max Reitz wrote: >> On 02.06.20 16:43, Vladimir Sementsov-Ogievskiy wrote: >>> 01.11.2019 18:25, Max Reitz wrote: >>> >>> Sorry for being late, I have some comments >> >> Uh, well.  Reasonable, but I hope you don’t mind me

Re: [PATCH v7 00/14] LUKS: encryption slot management using amend interface

2020-06-02 Thread Max Reitz
On 18.05.20 14:20, Maxim Levitsky wrote: > Hi! > Here is the updated series of my patches, incorporating all the feedback I > received. You asked me on IRC what to do to get this series to move forward; considering I don’t think there were objections from anyone but me on v6, there are no

Re: [PATCH v3 3/6] iotests: dump bitmap extension data with qcow2.py

2020-06-02 Thread Eric Blake
On 6/1/20 8:48 AM, Andrey Shinkevich wrote: Add bitmap header extension data, if any, to the dump in qcow2.py. Header extension: Bitmaps magic 0x23852875 length24 nb_bitmaps2 reserved320 bitmap_directory_size

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
02.06.2020 18:46, Max Reitz wrote: On 02.06.20 16:43, Vladimir Sementsov-Ogievskiy wrote: 01.11.2019 18:25, Max Reitz wrote: Sorry for being late, I have some comments Uh, well. Reasonable, but I hope you don’t mind me having no longer having this patch fresh on my mind. The XFS kernel

Re: [PATCH v3 2/6] iotests: move check for printable data to QcowHeaderExtension class

2020-06-02 Thread Eric Blake
On 6/1/20 8:48 AM, Andrey Shinkevich wrote: Let us differ binary data type from string one for the extension data variable and keep the string as the QcowHeaderExtension class member in the script qcow2.py. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/qcow2.py | 15 ---

Re: [PATCH v3 1/6] iotests: Add extension names to qcow2.py dump

2020-06-02 Thread Eric Blake
On 6/2/20 11:05 AM, Eric Blake wrote: [I hit send too soon...] +++ b/tests/qemu-iotests/qcow2.py @@ -6,19 +6,36 @@ import string   class QcowHeaderExtension: +    QCOW2_EXT_MAGIC_BACKING_FORMAT = 0xE2792ACA +    QCOW2_EXT_MAGIC_FEATURE_TABLE = 0x6803f857 Why the inconsistency between

Re: [PATCH v6 08/20] hw/block/nvme: allow use of any valid msix vector

2020-06-02 Thread Philippe Mathieu-Daudé
On 5/28/20 5:44 PM, Philippe Mathieu-Daudé wrote: > On 5/14/20 6:45 AM, Klaus Jensen wrote: >> From: Klaus Jensen >> >> If the device uses MSI-X, any of the 2048 MSI-X interrupt vectors are >> valid. If the device is not using MSI-X, vector will and can only be >> zero at this point. >> >> Cc:

Re: [PATCH v3 1/6] iotests: Add extension names to qcow2.py dump

2020-06-02 Thread Eric Blake
On 6/1/20 8:48 AM, Andrey Shinkevich wrote: Header extension: Feature table magic 0x6803f857 length192 data The change incurs modification of the output in 031, 036 and 061 test cases. Signed-off-by: Andrey Shinkevich ---

[PATCH] hw/block/nvme: Verify msix_vector_use() returned value

2020-06-02 Thread Philippe Mathieu-Daudé
msix_vector_use() returns -EINVAL on error. Assert it won't. Signed-off-by: Philippe Mathieu-Daudé --- Notes taken while reviewing: https://www.mail-archive.com/qemu-block@nongnu.org/msg66831.html Based-on: <20200514044611.734782-1-...@irrelevant.dk> --- hw/block/nvme.c | 5 - 1 file

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Max Reitz
On 02.06.20 16:43, Vladimir Sementsov-Ogievskiy wrote: > 01.11.2019 18:25, Max Reitz wrote: > > Sorry for being late, I have some comments Uh, well. Reasonable, but I hope you don’t mind me having no longer having this patch fresh on my mind. >> The XFS kernel driver has a bug that may cause

Re: [PATCH v6 00/20] nvme: small fixes, refactoring and cleanups

2020-06-02 Thread Kevin Wolf
Am 14.05.2020 um 06:45 hat Klaus Jensen geschrieben: > From: Klaus Jensen > > Changes since v5 > > * Prefixed all patches with "hw/block/nvme" to avoid confusion with the > nvme block driver. > > * Added patch two patches: > > hw/block/nvme: fix pin-based interrupt

Re: [PATCH] virtio-blk: Disable request queuing while switching contexts

2020-06-02 Thread Stefan Hajnoczi
On Tue, Jun 02, 2020 at 03:04:33PM +0200, Kevin Wolf wrote: > Am 02.06.2020 um 14:18 hat Sergio Lopez geschrieben: > > On Tue, Jun 02, 2020 at 01:23:14PM +0200, Kevin Wolf wrote: > > > Am 02.06.2020 um 10:11 hat Sergio Lopez geschrieben: > > > > Disable request queuing while switching contexts on

Re: [PATCH] virtio-blk: Disable request queuing while switching contexts

2020-06-02 Thread Sergio Lopez
On Tue, Jun 02, 2020 at 03:04:33PM +0200, Kevin Wolf wrote: > Am 02.06.2020 um 14:18 hat Sergio Lopez geschrieben: > > On Tue, Jun 02, 2020 at 01:23:14PM +0200, Kevin Wolf wrote: > > > Am 02.06.2020 um 10:11 hat Sergio Lopez geschrieben: > > > > Disable request queuing while switching contexts on

Re: [PATCH for-4.2 v2 3/3] block/file-posix: Let post-EOF fallocate serialize

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.11.2019 18:25, Max Reitz wrote: Sorry for being late, I have some comments The XFS kernel driver has a bug that may cause data corruption for qcow2 images as of qemu commit c8bb23cbdbe32f. We can work around it by treating post-EOF fallocates as serializing up until infinity (INT64_MAX in

Re: [PATCH v6 02/12] monitor: Use getter/setter functions for cur_mon

2020-06-02 Thread Kevin Wolf
Am 28.05.2020 um 20:31 hat Eric Blake geschrieben: > On 5/28/20 10:37 AM, Kevin Wolf wrote: > > cur_mon really needs to be coroutine-local as soon as we move monitor > > command handlers to coroutines and let them yield. As a first step, just > > remove all direct accesses to cur_mon so that we

Re: [PATCH] virtio-blk: Disable request queuing while switching contexts

2020-06-02 Thread Kevin Wolf
Am 02.06.2020 um 14:18 hat Sergio Lopez geschrieben: > On Tue, Jun 02, 2020 at 01:23:14PM +0200, Kevin Wolf wrote: > > Am 02.06.2020 um 10:11 hat Sergio Lopez geschrieben: > > > Disable request queuing while switching contexts on > > > virtio_blk_data_plane_[start|stop](), preventing requests from

Re: [PATCH] virtio-blk: Disable request queuing while switching contexts

2020-06-02 Thread Sergio Lopez
On Tue, Jun 02, 2020 at 01:23:14PM +0200, Kevin Wolf wrote: > Am 02.06.2020 um 10:11 hat Sergio Lopez geschrieben: > > Disable request queuing while switching contexts on > > virtio_blk_data_plane_[start|stop](), preventing requests from getting > > queued on the wrong context. > > > > Placing

Re: [PATCH v8 5/8] qdev-properties: make blocksize accept size suffixes

2020-06-02 Thread Philippe Mathieu-Daudé
On 5/29/20 12:55 AM, Roman Kagan wrote: > It appears convenient to be able to specify physical_block_size and > logical_block_size using common size suffixes. > > Teach the blocksize property setter to interpret them. Also express the > upper and lower limits in the respective units. > >

Re: [PATCH v8 2/8] block: consolidate blocksize properties consistency checks

2020-06-02 Thread Kevin Wolf
Am 29.05.2020 um 12:56 hat Roman Kagan geschrieben: > On Fri, May 29, 2020 at 11:53:26AM +0200, Markus Armbruster wrote: > > Roman Kagan writes: > > > > > Several block device properties related to blocksize configuration must > > > be in certain relationship WRT each other: physical block must

Re: [PATCH] virtio-blk: Disable request queuing while switching contexts

2020-06-02 Thread Kevin Wolf
Am 02.06.2020 um 10:11 hat Sergio Lopez geschrieben: > Disable request queuing while switching contexts on > virtio_blk_data_plane_[start|stop](), preventing requests from getting > queued on the wrong context. > > Placing requests on the wrong context may lead to them being wrongly > accessed in

Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
26.05.2020 18:07, Philippe Mathieu-Daudé wrote: On 5/19/20 12:54 PM, Vladimir Sementsov-Ogievskiy wrote: 19.05.2020 03:27, John Snow wrote: On 5/18/20 3:33 PM, Vladimir Sementsov-Ogievskiy wrote: 18.05.2020 21:23, John Snow wrote: On 5/18/20 2:14 PM, Vladimir Sementsov-Ogievskiy wrote:

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-06-02 Thread Peter Krempa
On Tue, Jun 02, 2020 at 12:56:32 +0200, Max Reitz wrote: > On 18.05.20 18:26, Peter Krempa wrote: > > On Wed, May 13, 2020 at 16:56:10 +0200, Max Reitz wrote: > >> This command allows mapping block node names to aliases for the purpose > >> of block dirty bitmap migration. > >> > >> This way,

Re: [PATCH RFC 03/32] python//machine.py: remove bare except

2020-06-02 Thread Kevin Wolf
Am 14.05.2020 um 07:53 hat John Snow geschrieben: > Catch only the timeout error; if there are other problems, allow the > stack trace to be visible. > > Signed-off-by: John Snow Having a visible stack trace is nice, but don't we still want to kill the qemu process to be sure that it's gone

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-06-02 Thread Max Reitz
On 18.05.20 18:26, Peter Krempa wrote: > On Wed, May 13, 2020 at 16:56:10 +0200, Max Reitz wrote: >> This command allows mapping block node names to aliases for the purpose >> of block dirty bitmap migration. >> >> This way, management tools can use different node names on the source >> and

Re: [PATCH RFC 26/32] python//machine.py: use qmp.command

2020-06-02 Thread Kevin Wolf
Am 02.06.2020 um 12:18 hat Kevin Wolf geschrieben: > Am 29.05.2020 um 02:18 hat John Snow geschrieben: > > > > [...] > > > > > > > > -def qmp(self, cmd, conv_keys=True, **args): > > > -""" > > > -Invoke a QMP command and return the response dict > > > -""" > > > +

Re: [PATCH RFC 26/32] python//machine.py: use qmp.command

2020-06-02 Thread Kevin Wolf
Am 29.05.2020 um 02:18 hat John Snow geschrieben: > > [...] > > > > > -def qmp(self, cmd, conv_keys=True, **args): > > -""" > > -Invoke a QMP command and return the response dict > > -""" > > +@classmethod > > +def _qmp_args(cls, _conv_keys: bool = True,

Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module

2020-06-02 Thread Kevin Wolf
Am 14.05.2020 um 07:53 hat John Snow geschrieben: > move python/qemu/*.py to python/qemu/lib/*.py. > > To create a namespace package, the 'qemu' directory itself shouldn't > have module files in it. Thus, these files will go under a 'lib' package > directory instead. > > Bolster the

Re: [PATCH v4 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-06-02 Thread Dima Stepanov
On Sat, May 30, 2020 at 08:55:30PM -0400, Raphael Norwitz wrote: > On Thu, May 28, 2020 at 5:13 AM Dima Stepanov wrote: > > > > A socket write during vhost-user communication may trigger a disconnect > > event, calling vhost_user_blk_disconnect() and clearing all the > > vhost_dev structures

Re: [PATCH v2 00/20] backup performance: block_status + async

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 21:59, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200601181118.579-1-vsement...@virtuozzo.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can

Re: [PATCH v2 11/20] qapi: backup: add x-max-chunk and x-max-workers parameters

2020-06-02 Thread Vladimir Sementsov-Ogievskiy
01.06.2020 21:11, Vladimir Sementsov-Ogievskiy wrote: Add new parameters to configure future backup features. The patch doesn't introduce aio backup requests (so we actually have only one worker) neither requests larger than one cluster. Still, formally we satisfy these maximums anyway, so add

[PATCH] virtio-blk: Disable request queuing while switching contexts

2020-06-02 Thread Sergio Lopez
Disable request queuing while switching contexts on virtio_blk_data_plane_[start|stop](), preventing requests from getting queued on the wrong context. Placing requests on the wrong context may lead to them being wrongly accessed in parallel from different threads, potentially leading to multiple