Re: [PATCH] hw/arm/aspeed: Map the UART5 device unconditionally

2020-09-29 Thread Andrew Jeffery
On Fri, 18 Sep 2020, at 02:33, Cédric Le Goater wrote: > On 9/17/20 6:57 PM, Philippe Mathieu-Daudé wrote: > > On 9/16/20 7:51 AM, Cédric Le Goater wrote: > >> On 9/15/20 7:23 PM, Philippe Mathieu-Daudé wrote: > >>> ping? > >> > >> It's reviewed : > >> > >> > >>

Re: [PATCH v2 11/13] block/export: convert vhost-user-blk server to block export API

2020-09-29 Thread Markus Armbruster
Stefan Hajnoczi writes: > Use the new QAPI block exports API instead of defining our own QOM > objects. > > This is a large change because the lifecycle of VuBlockDev needs to > follow BlockExportDriver. QOM properties are replaced by QAPI options > objects. > > VuBlockDev is renamed VuBlkExport

Re: [PATCH v5 09/14] hw/block/nvme: Support Zoned Namespace Command Set

2020-09-29 Thread Klaus Jensen
On Sep 28 12:42, Klaus Jensen wrote: > On Sep 28 11:35, Dmitry Fomichev wrote: > > The emulation code has been changed to advertise NVM Command Set when > > "zoned" device property is not set (default) and Zoned Namespace > > Command Set otherwise. > > > > Handlers for three new NVMe commands

network buffering in fault tolerance

2020-09-29 Thread Shivam Mehra
I came across this documentation with source code for providing network buffering to applications https://www.nfradead.org/~tgr/libnl/doc/api/route_2qdisc_2plug_8c_source.html . This network-buffering helps

Re: [PATCH 16/16] qapi/expr.py: Use an expression checker dispatch table

2020-09-29 Thread John Snow
On 9/26/20 7:31 AM, Helio Loureiro wrote: On Fri, Sep 25, 2020, 16:16 John Snow > wrote: On 9/25/20 2:03 AM, Helio Loureiro wrote: > Hi, > > I would replace the word variable "kind" by "category". > Hi, welcome to the list! Tkz!

Re: [PATCH] hw/arm: Restrict APEI tables generation to the 'virt' machine

