Re: [PULL 00/11] capstone + disassembler patch queue

2020-09-23 Thread Paolo Bonzini
On 22/09/20 19:47, Richard Henderson wrote: > The following changes since commit 834b9273d5cdab68180dc8c84d641aaa4344b057: > > Merge remote-tracking branch > 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-request' into staging > (2020-09-22 15:42:23 +0100) > > are available in the Git

Re: [PATCH v8 3/7] usb/hcd-xhci: Split pci wrapper for xhci base model

2020-09-23 Thread Gerd Hoffmann
Hi, > Can you also provide any steps to test vmstate migration ? Helper script below, run it with something like: $script -m 4G -vga std \ -cdrom Fedora-Workstation-Live-x86_64-32-1.6.iso \ -device qemu-xhci -device usb-tablet cut here

Re: [PATCH v2 1/3] hw/smbios: support loading OEM strings values from a file

2020-09-23 Thread Laszlo Ersek
Hi Daniel, On 09/23/20 12:41, Daniel P. Berrangé wrote: > Some applications want to pass quite large values for the OEM strings > entries. Rather than having huge strings on the command line, it would > be better to load them from a file, as supported with -fw_cfg. > > This introduces the "path"

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-23 Thread Thomas Huth
On 23/09/2020 20.18, Alberto Garcia wrote: > On Fri 04 Sep 2020 10:25:13 AM CEST, Kevin Wolf wrote: >>> Test 030 is still occasionally failing in the CI ... so for the >>> time being, let's disable it in the "auto" group. We can add it >>> back once it got more stable. >>> >>> Signed-off-by:

RE: [RFC PATCH v3 30/34] Hexagon (target/hexagon) TCG for instructions with multiple definitions

2020-09-23 Thread Taylor Simpson
> > On 8/31/20 4:10 PM, Taylor Simpson wrote: > > > > > > > > >> -Original Message- > > >> From: Richard Henderson > > >> Sent: Monday, August 31, 2020 1:20 PM > > >> To: Taylor Simpson ; qemu-devel@nongnu.org > > >> Cc: phi...@redhat.com; laur...@vivier.eu; riku.voi...@iki.fi; > > >>

RE: [RFC PATCH v3 34/34] Hexagon build infrastructure

2020-09-23 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Friday, August 28, 2020 9:20 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: phi...@redhat.com; laur...@vivier.eu; riku.voi...@iki.fi; > aleksandar.m.m...@gmail.com; a...@rev.ng > Subject: Re: [RFC PATCH v3 34/34] Hexagon

Re: [PATCH 3/4] net/colo-compare.c: Add secondary old packet detection

2020-09-23 Thread Li Zhijian
On 9/23/20 2:47 PM, Zhang, Chen wrote: -Original Message- From: Li Zhijian Sent: Tuesday, September 22, 2020 2:47 PM To: Zhang, Chen ; Jason Wang ; qemu-dev Cc: Zhang Chen Subject: Re: [PATCH 3/4] net/colo-compare.c: Add secondary old packet detection On 9/18/20 5:22 PM, Zhang

[Bug 1896317] Re: ioapic: UndefinedBehaviorSanitizer starting qemu-system-i386

2020-09-23 Thread Peter Xu
I cannot reproduce locally with 053a4177817... What could I have missed? It's kind of odd - For i386, ioapic_as should be set in ../softmmu/vl.c:4355 in pc_memory_init(). The failure triggered at qemu_init softmmu/vl.c:4458:5, which is later. However I don't see any place that ioapic_as can be

Re: [PATCH v2 25/38] qapi/gen.py: add type hint annotations

2020-09-23 Thread Eduardo Habkost
On Wed, Sep 23, 2020 at 08:29:17PM -0400, John Snow wrote: > On 9/23/20 7:51 PM, Cleber Rosa wrote: > > On Tue, Sep 22, 2020 at 05:00:48PM -0400, John Snow wrote: > > > Annotations do not change runtime behavior. > > > This commit *only* adds annotations. > > > > > > Signed-off-by: John Snow > >

Re: [PATCH v3 51/81] target/arm: Pass separate addend to {U, S}DOT helpers

