[PATCH 2/2] tcg: Allocate sufficient storage in temp_allocate_frame

2021-06-18 Thread Richard Henderson
This function should have been updated for vector types when they were introduced. Cc: qemu-sta...@nongnu.org Fixes: d2fd745fe8b Resolves: https://gitlab.com/qemu-project/qemu/-/issues/367 Signed-off-by: Richard Henderson --- tcg/tcg.c | 32 +++- 1 file changed, 27 in

[PATCH 1/2] tcg/sparc: Fix temp_allocate_frame vs sparc stack bias

2021-06-18 Thread Richard Henderson
We should not be aligning the offset in temp_allocate_frame, because the odd offset produces an aligned address in the end. Instead, pass the logical offset into tcg_set_frame and add the stack bias last. Cc: qemu-sta...@nongnu.org Cc: mark.cave-ayl...@ilande.co.uk Signed-off-by: Richard Henderson

[PATCH 0/2] tcg: Fixes for temp_allocate_frame

2021-06-18 Thread Richard Henderson
Stefan, I think this will resolve #367 for you -- please test. r~ Richard Henderson (2): tcg/sparc: Fix temp_allocate_frame vs sparc stack bias tcg: Allocate sufficient storage in temp_allocate_frame tcg/tcg.c | 41 -- tcg/sparc/tcg-tar

[Bug 1825452] Re: Pulse audio backend doesn't work in v4.0.0-rc4 release

2021-06-18 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1825452 Title: Pulse audio

Re: [PATCH 00/12] linux-user: Load a vdso for x86_64 and hppa

2021-06-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210619034329.532318-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: 20210619034329.532318-1-richard.hender...@linaro.org Subject: [PATCH 00/12] lin

[PATCH 12/12] linux-user/hppa: Add vdso and use it for rt_sigreturn

2021-06-18 Thread Richard Henderson
Building the vdso itself is not actually wired up to anything, since we require a cross-compiler. Just check in that file for now. Drop the now-unused 9 trampoline words, and describe the frame without the trampoline in __kernel_rt_sigreturn. Signed-off-by: Richard Henderson --- linux-user/elf

[PATCH 05/12] linux-user: Use ImageSource in load_elf_image

2021-06-18 Thread Richard Henderson
Change parse_elf_properties as well, as the bprm_buf argument ties the two functions closely. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 124 --- 1 file changed, 47 insertions(+), 77 deletions(-) diff --git a/linux-user/elfload.c b/linux-

[PATCH 11/12] linux-user/x86_64: Add vdso

2021-06-18 Thread Richard Henderson
Building the vdso itself is not actually wired up to anything, since we require a cross-compiler. Just check in that file for now. Signed-off-by: Richard Henderson --- linux-user/elfload.c| 3 + linux-user/x86_64/Makefile.vdso | 3 + linux-user/x86_64/meson.build | 6 ++ lin

[PATCH 06/12] linux-user: Use ImageSource in load_symbols

2021-06-18 Thread Richard Henderson
Aside from the section headers, we're unlikely to hit the ImageSource cache on guest executables. But the interface for imgsrc_read_* is better. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 87 1 file changed, 48 insertions(+), 39 dele

[PATCH 10/12] linux-user: Add gen-vdso tool

2021-06-18 Thread Richard Henderson
This tool will be used for post-processing the linked vdso image, turning it into something that is easy to include into elfload.c. Signed-off-by: Richard Henderson --- linux-user/gen-vdso.c | 168 ++ linux-user/gen-vdso-elfn.c.inc | 299 +

[PATCH 02/12] linux-user: Introduce imgsrc_read, imgsrc_read_alloc

2021-06-18 Thread Richard Henderson
Introduced and initialized, but not yet really used. These will tidy the current tests vs BPRM_BUF_SIZE. Signed-off-by: Richard Henderson --- linux-user/qemu.h | 50 ++ linux-user/linuxload.c | 46 ++ 2 files change

Re: [RFC PATCH] tests/tcg: skip the signals test for hppa for now

