Re: [PATCH v2 1/1] MAINTAINERS: Add Python library stanza

2020-09-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 9/23/20 5:37 PM, Eduardo Habkost wrote: >> On Wed, Sep 23, 2020 at 11:17:01AM -0400, John Snow wrote: >>> On 9/23/20 11:14 AM, Markus Armbruster wrote: John Snow writes: > I'm proposing that I split the actual Python library off from the other >>

Re: [PATCH v3] Add a comment in bios-tables-test.c to clarify the reason behind approach

2020-09-23 Thread Igor Mammedov
On Tue, 22 Sep 2020 17:06:42 +0530 Ani Sinha wrote: > On Tue, Sep 22, 2020 at 4:57 PM Igor Mammedov wrote: > > > > On Tue, 22 Sep 2020 15:39:18 +0530 > > Ani Sinha wrote: > > > > > A comment blob is added in bios-tables-test.c that explains the reasoning > > > behind the process of updating t

[PATCH v2 10/11] acpi/gpex: no reason to use a method for _CRS

2020-09-23 Thread Gerd Hoffmann
... just to return something which is constant anyway. -Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings -{ -Return (ResourceTemplate () -{ -WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecod

[PATCH v2 07/11] tests/acpi: allow updates for expected data files

2020-09-23 Thread Gerd Hoffmann
Also add empty tests/data/acpi/microvm/DSDT.pcie Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 4 tests/data/acpi/microvm/DSDT.pcie | 0 2 files changed, 4 insertions(+) create mode 100644 tests/data/acpi/microvm/DSDT.pcie diff --git a/tests/qtes

[PATCH v2 08/11] tests/acpi: factor out common microvm test setup

2020-09-23 Thread Gerd Hoffmann
... into new test_acpi_microvm_prepare helper Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index a9c8d478aee3..cc4579d914e7 1006

[PATCH v2 11/11] tests/acpi: update expected data files

2020-09-23 Thread Gerd Hoffmann
Also clear allowed changes. Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 4 tests/data/acpi/microvm/DSDT.pcie | Bin 0 -> 3023 bytes tests/data/acpi/virt/DSDT | Bin 5200 -> 5196 bytes tests/data/acpi/virt/DSDT.memhp

[PATCH v2 09/11] tests/acpi: add microvm pcie test

2020-09-23 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index cc4579d914e7..edb3ee5351de 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tab

[PATCH v2 06/11] microvm/pcie: add 64bit mmio window

2020-09-23 Thread Gerd Hoffmann
Place the 64bit window at the top of the physical address space, assign 25% of the avaiable address space. Force cpu.host-phys-bits=on for microvm machine typs so this actually works reliable. Signed-off-by: Gerd Hoffmann --- hw/i386/microvm.c | 7 +++ 1 file changed, 7 insertions(+) diff

[PATCH v2 03/11] arm: use acpi_dsdt_add_gpex

2020-09-23 Thread Gerd Hoffmann
Fill gpex config struct from memory map, then call the new acpi_dsdt_add_gpex helper function. No functional change. Signed-off-by: Gerd Hoffmann --- hw/arm/virt-acpi-build.c | 175 ++- 1 file changed, 9 insertions(+), 166 deletions(-) diff --git a/hw/arm/vi

[PATCH v2 02/11] acpi: add acpi_dsdt_add_gpex

2020-09-23 Thread Gerd Hoffmann
Add helper function to generate dsdt aml code for the gpex pci host. Largely copied from arm/virt. Configuration is handled by passing a config struct instead of looked up from memory map. Signed-off-by: Gerd Hoffmann --- include/hw/pci-host/gpex.h | 11 +++ hw/pci-host/gpex-acpi.c| 179 ++

[PATCH v2 04/11] microvm: add irq table

2020-09-23 Thread Gerd Hoffmann
Add a comment with a table listing the IRQs, both legacy pc and microvm side-by-side. Signed-off-by: Gerd Hoffmann --- include/hw/i386/microvm.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index 3b9fd4ff17fd..0

[PATCH v2 01/11] move MemMapEntry

2020-09-23 Thread Gerd Hoffmann
It is defined twice already. Move to a common header file to remove duplication and make it available to everybody. Signed-off-by: Gerd Hoffmann --- include/exec/hwaddr.h | 5 + include/hw/arm/virt.h | 5 - hw/arm/sbsa-ref.c | 5 - 3 files changed, 5 insertions(+), 10 deletions(

[PATCH v2 05/11] microvm: add pcie support

2020-09-23 Thread Gerd Hoffmann
Uses the existing gpex device which is also used as pcie host bridge on arm/aarch64. For now only a 32bit mmio window and no ioport support. It is disabled by default, use "-machine microvm,pcie=on" to enable. ACPI support must be enabled too because the bus is declared in the DSDT table. Signed

[PATCH v2 00/11] microvm: add pcie support

2020-09-23 Thread Gerd Hoffmann
v2: - move aml generator to gpex and have arm virt + microvm share it. - add 64bit window. - add testcase. Gerd Hoffmann (11): move MemMapEntry acpi: add acpi_dsdt_add_gpex arm: use acpi_dsdt_add_gpex microvm: add irq table microvm: add pcie support microvm/pcie: add 64bit mmio wind

Re: [PATCH] hw/i386/acpi-build: Explain bits in OSC method

2020-09-23 Thread Michael S. Tsirkin
On Wed, Sep 23, 2020 at 09:55:14AM +0200, Julia Suvorova wrote: > Provide a better explanation for the enabled bits in the _OSC control > field. Base it on the latest specification due to new bits 5 and 6. > > Signed-off-by: Julia Suvorova > --- > hw/i386/acpi-build.h | 11 +++ > hw/i386

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

2020-09-23 Thread Gerd Hoffmann
Hi, > @@ -203,8 +202,10 @@ struct XHCIState { > uint32_t numslots; > uint32_t flags; > uint32_t max_pstreams_mask; > -OnOffAuto msi; > -OnOffAuto msix; > +void (*intr_update)(XHCIState *s, int n, bool enable); > +void (*intr_raise)(XHCIState *s, int n, bool level);

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 repo

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: Thomas

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; > > >> al

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 build

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 a/include/fpu/softfloat.

[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 a/fpu/sof

[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 a/include/fpu/softfloat-ma

[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 100644

[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 index

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 main

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 chan

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. Lookin

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 functio

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 ch

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 dele

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 --- a

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 thi

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 `visit_modu

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 delet

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 doe

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 changed

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 ato

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 v

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 accommoda

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 c35bd64

[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 Q

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: > > > -obj['fe

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 doe

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 understan

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 simplifi

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 insertions(

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 an

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 misunderstandin

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 usefu

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 appear

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 -- E

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 a

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 +++ b/docs/to

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 t

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 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 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 dict.keys(

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) -> No

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 versi

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| 1

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. > > Signe

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. > > Signed-off-

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 don't

  1   2   3   4   5   >