2020-09-23 Thread LIU Zhiwei
On 2020/9/23 22:46, Richard Henderson wrote: On 9/23/20 3:01 AM, LIU Zhiwei wrote: On 2020/9/19 2:37, Richard Henderson wrote: For SVE, we potentially have a 4th argument coming from the movprfx instruction.  Currently we do not optimize movprfx, so the problem is not visible. Hi Richard,

[PATCH 7/8] softfloat: Use x86_64 assembly for {add,sub}{192,256}

2020-09-23 Thread Richard Henderson
The compiler cannot chain more than two additions together. Use inline assembly for 3 or 4 additions. Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 18 -- fpu/softfloat.c| 28 2 files changed, 44 insertions(+),

[PATCH 6/8] softfloat: Implement float128_muladd

2020-09-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 2 + fpu/softfloat.c | 356 +++- tests/fp/fp-test.c | 2 +- tests/fp/wrap.c.inc | 12 ++ 4 files changed, 370 insertions(+), 2 deletions(-) diff --git

[PATCH 8/8] softfloat: Use aarch64 assembly for {add,sub}{192,256}

2020-09-23 Thread Richard Henderson
The compiler cannot chain more than two additions together. Use inline assembly for 3 or 4 additions. Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 14 ++ fpu/softfloat.c| 25 + 2 files changed, 39 insertions(+) diff

[PATCH 2/8] softfloat: Use int128.h for some operations

2020-09-23 Thread Richard Henderson
Use our Int128, which wraps the compiler's __int128_t, instead of open-coding left shifts and arithmetic. We'd need to extend Int128 to have unsigned operations to replace more than these three. Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 39

[PATCH 5/8] softfloat: Inline pick_nan_muladd into its caller

2020-09-23 Thread Richard Henderson
Because of FloatParts, there will only ever be one caller. Inlining allows us to re-use abc_mask for the snan test. Signed-off-by: Richard Henderson --- fpu/softfloat.c | 75 +++-- 1 file changed, 35 insertions(+), 40 deletions(-) diff --git

[PATCH 1/8] softfloat: Use mulu64 for mul64To128

2020-09-23 Thread Richard Henderson
Via host-utils.h, we use a host widening multiply for 64-bit hosts, and a common subroutine for 32-bit hosts. Signed-off-by: Richard Henderson --- include/fpu/softfloat-macros.h | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git

[PATCH 3/8] softfloat: Tidy a * b + inf return

2020-09-23 Thread Richard Henderson
No reason to set values in 'a', when we already have float_class_inf in 'c', and can flip that sign. Signed-off-by: Richard Henderson --- fpu/softfloat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 67cfa0fd82..9db55d2b11

[PATCH 0/8] softfloat: Implement float128_muladd

2020-09-23 Thread Richard Henderson
Plus assorted cleanups, passes tests/fp/fp-test. I will eventually fill in ppc and s390x assembly bits. r~ Richard Henderson (8): softfloat: Use mulu64 for mul64To128 softfloat: Use int128.h for some operations softfloat: Tidy a * b + inf return softfloat: Add float_cmask and constants

[PATCH 4/8] softfloat: Add float_cmask and constants

2020-09-23 Thread Richard Henderson
Testing more than one class at a time is better done with masks. This reduces the static branch count. Signed-off-by: Richard Henderson --- fpu/softfloat.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c

Re: [PATCH v8 4/7] scripts: add block-coroutine-wrapper.py

2020-09-23 Thread Eric Blake
On 9/23/20 7:00 PM, Eric Blake wrote: Tested-by: Eric Blake There's enough grammar fixes, and the fact that John is working on python cleanups, to make me wonder if we need a v9, or if I should just stage it where it is with any other cleanups as followups.  But I'm liking the reduced

Re: [PATCH v2 25/38] qapi/gen.py: add type hint annotations

2020-09-23 Thread John Snow
On 9/23/20 7:51 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:48PM -0400, John Snow wrote: Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow --- scripts/qapi/gen.py | 102 +++- 1 file

Re: [PATCH v8 4/7] scripts: add block-coroutine-wrapper.py

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: We have a very frequent pattern of creating coroutine from function with several arguments: +++ b/scripts/block-coroutine-wrapper.py @@ -0,0 +1,187 @@ +#!/usr/bin/env python3 +"""Generate coroutine wrappers for block subsystem.