2020-09-29 Thread Dongjiu Geng
On 2020/9/29 20:56, Philippe Mathieu-Daudé wrote: > As only the Virt machine uses the RAS Virtualization feature (see > commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"), > restrict the APEI tables generation code to the virt machine. APEI is a generic feature for X86 and arm64.

Re: [PATCH 00/14] qapi: static typing conversion, pt3

2020-09-29 Thread John Snow
On 9/22/20 5:17 PM, John Snow wrote: based-on: <20200922211313.4082880-1-js...@redhat.com> [PATCH 00/16] qapi: static typing conversion, pt2 Hi, this series adds static type hints to the QAPI module. This is part three! Part 3:

[PATCH v4 43/46] qapi/types.py: remove one-letter variables

2020-09-29 Thread John Snow
"John, if pylint told you to jump off a bridge, would you?" Hey, if it looked like fun, I might. Now that this file is clean, enable pylint checks on this file. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/pylintrc | 1 -

[PATCH v4 45/46] qapi/visit.py: remove unused parameters from gen_visit_object

2020-09-29 Thread John Snow
And this fixes the pylint report for this file, so make sure we check this in the future, too. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- scripts/qapi/pylintrc | 1 - scripts/qapi/visit.py | 4 ++-- 2 files changed, 2

[PATCH v4 38/46] qapi/introspect.py: add _gen_features helper

2020-09-29 Thread John Snow
_make_tree might receive a dict or some other type. Adding features information should arguably be performed by the caller at such a time when we know the type of the object and don't have to re-interrogate it. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 19 --- 1

Re: [PATCH] pci: check bus pointer before dereference

2020-09-29 Thread P J P
[+Paolo, +Fam Zheng - for scsi] +-- On Mon, 28 Sep 2020, P J P wrote --+ | +-- On Wed, 16 Sep 2020, Peter Maydell wrote --+ | | On Wed, 16 Sep 2020 at 07:28, P J P wrote: | | > -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Flsi_nullptr1 | | > ==1183858==Hint: address points to

[PATCH v4 37/46] qapi/instrospect.py: add preliminary type hint annotations

2020-09-29 Thread John Snow
From: Eduardo Habkost The typing of _make_tree and friends is a bit involved, but it can be done with some stubbed out types and a bit of elbow grease. The forthcoming patches attempt to make some simplifications, but having the type hints in advance can aid in review. Signed-off-by: Eduardo

[PATCH v4 35/46] qapi/gen.py: delint with pylint

2020-09-29 Thread John Snow
'fp' and 'fd' are self-evident in context, add them to the list of OK names. _top and _bottom also need to stay standard methods because some users override the method and need to use `self`. Tell pylint to shush. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa

[PATCH v4 39/46] qapi/introspect.py: Unify return type of _make_tree()

2020-09-29 Thread John Snow
Returning a *something* or a Tuple of *something* is hard to accurately type. Let's just always return a tuple for structural consistency. Instances of the 'TreeNode' type can be replaced with the slightly more specific 'AnnotatedNode' type. Signed-off-by: John Snow ---

[PATCH v4 44/46] qapi/visit.py: assert tag_member contains a QAPISchemaEnumType

2020-09-29 Thread John Snow
This is true by design, but not presently able to be expressed in the type system. An assertion helps mypy understand our constraints. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/visit.py | 12 +++- 1 file changed, 7 insertions(+), 5

[PATCH v4 29/46] qapi/source.py: delint with pylint

2020-09-29 Thread John Snow
Shush an error and leave a hint for future cleanups when we're allowed to use Python 3.7+. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- scripts/qapi/pylintrc | 1 - scripts/qapi/source.py | 3 +++ 2 files changed, 3 insertions(+),

[PATCH v4 42/46] qapi/types.py: add type hint annotations

2020-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/mypy.ini | 5 --- scripts/qapi/types.py | 86 --- 2 files changed, 64

[PATCH v4 41/46] qapi/introspect.py: create a typed 'Node' data structure

2020-09-29 Thread John Snow
This replaces _make_tree with Node.__init__(), effectively. By creating it as a generic container, we can more accurately describe the exact nature of this particular Node. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 77 +++--- 1 file changed, 38

[PATCH v4 30/46] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-29 Thread John Snow
The edge case is that if the name is '', this expression returns a string instead of a bool, which violates our declared type. Signed-off-by: John Snow Reviewed-by: Cleber Rosa --- scripts/qapi/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi/gen.py

[PATCH v4 24/46] qapi/events.py: Move comments into docstrings

2020-09-29 Thread John Snow
Clarify them while we're here. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/events.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py index 57e0939e963..599f3d1f564

[PATCH v4 40/46] qapi/introspect.py: replace 'extra' dict with 'comment' argument

2020-09-29 Thread John Snow
This is only used to pass in a dictionary with a comment already set, so skip the runaround and just accept the comment. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/qapi/introspect.py

[PATCH v4 25/46] qapi/commands.py: Don't re-bind to variable of different type

2020-09-29 Thread John Snow
Mypy isn't a fan of rebinding a variable with a new data type. It's easy enough to avoid. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/commands.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/qapi/commands.py

[PATCH v4 21/46] qapi/common.py: move build_params into gen.py

2020-09-29 Thread John Snow
Including it in common.py creates a circular import dependency; schema relies on common, but common.build_params requires a type annotation from schema. To type this properly, it needs to be moved outside the cycle. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa

[PATCH v4 27/46] qapi/commands.py: enable checking with mypy

2020-09-29 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 5df11e53fd1..8ab9ac52cc4 100644 --- a/scripts/qapi/mypy.ini +++

[PATCH v4 36/46] qapi/introspect.py: assert obj is a dict when features are given

2020-09-29 Thread John Snow
This is necessary to keep mypy passing in the next patch when we add preliminary type hints. It will be removed shortly. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index

Re: Contributor wanting to get started with simple contributions

2020-09-29 Thread John Snow
On 9/2/20 12:38 PM, Rohit Shinde wrote: Hey John, I wanted to follow up on this, in case you missed my previous email :) Thanks, Rohit. Sorry Rohit, very buried in my work and haven't been doing a good job with my inbox. Right now, I am working on converting the QAPI parser module to the

[PATCH v4 19/46] qapi/common.py: add type hint annotations

2020-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/common.py | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git

[PATCH v4 26/46] qapi/commands.py: add type hint annotations

