Re: [PATCH v5 03/31] exec: Use uintptr_t for guest_base

2021-02-03 Thread Philippe Mathieu-Daudé
On 2/3/21 7:59 PM, Richard Henderson wrote: > This is more descriptive than 'unsigned long'. > No functional change, since these match on all linux+bsd hosts. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > include/exec/cpu-all.h | 2 +- > bsd-user/main.c| 4 ++

Re: [PATCH v3 2/2] pci: add romsize property

2021-02-03 Thread Laszlo Ersek
On 02/03/21 14:18, Paolo Bonzini wrote: > This property can be useful for distros to set up known-good ROM sizes for > migration purposes. The VM will fail to start if the ROM is too large, > and migration compatibility will not be broken if the ROM is too small. > > Note that even though romsize

[PATCH v5 22/31] target/arm: Use the proper TBI settings for linux-user

2021-02-03 Thread Richard Henderson
We were fudging TBI1 enabled to speed up the generated code. Now that we've improved the code generation, remove this. Also, tidy the comment to reflect the current code. The pauth test was testing a kernel address (-1) and making incorrect assumptions about TBI1; stick to userland addresses. Rev

[PATCH v5 27/31] linux-user/aarch64: Signal SEGV_MTESERR for sync tag check fault

2021-02-03 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/aarch64/target_signal.h | 2 ++ linux-user/aarch64/cpu_loop.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/linux-user/aarch64/target_signal.h b/linux-user/aarch64/target_signal.h index ddd73169f0..777fb66

Re: [PATCH v5 03/31] exec: Use uintptr_t for guest_base

2021-02-03 Thread Richard Henderson
On 2/3/21 9:08 AM, Philippe Mathieu-Daudé wrote: > On 2/3/21 7:59 PM, Richard Henderson wrote: >> This is more descriptive than 'unsigned long'. >> No functional change, since these match on all linux+bsd hosts. >> >> Reviewed-by: Peter Maydell >> Signed-off-by: Richard Henderson >> --- >> inclu

[PATCH v5 26/31] linux-user/aarch64: Pass syndrome to EXC_*_ABORT

2021-02-03 Thread Richard Henderson
A proper syndrome is required to fill in the proper si_code. Use page_get_flags to determine permission vs translation for user-only. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/aarch64/cpu_loop.c | 24 +--- target/arm/tlb_helper.c | 15 +

Re: [PATCH v7 2/6] [RISCV_PM] Support CSRs required for RISC-V PM extension except for the ones required for hypervisor mode

2021-02-03 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:56 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo > --- > target/riscv/cpu.c | 3 + > target/riscv/cpu.h | 12 ++ > target/riscv/cpu_bits.h | 66 ++ > target/riscv/csr.c | 271 > 4 files chan

Re: [PATCH v7 4/6] [RISCV_PM] Support pointer masking for RISC-V for i/c/f/d/a types of instructions

2021-02-03 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:51 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo Reviewed-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rva.c.inc | 3 +++ > target/riscv/insn_trans/trans_rvd.c.inc | 2 ++ > target/riscv/insn_trans/trans_rvf.c.inc | 2 ++ > targ

Re: [PATCH 6/6] travis.yml: Move the -fsanitize=thread compile-testing to the gitlab-CI

2021-02-03 Thread Wainer dos Santos Moschetta
Hi, On 2/3/21 8:32 AM, Thomas Huth wrote: It's only about compile-testing (there is too much noise when running the tests), so let's simply add the -fsanitize=thread flag to a job that only compiles the sources. The "build-gprof-gcov" seems to be a good candidate. Signed-off-by: Thomas Huth --

[PATCH v5 30/31] target/arm: Enable MTE for user-only

2021-02-03 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index db81a12418..43933550c3 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -204,6 +204,21 @@ static

Re: [PATCH v5 03/31] exec: Use uintptr_t for guest_base

2021-02-03 Thread Philippe Mathieu-Daudé
On Wed, Feb 3, 2021 at 8:10 PM Richard Henderson wrote: > On 2/3/21 9:08 AM, Philippe Mathieu-Daudé wrote: > > On 2/3/21 7:59 PM, Richard Henderson wrote: > >> This is more descriptive than 'unsigned long'. > >> No functional change, since these match on all linux+bsd hosts. > >> > >> Reviewed-by:

Re: [PATCH 1/6] travis.yml: Move gprof/gcov test across to gitlab

2021-02-03 Thread Wainer dos Santos Moschetta
Hi, On 2/3/21 8:32 AM, Thomas Huth wrote: From: Philippe Mathieu-Daudé Similarly to commit 8cdb2cef3f1, move the gprof/gcov test to GitLab. The coverage-summary.sh script is not Travis-CI specific, make it generic. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201108204535.2319870-10