Re: [PATCH v8 4/7] scripts: add block-coroutine-wrapper.py

2020-09-23 Thread Eric Blake
On 9/15/20 3:02 PM, Vladimir Sementsov-Ogievskiy wrote: 15.09.2020 19:44, Vladimir Sementsov-Ogievskiy wrote: We have a very frequent pattern of creating coroutine from function with several arguments:    - create structure to pack parameters    - create _entry function to call original

Re: [PATCH v2 27/38] qapi/gen.py: Remove unused parameter

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:50PM -0400, John Snow wrote: > module_basename doesn't use the 'what' argument, so remove it. > > Signed-off-by: John Snow Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 26/38] qapi/gen.py: Enable checking with mypy

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:49PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- > scripts/qapi/mypy.ini | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini > index 43c8bd1973..dbfeda748c 100644 > --- a/scripts/qapi/mypy.ini >

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread John Snow
On 9/23/20 7:08 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: 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 --- scripts/qapi/gen.py | 2 +- 1 file

Re: [PATCH v2 22/38] qapi/source.py: add type hint annotations

2020-09-23 Thread John Snow
On 9/23/20 6:36 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:45PM -0400, John Snow wrote: Annotations do not change runtime behavior. This commit *only* adds annotations. Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - scripts/qapi/source.py | 31

Re: [PATCH v2 25/38] qapi/gen.py: add type hint annotations

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:48PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow > --- > scripts/qapi/gen.py | 102 +++- > 1 file changed, 53 insertions(+), 49

Re: [PATCH v2 21/38] qapi/commands.py: enable checking with mypy

2020-09-23 Thread John Snow
On 9/23/20 6:21 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:44PM -0400, John Snow wrote: Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index b668776d94..9da1dccef4 100644 ---

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Wed, Sep 23, 2020 at 07:10:35PM -0400, Cleber Rosa wrote: > On Wed, Sep 23, 2020 at 02:33:35PM -0400, Eduardo Habkost wrote: > > On Wed, Sep 23, 2020 at 02:29:28PM -0400, John Snow wrote: > > > On 9/23/20 11:17 AM, Eduardo Habkost wrote: > > > > This changes behavior if name=='', and I guess

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Wed, Sep 23, 2020 at 07:08:50PM -0400, Cleber Rosa wrote: > On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: > > 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 > >

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Wed, Sep 23, 2020 at 02:33:35PM -0400, Eduardo Habkost wrote: > On Wed, Sep 23, 2020 at 02:29:28PM -0400, John Snow wrote: > > On 9/23/20 11:17 AM, Eduardo Habkost wrote: > > > This changes behavior if name=='', and I guess this is OK, but > > > I'm not sure. I miss documentation on

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: > 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 > --- > scripts/qapi/gen.py | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 32/38] qapi/introspect.py: create a typed 'Node' data structure

2020-09-23 Thread John Snow
On 9/23/20 2:41 PM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:55PM -0400, John Snow wrote: Replacing the un-typed tuple, add a typed Node that we can add typed metadata to. Signed-off-by: John Snow This is the most complex patch so far, and it's very hard to understand what it

Re: [PATCH v2 23/38] qapi/source.py: delint with pylint

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:46PM -0400, John Snow wrote: > 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: Cleber Rosa Tested-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 22/38] qapi/source.py: add type hint annotations

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:45PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow > --- > scripts/qapi/mypy.ini | 5 - > scripts/qapi/source.py | 31 ++- > 2 files

Re: [PATCH v4 0/2] qemu/atomic.h: rename atomic_ to qatomic_

2020-09-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200923151901.745277-1-phi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200923151901.745277-1-phi...@redhat.com Subject: [PATCH v4 0/2] qemu/atomic.h: rename

Re: [PATCH v2 21/38] qapi/commands.py: enable checking with mypy

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:44PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- > scripts/qapi/mypy.ini | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini > index b668776d94..9da1dccef4 100644 > --- a/scripts/qapi/mypy.ini >

Re: [PATCH v2 20/38] qapi/commands.py: add notational type hints

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:43PM -0400, John Snow wrote: > Signed-off-by: John Snow Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v2 36/38] qapi/visit.py: assert tag_member contains a QAPISchemaEnumType

