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.
*/
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
---
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
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
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
---
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
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
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
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
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
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
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
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
---
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,
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
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
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
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
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
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
---
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,
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
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
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,
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
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
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
>>
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
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
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
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
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 ---
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
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:
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
---
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
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
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
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
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
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
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
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
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
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.
>
>
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
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
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:
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,
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
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
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
> > > -"""
> > > +
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,
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
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
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
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
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
75 matches
Mail list logo