[PATCH v5 29/31] target/arm: Add allocation tag storage for user mode

2021-02-03 Thread Richard Henderson
Use the now-saved PAGE_ANON and PAGE_MTE bits, and the per-page saved data. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/mte_helper.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/target/arm/mte_helper.c b/target

Re: [PATCH v7 0/6] RISC-V Pointer Masking implementation

2021-02-03 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:54 AM Alexey Baturo wrote: > > Hi folks, > > Sorry it took me almost 3 month to provide the reply and fixes: it was a > really busy EOY. > This series contains fixed @Alistair suggestion on enabling J-ext. > > As for @Richard comments: > - Indeed I've missed appending r

Re: [PATCH v7 5/6] [RISCV_PM] Implement address masking functions required for RISC-V Pointer Masking extension

2021-02-03 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:53 AM Alexey Baturo wrote: > > From: Anatoly Parshintsev > > Signed-off-by: Anatoly Parshintsev > Reviewed-by: Richard Henderson > --- > target/riscv/cpu.h | 19 +++ > target/riscv/translate.c | 34 -- > 2 files c

Re: [PULL v2 00/20] NBD patches for 2021-02-02

2021-02-03 Thread Peter Maydell
On Wed, 3 Feb 2021 at 14:28, Eric Blake wrote: > > The following changes since commit 8360ebeb4f4a707984cafd1a22c049ec82ddcb4c: > > Merge remote-tracking branch > 'remotes/ehabkost-gl/tags/machine-next-pull-request' into staging (2021-02-03 > 09:54:21 +) > > are available in the Git reposi

Re: [PATCH v5 00/31] target-arm: Implement ARMv8.5-MemTag, user mode

2021-02-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210203190010.759771-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210203190010.759771-1-richard.hender...@linaro.org Subject: [PATCH v5 00/31]

Re: [PATCH v4 12/18] migration/rdma: Create the multifd send channels for RDMA

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Signed-off-by: Chuan Zheng > --- > migration/multifd.c | 4 ++-- > migration/multifd.h | 2 ++ > migration/rdma.c| 57 > + > 3 files changed, 61 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH 3/4] hw/virtio/virtio-balloon: Remove the "class" property

2021-02-03 Thread David Hildenbrand
On 03.02.21 18:18, Thomas Huth wrote: This property was only required for compatibility reasons in the pc-1.0 machine type and earlier. Now that these machine types have been removed, the property is not useful anymore. Signed-off-by: Thomas Huth --- hw/virtio/virtio-balloon-pci.c | 11 +-

Re: [PATCH v21 00/20] Initial support for multi-process Qemu

2021-02-03 Thread Elena Ufimtseva
On Wed, Feb 03, 2021 at 04:11:50PM +, Stefan Hajnoczi wrote: > On Fri, Jan 29, 2021 at 11:46:01AM -0500, Jagannathan Raman wrote: > > This is the v21 of the patchset. This version has the following changes: > > The docs/multi-process.rst file caused Sphinx to fail with "document > isn't includ

Re: [PATCH] target/arm: Don't migrate CPUARMState.features

2021-02-03 Thread Andrew Jones
On Wed, Feb 03, 2021 at 11:13:40AM -0500, Aaron Lindsay wrote: > As feature flags are added or removed, the meanings of bits in the > `features` field can change between QEMU versions, causing migration > failures. Additionally, migrating the field is not useful because it is > a constant function

Re: [PATCH v4 13/18] migration/rdma: Add the function for dynamic page registration

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Add the 'qemu_rdma_registration' function, multifd send threads > call it to register memory. This function is a copy of the code out of qemu_rdma_registration_stop; with some of the comments removed. It's OK to split this code out so you can use it a

Re: [PATCH v4 14/18] migration/rdma: register memory for multifd RDMA channels

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Signed-off-by: Zhimin Feng > Signed-off-by: Chuan Zheng This could do with a description in the commit message of the sequence; I think you're waiting for the semaphore; doing the registratin, then waiting again to say that everyone has finished???

Re: [PATCH 6/6] travis.yml: Move the -fsanitize=thread compile-testing to the gitlab-CI

2021-02-03 Thread Wainer dos Santos Moschetta
On 2/3/21 4:23 PM, Wainer dos Santos Moschetta wrote: Hi, On 2/3/21 8:32 AM, Thomas Huth wrote: It's only about compile-testing (there is too much noise when running the tests), so let's simply add the -fsanitize=thread flag to a job that only compiles the sources. The "build-gprof-gcov" seem

