[RFC PATCH] gitlab: disable accelerated zlib for s390x

2022-03-21 Thread Alex Bennée
Apparently this causes problems with migration. Signed-off-by: Alex Bennée Cc: Peter Maydell --- .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml | 12 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml

[PATCH v2] hw/i386/amd_iommu: Fix maybe-uninitialized error with GCC 12

2022-03-21 Thread Paolo Bonzini
Be more explicit that the loop must roll at least once. Avoids the following warning: FAILED: libqemu-x86_64-softmmu.fa.p/hw_i386_amd_iommu.c.o In function 'pte_get_page_mask', inlined from 'amdvi_page_walk' at hw/i386/amd_iommu.c:945:25, inlined from 'amdvi_do_translate' at

Re: [PULL for-7.0 0/2] Block patches

2022-03-21 Thread Stefan Hajnoczi
On Thu, Mar 17, 2022 at 06:36:36PM +, Peter Maydell wrote: > On Thu, 17 Mar 2022 at 16:57, Stefan Hajnoczi wrote: > > > > The following changes since commit 1d60bb4b14601e38ed17384277aa4c30c57925d3: > > > > Merge tag 'pull-request-2022-03-15v2' of https://gitlab.com/thuth/qemu > > into

[PULL 1/4] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-21 Thread Markus Armbruster
From: Murilo Opsfelder Araujo Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the following error: $ ../configure --prefix=/usr/local/qemu-disabletcg --target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user ... $ make -j$(nproc) ... In

Re: [PULL 0/3] ppc queue

2022-03-21 Thread Peter Maydell
in the Git repository at: > > https://github.com/legoater/qemu/ tags/pull-ppc-20220321 > > for you to fetch changes up to 3515553bf625ad48aa90210379c4f387c2596093: > > target/ppc: Replicate Double->Single-Prec

[PATCH v1 08/13] libvhost-user: expose vu_request_to_string

2022-03-21 Thread Alex Bennée
This is useful for more human readable debug messages in vhost-user programs. Signed-off-by: Alex Bennée --- subprojects/libvhost-user/libvhost-user.h | 9 + subprojects/libvhost-user/libvhost-user.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git

[PATCH v1 05/13] docs: vhost-user: rewrite section on ring state machine

2022-03-21 Thread Alex Bennée
From: Paolo Bonzini This section is using the word "back-end" to refer to the "slave's back-end", and talking about the "client" for what the rest of the document calls the "slave". Rework it to free the use of the term "back-end", which in the next patch will replace "slave". Signed-off-by:

Re: [PATCH v3 06/11] target/s390x: vxeh2: vector {load, store} elements reversed

2022-03-21 Thread Richard Henderson
On 3/21/22 04:35, David Hildenbrand wrote: +/* Probe write access before actually modifying memory */ +gen_helper_probe_write_access(cpu_env, o->addr1, tcg_constant_i64(16)); We have to free the tcg_constant_i64() IIRC. We do not. r~

Re: Memory leak in via_isa_realize()

2022-03-21 Thread BALATON Zoltan
On Mon, 21 Mar 2022, Peter Maydell wrote: On Mon, 21 Mar 2022 at 10:31, Thomas Huth wrote: FYI, I'm seeing a memory leak in via_isa_realize() when building QEMU with sanitizers enabled or when running QEMU through valgrind: Same problem happens with qemu-system-ppc64 and the pegasos2 machine.

[PATCH] hw/pvrdma: Protect against buggy or malicious guest driver

2022-03-21 Thread Yuval Shaia
Guest driver might execute HW commands when shared buffers are not yet allocated. This might happen on purpose (malicious guest) or because some other guest/host address mapping. We need to protect againts such case. Reported-by: Mauro Matteo Cascella Signed-off-by: Yuval Shaia ---

Re: [PATCH v4] tests: Do not treat the iotests as separate meson test target anymore

2022-03-21 Thread Hanna Reitz
On 21.03.22 10:17, Thomas Huth wrote: On 21/03/2022 10.06, Hanna Reitz wrote: On 18.03.22 18:36, Thomas Huth wrote: On 18/03/2022 18.04, Hanna Reitz wrote: On 10.03.22 08:50, Thomas Huth wrote: If there is a failing iotest, the output is currently not logged to the console anymore. To get

[PATCH] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2022-03-21 Thread Lu Gao
Block Size Register bits [14:12] is SDMA Buffer Boundary, it is missed in register write, but it is needed in SDMA transfer. e.g. it will be used in sdhci_sdma_transfer_multi_blocks to calculate boundary_ variables. Missing this field will cause wrong operation for different SDMA Buffer Boundary

Re: [PATCH v2 2/3] qapi: nbd-export: allow select bitmaps by node/name pair

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 02:50:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > +++ b/qapi/block-export.json > > > @@ -6,6 +6,7 @@ > > > ## > > > { 'include': 'sockets.json' } > > > +{ 'include': 'block-core.json' } > > > > Hmm. Does this extra inclusion negatively impact