2021-06-18 Thread Richard Henderson
On 6/18/21 2:32 AM, Alex Bennée wrote: While Richard has some patches that fix the instability on other architectures the hppa signal support still needs vdso support before we can make this reliable. So for now skip the test. Patches for a vdso posted. r~ Signed-off-by: Alex Bennée Cc: Ri

[PATCH 09/12] linux-user: Load vdso image if available

2021-06-18 Thread Richard Henderson
The vdso image will be pre-processed into a C data array, with a simple list of relocations to perform, and identifying the location of signal trampolines. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 75 +++- 1 file changed, 67 insertions(+

[PATCH 08/12] linux-user: Introduce imgsrc_mmap

2021-06-18 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/qemu.h | 11 +++ linux-user/elfload.c | 4 ++-- linux-user/linuxload.c | 44 ++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index dafaa

[PATCH 03/12] linux-user: Tidy loader_exec

2021-06-18 Thread Richard Henderson
Reorg the if cases to reduce indentation. Test for 4 bytes in the file before checking the signatures. Signed-off-by: Richard Henderson --- linux-user/linuxload.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/linux-user/linuxload

[PATCH 07/12] linux-user: Replace bprm->fd with bprm->src.fd

2021-06-18 Thread Richard Henderson
There are only a couple of uses of bprm->fd remaining. Migrate to the other field. Signed-off-by: Richard Henderson --- linux-user/qemu.h | 1 - linux-user/flatload.c | 8 linux-user/linuxload.c | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/linux-user/q

[PATCH 00/12] linux-user: Load a vdso for x86_64 and hppa

2021-06-18 Thread Richard Henderson
Supersedes: 20200519194452.9009-1-richard.hender...@linaro.org Based-on: 20210618192951.125651-1-richard.hender...@linaro.org ("[PATCH v2 00/23] linux-user: Move signal trampolines to new page") Previous cover letter: > The subject of AT_SYSINFO came up on launchpad recently. > > There is definit

[PATCH 01/12] linux-user: Fix style problems in linuxload.c

2021-06-18 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/linuxload.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c index a27e1d0d8b..9d4eb5e94b 100644 --- a/linux-user/linuxload.c +++ b/linux

[PATCH 04/12] linux-user: Do not clobber bprm_buf swapping ehdr

2021-06-18 Thread Richard Henderson
Rearrange the allocation of storage for ehdr between load_elf_image and load_elf_binary. The same set of copies are done, but we don't modify bprm_buf, which will be important later. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 25 ++--- 1 file changed, 14 ins

Shortcoming (oversight) in Windows installer

2021-06-18 Thread adam . s
Hello, I'm new and can't use GitHub/GitLab, but I noticed this about the Windows installer: Does not add (nor offer to add) "C:\Program Files\qemu" to path. It should maybe be an optional choice in the installer. Have a wonderful day!

[qemu-web PATCH] (typo)

2021-06-18 Thread adam . s
Hello, Sorry I cannot use github/gitlab. I'm new to QEMU but I found this typo (mismatched braces) in the *installed* HTML manual: In: "file:///C:/Program%20Files/qemu/share/doc/tools/qemu-img.html" This should *not* have ending ']': measure [--output=OFMT] [-O OUTPUT_FMT] [-o OPTIONS] [--size

[PULL 71/72] python: add qmp-shell entry point

2021-06-18 Thread John Snow
now 'qmp-shell' should be available from the command line when installing the python package. Signed-off-by: John Snow Message-id: 20210607200649.1840382-42-js...@redhat.com Signed-off-by: John Snow --- python/setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/python/setup.cfg b/pyth

[PULL 69/72] scripts/qmp-shell: add docstrings

2021-06-18 Thread John Snow
Signed-off-by: John Snow Message-id: 20210607200649.1840382-40-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 1a8a4

[PULL 65/72] scripts/qmp-shell: Remove too-broad-exception

2021-06-18 Thread John Snow
We are only anticipating QMPShellErrors here, for syntax we weren't able to understand. Other errors, if any, should be allowed to percolate upwards. Signed-off-by: John Snow Message-id: 20210607200649.1840382-36-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 11 +++--

[PULL 62/72] scripts/qmp-shell: use logging to show warnings