Re: [PATCH v4 16/18] migration/rdma: add rdma_channel into Migrationstate field

2021-02-03 Thread Dr. David Alan Gilbert
* Chuan Zheng (zhengch...@huawei.com) wrote: > Multifd RDMA is need to poll when we send data, record it. This looks like it's trying to be the equivalent of the 'static int next_channel' in multifd_send_pages. If so, why not mkae this 'multifd_channel' and make the function 'multifd_next_channel

Re: [PATCH v2] virtiofsd: vu_dispatch locking should never fail

2021-02-03 Thread Vivek Goyal
On Wed, Feb 03, 2021 at 07:24:34PM +0100, Greg Kurz wrote: > pthread_rwlock_rdlock() and pthread_rwlock_wrlock() can fail if a > deadlock condition is detected or the current thread already owns > the lock. They can also fail, like pthread_rwlock_unlock(), if the > mutex wasn't properly initialized

Re: [PATCH v4 2/4] target/arm: Support AA32 DIT by moving PSTATE_SS from cpsr into env->pstate

2021-02-03 Thread Rebecca Cran
On 2/3/21 10:17 AM, Richard Henderson wrote: On 2/2/21 6:58 PM, Rebecca Cran wrote: if (!arm_singlestep_active(env)) { -env->uncached_cpsr &= ~PSTATE_SS; +env->pstate &= ~PSTATE_SS; +} else { +env->pstate |= PSTATE_SS; } Where did

Re: [PATCH v4 2/4] target/arm: Support AA32 DIT by moving PSTATE_SS from cpsr into env->pstate

