[PATCH 1/1] util: Make some iova_tree parameters const

2021-10-12 Thread Eugenio Pérez
As qemu guidelines: Unless a pointer is used to modify the pointed-to storage, give it the "const" attribute. In the particular case of iova_tree_find it allows to enforce what is requested by its comment, since the compiler would shout in case of modifying or freeing the const-qualified returned

[PATCH 0/1] util: Make some iova_tree functions parameters const

2021-10-12 Thread Eugenio Pérez
Some guidelines misses I found while working on Shadow Virtqueue, that uses these functions at this moment. Eugenio Pérez (1): util: Make some iova_tree parameters const include/qemu/iova-tree.h | 8 hw/i386/intel_iommu.c| 2 +- util/iova-tree.c | 10 +- 3 files

Re: [PATCH v2 12/17] python/machine: Handle QMP errors on close more meticulously

2021-10-12 Thread Hanna Reitz
On 07.10.21 18:52, John Snow wrote: On Wed, Sep 22, 2021 at 8:50 PM John Snow wrote: To use the AQMP backend, Machine just needs to be a little more diligent about what happens when closing a QMP connection. The operation is no longer a freebie in the async world; it may retur

Re: [PATCH v2 13/17] iotests: Accommodate async QMP Exception classes

2021-10-12 Thread Hanna Reitz
On 23.09.21 02:49, John Snow wrote: (But continue to support the old ones for now, too.) There are very few cases of any user of QEMUMachine or a subclass thereof relying on a QMP Exception type. If you'd like to check for yourself, you want to grep for all of the derivatives of QMPError, exclud

Re: [PATCH 10/12] block-backend: convert blk_aio_ functions to int64_t bytes paramter

2021-10-12 Thread Vladimir Sementsov-Ogievskiy
10/6/21 23:29, Eric Blake wrote: On Wed, Oct 06, 2021 at 03:17:16PM +0200, Vladimir Sementsov-Ogievskiy wrote: 1. Convert bytes in BlkAioEmAIOCB: aio->bytes is only passed to already int64_t interfaces, and set in blk_aio_prwv, which is updated here. 2. For all updated functions parameter

Re: [PATCH 04/15] pcie: Add callback preceding SR-IOV VFs update

2021-10-12 Thread Lukasz Maniak
On Tue, Oct 12, 2021 at 03:25:12AM -0400, Michael S. Tsirkin wrote: > On Thu, Oct 07, 2021 at 06:23:55PM +0200, Lukasz Maniak wrote: > > PCIe devices implementing SR-IOV may need to perform certain actions > > before the VFs are unrealized or vice versa. > > > > Signed-off-by: Lukasz Maniak > >

[PATCH v2 01/23] accel/tcg: Handle gdb singlestep in cpu_tb_exec

2021-10-12 Thread Richard Henderson
Currently the change in cpu_tb_exec is masked by the debug exception being raised by the translators. But this allows us to remove that code. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/accel/tcg/cpu-exec.c b/accel/t

[PATCH v2 04/23] target/cris: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/cris/translate.c | 16 1 file changed, 16 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index a84b753349..59325b388a 100644 --- a/target/cris/translate.c ++

[PATCH v2 00/23] tcg: singlestep reorg