2021-06-18 Thread John Snow
A perfect candidate is non-fatal shell history messages. Signed-off-by: John Snow Message-id: 20210607200649.1840382-33-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scri

[PULL 72/72] scripts/qmp-shell: add redirection shim

2021-06-18 Thread John Snow
qmp-shell has a new home, add a redirect for a little while as the dust settles. Signed-off-by: John Snow Message-id: 20210607200649.1840382-43-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 11 +++ 1 file changed, 11 insertions(+) create mode 100755 scripts/qmp/

[PULL 61/72] scripts/qmp-shell: Use context manager instead of atexit

2021-06-18 Thread John Snow
We can invoke the shell history writing when we leave the QMPShell scope instead of relying on atexit. Doing so may be preferable to avoid global state being registered from within a class instead of from the application logic directly. Use QMP's context manager to hook this history saving at clos

[PULL 67/72] scripts/qmp-shell: remove double-underscores

2021-06-18 Thread John Snow
They're not needed; single underscore is enough to express intent that these methods are "internal". double underscore is used as a weak name mangling, but that isn't beneficial for us here. Signed-off-by: John Snow Message-id: 20210607200649.1840382-38-js...@redhat.com Signed-off-by: John Snow

[PULL 64/72] scripts/qmp-shell: Fix empty-transaction invocation

2021-06-18 Thread John Snow
calling "transaction( )" is pointless, but valid. Rework the parser to allow this kind of invocation. This helps clean up exception handling later by removing accidental breakages of the parser that aren't explicitly forbidden. Signed-off-by: John Snow Message-id: 20210607200649.1840382-35-js...@

[PULL 58/72] scripts/qmp-shell: Accept SocketAddrT instead of string

2021-06-18 Thread John Snow
Don't "extend" QEMUMonitorProtocol by changing the argument types. Move the string parsing just outside of the class instead. Signed-off-by: John Snow Message-id: 20210607200649.1840382-29-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 12 +++- 1 file changed, 7 i

[PULL 66/72] scripts/qmp-shell: convert usage comment to docstring

2021-06-18 Thread John Snow
The nice usage comment should be a docstring instead of a comment, so that it's visible from other python tooling. Signed-off-by: John Snow Message-id: 20210607200649.1840382-37-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 128 --

[PULL 59/72] scripts/qmp-shell: unprivatize 'pretty' property

2021-06-18 Thread John Snow
Similar to verbose, there's no reason this needs to be hidden. Signed-off-by: John Snow Message-id: 20210607200649.1840382-30-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/qmp/qmp-shell b/

[PULL 68/72] scripts/qmp-shell: make QMPShellError inherit QMPError

2021-06-18 Thread John Snow
In preparation for moving qmp-shell into the qemu.qmp package, make QMPShellError inherit from QMPError so that all custom errors in this package all derive from QMPError. Signed-off-by: John Snow Message-id: 20210607200649.1840382-39-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qm

[PULL 70/72] scripts/qmp-shell: move to python/qemu/qmp/qmp_shell.py

2021-06-18 Thread John Snow
The script will be unavailable for a commit or two, which will help preserve development history attached to the new file. A forwarder will be added shortly afterwards. With qmp_shell in the python qemu.qmp package, now it is fully type checked, linted, etc. via the Python CI. It will be quite a b

[PULL 63/72] scripts/qmp-shell: remove TODO

2021-06-18 Thread John Snow
We still want to revamp qmp-shell again, but there's much more to the idea than the comment now intuits. Remove it. Signed-off-by: John Snow Message-id: 20210607200649.1840382-34-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 -- 1 file changed, 2 deletions(-) diff --g

[PULL 52/72] scripts/qmp-shell: move the REPL functionality into QMPShell

2021-06-18 Thread John Snow
Instead of doing this in main, move it into the class itself. (This makes it easier to put into the qemu.qmp package later by removing as much as we can from the main() function.) Signed-off-by: John Snow Message-id: 20210607200649.1840382-23-js...@redhat.com Signed-off-by: John Snow --- script

[PULL 60/72] python/qmp: return generic type from context manager