2020-09-23 Thread John Snow
On 9/23/20 3:15 PM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:59PM -0400, John Snow wrote: Signed-off-by: John Snow This for making mypy happy, correct? An explanation in the commit message would be nice. Reviewed-by: Eduardo Habkost Yes, it's for mypy -- but it's a runtime

Re: [PATCH v2 35/38] qapi/types.py: remove one-letter variables

2020-09-23 Thread John Snow
On 9/23/20 3:14 PM, Eduardo Habkost wrote: I'm not sure I like this weird expression, but I believe asking for a 120-patch cleanup series to be respun because of a tiny style issue would be counterproductive, so: Reviewed-by: Eduardo Habkost I was trying to reduce the indent level to

Re: [PATCH] docs: Better mention of qemu-img amend limitations

2020-09-23 Thread Nir Soffer
On Wed, Sep 23, 2020 at 11:38 PM Eric Blake wrote: > > Missed during merge resolution of commit bc5ee6da71. > > Signed-off-by: Eric Blake > --- > docs/tools/qemu-img.rst | 4 > 1 file changed, 4 insertions(+) > > diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst > index

[Bug 1896096] Re: Git version: Build process is broken in block_curl.c.o

2020-09-23 Thread Toolybird
v2 patches appear to work fine in both test scenarios. Thanks again. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1896096 Title: Git version: Build process is broken in block_curl.c.o Status in

Re: [PATCH v2 31/38] qapi/introspect.py: add _gen_features helper

2020-09-23 Thread Eduardo Habkost
On Wed, Sep 23, 2020 at 05:43:45PM -0400, John Snow wrote: > On 9/23/20 12:35 PM, Eduardo Habkost wrote: > > I believe these two lines above should be removed, as suggested > > in patch 30, but let's ignore that for now. > > > > Yup, headed there. > > > > -if features: > > > -

Re: [PATCH v2 32/38] qapi/introspect.py: create a typed 'Node' data structure

2020-09-23 Thread John Snow
On 9/23/20 2:41 PM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:55PM -0400, John Snow wrote: Replacing the un-typed tuple, add a typed Node that we can add typed metadata to. Signed-off-by: John Snow This is the most complex patch so far, and it's very hard to understand what it

Re: [PATCH v8 3/7] block: declare some coroutine functions in block/coroutines.h

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: We are going to keep coroutine-wrappers code (structure-packing parameters, BDRV_POLL wrapper functions) in separate auto-generated files. So, we'll need a header with declaration of original _co_ functions, for those which are static now.

Re: [PATCH v2 31/38] qapi/introspect.py: add _gen_features helper

2020-09-23 Thread John Snow
On 9/23/20 12:35 PM, Eduardo Habkost wrote: I believe these two lines above should be removed, as suggested in patch 30, but let's ignore that for now. Yup, headed there. -if features: -obj['features'] = [(f.name, Extra(None, f.ifcond)) for f in features] I can't say I

Re: [PATCH v2 30/38] qapi/introspect.py: Add a typed 'extra' structure

2020-09-23 Thread John Snow
On 9/23/20 12:13 PM, Eduardo Habkost wrote: On Tue, Sep 22, 2020 at 05:00:53PM -0400, John Snow wrote: Typing arbitrarily shaped dicts with mypy is difficult prior to Python 3.8; using explicit structures is nicer. Since we always define an Extra type now, the return type of _make_tree

Re: [PATCH v2 14/38] qapi/common.py: Convert comments into docstrings, and elaborate

2020-09-23 Thread John Snow
On 9/23/20 3:38 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:37PM -0400, John Snow wrote: As docstrings, they'll show up in documentation and IDE help. Signed-off-by: John Snow --- scripts/qapi/common.py | 51 ++ 1 file changed, 37

Re: [PATCH] load_elf: Remove unused address variables from callers

2020-09-23 Thread BALATON Zoltan via
On Wed, 23 Sep 2020, BALATON Zoltan wrote: On Tue, 7 Jul 2020, BALATON Zoltan wrote: On Tue, 7 Jul 2020, Alistair Francis wrote: On Sun, Jul 5, 2020 at 10:41 AM BALATON Zoltan wrote: Several callers of load_elf() pass pointers for lowaddr and highaddr parameters which are then not used for

Re: [PATCH] load_elf: Remove unused address variables from callers