Re: [PULL for-7.0 1/2] aio-posix: fix build failure io_uring 2.2

2022-03-21 Thread Stefan Hajnoczi
On Thu, Mar 17, 2022 at 05:14:20PM +, Daniel P. Berrangé wrote: > On Thu, Mar 17, 2022 at 04:57:42PM +, Stefan Hajnoczi wrote: > > From: Haiyue Wang > > > > The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit": > >

[PATCH v3 5/5] i386/cpu: Free env->xsave_buf in KVM and HVF destory_vcpu_thread routines

2022-03-21 Thread Mark Kanda
Create KVM and HVF specific destory_vcpu_thread() routines to free env->xsave_buf. vCPU hotunplug related leak reported by Valgrind: ==132362== 4,096 bytes in 1 blocks are definitely lost in loss record 8,440 of 8,549 ==132362==at 0x4C3B15F: memalign (vg_replace_malloc.c:1265) ==132362==

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
09.03.2022 16:26, Emanuele Giuseppe Esposito wrote: Am 02/03/2022 um 12:07 schrieb Vladimir Sementsov-Ogievskiy: 01.03.2022 17:21, Emanuele Giuseppe Esposito wrote: This serie tries to provide a proof of concept and a clear explanation on why we need to use drains (and more precisely

Re: [PATCH 06/15] iotests: rebase qemu_io() on top of qemu_tool()

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:46PM -0400, John Snow wrote: > Rework qemu_io() to be analogous to qemu_img(); a function that requires > a return code of zero by default unless disabled explicitly. > > Tests that use qemu_io(): > 030 040 041 044 055 056 093 124 129 132 136 148 149 151 152 163 165

[PATCH v1 12/13] hw/virtio/vhost-user: don't suppress F_CONFIG when supported

2022-03-21 Thread Alex Bennée
Previously we would silently suppress VHOST_USER_PROTOCOL_F_CONFIG during the protocol negotiation if the QEMU stub hadn't implemented the vhost_dev_config_notifier. However this isn't the only way we can handle config messages, the existing vdc->get/set_config can do this as well. Lightly

Re: [PATCH qemu 00/13] Add tail agnostic behavior for rvv instructions

2022-03-21 Thread eop Chen
Hi WeiWei, Thanks for reviewing this PR. === Regarding to possible behaviors on agnostic elements to mask instructions, I want to ask for you and other's opinion on this proposed PR before sending the next version. I

Re: [PATCH 02/15] iotests/163: Fix broken qemu-io invocation

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:42PM -0400, John Snow wrote: > The 'read' commands to qemu-io were malformed, and this invocation only > worked by coincidence because the error messages were identical. Oops. > > There's no point in checking the patterning of the reference image, so > just check the

Re: [PATCH v4 10/18] iotests: add qemu_img_map() function

2022-03-21 Thread Eric Blake
On Thu, Mar 17, 2022 at 07:49:29PM -0400, John Snow wrote: > Add a qemu_img_map() function by analogy with qemu_img_measure(), > qemu_img_check(), and qemu_img_info() that all return JSON information. > > Replace calls to qemu_img_pipe('map', '--output=json', ...) with this > new function, which

[PULL 0/4] Miscellaneous patches patches for 2022-03-21

2022-03-21 Thread Markus Armbruster
If it's too late for trivial cleanup, I'll respin this with the last patch dropped. The following changes since commit 2058fdbe81e2985c226a026851dd26b146d3395c: Merge tag 'fixes-20220318-pull-request' of git://git.kraxel.org/qemu into staging (2022-03-19 11:28:54 +) are available in the

[PULL 2/4] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-21 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Message-Id: <20220315144156.1595462-2-arm...@redhat.com>

[PATCH v1 04/13] docs: vhost-user: clean up request/reply description

2022-03-21 Thread Alex Bennée
From: Paolo Bonzini It is not necessary to mention which side is sending/receiving each payload; it is more interesting to say which is the request and which is the reply. This also matches what vhost-user-gpu.rst already does. While at it, ensure that all messages list both the request and

[PATCH v1 06/13] docs: vhost-user: replace master/slave with front-end/back-end

2022-03-21 Thread Alex Bennée
From: Paolo Bonzini This matches the nomenclature that is generally used. Also commonly used is client/server, but it is not as clear because sometimes the front-end exposes a passive (server) socket that the back-end connects to. Signed-off-by: Paolo Bonzini Message-Id:

[PATCH v1 00/13] various virtio docs, fixes and tweaks

2022-03-21 Thread Alex Bennée
Hi, This series is a sub-set of patches while I was trying to re-rev my virtio-rpmb patches. It attempts to address a few things: - improve documentation for virtio/vhost/vhost-user - document some of the API - a hacky fix for F_CONFIG handling - putting VhostUserState on a diet, make

[PATCH v2] gitlab: disable accelerated zlib for s390x

2022-03-21 Thread Alex Bennée
There appears to be a bug in the s390 hardware-accelerated version of zlib distributed with Ubuntu 20.04, which makes our test /i386/migration/multifd/tcp/zlib hit an assertion perhaps one time in 10. Fortunately zlib provides an escape hatch where we can disable the hardware-acceleration entirely

[PULL 4/4] Use g_new() & friends where that makes obvious sense

2022-03-21 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form

Re: [PATCH v21 0/9] support dirty restraint on vCPU

2022-03-21 Thread Hyman Huang
Ping Hi! I think this patchset is meaningful to merge, not just for it provides interfaces for limiting dirty page rate, but also it builds foundation for the dirtylimit capability of live migration. Which is implemented in the following repo:

[PATCH v1 01/13] hw/virtio: move virtio-pci.h into shared include space

2022-03-21 Thread Alex Bennée
This allows other device classes that will be exposed via PCI to be able to do so in the appropriate hw/ directory. I resisted the temptation to re-order headers to be more aesthetically pleasing. Signed-off-by: Alex Bennée Message-Id: <20200925125147.26943-4-alex.ben...@linaro.org> --- v2 -

[PATCH v1 03/13] hw/virtio: add vhost_user_[read|write] trace points

2022-03-21 Thread Alex Bennée
These are useful when trying to debug the initial vhost-user negotiation, especially when it hard to get logging from the low level library on the other side. Signed-off-by: Alex Bennée --- v2 - fixed arguments --- hw/virtio/vhost-user.c | 4 hw/virtio/trace-events | 2 ++ 2 files

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
09.03.2022 16:26, Emanuele Giuseppe Esposito wrote: Am 02/03/2022 um 12:07 schrieb Vladimir Sementsov-Ogievskiy: 01.03.2022 17:21, Emanuele Giuseppe Esposito wrote: This serie tries to provide a proof of concept and a clear explanation on why we need to use drains (and more precisely

[PATCH v1 13/13] virtio/vhost-user: dynamically assign VhostUserHostNotifiers

2022-03-21 Thread Alex Bennée
At a couple of hundred bytes per notifier allocating one for every potential queue is very wasteful as most devices only have a few queues. Instead of having this handled statically dynamically assign them and track in a GPtrArray. [AJB: it's hard to trigger the vhost notifiers code, I assume as

Re: [PATCH v3 06/11] target/s390x: vxeh2: vector {load, store} elements reversed

2022-03-21 Thread David Hildenbrand
On 21.03.22 16:35, Richard Henderson wrote: > On 3/21/22 04:35, David Hildenbrand wrote: >>> +/* Probe write access before actually modifying memory */ >>> +gen_helper_probe_write_access(cpu_env, o->addr1, tcg_constant_i64(16)); >> >> We have to free the tcg_constant_i64() IIRC. > > We do

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread Hanna Reitz
On 21.03.22 14:14, Hanna Reitz wrote: On 18.03.22 22:14, John Snow wrote: On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: On 18.03.22 00:49, John Snow wrote: Hiya! This series effectively replaces qemu_img_pipe_and_status() with a rewritten function named qemu_img() that raises an

Re: [PATCH v2] gitlab: disable accelerated zlib for s390x

2022-03-21 Thread Thomas Huth
On 21/03/2022 17.11, Alex Bennée wrote: There appears to be a bug in the s390 hardware-accelerated version of zlib distributed with Ubuntu 20.04, which makes our test /i386/migration/multifd/tcp/zlib hit an assertion perhaps one time in 10. Fortunately zlib provides an escape hatch where we can

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-21 Thread Vladimir Sementsov-Ogievskiy
17.03.2022 00:55, Emanuele Giuseppe Esposito wrote: Am 09/03/2022 um 14:26 schrieb Emanuele Giuseppe Esposito: Next, I have a problem in mind, that in past lead to a lot of iotest 30 failures. Next there were different fixes and improvements, but the core problem (as far as I understand) is

[PATCH v1 1/1] test/avocado/machine_aspeed.py: Add ast1030 test case

2022-03-21 Thread Jamin Lin
Add test case to test "ast1030-evb" machine with zephyr os Signed-off-by: Jamin Lin --- tests/avocado/machine_aspeed.py | 36 + 1 file changed, 36 insertions(+) create mode 100644 tests/avocado/machine_aspeed.py diff --git a/tests/avocado/machine_aspeed.py

Re: [PATCH v4 06/18] iotests: add qemu_img_json()

2022-03-21 Thread Eric Blake
On Thu, Mar 17, 2022 at 07:49:25PM -0400, John Snow wrote: > qemu_img_json() is a new helper built on top of qemu_img() that tries to > pull a valid JSON document out of the stdout stream. > > In the event that the return code is negative (the program crashed), or > the code is greater than zero

Re: [RFC PATCH] gitlab: disable accelerated zlib for s390x

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 13:39, Alex Bennée wrote: > > Apparently this causes problems with migration. More specifically: # There appears to be a bug in the s390 hardware-accelerated version # of zlib distributed with Ubuntu 20.04, which makes our test # /i386/migration/multifd/tcp/zlib hit an

[PATCH v3 3/5] softmmu/cpus: Free cpu->halt_cond in generic_destroy_vcpu_thread()

2022-03-21 Thread Mark Kanda
vCPU hotunplug related leak reported by Valgrind: ==102631== 56 bytes in 1 blocks are definitely lost in loss record 5,089 of 8,555 ==102631==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==102631==by 0x69EE4CD: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.5600.4) ==102631==by

[PULL 3/4] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-21 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form

Re: [PATCH v4 1/3] qmp: Support for querying stats

2022-03-21 Thread Mark Kanda
On 3/21/2022 9:55 AM, Paolo Bonzini wrote: On 3/21/22 14:50, Markus Armbruster wrote: Mark Kanda writes: Thank you Markus. On 3/11/2022 7:06 AM, Markus Armbruster wrote: Are the stats bulky enough to justfify the extra complexity of filtering? If this was only for KVM, the complexity

[PATCH v1 10/13] include/hw: start documenting the vhost API

2022-03-21 Thread Alex Bennée
While trying to get my head around the nest of interactions for vhost devices I though I could start by documenting the key API functions. This patch documents the main API hooks for creating and starting a vhost device as well as how the configuration changes are handled. Signed-off-by: Alex

[PATCH v1 11/13] contrib/vhost-user-blk: fix 32 bit build and enable

2022-03-21 Thread Alex Bennée
We were not building the vhost-user-blk server due to 32 bit compilation problems. The problem was due to format string types so fix that and then enable the build. Tweak the rule to follow the same rules as other vhost-user daemons. Signed-off-by: Alex Bennée --- meson.build

[PATCH v1 07/13] vhost-user.rst: add clarifying language about protocol negotiation

2022-03-21 Thread Alex Bennée
Make the language about feature negotiation explicitly clear about the handling of the VHOST_USER_F_PROTOCOL_FEATURES feature bit. Try and avoid the sort of bug introduced in vhost.rs REPLY_ACK processing: https://github.com/rust-vmm/vhost/pull/24 Signed-off-by: Alex Bennée Cc: Jiang Liu

Re: [PATCH v4 10/18] iotests: add qemu_img_map() function

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022, 10:24 AM Eric Blake wrote: > On Thu, Mar 17, 2022 at 07:49:29PM -0400, John Snow wrote: > > Add a qemu_img_map() function by analogy with qemu_img_measure(), > > qemu_img_check(), and qemu_img_info() that all return JSON information. > > > > Replace calls to

Re: [PATCH v3 08/11] target/s390x: vxeh2: vector {load, store} byte reversed element

2022-03-21 Thread David Hildenbrand
On 08.03.22 02:53, Richard Henderson wrote: > From: David Miller > > This includes VLEBR* and VSTEBR* (single element); > VLBRREP (load single element and replicate); and > VLLEBRZ (load single element and zero). "load byte reversed element and ..." > > Signed-off-by: David Miller >

Re: [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance

2022-03-21 Thread Andrea Righi
On Fri, Mar 18, 2022 at 02:34:29PM +0100, Claudio Fontana wrote: ... > I have lots of questions here, and I tried to involve Jiri and Andrea Righi > here, who a long time ago proposed a POSIX_FADV_NOREUSE implementation. > > 1) What is the reason iohelper was introduced? > > 2) Was Jiri's

[PATCH v1 0/1] hw/gpio Add ASPEED GPIO model for AST1030

2022-03-21 Thread Jamin Lin
1. Add GPIO read/write trace event. 2. Support GPIO index mode for write operation. It did not support GPIO index mode for read operation. 3. AST1030 integrates one set of Parallel GPIO Controller with maximum 151 control pins, which are 21 groups (A~U, exclude pin: M6 M7 Q5 Q6 Q7 R0 R1 R4 R5 R6

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread Hanna Reitz
On 18.03.22 22:14, John Snow wrote: On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: On 18.03.22 00:49, John Snow wrote: Hiya! This series effectively replaces qemu_img_pipe_and_status() with a rewritten function named qemu_img() that raises an exception on non-zero return code by default.

Re: [PATCH 01/15] iotests: replace calls to log(qemu_io(...)) with qemu_io_log()

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:41PM -0400, John Snow wrote: > This makes these callsites a little simpler, but the real motivation is > a forthcoming commit will change the return type of qemu_io(), so removing > users of the return value now is helpful. > > Signed-off-by: John Snow > ---

[PATCH-for-7.0] qemu/main-loop: Disable block backend global state assertion on Darwin

2022-03-21 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Since commit 0439c5a462 ("block/block-backend.c: assertions for block-backend") QEMU crashes on Darwin hosts, example on macOS: $ qemu-system-i386 Assertion failed: (qemu_in_main_thread()), function blk_all_next, file block-backend.c, line 552. Abort trap: 6

Re: [PATCH 05/15] iotests: create generic qemu_tool() function

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:45PM -0400, John Snow wrote: > reimplement qemu_img() in terms of qemu_tool() in preparation for doing > the same with qemu_io(). > > Signed-off-by: John Snow > --- > tests/qemu-iotests/iotests.py | 37 +++ > 1 file changed, 24

[PATCH 1/2] pcie: Don't try triggering a LSI when not defined

2022-03-21 Thread Frederic Barrat
This patch skips [de]asserting a LSI interrupt if the device doesn't have any LSI defined. Doing so would trigger an assert in pci_irq_handler(). The PCIE root port implementation in qemu requests a LSI (INTA), but a subclass may want to change that behavior since it's a valid configuration. For

[PATCH 2/2] ppc/pnv: Remove LSI on the PCIE host bridge

2022-03-21 Thread Frederic Barrat
The phb3/phb4/phb5 root ports inherit from the default PCIE root port implementation, which requests a LSI interrupt (#INTA). On real hardware (POWER8/POWER9/POWER10), there is no such LSI. This patch corrects it so that it matches the hardware. As a consequence, the device tree previously

Re: Memory leak in via_isa_realize()

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 12:11, BALATON Zoltan wrote: > > On Mon, 21 Mar 2022, Peter Maydell wrote: > > On Mon, 21 Mar 2022 at 10:31, Thomas Huth wrote: > >> FYI, I'm seeing a memory leak in via_isa_realize() when building > >> QEMU with sanitizers enabled or when running QEMU through valgrind: >

Re: [PATCH RESEND 1/2] hw/vfio/pci-quirks: Resolve redundant property getters

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 11:57, Bernhard Beschow wrote: Am 1. März 2022 22:52:19 UTC schrieb Bernhard Beschow : The QOM API already provides getters for uint64 and uint32 values, so reuse them. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/vfio/pci-quirks.c | 34

Re: [PATCH 04/15] iotests/040: Don't check image pattern on zero-length image

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:44PM -0400, John Snow wrote: > qemu-io fails on read/write with zero-length raw images, so skip these > when running the zero-length image tests. On my first read, I wondered what we accomplish by rejecting zero-length reads on a zero-length image, and whether

Re: [PATCH v4 1/3] qmp: Support for querying stats

2022-03-21 Thread Paolo Bonzini
On 3/21/22 14:50, Markus Armbruster wrote: Mark Kanda writes: Thank you Markus. On 3/11/2022 7:06 AM, Markus Armbruster wrote: Are the stats bulky enough to justfify the extra complexity of filtering? If this was only for KVM, the complexity probably isn't worth it. However, the framework

[PATCH v1 02/13] virtio-pci: add notification trace points

2022-03-21 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200925125147.26943-6-alex.ben...@linaro.org> Signed-off-by: Alex Bennée --- hw/virtio/virtio-pci.c | 3 +++ hw/virtio/trace-events | 7 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH v1 09/13] docs/devel: start documenting writing VirtIO devices

2022-03-21 Thread Alex Bennée
While writing my own VirtIO devices I've gotten confused with how things are structured and what sort of shared infrastructure there is. If we can document how everything is supposed to work we can then maybe start cleaning up inconsistencies in the code. Signed-off-by: Alex Bennée Cc: Stefan

Re: [PATCH v3 0/4] Improve integration of iotests in the meson test harness

2022-03-21 Thread Hanna Reitz
On 23.02.22 10:38, Thomas Huth wrote: Though "make check-block" is currently already run via the meson test runner, it still looks like an oddball in the output of "make check". It would be nicer if the iotests would show up like the other tests suites. My original plan was to add each iotests

Re: [PATCH 05/15] iotests: create generic qemu_tool() function

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022, 11:13 AM Eric Blake wrote: > On Fri, Mar 18, 2022 at 04:36:45PM -0400, John Snow wrote: > > reimplement qemu_img() in terms of qemu_tool() in preparation for doing > > the same with qemu_io(). > > > > Signed-off-by: John Snow > > --- > > tests/qemu-iotests/iotests.py | 37

[PATCH v1 1/1] hw/gpio: Add ASPEED GPIO model for AST1030

2022-03-21 Thread Jamin Lin
1. Add GPIO read/write trace event. 2. Support GPIO index mode for write operation. It did not support GPIO index mode for read operation. 3. AST1030 integrates one set of Parallel GPIO Controller with maximum 151 control pins, which are 21 groups (A~U, exclude pin: M6 M7 Q5 Q6 Q7 R0 R1 R4 R5 R6

Re: [PATCH 03/15] iotests: Don't check qemu_io() output for specific error strings

2022-03-21 Thread Eric Blake
On Fri, Mar 18, 2022 at 04:36:43PM -0400, John Snow wrote: > A forthcoming commit updates qemu_io() to raise an exception on non-zero > return by default, and changes its return type. > > In preparation, simplify some calls to qemu_io() that assert that > specific error message strings do not

Re: [PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Yongji Xie
On Mon, Mar 21, 2022 at 9:25 PM Eric Blake wrote: > > On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote: > > This implements a VDUSE block backends based on > > the libvduse library. We can use it to export the BDSs > > for both VM and container (host) usage. > > > > The new command-line

[PATCH v3 4/5] cpu: Free cpu->cpu_ases in cpu_address_space_destroy()

2022-03-21 Thread Mark Kanda
Create cpu_address_space_destroy() to free a CPU's cpu_ases list. vCPU hotunplug related leak reported by Valgrind: ==132362== 216 bytes in 1 blocks are definitely lost in loss record 7,119 of 8,549 ==132362==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==132362==by 0x69EE4CD:

[PATCH v3 0/5] vCPU hotunplug related memory leaks

2022-03-21 Thread Mark Kanda
This series addresses a few vCPU hotunplug related leaks (found with Valgrind). v3: - patch 4: create cpu_address_space_destroy() to free cpu_ases (Phillipe) - patch 5: create _destroy_vcpu_thread() to free xsave_buf (Phillipe) v2: Create AccelOpsClass::destroy_vcpu_thread() for vcpu thread

[PATCH v3 2/5] softmmu/cpus: Free cpu->thread in generic_destroy_vcpu_thread()

2022-03-21 Thread Mark Kanda
Free cpu->thread in a new AccelOpsClass::destroy_vcpu_thread() handler generic_destroy_vcpu_thread(). vCPU hotunplug related leak reported by Valgrind: ==102631== 8 bytes in 1 blocks are definitely lost in loss record 1,037 of 8,555 ==102631==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117)

[PATCH v3 1/5] accel: Introduce AccelOpsClass::destroy_vcpu_thread()

2022-03-21 Thread Mark Kanda
Add destroy_vcpu_thread() to AccelOps as a method for vcpu thread cleanup. This will be used in subsequent patches. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Mark Kanda Reviewed-by: Philippe Mathieu-Daudé --- include/sysemu/accel-ops.h | 1 + softmmu/cpus.c | 3 +++ 2

Re: [PATCH] i386: Set MCG_STATUS_RIPV bit for mce SRAR error

2022-03-21 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v3 3/4] tests/qemu-iotests: Move the bash and sanitizer checks to meson.build

2022-03-21 Thread Hanna Reitz
On 23.02.22 10:38, Thomas Huth wrote: We want to get rid of check-block.sh in the long run, so let's move the checks for the bash version and sanitizers from check-block.sh into the meson.build file instead. Signed-off-by: Thomas Huth --- tests/check-block.sh | 26

Re: [PATCH v5 14/15] docs: Add documentation for SR-IOV and Virtualization Enhancements

2022-03-21 Thread Lukasz Maniak
On Tue, Mar 01, 2022 at 01:23:18PM +0100, Klaus Jensen wrote: > On Feb 17 18:45, Lukasz Maniak wrote: > > Signed-off-by: Lukasz Maniak > > Please add a short commit description as well. Otherwise, Klaus, Sorry I forgot to add the description in v6 aka v7, been really busy recently. I am going

Re: Memory leak in via_isa_realize()

2022-03-21 Thread Philippe Mathieu-Daudé
Cc'ing Bernhard who did a similar cleanup recently. On 21/3/22 11:31, Thomas Huth wrote:  Hi! FYI, I'm seeing a memory leak in via_isa_realize() when building QEMU with sanitizers enabled or when running QEMU through valgrind: $ valgrind --leak-check=full --show-leak-kinds=definite

Re: [PATCH v3 4/6] vduse-blk: implements vduse-blk export

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote: > This implements a VDUSE block backends based on > the libvduse library. We can use it to export the BDSs > for both VM and container (host) usage. > > The new command-line syntax is: > > $ qemu-storage-daemon \ > --blockdev

[PATCH v1 0/1] tests/avocado: Add ast1030 test case

2022-03-21 Thread Jamin Lin
1. Add tests/avocado/machines_aspeed.py to test ASPEED SOCs with avocado framework 2. Add test case to test "ast1030-evb" machine with zephyr os Jamin Lin (1): test/avocado/machine_aspeed.py: Add ast1030 test case tests/avocado/machine_aspeed.py | 36 + 1 file

Re: [PATCH v4 1/3] qmp: Support for querying stats

2022-03-21 Thread Markus Armbruster
First: sorry for my slow response. Mark Kanda writes: > Thank you Markus. > > On 3/11/2022 7:06 AM, Markus Armbruster wrote: >> Mark Kanda writes: >> >>> Introduce QMP support for querying stats. Provide a framework for adding new >>> stats and support for the following commands: >>> >>> -

Re: [PATCH v2] hw/i386/amd_iommu: Fix maybe-uninitialized error with GCC 12

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 15:33, Paolo Bonzini wrote: Be more explicit that the loop must roll at least once. Avoids the following warning: FAILED: libqemu-x86_64-softmmu.fa.p/hw_i386_amd_iommu.c.o In function 'pte_get_page_mask', inlined from 'amdvi_page_walk' at hw/i386/amd_iommu.c:945:25,

Re: [PATCH 1/1] MAINTAINERS: Update maintainers for Guest x86 HAXM CPUs

2022-03-21 Thread Markus Armbruster
Perhaps this can go via qemu-trivial (cc'ed). "Wang, Wenchao" writes: > diff --git a/MAINTAINERS b/MAINTAINERS > index f2e9ce1da2..36f877cf74 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -492,7 +492,6 @@ Guest CPU Cores (HAXM) > - > X86 HAXM CPUs > M: Wenchao Wang >

[PATCH 0/2] Remove PCIE root bridge LSI on powernv

2022-03-21 Thread Frederic Barrat
The powernv8/powernv9/powernv10 machines allocate a LSI for their root port bridge, which is not the case on real hardware. The default root port implementation in qemu requests a LSI. Since the powernv implementation derives from it, that's where the LSI is coming from. This series fixes it, so

Re: [PATCH v4 00/18] iotests: add enhanced debugging info to qemu-img failures

2022-03-21 Thread John Snow
On Mon, Mar 21, 2022, 11:50 AM Hanna Reitz wrote: > On 21.03.22 14:14, Hanna Reitz wrote: > > On 18.03.22 22:14, John Snow wrote: > >> On Fri, Mar 18, 2022 at 9:36 AM Hanna Reitz wrote: > >>> On 18.03.22 00:49, John Snow wrote: > Hiya! > > This series effectively replaces

[PULL 0/2] Bugfixes for QEMU 7.0-rc1

2022-03-21 Thread Paolo Bonzini
The following changes since commit e2fb7d8aa218256793df99571d16f92074258447: Merge tag 'dbus-pull-request' of gitlab.com:marcandre.lureau/qemu into staging (2022-03-15 16:28:50 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

[PATCH 3/3] qapi-schema: test: add a unit test for parsing array alternates

2022-03-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/qapi-schema/qapi-schema-test.json | 1 + tests/qapi-schema/qapi-schema-test.out | 4 +++ tests/unit/test-qobject-input-visitor.c | 43 + 3 files changed, 48 insertions(+) diff --git a/tests/qapi-schema/qapi-schema-test.json

[PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems

2022-03-21 Thread Khem Raj
linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures which include asm-generic/mman.h and mips/powerpc are not including this file in linux/mman.h, therefore these should be defined for such architectures on Linux as well. This fixes build on mips/musl/linux Signed-off-by: Khem Raj

RE: [PATCH v8 12/12] target/hexagon: import additional tests

2022-03-21 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Wednesday, February 9, 2022 11:03 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; Michael Lambert ; > bab...@rev.ng; ni...@rev.ng; richard.hender...@linaro.org > Subject: [PATCH v8 12/12]

[PATCH v5 14/18] iotests: remove remaining calls to qemu_img_pipe()

2022-03-21 Thread John Snow
As part of moving all python iotest invocations of qemu-img onto a single qemu_img() implementation, remove a few lingering uses of qemu_img_pipe() from outside of iotests.py itself. Several cases here rely on the knowledge that qemu_img_pipe() suppresses *all* output on a successful case when

[PATCH v5 16/18] iotests: replace qemu_img_log('create', ...) calls

2022-03-21 Thread John Snow
qemu_img_log() calls into qemu_img_pipe(), which always removes output for 'create' commands on success anyway. Replace all of these calls to the simpler qemu_img_create(...) which doesn't log, but raises a detailed exception object on failure instead. Blank lines are removed from output files

Re: [PULL 0/4] Miscellaneous patches patches for 2022-03-21

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 14:59, Markus Armbruster wrote: > > If it's too late for trivial cleanup, I'll respin this with the last > patch dropped. > > The following changes since commit 2058fdbe81e2985c226a026851dd26b146d3395c: > > Merge tag 'fixes-20220318-pull-request' of

Re: [PATCH v5 17/18] iotests: remove qemu_img_pipe_and_status()

2022-03-21 Thread Eric Blake
On Mon, Mar 21, 2022 at 04:16:17PM -0400, John Snow wrote: > With the exceptional 'create' calls removed in the prior commit, change > qemu_img_log() and img_info_log() to call qemu_img() directly > instead. > > For now, allow these calls to qemu-img to return non-zero on the basis > that any

Re: [PATCH v3 4/5] cpu: Free cpu->cpu_ases in cpu_address_space_destroy()

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 15:14, Mark Kanda wrote: Create cpu_address_space_destroy() to free a CPU's cpu_ases list. vCPU hotunplug related leak reported by Valgrind: ==132362== 216 bytes in 1 blocks are definitely lost in loss record 7,119 of 8,549 ==132362==at 0x4C3ADBB: calloc

Re: [PATCH-for-7.0] qemu/main-loop: Disable block backend global state assertion on Darwin

2022-03-21 Thread Akihiko Odaki
On 2022/03/21 23:55, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Since commit 0439c5a462 ("block/block-backend.c: assertions for block-backend") QEMU crashes on Darwin hosts, example on macOS: $ qemu-system-i386 Assertion failed: (qemu_in_main_thread()), function

Re: [PATCH v3 4/5] cpu: Free cpu->cpu_ases in cpu_address_space_destroy()

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 23:03, Philippe Mathieu-Daudé wrote: On 21/3/22 15:14, Mark Kanda wrote: Create cpu_address_space_destroy() to free a CPU's cpu_ases list. vCPU hotunplug related leak reported by Valgrind: ==132362== 216 bytes in 1 blocks are definitely lost in loss record 7,119 of 8,549

Re: [PATCH v3 2/5] softmmu/cpus: Free cpu->thread in generic_destroy_vcpu_thread()

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 15:14, Mark Kanda wrote: Free cpu->thread in a new AccelOpsClass::destroy_vcpu_thread() handler generic_destroy_vcpu_thread(). vCPU hotunplug related leak reported by Valgrind: ==102631== 8 bytes in 1 blocks are definitely lost in loss record 1,037 of 8,555 ==102631==at

Re: [PATCH v1 01/13] hw/virtio: move virtio-pci.h into shared include space

2022-03-21 Thread Philippe Mathieu-Daudé
On 21/3/22 16:30, Alex Bennée wrote: This allows other device classes that will be exposed via PCI to be able to do so in the appropriate hw/ directory. I resisted the temptation to re-order headers to be more aesthetically pleasing. Signed-off-by: Alex Bennée Message-Id:

[PATCH v4 00/11] s390x/tcg: Implement Vector-Enhancements Facility 2

2022-03-21 Thread David Miller
Implement Vector-Enhancements Facility 2 for s390x resolves: https://gitlab.com/qemu-project/qemu/-/issues/738 implements: VECTOR LOAD ELEMENTS REVERSED (VLER) VECTOR LOAD BYTE REVERSED ELEMENTS (VLBR) VECTOR LOAD BYTE REVERSED ELEMENT (VLEBRH,

[PATCH v4 05/11] target/s390x: vxeh2: vector shift double by bit

2022-03-21 Thread David Miller
Signed-off-by: David Miller Signed-off-by: Richard Henderson --- target/s390x/tcg/insn-data.def | 6 +++- target/s390x/tcg/translate_vx.c.inc | 55 + 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/target/s390x/tcg/insn-data.def

[PATCH v4 01/11] tcg: Implement tcg_gen_{h,w}swap_{i32,i64}

2022-03-21 Thread David Miller
From: Richard Henderson Swap half-words (16-bit) and words (32-bit) within a larger value. Mirrors functions of the same names within include/qemu/bitops.h. Signed-off-by: Richard Henderson Reviewed-by: David Miller Reviewed-by: David Hildenbrand --- include/tcg/tcg-op.h | 6 ++

[PATCH v2 1/4] python/machine: permanently switch to AQMP

2022-03-21 Thread John Snow
Remove the QEMU_PYTHON_LEGACY_QMP environment variable, making the switch from sync qmp to async qmp permanent. Update exceptions and import paths as necessary. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Beraldo Leal Acked-by: Hanna Reitz ---

Re: Memory leak in via_isa_realize()

2022-03-21 Thread Peter Maydell
On Mon, 21 Mar 2022 at 18:55, Cédric Le Goater wrote: > I introduced quite a few of these calls, > >hw/ppc/pnv_lpc.c:irqs = qemu_allocate_irqs(handler, lpc, ISA_NUM_IRQS); >hw/ppc/pnv_psi.c:psi->qirqs = qemu_allocate_irqs(ics_set_irq, ics, > ics->nr_irqs); >hw/ppc/pnv_psi.c:

  1   2   3   >