2021-06-18 Thread John Snow
__enter__ can be invoked from a subclass, so it needs a more flexible type. Signed-off-by: John Snow Message-id: 20210607200649.1840382-31-js...@redhat.com Signed-off-by: John Snow --- python/qemu/qmp/__init__.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/qem

[PULL 56/72] python/qmp: add QMPObject type alias

2021-06-18 Thread John Snow
This is meant to represent any generic object seen in a QMPMessage, not just the root object itself. Signed-off-by: John Snow Message-id: 20210607200649.1840382-27-js...@redhat.com Signed-off-by: John Snow --- python/qemu/qmp/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/py

[PULL 49/72] scripts/qmp-shell: Make verbose a public attribute

2021-06-18 Thread John Snow
No real reason to hide this behind an underscore; make it part of the initializer and make it a regular RW attribute. Signed-off-by: John Snow Message-id: 20210607200649.1840382-20-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 16 ++-- 1 file changed, 6 insert

[PULL 54/72] scripts/qmp-shell: refactor QMPCompleter

2021-06-18 Thread John Snow
list is a generic type, but we expect to use strings directly. We could subclass list[str], but pylint does not presently understand that invocation. Change this class to envelop a list instead of *being* a list, for simpler mypy typing. Signed-off-by: John Snow Message-id: 20210607200649.184038

[PULL 53/72] scripts/qmp-shell: Fix "FuzzyJSON" parser

2021-06-18 Thread John Snow
I'm not sure when this regressed (Or maybe if it was ever working right to begin with?), but the Python AST requires you to change "Names" to "Constants" in order to truly convert `false` to `False`. Signed-off-by: John Snow Message-id: 20210607200649.1840382-24-js...@redhat.com Signed-off-by: Jo

[PULL 57/72] scripts/qmp-shell: add mypy types

2021-06-18 Thread John Snow
As per my usual, this patch is annotations only. Any changes with side effects are done elsewhere. Note: pylint does not understand the subscripts for Collection in Python 3.6, so use the stronger Sequence type as a workaround. Signed-off-by: John Snow Message-id: 20210607200649.1840382-28-js...@

[PULL 50/72] scripts/qmp-shell: move get_prompt() to prompt property

2021-06-18 Thread John Snow
Small tidying; treat "prompt" like an immutable property instead of function/method/routine. Signed-off-by: John Snow Message-id: 20210607200649.1840382-21-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --

[PULL 44/72] scripts/qmp-shell: fix shell history exception handling

2021-06-18 Thread John Snow
We want to remove exceptions that are too broad here; we only want to catch IOErrors that get raised as a direct result of the open call. Signed-off-by: John Snow Message-id: 20210607200649.1840382-15-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 15 ++- 1 fi

[PULL 51/72] scripts/qmp-shell: remove prompt argument from read_exec_command

2021-06-18 Thread John Snow
It's only ever used by one caller, we can just absorb that logic. Signed-off-by: John Snow Message-id: 20210607200649.1840382-22-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qmp/qmp-shell b/

[PULL 55/72] scripts/qmp-shell: initialize completer early

2021-06-18 Thread John Snow
Add an empty completer as a more type-safe placeholder instead of 'None'. Signed-off-by: John Snow Message-id: 20210607200649.1840382-26-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell

[PULL 48/72] scripts/qmp-shell: Add pretty attribute to HMP shell

2021-06-18 Thread John Snow
It's less useful, but it makes the initialization methods LSP consistent, which quiets a mypy complaint. Signed-off-by: John Snow Message-id: 20210607200649.1840382-19-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 11 --- 1 file changed, 4 insertions(+), 7 deleti

[PULL 41/72] scripts/qmp-shell: ignore visit_Name name

2021-06-18 Thread John Snow
Not something I control, sorry, pylint. Signed-off-by: John Snow Message-id: 20210607200649.1840382-12-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index c46f

[PULL 40/72] scripts/qmp-shell: use triple-double-quote docstring style

2021-06-18 Thread John Snow
(2014 me had never written python before.) Signed-off-by: John Snow Message-id: 20210607200649.1840382-11-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell

[PULL 45/72] scripts/qmp-shell: remove if-raise-else patterns