2020-09-23 Thread BALATON Zoltan via
On Tue, 7 Jul 2020, BALATON Zoltan wrote: On Tue, 7 Jul 2020, Alistair Francis wrote: On Sun, Jul 5, 2020 at 10:41 AM BALATON Zoltan wrote: Several callers of load_elf() pass pointers for lowaddr and highaddr parameters which are then not used for anything. This may stem from a

Re: [PATCH 14/14] qapi/doc.py: enable pylint checks

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:18:02PM -0400, John Snow wrote: > Signed-off-by: John Snow Tested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 13/14] qapi/doc.py: Assert type of object variant

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:18:01PM -0400, John Snow wrote: > Objects may have variants, but those variants must themselves be > objects. This is difficult to express with our current type system and > hierarchy, so instead pepper in an assertion. > > Note: These assertions don't appear to be

Re: [PATCH 12/14] qapi/doc.py: Assert tag member is Enum type

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:18:00PM -0400, John Snow wrote: > The type system can't quite express this constraint natively: members > can envelop any type -- but tag_members may only ever envelop an > enumerated type. > > For now, shrug and add an assertion. > > Note: These assertions don't

Re: [PATCH 11/14] qapi/doc.py: Don't use private attributes of QAPIGen property

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:59PM -0400, John Snow wrote: > Use the new __bool__ method to do the same without exposing the private > attribute. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 10/14] qapi/gen.py: Add __bool__ dunder method to QAPIGen

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:58PM -0400, John Snow wrote: > Falseish when there is no body or preamble; Trueish when there is. > Header and footer are excluded for now, because they are assumed to be > dynamic and always present. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost --

Re: [PATCH 09/14] qapi/doc.py: Remove one-letter variables

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:57PM -0400, John Snow wrote: > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 06/14] qapi/doc.py: Add type hint annotations

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:54PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v4 1/2] qemu/atomic: Update coding style to make checkpatch.pl happier

2020-09-23 Thread Carlo Marcelo Arenas Belón
will be also nice to squash the following on top for a complete clean checkpatch version, as the original patch introduces at least 1 issue Carlo --- >8 --- Subject: fixup! [PATCH 1/2] qemu/atomic.h: rename atomic_ to qatomic_ fixes: ERROR: Macros with multiple statements should be enclosed in

Re: [PATCH 05/14] qapi/doc.py: Assert no suffix given for enum members

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:53PM -0400, John Snow wrote: > We don't do anything with this argument. If something shows up here, > something wrong has happened. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 04/14] qapi/doc.py: assert correct types in member_func callbacks

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:52PM -0400, John Snow wrote: > These each take a specific subtype; assert that they got that correct > subtype. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 07/14] qapi/doc.py: enable mypy checks

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:55PM -0400, John Snow wrote: > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 03/14] qapi/doc.py: Add assertion on section.member

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:51PM -0400, John Snow wrote: > Similarly to other cases, we lack the power at the moment to express > that a specific member is constrained to a certain containing type. Add > an assertion before we use properties specific to that type. > > Signed-off-by: John Snow

Re: [PATCH 02/14] qapi/doc.py: avoid unnecessary keyword arguments

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:50PM -0400, John Snow wrote: > Keyword Callables are hard to type in Python 3.6, avoid them if there's > no urgent need to use them. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 01/14] qapi/doc.py: stash long temporary locals in named locals

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:17:49PM -0400, John Snow wrote: > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PULL v3 00/15] virtio,pc,acpi: fixes, tests

2020-09-23 Thread Michael S. Tsirkin
Peter, you said you see issues on some systems. I pushed a tag: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream_test which drops some patches I suspect. If that helps, pls let me know. On Mon, Sep 21, 2020 at 08:31:35AM -0400, Michael S. Tsirkin wrote: > On Mon, Sep 21,

[PATCH] docs: Better mention of qemu-img amend limitations

2020-09-23 Thread Eric Blake
Missed during merge resolution of commit bc5ee6da71. Signed-off-by: Eric Blake --- docs/tools/qemu-img.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst index c35bd6482203..2b5891b54db7 100644 --- a/docs/tools/qemu-img.rst +++

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

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:13PM -0400, John Snow wrote: > This enforces a type signature against all of the top-level expression > check routines without necessarily needing to create some > overcomplicated class hierarchy for them. > > Signed-off-by: John Snow > --- > scripts/qapi/expr.py |