2020-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/commands.py | 71 ++-- 1 file changed, 54 insertions(+), 17 deletions(-) diff

[PATCH v4 16/46] qapi/common.py: delint with pylint

2020-09-29 Thread John Snow
At this point, that just means using a consistent strategy for constant names. constants get UPPER_CASE and names not used externally get a leading underscore. As a preference, while renaming constants to be UPPERCASE, move them to the head of the file. Generally, it's nice to be able to audit

[PATCH v4 34/46] qapi/gen.py: update write() to be more idiomatic

2020-09-29 Thread John Snow
Make the file handling here just a tiny bit more idiomatic. (I realize this is heavily subjective.) Use exist_ok=True for os.makedirs and remove the exception, use fdopen() to wrap the file descriptor in a File-like object, and use a context manager for managing the file pointer. Signed-off-by:

[PATCH v4 33/46] qapi/gen.py: Remove unused parameter

2020-09-29 Thread John Snow
module_basename doesn't use the 'what' argument, so remove it. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index

[PATCH v4 23/46] qapi/events.py: add type hint annotations

2020-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/events.py | 46 -- scripts/qapi/mypy.ini | 5 - 2 files changed, 35

[PATCH v4 14/46] qapi/common.py: Remove python compatibility workaround

2020-09-29 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/common.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index ba35abea478..cee63eb95c7 100644 --- a/scripts/qapi/common.py

[PATCH v4 32/46] qapi/gen.py: Enable checking with mypy

2020-09-29 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 1b8555dfa39..c6960ff2dbd 100644 ---

[PATCH v4 22/46] qapi: establish mypy type-checking baseline

2020-09-29 Thread John Snow
Fix two very minor issues, and then establish a mypy type-checking baseline. Like pylint, this should be run from the folder above: > mypy --config-file=qapi/mypy.ini qapi/ This is designed and tested for mypy 0.770 or greater. Signed-off-by: John Snow Tested-by: Eduardo Habkost

[PATCH v4 12/46] qapi: delint using flake8

2020-09-29 Thread John Snow
Petty style guide fixes and line length enforcement. Not a big win, not a big loss, but flake8 passes 100% on the qapi module, which gives us an easy baseline to enforce hereafter. A note on the flake8 exception: flake8 will warn on *any* bare except, but pylint's is context-aware and will

[PATCH v4 31/46] qapi/gen.py: add type hint annotations

2020-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa --- scripts/qapi/gen.py | 104 1 file changed, 57 insertions(+), 47 deletions(-) diff

[PATCH v4 46/46] qapi/visit.py: add type hint annotations

2020-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- scripts/qapi/mypy.ini | 5 --- scripts/qapi/visit.py | 73 +-- 2

[PATCH v4 18/46] qapi/common.py: check with pylint

2020-09-29 Thread John Snow
Remove qapi/common.py from the pylintrc ignore list. Signed-off-by: John Snow Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Tested-by: Eduardo Habkost --- scripts/qapi/pylintrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/qapi/pylintrc

[PATCH v4 10/46] qapi: Remove wildcard includes

2020-09-29 Thread John Snow
Wildcard includes become hard to manage when refactoring and dealing with circular dependencies with strictly typed mypy. flake8 also flags each one as a warning, as it is not smart enough to know which names exist in the imported file. Remove them and include things explicitly by name instead.

[PATCH v4 15/46] qapi/common.py: Add indent manager

2020-09-29 Thread John Snow
Code style tools really dislike the use of global keywords, because it generally involves re-binding the name at runtime which can have strange effects depending on when and how that global name is referenced in other modules. Make a little indent level manager instead. Signed-off-by: John Snow

[PATCH v4 17/46] qapi/common.py: Replace one-letter 'c' variable

2020-09-29 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Cleber Rosa Reviewed-by: Eduardo Habkost --- scripts/qapi/common.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index a417b6029c8..338adedef4f 100644 ---

[PATCH v4 06/46] qapi-gen: Separate arg-parsing from generation

2020-09-29 Thread John Snow
This is a minor re-work of the entrypoint script. It isolates a generate() method from the actual command-line mechanism. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- scripts/qapi-gen.py | 85

[PATCH v4 28/46] qapi/source.py: add type hint annotations

2020-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit *only* adds annotations. A note on typing of __init__: mypy requires init functions with no parameters to document a return type of None to be considered fully typed. In the case when there are input parameters, None may be omitted. Since