2021-06-18 Thread John Snow
Shushes pylint. I don't always mind these patterns personally, but I'm not as sure that I want to remove the warning from pylint's repertoire entirely. Oh well. Signed-off-by: John Snow Message-id: 20210607200649.1840382-16-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 8

[PULL 37/72] scripts/qmp-shell: use @classmethod where appropriate

2021-06-18 Thread John Snow
Methods with no self-use should belong to the class. Signed-off-by: John Snow Message-id: 20210607200649.1840382-8-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qm

[PULL 30/72] scripts/qemu-ga-client: Add forwarder shim

2021-06-18 Thread John Snow
Add a little forwarder shim until we are sure that everyone is comfortable with how to use the tools in their new packaged location. Signed-off-by: John Snow Message-id: 20210604155532.1499282-12-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qemu-ga-client | 11 +++ 1 file c

[PULL 43/72] scripts/qmp-shell: rename one and two-letter variables

2021-06-18 Thread John Snow
A bit of churn and housekeeping for pylint, flake8 et al. Signed-off-by: John Snow Message-id: 20210607200649.1840382-14-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/qmp

[PULL 47/72] scripts/qmp-shell: use argparse

2021-06-18 Thread John Snow
Use argparse instead of an open-coded CLI parser, for consistency with everything else. Signed-off-by: John Snow Message-id: 20210607200649.1840382-18-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 82 +-- 1 file changed, 32 inserti

[PULL 29/72] python/qemu-ga-client: add entry point

2021-06-18 Thread John Snow
Remove the shebang, and add a package-defined entry point instead. Now, it can be accessed using 'qemu-ga-client' from the command line after installing the package. The next commit adds a forwarder shim that allows the running of this script without needing to install the package again. Signed-o

[PULL 42/72] scripts/qmp-shell: make QMPCompleter returns explicit

2021-06-18 Thread John Snow
This function returns None when it doesn't find a match; do that explicitly. Signed-off-by: John Snow Message-id: 20210607200649.1840382-13-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qmp/q

[PULL 34/72] scripts/qmp-shell: fix exception handling

2021-06-18 Thread John Snow
Fixes: 50d189c Signed-off-by: John Snow Message-id: 20210607200649.1840382-5-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 18bf49bb26..413dd4d2de 100755

[PULL 46/72] scripts/qmp-shell: use isinstance() instead of type()

2021-06-18 Thread John Snow
A bit more idiomatic, and quiets some linter warnings. Signed-off-by: John Snow Message-id: 20210607200649.1840382-17-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/q

[PULL 36/72] scripts/qmp-shell: remove shadowed variable from _print()

2021-06-18 Thread John Snow
Don't use 'qmp' here, which shadows the qmp module. Signed-off-by: John Snow Message-id: 20210607200649.1840382-7-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-s

[PULL 28/72] scripts/qemu-ga-client: move to python/qemu/qmp/qemu_ga_client.py