2021-10-12 Thread Richard Henderson
Consolidate all handling for gdb singlestep to 4 lines in cpu_tb_exec. Drop all of the code from target/*. Note that nios2 and sparc, lacked support for gdb singlestep entirely, which was a bit of a surprise. r~ Changes for v2: * Rebase; prereq is now upstream. v1: https://lore.kernel.org/q

[PATCH v2 03/23] target/avr: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Tested-by: Michael Rolnik Reviewed-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/avr/translate.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/target

[PATCH v2 14/23] target/mips: Drop exit checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 50 + 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/m

[PATCH v2 02/23] target/alpha: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index b034206688..8341cb8706 100644 --- a/target/al

[PATCH v2 05/23] target/hexagon: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/hexagon/translate.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 4f05ce3388..159931e8ee 100644 --- a/targ

[PATCH v2 07/23] target/hppa: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index c3698cf

[PATCH v2 06/23] target/arm: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 10 ++ target/arm/translate.c | 36 ++-- 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/target/arm/translate-a64.c b/targ

[PATCH v2 23/23] target/xtensa: Drop check for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index dcf6b500ef..09430c1bf9 100644

[PATCH v2 09/23] target/i386: Drop check for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/i386/helper.h | 1 - target/i386/tcg/misc_helper.c | 8 target/i386/tcg/translate.c | 4 +--- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/target/i386/helper.h b/targ

[PATCH v2 13/23] target/mips: Fix single stepping

2021-10-12 Thread Richard Henderson
As per an ancient comment in mips_tr_translate_insn about the expectations of gdb, when restarting the insn in a delay slot we also re-execute the branch. Which means that we are expected to execute two insns in this case. This has been broken since 8b86d6d2580, where we forced max_insns to 1 whi

[PATCH v2 16/23] target/ppc: Drop exit checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Reuse gen_debug_exception to handle architectural debug exceptions. Signed-off-by: Richard Henderson --- target/ppc/translate.c | 38 -- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/target/ppc/t

[PATCH v2 18/23] target/riscv: Remove exit_tb and lookup_and_goto_ptr

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically, which means we don't need to do anything in the wrappers. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 27 +-- .../riscv/insn_trans/trans_privileged.c.inc | 4 +-- target/riscv/insn_trans/t

[PATCH v2 11/23] target/microblaze: Check CF_NO_GOTO_TB for DISAS_JUMP

2021-10-12 Thread Richard Henderson
We were using singlestep_enabled as a proxy for whether translator_use_goto_tb would always return false. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/t

[PATCH v2 17/23] target/riscv: Remove dead code after exception

2021-10-12 Thread Richard Henderson
We have already set DISAS_NORETURN in generate_exception, which makes the exit_tb unreachable. Signed-off-by: Richard Henderson --- target/riscv/insn_trans/trans_privileged.c.inc | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/riscv/insn_trans/trans_privileged.c.i

[PATCH v2 15/23] target/openrisc: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 5f3d430245..ca79e609da 100644 -

[PATCH v2 21/23] target/sh4: Drop check for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sh4/helper.h| 1 - target/sh4/op_helper.c | 5 - target/sh4/translate.c | 14 +++--- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/

[PATCH v2 10/23] target/m68k: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Acked-by: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/translate.c | 44 + 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c

[PATCH v2 20/23] target/s390x: Drop check for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index f284870cd2..0cbec29f2f 100644 --- a/targ

[PATCH v2 19/23] target/rx: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/rx/helper.h| 1 - target/rx/op_helper.c | 8 target/rx/translate.c | 12 ++-- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/target/rx/helper.h b/target/rx/helper.h

[PATCH v2 08/23] target/i386: Check CF_NO_GOTO_TB for dc->jmp_opt

2021-10-12 Thread Richard Henderson
We were using singlestep_enabled as a proxy for whether translator_use_goto_tb would always return false. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/transl

[PATCH] ebpf: really include it only in system emulators

2021-10-12 Thread Paolo Bonzini
eBPF libraries are being included in user emulators, which is useless and also breaks --static compilation if a shared library for libbpf is present in the system. Reported-by: Alex Bennée Signed-off-by: Paolo Bonzini --- meson.build | 2 -- 1 file changed, 2 deletions(-) diff --git a/meson.bu

[PATCH v2 12/23] target/microblaze: Drop checks for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 7e465b629a..437bbed6d6 100644

[PATCH v2 22/23] target/tricore: Drop check for singlestep_enabled

2021-10-12 Thread Richard Henderson
GDB single-stepping is now handled generically. Signed-off-by: Richard Henderson --- target/tricore/helper.h| 1 - target/tricore/op_helper.c | 7 --- target/tricore/translate.c | 14 +- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/target/tricore/helper.h

[PULL 0/1] target/hppa update

2021-10-12 Thread Richard Henderson
The following changes since commit c09124dcb8401a0d635b4a52b295e9b3fc12392a: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2021-10-11 08:15:32 -0700) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-hpp

[PATCH v2] meson.build: don't include libbpf in the common source set

2021-10-12 Thread Alex Bennée
This library is only needed for the softmmu targets and as such break static *-user builds where libbpf is detected and it tries to link it into the user binaries. In fact ebpf/meson.build already brings libbpf into the softmmu build so we can delete the common_ss line altogether. Fixes: 46627f41b

Re: [PATCH v2 13/17] iotests: Accommodate async QMP Exception classes

2021-10-12 Thread John Snow
On Tue, Oct 12, 2021 at 12:06 PM Hanna Reitz wrote: > On 23.09.21 02:49, John Snow wrote: > > (But continue to support the old ones for now, too.) > > > > There are very few cases of any user of QEMUMachine or a subclass > > thereof relying on a QMP Exception type. If you'd like to check for > >

Re: [PATCH] ebpf: really include it only in system emulators

2021-10-12 Thread Richard Henderson
On 10/12/21 9:22 AM, Paolo Bonzini wrote: eBPF libraries are being included in user emulators, which is useless and also breaks --static compilation if a shared library for libbpf is present in the system. Reported-by: Alex Bennée Signed-off-by: Paolo Bonzini --- meson.build | 2 -- 1 file ch

Re: [PATCH] gdbstub: Switch to the thread receiving a signal

2021-10-12 Thread Pavel Labath
Ping. (This is my first qemu patch, so please let me know if I am doing something wrong.) regards, pavel On 30/09/2021 11:51, Pavel Labath wrote: Respond with Txxthread:; instead of a plain Sxx to indicate which thread received the signal. Otherwise, the debugger will associate it with t

Re: [PATCH 1/9] tests/docker: Add debian-nios2-cross image

2021-10-12 Thread Alex Bennée
Richard Henderson writes: > Build the entire cross tool chain from source. > For this reason, default to caching. > > Signed-off-by: Richard Henderson > --- > tests/docker/Makefile.include | 19 > .../dockerfiles/debian-nios2-cross.docker | 34 +++ > .../build-too

Re: [PATCH v2 12/24] configure, meson: remove CONFIG_GCOV from config-host.mak

2021-10-12 Thread Thomas Huth
On 12/10/2021 13.12, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau Message-Id: <20211007130829.632254-7-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 3 --- meson.build | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) Reviewe

Storage controller access to data

2021-10-12 Thread Nada Lachtar
Hello, I’m working on a project that requires me to read the data being sent to storage and it to a file for analysis. To be more specific, I’m trying to analyze the data in the phase of being written to the storage disk, thus, I’m trying to read the data when it’s going through a storage contr

Re: [PATCH v2 24/24] configure: automatically parse command line for meson -D options

2021-10-12 Thread Thomas Huth
On 12/10/2021 13.13, Paolo Bonzini wrote: Right now meson_options.txt lists about 90 options. Each option needs code in configure to parse it and pass the option down to Meson as a -D command-line argument; in addition the default must be duplicated between configure and meson_options.txt. This

Re: [PATCH 1/9] tests/docker: Add debian-nios2-cross image

2021-10-12 Thread Richard Henderson
On 10/12/21 10:03 AM, Alex Bennée wrote: We need to split this like in hexagon and have a second stage which does a: COPY --from=0 /usr/local /usr/local This will limit the size of the final image (and also avoid duplicting the UID in the hexagon build). Yeah, well, I had to take that out

Re: [PATCH 1/9] tests/docker: Add debian-nios2-cross image

2021-10-12 Thread Alex Bennée
It copies from the first stage. Is the compiler installed to a different path? On Tue, 12 Oct 2021, 19:24 Richard Henderson, wrote: > On 10/12/21 10:03 AM, Alex Bennée wrote: > > We need to split this like in hexagon and have a second stage which does > > a: > > > >COPY --from=0 /usr/local /

[PATCH v1] libvhost-user: fix VHOST_USER_REM_MEM_REG not closing the fd

2021-10-12 Thread David Hildenbrand
We end up not closing the file descriptor, resulting in leaking one file descriptor for each VHOST_USER_REM_MEM_REG message. Fixes: 875b9fd97b34 ("Support individual region unmap in libvhost-user") Cc: Michael S. Tsirkin Cc: Raphael Norwitz Cc: "Marc-André Lureau" Cc: Stefan Hajnoczi Cc: Paolo

[PULL 0/1] target/hppa update

2021-10-12 Thread Richard Henderson
The following changes since commit c09124dcb8401a0d635b4a52b295e9b3fc12392a: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2021-10-11 08:15:32 -0700) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-hpp

Re: [PULL 0/1] target/hppa update

2021-10-12 Thread Richard Henderson
https://gitlab.com/rth7680/qemu.git tags/pull-hppa-20211012 for you to fetch changes up to e770b8cf76083cc51497b854e73f0a9bb92d1bc7: pc-bios: Update hppa-firmware.img (2021-10-12 09:27:28 -0700) seabios-h

[PATCH v5 0/3] virtio: Add vhost-user based RNG

2021-10-12 Thread Mathieu Poirier
This set implements a random number generator (RNG) device that follows the vhost-user protocol. Aside from a new reference to file vhost-user-rng.rst, the code and features of this revision are unchanged. Applies cleanly to git://git.qemu.org/qemu.git master(8be1d4ed9838). Thanks, Mathieu [1

[PATCH v5 1/3] vhost-user-rng: Add vhost-user-rng implementation

2021-10-12 Thread Mathieu Poirier
Introduce a random number generator (RNG) backend that communicates with a vhost-user server to retrieve entropy. That way other VMM that comply with the vhost user protocl can use the same vhost-user daemon without having to write yet another RNG driver. Reviewed-by: Alex Bennée Signed-off-by:

[PATCH v5 2/3] vhost-user-rng-pci: Add vhost-user-rng-pci implementation

2021-10-12 Thread Mathieu Poirier
This patch provides a PCI bus interface to the vhost-user-rng backend. Reviewed-by: Alex Bennée Signed-off-by: Mathieu Poirier --- hw/virtio/meson.build | 1 + hw/virtio/vhost-user-rng-pci.c | 79 ++ 2 files changed, 80 insertions(+) create mode 100644

[PATCH v5 3/3] docs: Add documentation for vhost based RNG implementation

2021-10-12 Thread Mathieu Poirier
Add description and example for the vhost-user based RNG implementation. Signed-off-by: Mathieu Poirier --- docs/system/device-emulation.rst | 1 + docs/system/devices/vhost-user-rng.rst | 39 ++ 2 files changed, 40 insertions(+) create mode 100644 docs/system/dev

Re: [PATCH v4 3/3] docs: Add documentation for vhost based RNG implementation

2021-10-12 Thread Mathieu Poirier
On Tue, 5 Oct 2021 at 09:24, Michael S. Tsirkin wrote: > > On Mon, Sep 27, 2021 at 04:13:59PM -0600, Mathieu Poirier wrote: > > Add description and example for the vhost-user based RNG implementation. > > > > Signed-off-by: Mathieu Poirier > > Causes a build failure: > > Warning, treated as error

Re: [PATCH v2 18/23] target/riscv: Remove exit_tb and lookup_and_goto_ptr

2021-10-12 Thread Alistair Francis
On Wed, Oct 13, 2021 at 2:33 AM Richard Henderson wrote: > > GDB single-stepping is now handled generically, which means > we don't need to do anything in the wrappers. > > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/translate.c

Re: [PATCH 1/1] util: Make some iova_tree parameters const

2021-10-12 Thread Peter Xu
On Tue, Oct 12, 2021 at 05:50:01PM +0200, Eugenio Pérez wrote: > As qemu guidelines: > Unless a pointer is used to modify the pointed-to storage, give it the > "const" attribute. > > In the particular case of iova_tree_find it allows to enforce what is > requested by its comment, since the compile

Re: [PATCH v2 17/23] target/riscv: Remove dead code after exception

2021-10-12 Thread Alistair Francis
On Wed, Oct 13, 2021 at 2:35 AM Richard Henderson wrote: > > We have already set DISAS_NORETURN in generate_exception, > which makes the exit_tb unreachable. > > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_privileged.c.inc | 6

Re: [PATCH 10/12] block-backend: convert blk_aio_ functions to int64_t bytes paramter

2021-10-12 Thread Eric Blake
On Tue, Oct 12, 2021 at 07:13:23PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > @@ -1530,6 +1531,7 @@ BlockAIOCB *blk_aio_preadv(BlockBackend *blk, > > > int64_t offset, > > > QEMUIOVector *qiov, BdrvRequestFlags flags, > > > BlockCompl

[PULL 00/10] Python patches

2021-10-12 Thread John Snow
The following changes since commit bfd9a76f9c143d450ab5545dedfa74364b39fc56: Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-6.2-121021-2' into staging (2021-10-12 06:16:25 -0700) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git tags/python-pull-request

[PULL 01/10] python/aqmp: add greeting property to QMPClient

2021-10-12 Thread John Snow
Expose the greeting as a read-only property of QMPClient so it can be retrieved at-will. Signed-off-by: John Snow Reviewed-by: Hanna Reitz Reviewed-by: Paolo Bonzini Message-id: 20210923004938.363-2-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/qmp_client.py | 5 + 1

[PULL 05/10] python/aqmp: Add dict conversion method to Greeting object

2021-10-12 Thread John Snow
The iotests interface expects to return the greeting as a dict; AQMP offers it as a rich object. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Reviewed-by: Eric Blake Message-id: 20210923004938.363-6-js...@redhat.com Signed-off-by: John Snow --- python/qemu/aqmp/models.py | 13 +

[PULL 02/10] python/aqmp: add .empty() method to EventListener

2021-10-12 Thread John Snow
Synchronous clients may want to know if they're about to block waiting for an event or not. A method such as this is necessary to implement a compatible interface for the old QEMUMonitorProtocol using the new async internals. Signed-off-by: John Snow Reviewed-by: Hanna Reitz Reviewed-by: Paolo B

[PULL 04/10] python/aqmp: add send_fd_scm

2021-10-12 Thread John Snow
Add an implementation for send_fd_scm to the async QMP implementation. Like socket_scm_helper mentions, a non-empty payload is required for QEMU to process the ancillary data. A space is most useful because it does not disturb the parsing of subsequent JSON objects. A note on "voiding the warranty

[PULL 03/10] python/aqmp: Return cleared events from EventListener.clear()

2021-10-12 Thread John Snow
This serves two purposes: (1) It is now possible to discern whether or not clear() removed any event(s) from the queue with absolute certainty, and (2) It is now very easy to get a List of all pending events in one chunk, which is useful for the sync bridge. Signed-off-by: John Snow Reviewed-by

[PULL 08/10] python/qmp: clear events on get_events() call

2021-10-12 Thread John Snow
All callers in the tree *already* clear the events after a call to get_events(). Do it automatically instead and update callsites to remove the manual clear call. These semantics are quite a bit easier to emulate with async QMP, and nobody appears to be abusing some emergent properties of what hap

[PULL 06/10] python/aqmp: Reduce severity of EOFError-caused loop terminations

2021-10-12 Thread John Snow
When we encounter an EOFError, we don't know if it's an "error" in the perspective of the user of the library yet. Therefore, we should not log it as an error. Reduce the severity of this logging message to "INFO" to indicate that it's something that we expect to occur during the normal operation o

[PULL 07/10] python/aqmp: Disable logging messages by default

2021-10-12 Thread John Snow
AQMP is a library, and ideally it should not print error diagnostics unless a user opts into seeing them. By default, Python will print all WARNING, ERROR or CRITICAL messages to screen if no logging configuration has been created by a client application. In AQMP's case, ERROR logging statements a

[PULL 10/10] python, iotests: remove socket_scm_helper

2021-10-12 Thread John Snow
It's not used anymore, now. Signed-off-by: John Snow Reviewed-by: Hanna Reitz Reviewed-by: Paolo Bonzini Message-id: 20210923004938.363-11-js...@redhat.com Signed-off-by: John Snow --- tests/qemu-iotests/socket_scm_helper.c | 136 - python/qemu/machine/machine.py

[PULL 09/10] python/qmp: add send_fd_scm directly to QEMUMonitorProtocol

2021-10-12 Thread John Snow
It turns out you can do this directly from Python ... and because of this, you don't need to worry about setting the inheritability of the fds or spawning another process. Doing this is helpful because it allows QEMUMonitorProtocol to keep its file descriptor and socket object as private implement

Re: [PATCH 10/12] block-backend: convert blk_aio_ functions to int64_t bytes paramter

2021-10-12 Thread Vladimir Sementsov-Ogievskiy
13.10.2021 00:37, Eric Blake wrote: On Tue, Oct 12, 2021 at 07:13:23PM +0300, Vladimir Sementsov-Ogievskiy wrote: @@ -1530,6 +1531,7 @@ BlockAIOCB *blk_aio_preadv(BlockBackend *blk, int64_t offset, QEMUIOVector *qiov, BdrvRequestFlags flags,

Re: [RFC PATCH v2 02/16] qapi: Implement query-machine-phase QMP command

2021-10-12 Thread Alistair Francis
On Thu, Sep 23, 2021 at 2:20 AM Damien Hedde wrote: > > From: Mirela Grujic > > The command returns current machine initialization phase. > From now on, the MachineInitPhase enum is generated from the > QAPI schema. > > Signed-off-by: Mirela Grujic Acked-by: Alistair Francis Alistair > --- >

Re: [RFC PATCH v2 00/16] Initial support for machine creation via QMP

2021-10-12 Thread Alistair Francis
On Thu, Sep 23, 2021 at 2:22 AM Damien Hedde wrote: > > Hi, > > The goal of this work is to bring dynamic machine creation to QEMU: > we want to setup a machine without compiling a specific machine C > code. It would ease supporting highly configurable platforms (for > example resulting from an au

Re: [RFC PATCH v2 03/16] qapi: Implement x-machine-init QMP command

2021-10-12 Thread Alistair Francis
On Thu, Sep 23, 2021 at 2:17 AM Damien Hedde wrote: > > From: Mirela Grujic > > The x-machine-init QMP command is available only if the -preconfig option > is used and the current machine initialization phase is accel-created. > > The command triggers QEMU to enter machine initialized phase and w

Re: [PATCH 1/1] util: Make some iova_tree parameters const

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 17:50, Eugenio Pérez wrote: > As qemu guidelines: > Unless a pointer is used to modify the pointed-to storage, give it the > "const" attribute. > > In the particular case of iova_tree_find it allows to enforce what is > requested by its comment, since the compiler would shout in case o

Re: [RFC PATCH v2 06/16] qapi: Allow device_add to execute in machine initialized phase

2021-10-12 Thread Alistair Francis
On Thu, Sep 23, 2021 at 2:26 AM Damien Hedde wrote: > > From: Mirela Grujic > > To configure a machine using QMP we need the device_add command to > execute at machine initialized phase. > > Note: for device_add command in qdev.json adding the 'allow-init-config' > option has no effect because th

Re: [PATCH v2 13/23] target/mips: Fix single stepping

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 18:21, Richard Henderson wrote: > As per an ancient comment in mips_tr_translate_insn about the > expectations of gdb, when restarting the insn in a delay slot > we also re-execute the branch. Which means that we are > expected to execute two insns in this case. > > This has been brok

Re: [PATCH v2 19/23] target/rx: Drop checks for singlestep_enabled

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 18:21, Richard Henderson wrote: > GDB single-stepping is now handled generically. > > Signed-off-by: Richard Henderson > --- > target/rx/helper.h| 1 - > target/rx/op_helper.c | 8 > target/rx/translate.c | 12 ++-- > 3 files changed, 2 insertions(+), 19 deleti

Re: [PATCH v2 22/23] target/tricore: Drop check for singlestep_enabled

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 18:21, Richard Henderson wrote: > GDB single-stepping is now handled generically. > > Signed-off-by: Richard Henderson > --- > target/tricore/helper.h| 1 - > target/tricore/op_helper.c | 7 --- > target/tricore/translate.c | 14 +- > 3 files changed, 1 insertio

Re: [PATCH v2 05/23] target/hexagon: Drop checks for singlestep_enabled

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 18:21, Richard Henderson wrote: > GDB single-stepping is now handled generically. > > Signed-off-by: Richard Henderson > --- > target/hexagon/translate.c | 12 ++-- > 1 file changed, 2 insertions(+), 10 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 02/23] target/alpha: Drop checks for singlestep_enabled

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 18:21, Richard Henderson wrote: > GDB single-stepping is now handled generically. > > Signed-off-by: Richard Henderson > --- > target/alpha/translate.c | 13 +++-- > 1 file changed, 3 insertions(+), 10 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 15/23] target/openrisc: Drop checks for singlestep_enabled

2021-10-12 Thread Philippe Mathieu-Daudé
On 10/12/21 18:21, Richard Henderson wrote: > GDB single-stepping is now handled generically. > > Signed-off-by: Richard Henderson > --- > target/openrisc/translate.c | 18 +++--- > 1 file changed, 3 insertions(+), 15 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v3 0/7] Switch iotests to using Async QMP

2021-10-12 Thread John Snow
Based-on: <20211012214152.802483-1-js...@redhat.com> [PULL 00/10] Python patches GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-iotest-wrapper CI: https://gitlab.com/jsnow/qemu/-/pipelines/387210591 Hiya, This series continues where the last two AQMP series left off and add

[PATCH v3 1/7] python/machine: remove has_quit argument

2021-10-12 Thread John Snow
If we spy on the QMP commands instead, we don't need callers to remember to pass it. Seems like a fair trade-off. The one slightly weird bit is overloading this instance variable for wait(), where we use it to mean "don't issue the qmp 'quit' command". This means that wait() will "fail" if the QEM

[PATCH v3 4/7] iotests: Accommodate async QMP Exception classes

2021-10-12 Thread John Snow
(But continue to support the old ones for now, too.) There are very few cases of any user of QEMUMachine or a subclass thereof relying on a QMP Exception type. If you'd like to check for yourself, you want to grep for all of the derivatives of QMPError, excluding 'AQMPError' and its derivatives. T

[PATCH v3 5/7] iotests: Conditionally silence certain AQMP errors

2021-10-12 Thread John Snow
AQMP likes to be very chatty about errors it encounters. In general, this is good because it allows us to get good diagnostic information for otherwise complex async failures. For example, during a failed QMP connection attempt, we might see: +ERROR:qemu.aqmp.qmp_client.qemub-2536319:Negotiation

[PATCH v3 2/7] python/machine: Handle QMP errors on close more meticulously

2021-10-12 Thread John Snow
To use the AQMP backend, Machine just needs to be a little more diligent about what happens when closing a QMP connection. The operation is no longer a freebie in the async world; it may return errors encountered in the async bottom half on incoming message receipt, etc. (AQMP's disconnect, ultima

[PATCH v3 7/7] python, iotests: replace qmp with aqmp

2021-10-12 Thread John Snow
Swap out the synchronous QEMUMonitorProtocol from qemu.qmp with the sync wrapper from qemu.aqmp instead. Add an escape hatch in the form of the environment variable QEMU_PYTHON_LEGACY_QMP which allows you to cajole QEMUMachine into using the old implementatin, proving that both implementations wor

Re: [PATCH 3/3] s390x virtio-ccw machine: step down as maintainer

2021-10-12 Thread Halil Pasic
On Tue, 12 Oct 2021 16:40:40 +0200 Cornelia Huck wrote: > I currently don't have time to work on the s390x virtio-ccw machine > anymore, so let's step down. (I will, however, continue as a > maintainer for the virtio-ccw *transport*.) > > Signed-off-by: Cornelia Huck Acked-by: Halil Pasic Th

[PATCH v3 3/7] python/aqmp: Remove scary message

2021-10-12 Thread John Snow
The scary message interferes with the iotests output. Coincidentally, if iotests works by removing this, then it's good evidence that we don't really need to scare people away from using it. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 12 1 file changed, 12 deletions

Re: [RFC PATCH v2 08/16] qdev-monitor: Check sysbus device type before creating it

2021-10-12 Thread Alistair Francis
On Thu, Sep 23, 2021 at 2:53 AM Damien Hedde wrote: > > Add an early check to test if the requested sysbus device type > is allowed by the current machine before creating the device. This > impacts both -device cli option and device_add qmp command. > > Before this patch, the check was done well a

Re: [PATCH 2/3] s390x/kvm: step down as maintainer

2021-10-12 Thread Halil Pasic
On Tue, 12 Oct 2021 16:40:39 +0200 Cornelia Huck wrote: > I'm no longer involved with KVM/s390 on the kernel side, and I don't > have enough resources to work on the s390 KVM cpus support, so I'll > step down. > > Signed-off-by: Cornelia Huck Acked-by: Halil Pasic Thank you for your invaluab

[PATCH v3 6/7] python/aqmp: Create sync QMP wrapper for iotests

2021-10-12 Thread John Snow
This is a wrapper around the async QMPClient that mimics the old, synchronous QEMUMonitorProtocol class. It is designed to be interchangeable with the old implementation. It does not, however, attempt to mimic Exception compatibility. Signed-off-by: John Snow --- python/qemu/aqmp/legacy.py | 13

Re: [PATCH 1/2] numa: Set default distance map if needed

2021-10-12 Thread Gavin Shan
Hi Drew and Igor, On 10/13/21 12:05 AM, Andrew Jones wrote: On Tue, Oct 12, 2021 at 02:34:30PM +0200, Igor Mammedov wrote: On Tue, 12 Oct 2021 13:48:02 +0200 On Tue, Oct 12, 2021 at 09:31:55PM +1100, Gavin Shan wrote: On 10/12/21 8:40 PM, Igor Mammedov wrote: On Wed, 6 Oct 2021 18:22:08 +08

Re: [RFC PATCH v2 09/16] hw/core/machine: Remove the dynamic sysbus devices type check

2021-10-12 Thread Alistair Francis
On Thu, Sep 23, 2021 at 2:23 AM Damien Hedde wrote: > > Now that we check sysbus device types during device creation, we > can remove the check done in the machine init done notifier. > This was the only thing done by this notifier, so we remove the > whole sysbus_notifier structure of the Machine

Re: [PATCH 1/2] numa: Set default distance map if needed

2021-10-12 Thread Gavin Shan
uma nodes does edk2 actually uses numa info from QEMU? are put on the command line unless we follow a DT spec saying how to do that. The current spec says we should have a distance-map that contains those nodes. can you point out to the spec and place within it, pls? https://git.kernel.org

Re: [PATCH 1/3] vfio-ccw: step down as maintainer

2021-10-12 Thread Matthew Rosato
On 10/12/21 10:40 AM, Cornelia Huck wrote: I currently don't have time to act as vfio-ccw maintainer anymore, so remove myself there. Signed-off-by: Cornelia Huck Once again, thanks for all of your work on vfio-ccw. Acked-by: Matthew Rosato --- MAINTAINERS | 2 -- 1 file changed, 2 del

Re: [PATCH v4 00/11] virtio-iommu: Add ACPI support

2021-10-12 Thread Haiwei Li
On Tue, Oct 12, 2021 at 1:34 AM Jean-Philippe Brucker wrote: > > Hi Haiwei, > > On Mon, Oct 11, 2021 at 06:10:07PM +0800, Haiwei Li wrote: > [...] > > Gave up waiting for root file system device. Common problems: > > - Boot args (cat /proc/cmdline) > >- Check rootdelay= (did the system wait

[PATCH 00/16] fdt: Make OF_BOARD a boolean option

2021-10-12 Thread Simon Glass
With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so there are only three ways to obtain a devicetree: - OF_SEPARATE - the normal way, where the devicetree is built and appended to U-Boot - OF_EMBED - for development purposes, the devicetree is embedded in the EL

[PATCH 05/16] arm: qemu: Add a devicetree file for qemu_arm64

2021-10-12 Thread Simon Glass
Add this file, generated from qemu, so there is a reference devicetree in the U-Boot tree. Signed-off-by: Simon Glass --- arch/arm/dts/Makefile| 2 +- arch/arm/dts/qemu-arm64.dts | 381 +++ configs/qemu_arm64_defconfig | 1 + 3 files changed, 383 ins

[PATCH 06/16] riscv: qemu: Add devicetree files for qemu_riscv32/64

2021-10-12 Thread Simon Glass
Add these files, generated from qemu, so there is a reference devicetree in the U-Boot tree. Split the existing qemu-virt into two, since we need a different devicetree for 32- and 64-bit machines. Signed-off-by: Simon Glass --- arch/riscv/dts/Makefile | 2 +- arch/riscv/dts/qem

[PATCH 01/16] arm: qemu: Mention -nographic in the docs

2021-10-12 Thread Simon Glass
Without this option QEMU appears to hang. Add it to avoid confusion. Signed-off-by: Simon Glass --- doc/board/emulation/qemu-arm.rst | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst index 8d7fda10f15..

[PATCH 03/16] riscv: qemu: Explain how to extract the generate devicetree

2021-10-12 Thread Simon Glass
QEMU currently generates a devicetree for use with U-Boot. Explain how to obtain it. Signed-off-by: Simon Glass --- doc/board/emulation/qemu-riscv.rst | 12 1 file changed, 12 insertions(+) diff --git a/doc/board/emulation/qemu-riscv.rst b/doc/board/emulation/qemu-riscv.rst index

[PATCH 04/16] arm: qemu: Add a devicetree file for qemu_arm

2021-10-12 Thread Simon Glass
Add this file, generated from qemu, so there is a reference devicetree in the U-Boot tree. Signed-off-by: Simon Glass --- arch/arm/dts/Makefile | 2 + arch/arm/dts/qemu-arm.dts | 402 + configs/qemu_arm_defconfig | 1 + 3 files changed, 405 insertio

[PATCH 02/16] arm: qemu: Explain how to extract the generate devicetree

2021-10-12 Thread Simon Glass
QEMU currently generates a devicetree for use with U-Boot. Explain how to obtain it. Signed-off-by: Simon Glass --- doc/board/emulation/qemu-arm.rst | 12 1 file changed, 12 insertions(+) diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst index 97b6ec

<    1   2   3   4   >