[PATCH v4 11/46] qapi: enforce import order/styling with isort

2020-09-29 Thread John Snow
While we're mucking around with imports, we might as well formalize the style we use. Let's use isort to do it for us. lines_after_imports=2: Use two lines after imports, to match PEP8's desire to have "two lines before and after" class definitions, which are likely to start immediately after

[PATCH v4 20/46] qapi/common.py: Convert comments into docstrings, and elaborate

2020-09-29 Thread John Snow
As docstrings, they'll show up in documentation and IDE help. The docstring style being targeted is the Sphinx documentation style. Sphinx uses an extension of ReST with "domains". We use the (implicit) Python domain, which supports a number of custom "info fields". Those info fields are

[PATCH v4 13/46] qapi: add pylintrc

2020-09-29 Thread John Snow
Using `pylint --generate-rcfile > pylintrc`, generate a skeleton pylintrc file. Sections that are not presently relevant (by the end of this series) are removed leaving just the empty section as a search engine / documentation hint to future authors. I am targeting pylint 2.6.0. In the future

[PATCH v4 07/46] qapi: move generator entrypoint into module

2020-09-29 Thread John Snow
As part of delinting and adding type hints to the QAPI generator, it's helpful for the entrypoint to be part of the package, only leaving a very tiny entrypoint shim outside of the module. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

[PATCH v4 08/46] [DO-NOT-MERGE] docs: add scripts/qapi/main to python manual

2020-09-29 Thread John Snow
Signed-off-by: John Snow --- docs/devel/python/qapi.main.rst | 7 +++ docs/devel/python/qapi.rst | 1 + 2 files changed, 8 insertions(+) create mode 100644 docs/devel/python/qapi.main.rst diff --git a/docs/devel/python/qapi.main.rst b/docs/devel/python/qapi.main.rst new file mode

[PATCH v4 05/46] [DO-NOT-MERGE] docs: enable sphinx-autodoc for scripts/qapi

2020-09-29 Thread John Snow
Signed-off-by: John Snow --- docs/conf.py | 3 ++- docs/devel/index.rst | 1 + docs/devel/python/index.rst | 7 +++ docs/devel/python/qapi.commands.rst | 7 +++ docs/devel/python/qapi.common.rst | 7 +++