2021-06-18 Thread John Snow
The script itself will be unavailable for a few commits before being restored, with no way to run it right after this commit. This helps move git history into the new file. To prevent linter regressions, though, we do need to immediately touch up the filename to remove dashes (to make the module im

[PULL 38/72] scripts/qmp-shell: Use python3-style super()

2021-06-18 Thread John Snow
Signed-off-by: John Snow Message-id: 20210607200649.1840382-9-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index f354549bf2..3066e37ae5 100755 --- a/scri

[PULL 39/72] scripts/qmp-shell: declare verbose in __init__

2021-06-18 Thread John Snow
Linters get angry when we don't define state at init time. Signed-off-by: John Snow Message-id: 20210607200649.1840382-10-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 3

[PULL 33/72] scripts/qmp-shell: fix show_banner signature

2021-06-18 Thread John Snow
The signatures need to match. Signed-off-by: John Snow Message-id: 20210607200649.1840382-4-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 62a6377e06.

[PULL 32/72] scripts/qmp-shell: Apply flake8 rules

2021-06-18 Thread John Snow
A lot of fiddling around to get us below 80 columns. Signed-off-by: John Snow Message-id: 20210607200649.1840382-3-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 64 +-- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git

[PULL 16/72] python: add optional FUSE dependencies

2021-06-18 Thread John Snow
In preparation for moving qom-fuse over to the python package, we need some new dependencies to support it. Add an optional 'fusepy' dependency that users of the package can opt into with e.g. "pip install qemu[fuse]" which installs the requirements necessary to obtain the additional functionality

[PULL 26/72] python/qmp: Correct type of QMPReturnValue

2021-06-18 Thread John Snow
It's only a Dict[str, Any] most of the time. It's not actually guaranteed to be anything in particular. Fix this type to be more accurate to the reality we live in. Signed-off-by: John Snow Message-id: 20210604155532.1499282-8-js...@redhat.com Signed-off-by: John Snow --- python/qemu/qmp/__init

[PULL 22/72] scripts/qemu-ga-client: Fix exception handling

2021-06-18 Thread John Snow
Fixes: 50d189c These error classes aren't available anymore. Fix the bitrot. Signed-off-by: John Snow Message-id: 20210604155532.1499282-4-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qemu-ga-client | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scr

[PULL 21/72] scripts/qemu-ga-client: apply (most) flake8 rules

2021-06-18 Thread John Snow
- Line length should be < 80 - You shouldn't perform unscoped imports except at the top of the module Notably, the sys.path hack creates problems with the import rule. This will be fixed later. Signed-off-by: John Snow Message-id: 20210604155532.1499282-3-js...@redhat.com Signed-off-by: John Sno

[PULL 35/72] scripts/qmp-shell: fix connect method signature

2021-06-18 Thread John Snow
It needs to match the parent's signature -- the negotiate parameter must be optional. Signed-off-by: John Snow Message-id: 20210607200649.1840382-6-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qmp

[PULL 24/72] scripts/qemu-ga-client: add module docstring

2021-06-18 Thread John Snow
Turn that nice usage comment into a docstring. Signed-off-by: John Snow Message-id: 20210604155532.1499282-6-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qemu-ga-client | 65 +++--- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/scri

[PULL 15/72] scripts/qom-fuse: add static type hints

2021-06-18 Thread John Snow
Because fusepy does not have type hints, add some targeted warning suppressions. Namely, we need to allow subclassing something of an unknown type (in qom_fuse.py), and we need to allow missing imports (recorded against fuse itself) because mypy will be unable to import fusepy (even when installed

[PULL 31/72] scripts/qmp-shell: apply isort rules

2021-06-18 Thread John Snow
Signed-off-by: John Snow Message-id: 20210607200649.1840382-2-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index d5ae8a9b21..a00efe6fea 100755 ---

[PULL 20/72] scripts/qemu-ga-client: apply isort rules

2021-06-18 Thread John Snow
Hint: > ln -s scripts/qmp/qemu-ga-client python/qemu/qmp/qemu_ga_client.py > cd python > isort qemu Signed-off-by: John Snow Message-id: 20210604155532.1499282-2-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qemu-ga-client | 9 + 1 file changed, 5 insertions(+), 4 deletions(

[PULL 13/72] scripts/qom-fuse: use QOMCommand.qom_list()

2021-06-18 Thread John Snow
the qom_list method provides a type-safe object that's easier to type check, so switch to using it. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210603003719.1321369-14-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 18 -- 1 f

[PULL 27/72] scripts/qemu-ga-client: add mypy type hints

2021-06-18 Thread John Snow
This script is in slightly rough shape, but it still works. A lot of care went into its initial development. In good faith, I'm updating it to the latest Python coding standards. If there is in interest in this script, though, I'll be asking for a contributor to take care of it further. Signed-off

[PULL 10/72] scripts/qom-fuse: Apply pylint rules

2021-06-18 Thread John Snow
- Catch specific exceptions from QMP - Reraise errors with explicit context - method parameters should match parent's names Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210603003719.1321369-11-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 16

[PULL 08/72] scripts/qom-fuse: apply flake8 rules

2021-06-18 Thread John Snow
flake8 still has one warning because of the sys.path hack, but that will be going away by the end of this patch series. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210603003719.1321369-9-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 81

[PULL 18/72] scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py

2021-06-18 Thread John Snow
By leaving the script absent for a commit, git-blame travels to the new file instead of staying on the shim. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210603003719.1321369-19-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 11 +++ 1

[PULL 06/72] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/

2021-06-18 Thread John Snow
Redirect to the new qom scripts. These forwarders can be deleted eventually when there has been more time for the dust on the Python packaging to settle and people understand how to find these commands. Note: You can run these by setting $PYTHONPATH in your shell and then running "python3 -m qemu.

[PULL 09/72] python: Add 'fh' to known-good variable names

2021-06-18 Thread John Snow
fd and fh are fine: we often use these for "file descriptor" or "file handle" accordingly. It is rarely the case that you need to enforce a more semantically meaningful name beyond "This is the file we are using right now." While we're here: add comments for all of the non-standard pylint names. (

[PULL 19/72] python/qmp: add fuse command to 'qom' tools

2021-06-18 Thread John Snow
The 'fuse' command will be unavailable if 'fusepy' is not installed. It will simply not load and subsequently be unavailable as a subcommand. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210603003719.1321369-20-js...@redhat.com Signed-off-by: John Snow --- python/

[PULL 17/72] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py

2021-06-18 Thread John Snow
Move qom-fuse over to the python package now that it passes the linter. Update the import paradigms so that it continues to pass in the context of the Python package. Signed-off-by: John Snow Message-id: 20210603003719.1321369-18-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qom-fus

[PULL 11/72] scripts/qom-fuse: Add docstrings

2021-06-18 Thread John Snow
The methods inherited from fuse don't need docstrings; that's up to fusepy to handle. Signed-off-by: John Snow Message-id: 20210603003719.1321369-12-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qom-fuse | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) d

[PULL 12/72] scripts/qom-fuse: Convert to QOMCommand

2021-06-18 Thread John Snow
Move qom-fuse onto the QOMCommand base established in python/qemu/qmp/qom_common.py. The interface doesn't change incompatibly, "qom-fuse mountpoint" still works as an invocation, and QMP_SOCKET is still used as the environment variable. Signed-off-by: John Snow Message-id: 20210603003719.1321369

[PULL 25/72] scripts/qemu-ga-client: apply (most) pylint rules

2021-06-18 Thread John Snow
I'm only doing a very quick best-effort to preserve this script, to help keep it from breaking further. I think there are pending ideas swirling on the right way to implement better SDKs and better clients, and this script might be a handy reference for those discussions. It presents some interesti

[PULL 01/72] python/pipenv: Update Pipfile.lock

2021-06-18 Thread John Snow
In a previous commit, I added tox to the development requirements of the Python library. I never bothered to add them to the Pipfile, because they aren't needed there. Here, I sync it anyway in its own commit so that when we add new packages later that the diffstats will not confusingly appear to p

[PULL 23/72] scripts/qemu-ga-client: replace deprecated optparse with argparse

2021-06-18 Thread John Snow
optparse isn't supported anymore, it's from the python2 days. Replace it with the mostly similar argparse. Signed-off-by: John Snow Message-id: 20210604155532.1499282-5-js...@redhat.com Signed-off-by: John Snow --- scripts/qmp/qemu-ga-client | 32 +++- 1 file changed

[PULL 04/72] python/qmp: Add qom script rewrites

2021-06-18 Thread John Snow
Inspired by qom-set, qom-get, qom-tree and qom-list; combine all four of those scripts into a single script. A later addition of qom-fuse as an 'extension' necessitates that some common features are split out and shared between them. Signed-off-by: John Snow Message-id: 20210603003719.1321369-5-

[PULL 03/72] python/qmp: add parse_address classmethod

2021-06-18 Thread John Snow
This takes the place of qmp-shell's __get_address function. It also allows other utilities to share the same parser and syntax for specifying QMP locations. Signed-off-by: John Snow Message-id: 20210603003719.1321369-4-js...@redhat.com Signed-off-by: John Snow --- python/qemu/qmp/__init__.py |

[PULL 07/72] scripts/qom-fuse: apply isort rules

2021-06-18 Thread John Snow
Hint: you can use symlinks to create qom_fuse.py in python/qemu/qmp/ and point to scripts/qom-fuse to apply the standard linting rules to this script. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210603003719.1321369-8-js...@redhat.com Signed-off-by: John Snow ---

[PULL 05/72] python/qmp: add qom script entry points

2021-06-18 Thread John Snow
Add the 'qom', 'qom-set', 'qom-get', 'qom-list', and 'qom-tree' scripts to the qemu.qmp package. When you install this package, these scripts will become available on your command line. (e.g. when inside of a venv, `cd python && pip install .` will add 'qom', 'qom-set', etc to your $PATH.) Signed

[PULL 14/72] scripts/qom-fuse: ensure QOMFuse.read always returns bytes

2021-06-18 Thread John Snow
- Use FuseOSError to signal ENOENT instead of returning it - Wrap qom-get in str(), as we don't always know its type - The empty return should be b'', not ''. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210603003719.1321369-15-js...@redhat.com Signed-off-by: John S

[PULL 02/72] python/qmp: Fix type of SocketAddrT

2021-06-18 Thread John Snow
In porting the qom tools, qmp-shell, etc; it becomes evident that this type is wrong. This is an integer, not a string. We didn't catch this before because none of QEMUMonitorProtocol's *users* happen to be checked, and the internal logic of this class is otherwise self-consistent. Additionally, m

[PULL 00/72] Python patches

2021-06-18 Thread John Snow
The following changes since commit 3ccf6cd0e3e1dfd663814640b3b18b55715d7a75: Merge remote-tracking branch 'remotes/kraxel/tags/audio-20210617-pull-request' into staging (2021-06-18 09:54:42 +0100) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git tags/python-pull-re

Re: [PATCH 9/9] target/mips: Optimize regnames[] arrays

2021-06-18 Thread Richard Henderson
On 6/17/21 10:43 AM, Philippe Mathieu-Daudé wrote: Since all entries are no more than 3/4/6 bytes (including nul terminator), can save space and pie runtime relocations by declaring regnames[] as array of 3/4/6 const char. Inspired-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH 8/9] target/mips: Constify host_to_mips_errno[]

2021-06-18 Thread Richard Henderson
On 6/17/21 10:43 AM, Philippe Mathieu-Daudé wrote: Keep host_to_mips_errno[] in .rodata by marking the array const. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/sysemu/mips-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 7/9] target/mips: Remove microMIPS BPOSGE32 / BPOSGE64 unuseful cases