2021-02-03 Thread Richard Henderson
On 2/3/21 10:28 AM, Rebecca Cran wrote: > On 2/3/21 10:17 AM, Richard Henderson wrote: >> On 2/2/21 6:58 PM, Rebecca Cran wrote: >>>   if (!arm_singlestep_active(env)) { >>> -    env->uncached_cpsr &= ~PSTATE_SS; >>> +    env->pstate &= ~PSTATE_SS; >>> +    } else { >>>

Re: [PATCH v4 04/14] qapi/introspect.py: guard against ifcond/comment misuse

2021-02-03 Thread John Snow
On 2/3/21 9:08 AM, Markus Armbruster wrote: John Snow writes: _tree_to_qlit is called recursively on dict values alone; at such a point in generating output it is too late to apply an ifcond. Similarly, comments do not necessarily have a "tidy" place they can be printed in such a circumstance.

Re: [RFC 3/4] clock: Add clock_ns_to_ticks() function

2021-02-03 Thread Luc Michel
On 12:30 Mon 01 Feb , Peter Maydell wrote: > Add a clock_ns_to_ticks() function which does the opposite of > clock_ticks_to_ns(): given a duration in nanoseconds, it returns the > number of clock ticks that would happen in that time. This is useful > for devices that have a free running counte

Re: [PATCH v2 20/36] block: add bdrv_attach_child_common() transaction action

2021-02-03 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > Split out no-perm part of bdrv_root_attach_child() into separate > transaction action. bdrv_root_attach_child() now moves to new > permission update paradigm: first update graph relations then update > permissions. > > Signed-o

Re: [PATCH v4 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI)

2021-02-03 Thread Cleber Rosa
On Thu, Jan 28, 2021 at 12:51:20PM +0100, Thomas Huth wrote: > On 19/10/2020 03.49, Cleber Rosa wrote: > > TL;DR: this should allow the QEMU maintainer to push to the staging > > branch, and have custom jobs running on the project's aarch64 and > > s390x machines. Simple usage looks like: > > > >

Re: [RFC 0/4] New APIs for the Clock framework

2021-02-03 Thread Luc Michel
On 12:30 Mon 01 Feb , Peter Maydell wrote: [snip] > > Side note: there is currently no MAINTAINERS entry for the > clock framework. Any volunteers? It would cover > > F: include/hw/clock.h > F: include/hw/qdev-clock.h > F: hw/core/clock.c > F: hw/core/qdev-clock.c > F: docs/devel/clocks.rst

Re: [PATCH v4 3/3] virtiofsd: prevent opening of special files (CVE-2020-35517)

2021-02-03 Thread Vivek Goyal
On Wed, Feb 03, 2021 at 05:05:14PM +, Stefan Hajnoczi wrote: > On Wed, Feb 03, 2021 at 11:08:58AM -0500, Vivek Goyal wrote: > > On Wed, Feb 03, 2021 at 05:02:37PM +0100, Greg Kurz wrote: > > > On Wed, 3 Feb 2021 10:28:50 -0500 > > > Vivek Goyal wrote: > > > > > > > On Wed, Feb 03, 2021 at 11:

Re: [PATCH v2 22/36] block: split out bdrv_replace_node_noperm()

2021-02-03 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > Split part of bdrv_replace_node_common() to be used separately. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > @@ -4909,7 +4936,6 @@ static int bdrv_replace_node_common(BlockDriverState > *from, >

Re: [PATCH v4 04/14] qapi/introspect.py: guard against ifcond/comment misuse

2021-02-03 Thread Eduardo Habkost
On Wed, Feb 03, 2021 at 03:42:54PM -0500, John Snow wrote: > On 2/3/21 9:08 AM, Markus Armbruster wrote: > > John Snow writes: > > > > > _tree_to_qlit is called recursively on dict values alone; at such a > > > point in generating output it is too late to apply an ifcond. Similarly, > > > comment

[PATCH] MAINTAINERS: Fix the location of virtiofsd.rst

2021-02-03 Thread Wainer dos Santos Moschetta
The virtiofsd.rst file was moved to docs/tools, so this update MAINTAINERS accordingly. Fixes: a08b4a9fe6c ("docs: Move tools documentation to tools manual") Signed-off-by: Wainer dos Santos Moschetta --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINER

Re: [PATCH v4 06/14] qapi/introspect.py: replace 'extra' dict with 'comment' argument

2021-02-03 Thread John Snow
On 2/3/21 9:23 AM, Markus Armbruster wrote: John Snow writes: This is only used to pass in a dictionary with a comment already set, so skip the runaround and just accept the comment. This works because _tree_to_qlit() treats 'if': None; 'comment': None exactly like absent 'if'; 'comment'. C

Re: [PATCH v2 23/36] block: adapt bdrv_append() for inserting filters

2021-02-03 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > bdrv_append is not very good for inserting filters: it does extra > permission update as part of bdrv_set_backing_hd(). During this update > filter may conflict with other parents of top_bs. > > Instead, let's first do all grap

[PATCH v2 0/2] Add support for ipv6 host forwarding

2021-02-03 Thread dje--- via
This patchset takes the original patch from Maxim, https://www.mail-archive.com/qemu-devel@nongnu.org/msg569573.html and updates it. New option: -ipv6-hostfwd New commands: ipv6_hostfwd_add, ipv6_hostfwd_remove These are the ipv6 equivalents of their ipv4 counterparts. The libslirp part of the

[PATCH v2 2/2] net: Add -ipv6-hostfwd option, ipv6_hostfwd_add/remove commands

2021-02-03 Thread dje--- via
These are identical to their ipv4 counterparts, but for ipv6. Signed-off-by: Doug Evans --- hmp-commands.hx | 28 ++ include/net/slirp.h | 2 + net/slirp.c | 129 +++- qapi/net.json | 4 ++ 4 files changed, 161 insertions(+),

[PATCH v2 1/2] net/slirp.c: Refactor address parsing

2021-02-03 Thread dje--- via
... in preparation for adding ipv6 host forwarding support. --- net/slirp.c | 200 +--- slirp | 2 +- 2 files changed, 130 insertions(+), 72 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index be914c0be0..a21a313302 100644 --- a/net/sl

Re: [PATCH v4 07/14] qapi/introspect.py: Introduce preliminary tree typing

2021-02-03 Thread John Snow
On 2/3/21 9:30 AM, Markus Armbruster wrote: John Snow writes: The types will be used in forthcoming patches to add typing. These types describe the layout and structure of the objects passed to _tree_to_qlit, but lack the power to describe annotations until the next commit. Signed-off-by: Joh

Re: [PATCH v2 1/2] net/slirp.c: Refactor address parsing

2021-02-03 Thread Doug Evans
On Wed, Feb 3, 2021 at 1:37 PM Doug Evans wrote: > ... in preparation for adding ipv6 host forwarding support. > --- > net/slirp.c | 200 +--- > slirp | 2 +- > 2 files changed, 130 insertions(+), 72 deletions(-) > > diff --git a/net/slirp.

Re: cdrom scsi passthough not working well

2021-02-03 Thread daggs
Greetings Philippe, > Sent: Wednesday, February 03, 2021 at 6:48 PM > From: "Philippe Mathieu-Daudé" > To: "daggs" , qemu-disc...@nongnu.org > Cc: "qemu-devel" , "Qemu-block" > Subject: Re: cdrom scsi passthough not working well > > Cc'ing qemu-block@ developers. > > On 10/28/20 6:18 AM, daggs

Re: [PATCH v2 0/2] Add support for ipv6 host forwarding

2021-02-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210203213729.1940893-1-...@google.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210203213729.1940893-1-...@google.com Subject: [PATCH v2 0/2] Add support for ipv6 host for

Re: [PATCH v15 00/23] i386 cleanup PART 2

2021-02-03 Thread Alex Bennée
For patch 17 on onwards it was just seeing what the actual benefit of the derived class was - I think I get it later on but you should mention it up front. I do think we need to address the ordering constraint in 21 - are we introducing one or just formalising what has been created? If we are intr

Re: [PATCH v2 1/2] net/slirp.c: Refactor address parsing

2021-02-03 Thread Samuel Thibault
Doug Evans, le mer. 03 févr. 2021 13:37:28 -0800, a ecrit: > ... in preparation for adding ipv6 host forwarding support. Reviewed-by: Samuel Thibault except > diff --git a/slirp b/slirp > index 8f43a99191..358c0827d4 16 > --- a/slirp > +++ b/slirp > @@ -1 +1 @@ > -Subproject commit 8f43a991

Re: [PATCH v2 2/2] net: Add -ipv6-hostfwd option, ipv6_hostfwd_add/remove commands

2021-02-03 Thread Samuel Thibault
Doug Evans, le mer. 03 févr. 2021 13:37:29 -0800, a ecrit: > @@ -1392,6 +1392,34 @@ SRST >Remove host-to-guest TCP or UDP redirection. > ERST > > +#ifdef CONFIG_SLIRP > +{ > +.name = "ipv6_hostfwd_add", > +.args_type = "arg1:s,arg2:s?", > +.params = "[n

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-03 Thread Eduardo Habkost
On Wed, Feb 03, 2021 at 03:47:36PM +0100, Markus Armbruster wrote: > John Snow writes: > > > Presently, we use a tuple to attach a dict containing annotations > > (comments and compile-time conditionals) to a tree node. This is > > undesirable because dicts are difficult to strongly type; promoti

Re: [PATCH 11/20] ui: add an optional get_flags callback to GraphicHwOps

2021-02-03 Thread Marc-André Lureau
On Wed, Feb 3, 2021 at 7:48 PM Gerd Hoffmann wrote: > > +static int > > +virtio_gpu_get_flags(void *opaque) > > +{ > > +VirtIOGPUBase *g = opaque; > > +int flags = GRAPHIC_FLAGS_NONE; > > + > > +if (virtio_gpu_virgl_enabled(g->conf)) > > +flags |= GRAPHIC_FLAGS_GL; > > + > > +

Re: [PATCH v2 2/2] net: Add -ipv6-hostfwd option, ipv6_hostfwd_add/remove commands

2021-02-03 Thread Doug Evans
On Wed, Feb 3, 2021 at 2:20 PM Samuel Thibault wrote: > Doug Evans, le mer. 03 févr. 2021 13:37:29 -0800, a ecrit: > > @@ -1392,6 +1392,34 @@ SRST > >Remove host-to-guest TCP or UDP redirection. > > ERST > > > > +#ifdef CONFIG_SLIRP > > +{ > > +.name = "ipv6_hostfwd_add", >

Re: [PATCH v2 1/2] net/slirp.c: Refactor address parsing

2021-02-03 Thread Doug Evans
On Wed, Feb 3, 2021 at 2:15 PM Samuel Thibault wrote: > Doug Evans, le mer. 03 févr. 2021 13:37:28 -0800, a ecrit: > > ... in preparation for adding ipv6 host forwarding support. > > Reviewed-by: Samuel Thibault > > except > > > diff --git a/slirp b/slirp > > index 8f43a99191..358c0827d4 16

gitlab containers are broken

2021-02-03 Thread Richard Henderson
Something has gone wrong with the building of the containers in gitlab, because *all* off them are installing Alpine Linux. https://gitlab.com/rth7680/qemu/-/jobs/1006336396#L155 I presume that IMAGE is not actually being passed through, and alpine.docker is lexicographically first. I have a str

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-03 Thread John Snow
On 2/3/21 9:47 AM, Markus Armbruster wrote: John Snow writes: Presently, we use a tuple to attach a dict containing annotations (comments and compile-time conditionals) to a tree node. This is undesirable because dicts are difficult to strongly type; promoting it to a real class allows us to n

Re: [PATCH v4 11/14] qapi/introspect.py: add type hint annotations

2021-02-03 Thread John Snow
On 2/3/21 10:15 AM, Markus Armbruster wrote: John Snow writes: Signed-off-by: John Snow --- scripts/qapi/introspect.py | 115 ++--- scripts/qapi/mypy.ini | 5 -- scripts/qapi/schema.py | 2 +- 3 files changed, 82 insertions(+), 40 deletions(-)

[PATCH v3 0/3]

2021-02-03 Thread dje--- via
Add support for ipv6 host forwarding This patchset takes the original patch from Maxim, https://www.mail-archive.com/qemu-devel@nongnu.org/msg569573.html and updates it. New option: -ipv6-hostfwd New commands: ipv6_hostfwd_add, ipv6_hostfwd_remove These are the ipv6 equivalents of their ipv4 co

[PATCH v3 1/3] slirp: Placeholder for libslirp ipv6 hostfwd support

2021-02-03 Thread dje--- via
This commit is intended to only contain the slirp submodule change that adds ipv6 hostfwd support. --- slirp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slirp b/slirp index 8f43a99191..358c0827d4 16 --- a/slirp +++ b/slirp @@ -1 +1 @@ -Subproject commit 8f43a99191afb47c

[PATCH v3 2/3] net/slirp.c: Refactor address parsing

2021-02-03 Thread dje--- via
... in preparation for adding ipv6 host forwarding support. Signed-off-by: Doug Evans --- net/slirp.c | 200 +--- 1 file changed, 129 insertions(+), 71 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index be914c0be0..a21a313302 100644 --- a/n

[PATCH v3 3/3] net: Add -ipv6-hostfwd option, ipv6_hostfwd_add/remove commands

2021-02-03 Thread dje--- via
These are identical to their ipv4 counterparts, but for ipv6. Signed-off-by: Doug Evans --- hmp-commands.hx | 32 +++ include/net/slirp.h | 2 + net/slirp.c | 128 +++- qapi/net.json | 4 ++ 4 files changed, 164 insertions(+)

Re: [PATCH v3 0/3]

2021-02-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210203233539.1990032-1-...@google.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210203233539.1990032-1-...@google.com Subject: [PATCH v3 0/3] === TEST SCRIPT BEGIN === #!

[PATCH v5 01/15] qapi/introspect.py: assert schema is not None

2021-02-03 Thread John Snow
The introspect visitor is stateful, but expects that it will have a schema to refer to. Add assertions that state this. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index f

[PATCH v5 02/15] qapi/introspect.py: use _make_tree for features nodes

2021-02-03 Thread John Snow
At present, we open-code this in _make_tree itself; but if the structure of the tree changes, this is brittle. Use an explicit recursive call to _make_tree when appropriate to help keep the interior node typing consistent. A consequence of doing this is that the 'ifcond' key of the features dict w

[PATCH v5 10/15] qapi/introspect.py: improve _tree_to_qlit error message

2021-02-03 Thread John Snow
Trivial; make the error message just a pinch more explicit in case we trip this by accident in the future. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index

[PATCH v5 04/15] qapi/introspect.py: guard against ifcond/comment misuse

2021-02-03 Thread John Snow
_tree_to_qlit is called recursively on dict values (isolated from their keys); at such a point in generating output it is too late to apply an ifcond. Similarly, comments do not necessarily have a "tidy" place they can be printed in such a circumstance. Forbid this usage by renaming "suppress_firs

[PATCH v5 03/15] qapi/introspect.py: add _gen_features helper

2021-02-03 Thread John Snow
_make_tree might receive a dict (a SchemaInfo object) or some other type (usually, a string) for its obj parameter. 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 Sno

[PATCH v5 00/15] qapi: static typing conversion, pt2

2021-02-03 Thread John Snow
Hi, this series adds static type hints to the QAPI module. This is part two, and covers introspect.py. Part 2: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt2 Everything: https://gitlab.com/jsnow/qemu/-/tree/python-qapi-cleanup-pt6 - Requires Python 3.6+ - Requires mypy 0.770 or newe

[PATCH v5 08/15] qapi/introspect.py: Introduce preliminary tree typing

2021-02-03 Thread John Snow
The types will be used in forthcoming patches to add typing. These types describe the layout and structure of the objects passed to _tree_to_qlit, but lack the power to describe annotations until the next commit. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 30 ++

[PATCH v5 09/15] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-03 Thread John Snow
Presently, we use a tuple to attach a dict containing annotations (comments and compile-time conditionals) to a tree node. This is undesirable because dicts are difficult to strongly type; promoting it to a real class allows us to name the values and types of the annotations we are expecting. In t

[PATCH v5 06/15] qapi/introspect.py: replace 'extra' dict with 'comment' argument

2021-02-03 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 (optional) comment. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/qapi/introspect.

[PATCH v5 05/15] qapi/introspect.py: Unify return type of _make_tree()

2021-02-03 Thread John Snow
Returning two different types conditionally can be complicated to type. Return one type for consistency. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index a7

[PATCH v5 11/15] qapi/introspect.py: improve readability of _tree_to_qlit

2021-02-03 Thread John Snow
Subjective, but I find getting rid of the comprehensions helps. Also, divide the sections into scalar and non-scalar sections, and remove old-style string formatting. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 33 ++--- 1 file changed, 18 insertions(+),

[PATCH v5 13/15] qapi/introspect.py: add introspect.json dummy types

2021-02-03 Thread John Snow
Add some aliases that declare intent for some of the "dictly-typed" objects we pass around in introspect.py. Signed-off-by: John Snow --- This patch is optional, it can be dropped if desired. If it's taken, it's probably best to squash it with the prior patch. It is purely for the sake of demo

[PATCH v5 07/15] qapi/introspect.py: Always define all 'extra' dict keys

2021-02-03 Thread John Snow
This mimics how a typed object works, where 'if' and 'comment' are always set, regardless of if they have a value set or not. It is safe to do this because of the way that _tree_to_qlit processes these values (using dict.get with a default of None), resulting in no change of output from _tree_to_q

[PATCH v5 12/15] qapi/introspect.py: add type hint annotations

2021-02-03 Thread John Snow
Signed-off-by: John Snow --- See the next patch for an optional amendment that helps to clarify what _DObject is meant to be. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 117 ++--- scripts/qapi/mypy.ini | 5 -- scripts/qapi/schema.py |

[PATCH v5 14/15] qapi/introspect.py: Add docstring to _tree_to_qlit

2021-02-03 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/introspect.py | 8 1 file changed, 8 insertions(+) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index 2a39726f40a..2b338abe2cf 100644 --- a/scripts/qapi/introspect.py +++ b/scripts/qapi/introspect.py @@ -97,6 +97,14 @@ de

[PATCH v5 15/15] qapi/introspect.py: Update copyright and authors list

2021-02-03 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/introspect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index 2b338abe2cf..fd0ca0aba21 100644 --- a/scripts/qapi/introspect.py +++ b/scripts/qapi/introspect.py @@ -1,10 +1

[PATCH v2 00/93] TCI fixes and cleanups

2021-02-03 Thread Richard Henderson
Almost 7 years ago I detailed 5 major problems in tci[1], of which three still remain: * Unaligned accesses to the bytecode stream, which means that we immediately SIGBUS on any host requiring alignment. * Non-portable calls to helper functions. * Full of useless ifdefs and TODOs. To my

[PATCH v2 04/93] tcg: Manage splitwx in tc_ptr_to_region_tree by hand

2021-02-03 Thread Richard Henderson
The use in tcg_tb_lookup is given a random pc that comes from the pc of a signal handler. Do not assert that the pointer is already within the code gen buffer at all, much less the writable mirror of it. Fixes: db0c51a3803 Signed-off-by: Richard Henderson --- For TCI, this indicates a bug in ha

[PATCH v2 05/93] tcg/tci: Make tci_tb_ptr thread-local

2021-02-03 Thread Richard Henderson
Each thread must have its own pc, even under TCI. Remove the GETPC ifdef, because GETPC is always available for helpers, and thus is always required. Move the assignment under INDEX_op_call, because the value is only visible when we make a call to a helper function. Signed-off-by: Richard Hender

[PATCH v2 02/93] tcg: Split out tcg_raise_tb_overflow

2021-02-03 Thread Richard Henderson
Allow other places in tcg to restart with a smaller tb. Signed-off-by: Richard Henderson --- tcg/tcg.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 63a12b197b..bbe3dcee03 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -346,6 +346,12 @@ stati

[PATCH v2 01/93] gdbstub: Fix handle_query_xfer_auxv

2021-02-03 Thread Richard Henderson
The main problem was that we were treating a guest address as a host address with a mere cast. Use the correct interface for accessing guest memory. Do not allow offset == auxv_len, which would result in an empty packet. Fixes: 51c623b0de1 ("gdbstub: add support to Xfer:auxv:read: packet") Signe

[PATCH v2 06/93] tcg/tci: Implement INDEX_op_ld16s_i32

2021-02-03 Thread Richard Henderson
From: Stefan Weil That TCG opcode is used by debian-buster (arm64) running ffmpeg: qemu-aarch64 /usr/bin/ffmpeg -i theora.mkv theora.webm Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reported-by: Alex Bennée Signed-off-by: Stefan Weil Message-Id: <20210128024814.2056958-1...@weilnetz

[PATCH v2 10/93] tcg/tci: Inline tci_write_reg16 into the only caller

2021-02-03 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 740244cc54..005d2946c4 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -117,14 +117,6 @@ tci_write_r

[PATCH v2 12/93] tcg/tci: Inline tci_write_reg64 into 64-bit callers

2021-02-03 Thread Richard Henderson
Note that we had two functions of the same name: a 32-bit version which took two register numbers and a 64-bit version which was a no-op wrapper for tcg_write_reg. After this, we are left with only the 32-bit version. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Hender

[PATCH v2 03/93] configure: Fix --enable-tcg-interpreter

2021-02-03 Thread Richard Henderson
The configure option was backward, and we failed to pass the value on to meson. Fixes: 23a77b2d18b ("build-system: clean up TCG/TCI configury") Tested-by: Stefan Weil Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Da

[PATCH v2 11/93] tcg/tci: Inline tci_write_reg32 into all callers

2021-02-03 Thread Richard Henderson
For a 64-bit TCI, the upper bits of a 32-bit operation are undefined (much like a native ppc64 32-bit operation). It simplifies everything if we don't force-extend the result. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 66 +

[PATCH v2 07/93] tcg/tci: Implement INDEX_op_ld8s_i64

2021-02-03 Thread Richard Henderson
From: Stefan Weil That TCG opcode is used by debian-buster (arm64) running ffmpeg: qemu-aarch64 /usr/bin/ffmpeg -i theora.mkv theora.webm Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reported-by: Alex Bennée Signed-off-by: Stefan Weil Message-Id: <20210128020425.2055454-1...@weilnetz

[PATCH v2 15/93] tcg/tci: Merge INDEX_op_ld16u_{i32,i64}

2021-02-03 Thread Richard Henderson
Eliminating a TODO for ld16u_i32. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index c31be1a1f4..b64d611ec9 100644 --- a/tcg/tci.c +++ b/tcg

[PATCH v2 13/93] tcg/tci: Merge INDEX_op_ld8u_{i32,i64}

2021-02-03 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 0f56702b93..7e108bcbb3 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -455,6 +455,18 @@

[PATCH v2 09/93] tcg/tci: Inline tci_write_reg8 into its callers

2021-02-03 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index e8023b5384..740244cc54 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -117,11 +117,6 @@ tci_write_re

[PATCH v2 08/93] tcg/tci: Inline tci_write_reg32s into the only caller

2021-02-03 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index c3a8511dfe..e8023b5384 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -117,14 +117,6 @@ tci_write_r

[PATCH v2 24/93] tcg/tci: Implement 64-bit division

2021-02-03 Thread Richard Henderson
Trivially implemented like other arithmetic. Tested via check-tcg and the ppc64 target. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 4 ++-- tcg/tci.c| 28 ++-- tcg/tci/tcg-target.c.inc

[PATCH v2 23/93] tcg/tci: Remove dead code for TCG_TARGET_HAS_div2_*

2021-02-03 Thread Richard Henderson
We do not simultaneously support div and div2 -- it's one or the other. TCI is already using div, so remove div2. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c| 12 tcg/tci/tcg-target.c.inc | 8 2 files ch

[PATCH v2 16/93] tcg/tci: Merge INDEX_op_ld16s_{i32,i64}

2021-02-03 Thread Richard Henderson
Eliminating a TODO for ld16s_i64. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index b64d611ec9..259a8538bf 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@

[PATCH v2 14/93] tcg/tci: Merge INDEX_op_ld8s_{i32,i64}

2021-02-03 Thread Richard Henderson
Eliminating a TODO for ld8s_i32. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 7e108bcbb3..c31be1a1f4 100644 --- a/tcg/tci.c +++ b/tcg/

[PATCH v2 30/93] tcg/tci: Merge identical cases in generation

2021-02-03 Thread Richard Henderson
Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 204 ++- 1 file changed, 73 insertions(+), 131 deletions(-) diff --git a/tcg/tci/tc

[PATCH v2 25/93] tcg/tci: Remove TODO as unused

2021-02-03 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 8 1 file changed, 8 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 5c84a1c979..e0d815e4b2 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -33,14 +33,6 @@ #include "tcg/tcg-op.h" #inclu

[PATCH v2 17/93] tcg/tci: Merge INDEX_op_{ld_i32,ld32u_i64}

2021-02-03 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 259a8538bf..55863f76a7 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -606,6 +606,7 @@ uintptr_t QEMU_D

[PATCH v2 21/93] tcg/tci: Merge INDEX_op_{st_i32,st32_i64}

2021-02-03 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index ee2cd7dfa2..eb70672efb 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -625,6 +625,7 @@ uintptr_t QEMU_D

<    1   2   3   4   5   6   >