[PATCH v4 01/46] [DO-NOT-MERGE] docs: replace single backtick (`) with double-backtick (``)

2020-09-29 Thread John Snow
The single backtick in ReST is the "default role". Currently, Sphinx's default role is called "content". Sphinx suggests you can use the "Any" role instead to turn any single-backtick enclosed item into a cross-reference. Before we do that, though, we'll need to turn all existing usages of the

[PATCH v4 09/46] qapi: Prefer explicit relative imports

2020-09-29 Thread John Snow
All of the QAPI include statements are changed to be package-aware, as explicit relative imports. A quirk of Python packages is that the name of the package exists only *outside* of the package. This means that to a module inside of the qapi folder, there is inherently no such thing as the "qapi"

[PATCH v4 03/46] [DO-NOT-MERGE] docs/sphinx: change default role to "any"

2020-09-29 Thread John Snow
Signed-off-by: John Snow --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 606f623211d..49599e38314 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -84,6 +84,9 @@ # The master toctree document. master_doc = 'index' +# Interpret `this`

[PATCH v4 02/46] docs: repair broken references

2020-09-29 Thread John Snow
In two different places, we are not making a cross-reference to some resource correctly. Signed-off-by: John Snow --- docs/devel/multi-thread-tcg.rst | 2 +- docs/devel/testing.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/devel/multi-thread-tcg.rst

[PATCH v4 04/46] qapi: modify docstrings to be sphinx-compatible

2020-09-29 Thread John Snow
I did not say "sphinx beautiful", just "sphinx compatible". They will not throw errors when parsed and interpreted as ReST. Signed-off-by: John Snow --- scripts/qapi/gen.py| 6 -- scripts/qapi/parser.py | 9 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH v4 00/46] qapi: static typing conversion, pt1

2020-09-29 Thread John Snow
Based-on: <20200925162316.21205-1-peter.mayd...@linaro.org> Hi, this series adds static type hints to the QAPI module. This is part one! Part 1: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt1 Everything: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt6 - Requires

Re: [PATCH v2] hw/ide: check null block before _cancel_dma_sync

2020-09-29 Thread P J P
+-- On Tue, 29 Sep 2020, Li Qiang wrote --+ | P J P 于2020年9月29日周二 下午2:22写道: | > +-- On Fri, 18 Sep 2020, Li Qiang wrote --+ | > | P J P 于2020年9月18日周五 下午6:26写道: | > | > +-- On Fri, 18 Sep 2020, Li Qiang wrote --+ | > | > | Update v2: use an assert() call | > | > |

Re: [RFC PATCH v4 00/29] Hexagon patch series

2020-09-29 Thread Brad Smith
On 9/29/2020 1:01 PM, Philippe Mathieu-Daudé wrote: On 9/29/20 5:53 PM, Taylor Simpson wrote: -Original Message- From: Philippe Mathieu-Daudé On Behalf Of Philippe Mathieu-Daudé Sent: Tuesday, September 29, 2020 6:22 AM To: Taylor Simpson ; qemu-devel@nongnu.org Cc: a...@rev.ng;

[Bug 1849644] Autopkgtest regression report (qemu/1:4.2-3ubuntu6.7)

2020-09-29 Thread Ubuntu SRU Bot
All autopkgtests for the newly accepted qemu (1:4.2-3ubuntu6.7) for focal have finished running. The following regressions have been reported in tests triggered by the package: casper/1.445.1 (amd64) Please visit the excuses page listed below and investigate the failures, proceeding

Re: [Qemu-devel PATCH v2] target/i386: add "-cpu,lbr-fmt=*" support to enable guest LBR

2020-09-29 Thread Like Xu
Hi Eduardo, On 2020/9/30 1:38, Eduardo Habkost wrote: (CCing the people from the thread, as kvm_exact_match_flags would be useful for INTEL_PT_IP_LIP) On Tue, Sep 29, 2020 at 02:12:17PM +0800, Like Xu wrote: The last branch recording (LBR) is a performance monitor unit (PMU) feature on Intel

Re: [External] Re: [PULL 26/26] virtiofsd: Add -o allow_direct_io|no_allow_direct_io options

2020-09-29 Thread Jiachen Zhang
On Wed, Sep 30, 2020 at 5:53 AM Vivek Goyal wrote: > On Fri, Sep 25, 2020 at 01:06:55PM +0100, Dr. David Alan Gilbert (git) > wrote: > > From: Jiachen Zhang > > > > Due to the commit 65da4539803373ec4eec97ffc49ee90083e56efd, the O_DIRECT > > open flag of guest applications will be discarded by

Re: [RFC 0/3] QEMU as IPMI BMC emulator

2020-09-29 Thread Corey Minyard
On Tue, Sep 29, 2020 at 06:05:16PM -0700, Havard Skinnemoen wrote: > On Tue, Sep 29, 2020 at 10:46 AM Corey Minyard wrote: > > > > On Mon, Sep 28, 2020 at 05:39:13PM -0700, Havard Skinnemoen via wrote: > > > This series briefly documents the existing IPMI device support for main > > > processor

Re: [PATCH 1/4] linux-user: update syscall_nr.h to Linux 5.9-rc7

2020-09-29 Thread Alistair Francis
On Tue, Sep 29, 2020 at 5:34 PM Laurent Vivier wrote: > > Update gensyscalls.sh not to generate an empty line at the end of the file > > And then automatically update syscall_nr.h running scripts/gensyscalls.sh > > Signed-off-by: Laurent Vivier For the RISC-V part: Reviewed-by: Alistair

Re: [RFC 0/3] QEMU as IPMI BMC emulator

2020-09-29 Thread Havard Skinnemoen
On Tue, Sep 29, 2020 at 10:46 AM Corey Minyard wrote: > > On Mon, Sep 28, 2020 at 05:39:13PM -0700, Havard Skinnemoen via wrote: > > This series briefly documents the existing IPMI device support for main > > processor emulation, and goes on to propose a similar device structure to > > emulate

[PATCH 0/4] linux-user: update syscall_nr headers to Linux 5.9-rc7

2020-09-29 Thread Laurent Vivier
All the changes have been done using: scripts/gensyscalls.sh, scripts/update-mips-syscall-args.sh and scripts/update-syscalltbl.sh I've checked syscall_nr.h generated from syscall.tbl are always correctly generated (there have been massive changes in x86 targets). The series also removes

[PATCH 3/4] linux-user: update syscall.tbl to Linux 5.9-rc7

2020-09-29 Thread Laurent Vivier
Updated running scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier --- linux-user/alpha/syscall.tbl | 4 +- linux-user/arm/syscall.tbl| 4 +- linux-user/hppa/syscall.tbl | 8 +- linux-user/i386/syscall_32.tbl| 820 +++---

[PATCH 1/4] linux-user: update syscall_nr.h to Linux 5.9-rc7

2020-09-29 Thread Laurent Vivier
Update gensyscalls.sh not to generate an empty line at the end of the file And then automatically update syscall_nr.h running scripts/gensyscalls.sh Signed-off-by: Laurent Vivier --- linux-user/aarch64/syscall_nr.h | 7 +-- linux-user/nios2/syscall_nr.h| 7 +--

[PATCH 2/2] hw/block/m25p80: Fix nonvolatile-cfg property default value

2020-09-29 Thread Joe Komlodi
The nvcfg registers are all 1s, unless previously modified. Signed-off-by: Joe Komlodi --- hw/block/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 43830c9..69c88d4 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@

[PATCH 4/4] linux-user: remove _sysctl

2020-09-29 Thread Laurent Vivier
It has been removed from linux since 61a47c1ad3a4 ("sysctl: Remove the sysctl system call") It's a good news because it was not really supported by qemu. Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/linux-user/syscall.c

[PATCH 2/4] linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7

2020-09-29 Thread Laurent Vivier
Updated running scripts/update-mips-syscall-args.sh Signed-off-by: Laurent Vivier --- linux-user/mips/syscall-args-o32.c.inc | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/mips/syscall-args-o32.c.inc b/linux-user/mips/syscall-args-o32.c.inc index 0ad35857b4e4..92ee4f921ec7

[PATCH 1/2] hw/block/m25p80: Fix Numonyx dummy cycle register behavior

2020-09-29 Thread Joe Komlodi
Numonyx chips determine the number of cycles to wait based on bits 7:4 in the volatile configuration register. However, if these bits are 0x0 or 0xF, the number of dummy cycles to wait is 10 on a QIOR or QIOR4 command, or 8 on any other currently supported fast read command. [1] [1]

[PATCH 0/2] hw/block/m25p80: Fix Numonyx flash dummy cycle register behavior

2020-09-29 Thread Joe Komlodi
Hi all, This series addresses a couple issues with dummy cycle counts with Numonyx flashes. The first patch fixes the behavior of the dummy cycle register so it's closer to how hardware behaves. As a consequence, it also corrects the amount of dummy cycles QIOR and QIOR4 commands need by

[Bug 1821595] Re: Failed to emulate MMIO access with EmulatorReturnStatus: 2

2020-09-29 Thread Fernando Luiz
Hi. I didnt build Qemu but I downloaded the last version 5.1.0 from https://qemu.weilnetz.de/w64/ and the error "Failed to emulate MMIO access with EmulatorReturnStatus: 2" happens when I use -drive if=pflash or -pflash with -accel whpx. "qemu-system-x86_64.exe -pflash d:\macWIN\OVMF_CODE.fd

[PATCH] qom: fix objects with improper parent type

2020-09-29 Thread Sergey Nizovtsev
Some objects accidentally inherit ObjectClass instead of Object. They compile silently but may crash after downcasting. In this patch, we introduce a coccinelle script to find broken declarations and fix them manually with proper base type. Signed-off-by: Sergey Nizovtsev ---

Re: [PATCH v2 4/8] linux-user: Add IPv6 options to do_print_sockopt()

2020-09-29 Thread Laurent Vivier
Le 11/08/2020 à 09:09, Shu-Chun Weng a écrit : > Signed-off-by: Shu-Chun Weng > --- > v1 -> v2: > New: Add all IPV6 options to do_print_sockopt(), including the newly > supported > IPV6_ADDR_PREFERENCES. > > linux-user/strace.c | 108 > 1 file

Re: [PATCH v4] linux-user: Add most IFTUN ioctls

2020-09-29 Thread Laurent Vivier
Le 29/09/2020 à 03:48, Shu-Chun Weng via a écrit : > The three options handling `struct sock_fprog` (TUNATTACHFILTER, > TUNDETACHFILTER, and TUNGETFILTER) are not implemented. Linux kernel > keeps a user space pointer in them which we cannot correctly handle. > > Signed-off-by: Josh Kunz >

[PATCH v2 14/14] hw/block/nvme: allow open to close transitions by controller

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Allow the controller to release open resources by transitioning implicitly and explicitly opened zones to closed. This is done using a naive "least recently opened" strategy. Signed-off-by: Klaus Jensen --- hw/block/nvme-ns.h| 5 ++ hw/block/nvme-ns.c| 5 ++

[PATCH] qom: fix objects with improper parent type

2020-09-29 Thread Sergey Nizovtsev
Some objects accidentally inherit ObjectClass instead of Object. They compile silently but may crash after downcasting. In this patch, we introduce a coccinelle script to find broken declarations and fix them manually with proper base type. Signed-off-by: Sergey Nizovtsev ---

[PATCH v2 11/14] hw/block/nvme: add the zone management send command

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Add the Zone Management Send command. Signed-off-by: Klaus Jensen --- hw/block/nvme.h | 1 + include/block/nvme.h | 29 +++ hw/block/nvme.c | 552 -- hw/block/trace-events | 11 + 4 files changed, 574 insertions(+),

[PATCH v2 12/14] hw/block/nvme: add the zone append command

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Add the Zone Append command. Signed-off-by: Klaus Jensen --- hw/block/nvme.h | 6 include/block/nvme.h | 7 + hw/block/nvme.c | 71 +++ hw/block/trace-events | 1 + 4 files changed, 79 insertions(+), 6

[PATCH] qom: fix objects with improper parent type

2020-09-29 Thread Sergey Nizovtsev
Some objects accidentally inherit ObjectClass instead of Object. They compile silently but may crash after downcasting. In this patch, we introduce a coccinelle script to find broken declarations and fix them manually with proper base type. Signed-off-by: Sergey Nizovtsev ---

[PATCH v2 05/14] hw/block/nvme: consolidate read, write and write zeroes

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Consolidate the read/write and write zeroes functions. Signed-off-by: Klaus Jensen --- hw/block/nvme.h | 11 include/block/nvme.h | 2 ++ hw/block/nvme.c | 65 +++ hw/block/trace-events | 3 +- 4 files changed,

[PATCH v2 13/14] hw/block/nvme: track and enforce zone resources

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Track number of open/active resources. Signed-off-by: Klaus Jensen --- docs/specs/nvme.txt | 7 + hw/block/nvme-ns.h | 7 + include/block/nvme.h | 2 ++ hw/block/nvme-ns.c | 25 +++-- hw/block/nvme.c | 67

[PATCH v2 10/14] hw/block/nvme: add the zone management receive command

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Add the Zone Management Receive command. Signed-off-by: Klaus Jensen --- hw/block/nvme-ns.h| 11 +++- hw/block/nvme.h | 1 + include/block/nvme.h | 46 ++ hw/block/nvme-ns.c| 49 --- hw/block/nvme.c | 135

[PATCH v2 08/14] hw/block/nvme: support namespace types

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Implement support for TP 4056 ("Namespace Types"). This adds the 'iocs' (I/O Command Set) device parameter to the nvme-ns device. Signed-off-by: Klaus Jensen --- docs/specs/nvme.txt | 3 + hw/block/nvme-ns.h| 14 ++- hw/block/nvme.h | 3 +

[PATCH v2 07/14] hw/block/nvme: add commands supported and effects log page

2020-09-29 Thread Klaus Jensen
From: Gollu Appalanaidu This is to support for the Commands Supported and Effects log page. See NVM Express Spec 1.3d, sec. 5.14.1.5 ("Commands Supported and Effects") Signed-off-by: Gollu Appalanaidu Signed-off-by: Klaus Jensen --- include/block/nvme.h | 21 + hw/block/nvme.c

[PATCH v2 04/14] hw/block/nvme: reject io commands if only admin command set selected

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen If the host sets CC.CSS to 111b, all commands submitted to I/O queues should be completed with status Invalid Command Opcode. Note that this is technically a v1.4 feature, but it does not hurt to implement before we finally bump the reported version implemented.

[PATCH v2 09/14] hw/block/nvme: add basic read/write for zoned namespaces

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen This adds basic read and write for zoned namespaces. A zoned namespace is created by setting the iocs namespace parameter to 0x2 and specifying the zns.zcap parameter (zone capacity) in number of logical blocks per zone. If a zone size (zns.zsze) is not specified, the

[PATCH v2 06/14] hw/block/nvme: add support for dulbe and block utilization tracking

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen This adds support for reporting the Deallocated or Unwritten Logical Block error (DULBE). This requires tracking the allocated/deallocated status of all logical blocks. Introduce a bitmap that does this. The bitmap is persisted on the new 'pstate' blockdev that is associated

[PATCH v2 02/14] hw/block/nvme: add trace event for requests with non-zero status code

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen If a command results in a non-zero status code, trace it. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 6 ++ hw/block/trace-events | 1 + 2 files changed, 7 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 84b6b516fa7b..3cbc3c7b75b1 100644

[PATCH v2 01/14] hw/block/nvme: add nsid to get/setfeat trace events

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Include the namespace id in the pci_nvme_{get,set}feat trace events. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 ++-- hw/block/trace-events | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index

[PATCH v2 03/14] hw/block/nvme: make lba data size configurable

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen Allos the LBA data size (lbads) to be set between 9 and 12. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé --- docs/specs/nvme.txt | 11 ++- hw/block/nvme-ns.h | 1 + hw/block/nvme-ns.c | 8

[PATCH v2 00/14] hw/block/nvme: zoned namespace command set

2020-09-29 Thread Klaus Jensen
From: Klaus Jensen So, things escalated a bit. I'm removing the old cover letter. I don't think we need it anymore - you all know the reason I keep posting versions of this implementation ;) Based-on: <20200922084533.1273962-1-...@irrelevant.dk> Changes for v2 ~~ *

[Bug 1897481] Re: qemu crashes with VGA pass-through, e-GPU, nvidia 1060

2020-09-29 Thread Alex Williamson
Please attach output from `dmesg` and `sudo lspci -vvv`, both from the host. Laptops typically don't provide sufficient resources for GPUs attached like this, so my guess is that we're trying to add a quirk on top of a BAR that isn't mapped. If that's the case, the following host kernel options

Re: [PATCH v3 07/18] hw/block/nvme: add support for the get log page command

2020-09-29 Thread Keith Busch
On Wed, Sep 30, 2020 at 12:42:48AM +0200, Klaus Jensen wrote: > On Sep 29 15:34, Keith Busch wrote: > > Yeah, looks safe as-is, but we're missing out on returning the spec > > required 'Invalid Field'. > > I can't see where it says that we should do that? Invalid Field in > Command if offset is

[PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job

2020-09-29 Thread Philippe Mathieu-Daudé
Add a job to build QEMU on Aarch64 with TCG disabled, so this configuration won't bitrot over time. We explicitly modify default-configs/aarch64-softmmu.mak to only select the 'virt' and 'SBSA-REF' machines. Signed-off-by: Philippe Mathieu-Daudé --- Job ran for 7 min 30 sec

[PATCH v4 10/12] target/arm: Do not build TCG objects when TCG is off

2020-09-29 Thread Philippe Mathieu-Daudé
From: Samuel Ortiz We can now safely turn all TCG dependent build off when CONFIG_TCG is off. This allows building ARM binaries with --disable-tcg. Signed-off-by: Samuel Ortiz [PMD: Heavily rebased during almost 2 years then finally rewritten =) ] Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3

2020-09-29 Thread Philippe Mathieu-Daudé
The current 'virt_kvm' test is restricted to GICv2, but can also work with a GICv3. Duplicate it but add a GICv3 test which can be tested on some hardware. Noticed while running: $ avocado --show=app run -t machine:virt tests/acceptance/ ... (2/6)

[PATCH v4 11/12] target/arm: Reorder meson.build rules

2020-09-29 Thread Philippe Mathieu-Daudé
Reorder the rules to make this file easier to modify. Signed-off-by: Philippe Mathieu-Daudé --- I prefer to not squash that with the previous patch, as it makes it harder to review. --- target/arm/meson.build | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff

[PATCH v4 06/12] target/arm: Restrict ARMv6 cpus to TCG accel

2020-09-29 Thread Philippe Mathieu-Daudé
KVM requires a cpu based on (at least) the ARMv7 architecture. Only enable the following ARMv6 CPUs when TCG is available: - ARM1136 - ARM1176 - ARM11MPCore - Cortex-M0 Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git

  1   2   3   4   5   6   >