2021-06-18 Thread Richard Henderson
On 6/17/21 10:43 AM, Philippe Mathieu-Daudé wrote: These switch cases for the microMIPS BPOSGE32 / BPOSGE64 opcodes have been added commit 3c824109da0 ("target-mips: microMIPS ASE support"). More than 11 years later it is safe to assume there won't be added soon. The cases fall back to the defaul

Re: [PATCH 6/9] target/mips: Remove SmartMIPS / MDMX unuseful comments

2021-06-18 Thread Richard Henderson
On 6/17/21 10:43 AM, Philippe Mathieu-Daudé wrote: These placeholder comments for SmartMIPS and MDMX extensions have been added commit 3c824109da0 ("target-mips: microMIPS ASE support"). More than 11 years later it is safe to assume there won't be added soon, so remove these unuseful comments. S

Re: [PATCH 5/9] target/mips: Restrict some system specific declarations to sysemu

2021-06-18 Thread Richard Henderson
On 6/17/21 10:43 AM, Philippe Mathieu-Daudé wrote: Commit 043715d1e0f ("target/mips: Update ITU to utilize SAARI and SAAR CP0 registers") declared itc_reconfigure() in public namespace, while it is restricted to system emulation. Similarly commit 5679479b9a1 ("target/mips: Move CP0 helpers to sy

Re: [PATCH 4/9] target/mips: Move translate.h to tcg/ sub directory

2021-06-18 Thread Richard Henderson
On 6/17/21 10:43 AM, Philippe Mathieu-Daudé wrote: diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.c index ae6587edf69..b3b06352bf2 100644 --- a/target/mips/tcg/msa_translate.c +++ b/target/mips/tcg/msa_translate.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #includ

  1   2   3   4   >