Re: [PATCH v5 00/12] Cadence GEM Fixes

2020-05-13 Thread Jason Wang
On 2020/5/12 下午10:54, Sai Pavan Boddu wrote: Hi, Following patch series fixes issues with priority queues, Adds JUMBO Frame support, Makes Debug statements compilable & Fixes related to multicast frames. Changes for V2: Fixed build failure on fedora docker machine Fix buggy de

Re: [RESEND PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2

2020-05-13 Thread David Gibson
On Thu, May 14, 2020 at 08:05:17AM +0200, Cédric Le Goater wrote: > >> --- a/hw/ppc/spapr.c > >> +++ b/hw/ppc/spapr.c > >> @@ -446,7 +446,8 @@ static int > >> spapr_dt_dynamic_memory_v2(SpaprMachineState *spapr, void *fdt, > >> g_assert(drc); > >> elem = spapr_get_drconf_cell(siz

Re: [PATCH v4 6/9] qemu-img: Add bitmap sub-command

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: Include actions for --add, --remove, --clear, --enable, --disable, and --merge (note that --clear is a bit of fluff, because the same can be accomplished by removing a bitmap and then adding a new one in its place, but it matches what QMP commands exist). List

Re: [PATCH v2 6/6] target/ppc: Don't update radix PTE R/C bits with gdbstub

2020-05-13 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > gdbstub shouldn't silently change guest visible state when doing address > translation. Since the R/C bits can only be updated when handling a MMU > fault, let's reuse the cause_excp flag and rename it to guest_visible. > While here drop a not very useful com

Re: [PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-13 Thread Raphael Pour
[...] introduced with e6df58a5, stderr won't get closed if the fork option is __not__ set. On 5/14/20 8:31 AM, Raphael Pour wrote: > introduced with e6df58a5, stderr won't get closed if the fork option is > set. -- Hetzner Online GmbH Am Datacenter-Park 1 08223 Falkenstein/Vogtland raphael.p...@

[PATCH v2 1/1] qemu-nbd: Close inherited stderr

2020-05-13 Thread Raphael Pour
Close inherited stderr of the parent if fork_process is false. Otherwise no one will close it. (introduced by e6df58a5) --- qemu-nbd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 4aa005004e..a324d21c5e 100644 --- a/qemu-nbd.c +++ b/qemu-

Re: [PATCH v2 3/6] target/ppc: Don't initialize some local variables in ppc_radix64_xlate()

2020-05-13 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > It is the job of the ppc_radix64_get_fully_qualified_addr() function > which is called at the beginning of ppc_radix64_xlate() to set both > lpid *and* pid. It doesn't buy us anything to initialize them first. > > Worse, a bug in ppc_radix64_get_fully_qualif

[PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-13 Thread Raphael Pour
Hello, introduced with e6df58a5, stderr won't get closed if the fork option is set. This causes other processes reading stderr to block infinietly or crash while relying on EOF. v2: - Instead of closing the inherited stderr in the child, avoid the dup in the parent if the fork option is no

Re: [PATCH v2 2/6] target/ppc: Pass const pointer to ppc_radix64_get_fully_qualified_addr()

2020-05-13 Thread Cédric Le Goater
On 5/14/20 12:56 AM, Greg Kurz wrote: > This doesn't require write access to the CPU registers. > > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > target/ppc/mmu-radix64.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target/ppc/mmu-radix64.c b

Re: [PATCH v2 5/6] target/ppc: Fix arguments to ppc_radix64_partition_scoped_xlate()

2020-05-13 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > The last two arguments have the bool type. Also, we shouldn't raise an > exception when using gdbstub. > > This was found while reading the code. Since it only affects the powernv > machine, I didn't dig further to find an actual bug. > > Fixes: d04ea940c59

Re: [PATCH v2 4/6] target/ppc: Add missing braces in ppc_radix64_partition_scoped_xlate()

2020-05-13 Thread Cédric Le Goater
On 5/14/20 12:57 AM, Greg Kurz wrote: > As per CODING_STYLE. > > Fixes: d04ea940c597 "target/ppc: Add support for Radix partition-scoped > translation" > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > target/ppc/mmu-radix64.c |3 ++- > 1 file changed, 2 insertions(+), 1 d

Re: [PATCH v2 1/6] target/ppc: Pass const pointer to ppc_radix64_get_prot_amr()

2020-05-13 Thread Cédric Le Goater
On 5/14/20 12:56 AM, Greg Kurz wrote: > This doesn't require write access to the CPU structure. > > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > target/ppc/mmu-radix64.h |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target/ppc/mmu-radix64.h

Re: [PATCH] python: remove more instances of sys.version_info

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 5:52 AM, John Snow wrote: We guarantee 3.5+ everywhere; remove more dead checks. In general, try to avoid using version checks and instead prefer to attempt behavior when possible. Signed-off-by: John Snow --- scripts/analyze-migration.py | 5 - scripts/decodetree

Re: [PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-05-13 Thread John Snow
On 3/31/20 9:44 AM, Kevin Wolf wrote: > Am 31.03.2020 um 02:00 hat John Snow geschrieben: >> We can turn logging on/off globally instead of per-function. >> >> Remove use_log from run_job, and use python logging to turn on >> diffable output when we run through a script entry point. >> >> iotest

Re: [PATCH v3 03/10] iotests/283: make executable

2020-05-13 Thread Philippe Mathieu-Daudé
On 4/21/20 9:35 AM, Vladimir Sementsov-Ogievskiy wrote: All other test files are executable, except for this one. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/283 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/qemu-io

Re: [PATCH 0/4] target/i386: miscellaneous x87 fixes

2020-05-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/alpine.deb.2.21.2005132345100.11...@digraph.polyomino.org.uk/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: alpine.deb.2.21.2005132345100.11...@digraph.polyomino.org.uk Subject: [PATCH 0/4] ta

Re: [PATCH v4 5/9] blockdev: Split off basic bitmap operations for qemu-img

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: Upcoming patches want to add some basic bitmap manipulation abilities to qemu-img. But blockdev.o is too heavyweight to link into qemu-img (among other things, it would drag in block jobs and transaction support - qemu-img does offline manipulation, where atom

[Bug 1686980] Re: qemu is very slow when adding 16, 384 virtio-scsi drives

2020-05-13 Thread Thomas Huth
Is this faster nowadays if you use the new -blockdev parameter instead of -drive? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1686980 Title:

Re: [PATCH RFC 19/32] python//qmp.py: add QMPProtocolError

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: 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 --- python/qemu/lib/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/qemu/lib/qmp.py

[PATCH RFC 19/32] python//qmp.py: add QMPProtocolError

2020-05-13 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 --- python/qemu/lib/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index e460234f2e

[PATCH RFC 31/32] python/qemu: add mypy to Pipfile

2020-05-13 Thread John Snow
Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 37 - 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index e396e56e06..80bd6c3188 100644 --- a/python/Pipfile +++ b/python/Pipfile @@

Re: [PATCH RFC 29/32] python//qtest.py: Check before accessing _qtest

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 7:54 AM, John Snow wrote: It can be None; so add assertions or exceptions where appropriate to guard the access accordingly. Signed-off-by: John Snow --- python/qemu/lib/qtest.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/python/qemu/lib/qt

[PATCH RFC 32/32] python/qemu/lib: Add mypy type annotations

2020-05-13 Thread John Snow
These should all be purely annotations with no changes in behavior at all. Signed-off-by: John Snow --- python/qemu/lib/accel.py | 8 ++-- python/qemu/lib/machine.py | 94 +- python/qemu/lib/qmp.py | 44 ++ python/qemu/lib/qtest.py | 2

Re: [PATCH RFC 14/32] python//qmp.py: use True/False for non/blocking modes

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: The type system doesn't want integers. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index b91c9d5c1c..a634c4e26c 100644 --- a/py

Re: [PATCH RFC 11/32] python/qemu/lib: remove Python2 style super() calls

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: Use the Python3 style instead. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/lib/machine.py | 2 +- python/qemu/lib/qtest.py | 15 +++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/pytho

Re: [PATCH 0/3] s390x: improve documentation

2020-05-13 Thread Cornelia Huck
On Tue, 5 May 2020 15:50:22 +0200 Cornelia Huck wrote: > The documentation for the s390x system emulation target still has quite > a bit of room for improvement, so I started adding some device documentation. > > I'm not quite happy with the long command/output lines in the 3270 and > vfio-ccw

Re: [PATCH RFC 23/32] python//machine.py: reorder __init__

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: 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 --- python/qemu/lib/machine.py | 29 +-

Re: [PATCH RFC 21/32] python//machine.py: remove logging configuration

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: Python 3.5 and above do not print a warning when logging is not configured. As a library, it's best practice to leave logging configuration to the client executable. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 3 --- 1 file changed, 3 deleti

[PATCH RFC 27/32] python//machine.py: Add _qmp access shim

2020-05-13 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/lib/machine.py | 12 +--- 1 file changed, 9 insertions(+), 3 dele

Re: [PATCH RFC 16/32] python//qmp.py: re-absorb MonitorResponseError

2020-05-13 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: 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 S

Re: [RESEND PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2

2020-05-13 Thread Cédric Le Goater
>> --- a/hw/ppc/spapr.c >> +++ b/hw/ppc/spapr.c >> @@ -446,7 +446,8 @@ static int spapr_dt_dynamic_memory_v2(SpaprMachineState >> *spapr, void *fdt, >> g_assert(drc); >> elem = spapr_get_drconf_cell(size / lmb_size, addr, >> spapr_drc_index(d

[PATCH RFC 29/32] python//qtest.py: Check before accessing _qtest

2020-05-13 Thread John Snow
It can be None; so add assertions or exceptions where appropriate to guard the access accordingly. Signed-off-by: John Snow --- python/qemu/lib/qtest.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/python/qemu/lib/qtest.py b/python/qemu/lib/qtest.py index a

[PATCH RFC 25/32] python//machine.py: Handle None events in event_wait

2020-05-13 Thread John Snow
If the timeout is 0, we can get None back. Handle this explicitly. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/qemu/lib/machine.py b/python/qemu/lib/machine.py index 8548c7c32d..61ee3a0e81 100644 --- a/py

[PATCH RFC 12/32] python/qemu/lib: fix socket.makefile() typing

2020-05-13 Thread John Snow
Note: A bug in typeshed (https://github.com/python/typeshed/issues/3977) misinterprets the type of makefile(). Work around this by explicitly stating that we are opening a text-mode file. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 10 +++--- python/qemu/lib/qtest.py | 12 ++

[PATCH RFC 24/32] python//machine.py: Don't modify state in _base_args()

2020-05-13 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 --- python/q

[PATCH RFC 28/32] python//machine.py: fix _popen access

2020-05-13 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/lib/machine.py | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/python/qe

[PATCH RFC 17/32] python//qmp.py: Do not return None from cmd_obj

2020-05-13 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 we

[PATCH RFC 23/32] python//machine.py: reorder __init__

2020-05-13 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 --- python/qemu/lib/machine.py | 29 + 1 file changed, 17 insertio

[PATCH RFC 21/32] python//machine.py: remove logging configuration

2020-05-13 Thread John Snow
Python 3.5 and above do not print a warning when logging is not configured. As a library, it's best practice to leave logging configuration to the client executable. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/python/qemu/lib/mach

[PATCH RFC 22/32] python//machine.py: Fix monitor address typing

2020-05-13 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 RFC 16/32] python//qmp.py: re-absorb MonitorResponseError

2020-05-13 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 --- python/qemu/lib/machine.py

[PATCH RFC 20/32] python//qmp.py: assert sockfile is not None

2020-05-13 Thread John Snow
In truth, if you don't do this, you'll just get a TypeError exception. Now, you'll get an AssertionError. Is this tangibly better? No. Does mypy complain less? Yes. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/qemu/lib/qmp.py b/p

[PATCH RFC 18/32] python//qmp.py: add casts to JSON deserialization

2020-05-13 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 Ty

[PATCH RFC 30/32] python/qemu/lib: make 'args' style arguments immutable

2020-05-13 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 justification

[PATCH RFC 09/32] python/qemu: add pylint to Pipfile

2020-05-13 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 insertions

[PATCH RFC 14/32] python//qmp.py: use True/False for non/blocking modes

2020-05-13 Thread John Snow
The type system doesn't want integers. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index b91c9d5c1c..a634c4e26c 100644 --- a/python/qemu/lib/qmp.py +++ b/python/qemu/li

[PATCH RFC 15/32] python//qmp.py: Define common types

2020-05-13 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/lib/qmp.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index a634c4e26c..911da59888 10

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

2020-05-13 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/lib/machine.py | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/python/qemu/lib/machine.py

[PATCH RFC 10/32] python/qemu: Add flake8 to Pipfile

2020-05-13 Thread John Snow
Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 31 ++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/python/Pipfile b/python/Pipfile index ddb2b5a518..e396e56e06 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -5,6 +

[PATCH RFC 13/32] python/qemu/lib: Adjust traceback typing

2020-05-13 Thread John Snow
mypy considers it incorrect to use `bool` to statically return false, because it will assume that it could conceivably return True, and gives different analysis in that case. Use a None return to achieve the same effect, but make mypy happy. Note: Pylint considers function signatures as code that

[PATCH RFC 11/32] python/qemu/lib: remove Python2 style super() calls

2020-05-13 Thread John Snow
Use the Python3 style instead. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 2 +- python/qemu/lib/qtest.py | 15 +++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/python/qemu/lib/machine.py b/python/qemu/lib/machine.py index 4b260fa2cb..b2f0412197 100

[PATCH RFC 05/32] python/qemu/lib: delint; add flake8 config

2020-05-13 Thread John Snow
Mostly, ignore the "no bare except" rule, because flake8 is not contextual and cannot determine if we re-raise. Pylint can, though, so always prefer pylint for that. Signed-off-by: John Snow --- python/qemu/lib/.flake8| 2 ++ python/qemu/lib/accel.py | 9 ++--- python/qemu/lib/machin

[PATCH RFC 08/32] python/qemu: Add Pipfile

2020-05-13 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 not pinned to precise versions. Note that pipenv is not required to install or use this module; this is just a convenience for in-tree d

[PATCH RFC 07/32] python/qemu: add README.rst

2020-05-13 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 a/python/qemu/RE

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

2020-05-13 Thread John Snow
Catch only the timeout error; if there are other problems, allow the stack trace to be visible. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/python/qemu/lib/machine.py b/python/qemu

[PATCH RFC 00/32] python/qemu: refactor as installable package

2020-05-13 Thread John Snow
Hey, I got lost on my way to the store and I accidentally got 32 patches that convert our python library into something that passes pylint, flake8, and mypy --strict. ...So, a few things: 1. This is just an RFC. The actual design of these libraries really needs adjusted to be more pythonic. In ge

[PATCH RFC 02/32] scripts/qmp: Fix shebang and imports

2020-05-13 Thread John Snow
There's more wrong with these scripts; They are in various stages of disrepair. That's beyond the scope of this current patchset. This just mechanically corrects the imports and the shebangs, as part of ensuring that the python/qemu/lib refactoring didn't break anything needlessly. Signed-off-by:

[PATCH RFC 06/32] python/qemu: formalize as package

2020-05-13 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. Signed-off-

[PATCH RFC 04/32] python/qemu/lib: delint, add pylintrc

2020-05-13 Thread John Snow
Bring our these files up to speed with pylint 2.5.0. Add a pylintrc file to formalize which pylint subset we are targeting. The similarity ignore is there to suppress similarity reports across imports, which for typing constants, are going to trigger this report erroneously. Signed-off-by: John S

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

2020-05-13 Thread John Snow
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 lib/__init__.py file a little bit, Make the top-level classes and functions a

Re: [PATCH v5 08/15] acpi: move aml builder code for floppy device

2020-05-13 Thread Thomas Huth
On 13/05/2020 22.43, John Snow wrote: > > > On 5/7/20 10:05 AM, Philippe Mathieu-Daudé wrote: >> +Hervé >> >> On 5/7/20 3:16 PM, Gerd Hoffmann wrote: >>> Signed-off-by: Gerd Hoffmann >>> Reviewed-by: Igor Mammedov >>> --- >>>   hw/block/fdc.c   | 83 +

Re: [PATCH v4 4/9] blockdev: Promote several bitmap functions to non-static

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: The next patch will split blockdev.c, which will require accessing some previously-static functions from more than one .c file. But part of promoting a function to public is picking a naming scheme that does not reek of exposing too many internals (two of the

Re: [PATCH] qemu-nbd: Close inherited stderr

2020-05-13 Thread Raphael Pour
On 5/13/20 3:02 PM, Eric Blake wrote: > Yes, now that we know about it, the bug will be fixed in 5.1; we can > also cc: qemu-stable to get it backported to the next 5.0.x release > (downstream developers are also more likely to backport it to their > ports as well if it lands on qemu-stable).  Wo

Re: [PATCH Kernel v19 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-13 Thread Kirti Wankhede
On 5/14/2020 10:37 AM, Alex Williamson wrote: On Thu, 14 May 2020 01:34:37 +0530 Kirti Wankhede wrote: DMA mapped pages, including those pinned by mdev vendor drivers, might get unpinned and unmapped while migration is active and device is still running. For example, in pre-copy phase while

Re: [PATCH v3 06/10] iotests: add testfinder.py

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 08:06, John Snow wrote: On 5/14/20 12:54 AM, Vladimir Sementsov-Ogievskiy wrote: 14.05.2020 00:58, John Snow wrote: On 5/7/20 1:43 PM, Vladimir Sementsov-Ogievskiy wrote: 21.04.2020 19:56, Kevin Wolf wrote: Am 21.04.2020 um 09:35 hat Vladimir Sementsov-Ogievskiy geschrieben: A

Re: [PATCH v4 3/9] block: Make it easier to learn which BDS support bitmaps

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: Upcoming patches will enhance bitmap support in qemu-img, but in doing so, it turns out to be nice to suppress output when persistent bitmaps make no sense (such as on a qcow2 v2 image). Add a hook to make this easier to query. This patch adds a new callback

Re: [PATCH] bitmaps: Add myself as maintainer

2020-05-13 Thread John Snow
On 5/14/20 12:49 AM, Vladimir Sementsov-Ogievskiy wrote: > 13.05.2020 23:24, John Snow wrote: >> >> >> On 5/13/20 10:14 AM, Eric Blake wrote: >>> Dirty bitmaps are important to incremental backups, including exposure >>> over NBD where I'm already maintainer.  Also, I'm aware that lately I >>> h

Re: [PATCH v4 2/9] qemu-img: Fix stale comments on doc location

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: Missed in commit e13c59fa. Signed-off-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH Kernel v19 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-13 Thread Alex Williamson
On Thu, 14 May 2020 01:34:37 +0530 Kirti Wankhede wrote: > DMA mapped pages, including those pinned by mdev vendor drivers, might > get unpinned and unmapped while migration is active and device is still > running. For example, in pre-copy phase while guest driver could access > those pages, host

Re: [PATCH v3 06/10] iotests: add testfinder.py

2020-05-13 Thread John Snow
On 5/14/20 12:54 AM, Vladimir Sementsov-Ogievskiy wrote: > 14.05.2020 00:58, John Snow wrote: >> >> >> On 5/7/20 1:43 PM, Vladimir Sementsov-Ogievskiy wrote: >>> 21.04.2020 19:56, Kevin Wolf wrote: Am 21.04.2020 um 09:35 hat Vladimir Sementsov-Ogievskiy geschrieben: > Add python script

Re: [PATCH v4 1/9] docs: Sort sections on qemu-img subcommand parameters

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: We already list the subcommand summaries alphabetically, we should do the same for the documentation related to subcommand-specific parameters. Signed-off-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vlad

Re: [PATCH Kernel v19 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking

2020-05-13 Thread Alex Williamson
On Thu, 14 May 2020 01:34:36 +0530 Kirti Wankhede wrote: > VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: > - Start dirty pages tracking while migration is active > - Stop dirty pages tracking. > - Get dirty pages bitmap. Its user space application's responsibility to > copy content of

Re: [PATCH Kernel v19 7/8] vfio iommu: Add migration capability to report supported features

2020-05-13 Thread Alex Williamson
On Thu, 14 May 2020 01:34:38 +0530 Kirti Wankhede wrote: > Added migration capability in IOMMU info chain. > User application should check IOMMU info chain for migration capability > to use dirty page tracking feature provided by kernel module. > User application must check page sizes supported a

Re: [PATCH] bitmaps: Add myself as maintainer

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 23:24, John Snow wrote: On 5/13/20 10:14 AM, Eric Blake wrote: Dirty bitmaps are important to incremental backups, including exposure over NBD where I'm already maintainer. Also, I'm aware that lately I have been doing as much code/review on bitmaps as John Snow, who is hoping to s

Re: [PATCH v3 06/10] iotests: add testfinder.py

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 00:58, John Snow wrote: On 5/7/20 1:43 PM, Vladimir Sementsov-Ogievskiy wrote: 21.04.2020 19:56, Kevin Wolf wrote: Am 21.04.2020 um 09:35 hat Vladimir Sementsov-Ogievskiy geschrieben: Add python script with new logic of searching for tests: Current ./check behavior:   - tests ar

[PATCH v6 13/20] hw/block/nvme: factor out block backend setup

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 617b2f0005df.

[PATCH v6 15/20] hw/block/nvme: factor out namespace setup

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/hw/block/nvme.c b/

[PATCH v6 11/20] hw/block/nvme: factor out property/constraint checks

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/hw/block/nvme.c b

[PATCH v6 18/20] hw/block/nvme: factor out pmr setup

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 95 ++--- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index d71a5f142d51..7254b66ae199 100644 --- a

[PATCH v6 14/20] hw/block/nvme: add namespace helpers

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Introduce some small helpers to make the next patches easier on the eye. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 3 +-- hw/block/nvme.h | 17 + 2 files chan

[PATCH v6 20/20] hw/block/nvme: factor out controller identify setup

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 49 ++--- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/hw/block/nvme.c

[PATCH v6 17/20] hw/block/nvme: factor out cmb setup

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/hw/block/nvme.c b/hw/b

[PATCH v6 06/20] hw/block/nvme: refactor nvme_addr_read

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Pull the controller memory buffer check to its own function. The check will be used on its own in later patches. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 16

[PATCH v6 12/20] hw/block/nvme: factor out device state setup

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 1d4f

[PATCH v6 19/20] hw/block/nvme: do cmb/pmr init as part of pci init

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 7254b66ae199..2addcc86034a 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c

[PATCH v6 09/20] hw/block/nvme: add max_ioqpairs device parameter

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen The num_queues device paramater has a slightly confusing meaning because it accounts for the admin queue pair which is not really optional. Secondly, it is really a maximum value of queues allowed. Add a new max_ioqpairs parameter that only accounts for I/O queue pairs, but ke

[PATCH v6 16/20] hw/block/nvme: factor out pci setup

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c i

[PATCH v6 07/20] hw/block/nvme: fix pin-based interrupt behavior

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen First, since the device only supports MSI-X or pin-based interrupt, if MSI-X is not enabled, it should not accept interrupt vectors different from 0 when creating completion queues. Secondly, the irq_status NvmeCtrl member is meant to be compared to the INTMS register, so it s

[PATCH v6 05/20] hw/block/nvme: use constants in identify

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch --- hw/block/nvme.c | 8 include/block/nvme.h | 8 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/

[PATCH v6 10/20] hw/block/nvme: remove redundant cmbloc/cmbsz members

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 7 ++- hw/block/nvme.h | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c in

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

2020-05-13 Thread Klaus Jensen
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: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 2 +- 1 file chang

[PATCH v6 02/20] hw/block/nvme: rename trace events to pci_nvme

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Change the prefix of all nvme device related trace events to 'pci_nvme' to not clash with trace events from the nvme block driver. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c

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

2020-05-13 Thread Klaus Jensen
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 behavior hw/block/nvme: allow use of any valid msix vector These were pr

[PATCH v6 01/20] hw/block/nvme: fix pci doorbell size calculation

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen The size of the BAR is 0x1000 (main registers) + 8 bytes for each queue. Currently, the size of the BAR is calculated like so: n->reg_size = pow2ceil(0x1004 + 2 * (n->num_queues + 1) * 4); Since the 'num_queues' parameter already accounts for the admin queue, this should

[PATCH v6 04/20] hw/block/nvme: move device parameters to separate struct

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen Move device configuration parameters to separate struct to make it explicit what is configurable and what is set internally. Signed-off-by: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 49 ++

[PATCH v6 03/20] hw/block/nvme: remove superfluous breaks

2020-05-13 Thread Klaus Jensen
From: Klaus Jensen These break statements was left over when commit 3036a626e9ef ("nvme: add Get/Set Feature Timestamp support") was merged. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch --- hw/block/nvme.c | 4 1 f

[PATCH] python: remove more instances of sys.version_info

2020-05-13 Thread John Snow
We guarantee 3.5+ everywhere; remove more dead checks. In general, try to avoid using version checks and instead prefer to attempt behavior when possible. Signed-off-by: John Snow --- scripts/analyze-migration.py | 5 - scripts/decodetree.py| 25 +

[PATCH RFC v2 4/5] iotests: move bitmap helpers into their own file

2020-05-13 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/257| 110 +--- tests/qemu-iotests/bitmaps.py | 131 ++ 2 files changed, 132 insertions(+), 109 deletions(-) create mode 100644 tests/qemu-iotests/bitmaps.py diff --git a/tests/qemu-io

[PATCH RFC v2 3/5] qmp: expose block-dirty-bitmap-populate

2020-05-13 Thread John Snow
This is a new job-creating command. Signed-off-by: John Snow --- qapi/block-core.json | 18 +++ qapi/transaction.json | 2 ++ blockdev.c| 74 +++ 3 files changed, 94 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.j

[PATCH RFC v2 1/5] block: add bitmap-populate job

2020-05-13 Thread John Snow
This job copies the allocation map into a bitmap. It's a job because there's no guarantee that allocation interrogation will be quick (or won't hang), so it cannot be retrofit into block-dirty-bitmap-merge. It was designed with different possible population patterns in mind, but only top layer all

  1   2   3   4   5   >