Re: [PULL 00/13] Block patches

2020-09-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200923161031.69474-1-stefa...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200923161031.69474-1-stefa...@redhat.com Subject: [PULL 00/13] Block patches === TEST

Re: [PATCH 15/16] qapi/expr.py: move related checks inside check_xxx functions

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:12PM -0400, John Snow wrote: > There's not a big obvious difference between the types of checks that > happen in the main function versus the kind that happen in the > functions. Now they're in one place for each of the main types. > > As part of the move, spell out

Re: [PATCH v2 19/38] qapi/commands.py: Don't re-bind to variable of different type

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:42PM -0400, John Snow wrote: > 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: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 14/16] qapi/expr.py: Use tuples instead of lists for static data

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:11PM -0400, John Snow wrote: > It is -- maybe -- possibly -- three nanoseconds faster. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v2 18/38] qapi/events.py: Move comments into docstrings

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:41PM -0400, John Snow wrote: > Signed-off-by: John Snow Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 13/16] qapi/expr.py: Modify check_keys to accept any Iterable

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:10PM -0400, John Snow wrote: > This is a very minor adjustment. > > a + b is list-specific behavior, but we can accept a wider variety of > types in a more pythonic fashion if we avoid that behavior. > > Typing it this way allows callers to use things like

Re: [PATCH v2 17/38] qapi/events.py: add type hint annotations

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:40PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 12/16] qapi/expr.py: Add docstrings

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:09PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- [...] > @@ -160,6 +244,18 @@ def check_type(value: Optional[object], > source: str, > allow_array: bool = False, > allow_dict: Union[bool, str] = False) ->

Re: [PATCH 11/16] qapi/expr.py: enable pylint checks

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:08PM -0400, John Snow wrote: > Signed-off-by: John Snow Tested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v2 16/38] qapi: establish mypy type-checking baseline

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:39PM -0400, John Snow wrote: > 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/ Like with pylint, let's at least document the

Re: [PATCH v8 7/7] block/io: refactor save/load vmstate

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: Like for read/write in a previous commit, drop extra indirection layer, generate directly bdrv_readv_vmstate() and bdrv_writev_vmstate(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/coroutines.h|

Re: [PATCH 10/16] qapi/expr.py: Remove single-letter variable

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:07PM -0400, John Snow wrote: > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 09/16] qapi/expr.py: rewrite check_if

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:06PM -0400, John Snow wrote: > This is a only minor rewrite to address some minor style nits. Don't > compare against the empty list to check for the empty condition, and > move the normalization forward to unify the check on the now-normalized > structure. > >

Re: [PATCH 08/16] qapi/expr.py: add type hint annotations

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:05PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH v2 15/38] qapi/common.py: move build_params into gen.py

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:38PM -0400, John Snow wrote: > 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. > >

Re: [PATCH 07/16] qapi/expr.py: Add casts in a few select cases

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:04PM -0400, John Snow wrote: > Casts are instructions to the type checker only, they aren't "safe" and > should probably be avoided in general. In this case, when we perform > type checking on a nested structure, the type of each field does not > "stick". > > We

Re: [PATCH 06/16] qapi/expr.py: Check type of 'data' member

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:03PM -0400, John Snow wrote: > Iterating over the members of data isn't going to work if it's not some > form of dict anyway, but for type safety, formalize it. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 05/16] qapi/expr.py: move string check upwards in check_type

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:02PM -0400, John Snow wrote: > It's a simple case, shimmy the early return upwards. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 04/16] qapi/expr.py: Add assertion for union type 'check_dict'

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:01PM -0400, John Snow wrote: > mypy isn't fond of allowing you to check for bool membership in a > collection of str elements. Guard this lookup for precisely when we were > given a name. > > Signed-off-by: John Snow > --- > scripts/qapi/expr.py | 4 +++- > 1 file

Re: [PATCH 03/16] qapi/expr.py: constrain incoming expression types

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:13:00PM -0400, John Snow wrote: > mypy does not know the types of values stored in Dicts that masquerade > as objects. Help the type checker out by constraining the type. > > Signed-off-by: John Snow > --- > scripts/qapi/expr.py | 25 ++--- > 1

[PATCH 5/6] spapr_numa: consider user input when defining associativity

2020-09-23 Thread Daniel Henrique Barboza
This patch puts all the pieces together to finally allow user input when defining the NUMA topology of the spapr guest. We have one more kernel restriction to handle in this patch: the associativity array of node 0 must be filled with zeroes [1]. The strategy below ensures that this will happen.

Re: [PATCH v8 2/7] block/io: refactor coroutine wrappers

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: Most of our coroutine wrappers already follow this convention: We have 'coroutine_fn bdrv_co_()' as the core function, and a wrapper 'bdrv_()' which does parameters packing and call bdrv_run_co(). The only outsiders are the bdrv_prwv_co

[PATCH 1/6] spapr: add spapr_machine_using_legacy_numa() helper

2020-09-23 Thread Daniel Henrique Barboza
The changes to come to NUMA support are all guest visible. In theory we could just create a new 5_1 class option flag to avoid the changes to cascade to 5.1 and under. The reality is that these changes are only relevant if the machine has more than one NUMA node. There is no need to change guest

Re: [PATCH v2 14/38] qapi/common.py: Convert comments into docstrings, and elaborate

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:37PM -0400, John Snow wrote: > As docstrings, they'll show up in documentation and IDE help. > > Signed-off-by: John Snow > --- > scripts/qapi/common.py | 51 ++ > 1 file changed, 37 insertions(+), 14 deletions(-) > > diff

[PATCH 3/6] spapr_numa: translate regular NUMA distance to PAPR distance

2020-09-23 Thread Daniel Henrique Barboza
QEMU allows the user to set NUMA distances in the command line. For ACPI architectures like x86, this means that user input is used to populate the SLIT table, and the guest perceives the distances as the user chooses to. PPC64 does not work that way. In the PAPR concept of NUMA, associativity

[PATCH 4/6] spapr_numa: change reference-points and maxdomain settings

2020-09-23 Thread Daniel Henrique Barboza
This is the first guest visible change introduced in spapr_numa.c. The previous settings of both reference-points and maxdomains were too restrictive, but enough for the existing associativity we're setting in the resources. We'll change that in the following patches, populating the associativity

[PATCH 0/6] pseries NUMA distance calculation

2020-09-23 Thread Daniel Henrique Barboza
Hi, This series is a follow-up of the reworked pSeries NUMA code that is already merged upstream. It contains some of the patches that were presented in the first version of this work [1], some of them changed based on the reviews made back there. With this series, we're able to take user input

[PATCH 6/6] specs/ppc-spapr-numa: update with new NUMA support

2020-09-23 Thread Daniel Henrique Barboza
This update provides more in depth information about the choices and drawbacks of the new NUMA support for the spapr machine. Signed-off-by: Daniel Henrique Barboza --- docs/specs/ppc-spapr-numa.rst | 213 ++ 1 file changed, 213 insertions(+) diff --git

[PATCH 2/6] spapr_numa: forbid asymmetrical NUMA setups

2020-09-23 Thread Daniel Henrique Barboza
The pSeries machine does not support asymmetrical NUMA configurations. This doesn't make much of a different since we're not using user input for pSeries NUMA setup, but this will change in the next patches. To avoid breaking existing setups, gate this change by checking for legacy NUMA support.

Re: [PATCH v2 13/38] qapi/common.py: add type hint annotations

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:36PM -0400, John Snow wrote: > Annotations do not change runtime behavior. > This commit *only* adds annotations. > > Signed-off-by: John Snow Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH 02/16] qapi/expr.py: Check for dict instead of OrderedDict

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:12:59PM -0400, John Snow wrote: > OrderedDict is a subtype of dict, so we can check for a more general form. > > Signed-off-by: John Snow Reviewed-by: Eduardo Habkost -- Eduardo

Re: [PATCH 01/16] qapi/expr.py: Remove 'info' argument from nested check_if_str

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:12:58PM -0400, John Snow wrote: > The function can just use the argument from the scope above. Otherwise, > we get shadowed argument errors because the parameter name clashes with > the name of a variable already in-scope. > > Signed-off-by: John Snow Reviewed-by:

  1   2   3   4   5   >