[PATCH] hw/arm/boot: Report error msg if loading elf/dtb failed

2024-08-30 Thread Changbin Du via
Print errors before exit. Do not exit silently. Signed-off-by: Changbin Du --- hw/arm/boot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d480a7da02cf..17c01f299831 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -839,6 +839,7 @@ static ssize_t arm_

Re: [PATCH v3 1/2] qdev-monitor: avoid QemuOpts in QMP device_add

2024-08-30 Thread Markus Armbruster
Stefan Hajnoczi writes: > The QMP device_add monitor command converts the QDict arguments to > QemuOpts and then back again to QDict. This process only supports scalar > types. Device properties like virtio-blk-pci's iothread-vq-mapping (an > array of objects) are silently dropped by qemu_opts_fr

Re: [PATCH] raw-format: Fix error message for invalid offset/size

2024-08-30 Thread Hanna Czenczek
On 29.08.24 20:55, Kevin Wolf wrote: s->offset and s->size are only set at the end of the function and still contain the old values when formatting the error message. Print the parameters with the new values that we actually checked instead. Fixes: 500e2434207d ('raw-format: Split raw_read_optio

Re: [PATCH v4 15/35] tests/functional: enable pre-emptive caching of assets

2024-08-30 Thread Thomas Huth
On 29/08/2024 12.15, Daniel P. Berrangé wrote: On Tue, Aug 27, 2024 at 04:24:59PM +0200, Thomas Huth wrote: On 27/08/2024 15.16, Thomas Huth wrote: On 23/08/2024 09.28, Philippe Mathieu-Daudé wrote: Hi, On 21/8/24 10:27, Thomas Huth wrote: From: Daniel P. Berrangé Many tests need to access

Re: [PATCH v4 15/35] tests/functional: enable pre-emptive caching of assets

2024-08-30 Thread Daniel P . Berrangé
On Fri, Aug 30, 2024 at 09:38:17AM +0200, Thomas Huth wrote: > On 29/08/2024 12.15, Daniel P. Berrangé wrote: > > On Tue, Aug 27, 2024 at 04:24:59PM +0200, Thomas Huth wrote: > > > On 27/08/2024 15.16, Thomas Huth wrote: > > > > On 23/08/2024 09.28, Philippe Mathieu-Daudé wrote: > > > > > Hi, > > >

Re: [PATCH] hw/arm/xilinx_zynq: Enable Security Extensions

2024-08-30 Thread Edgar E. Iglesias
On Thu, Aug 29, 2024 at 01:50:02PM +0100, Peter Maydell wrote: > On Wed, 28 Aug 2024 at 01:51, Sebastian Huber > wrote: > > > > The system supports the Security Extensions (core and GIC). This change is > > necessary to run tests which pass on the real hardware. > > > > Signed-off-by: Sebastian H

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-30 Thread Eugenio Perez Martin
On Fri, Aug 30, 2024 at 6:20 AM Si-Wei Liu wrote: > > > > On 8/29/2024 9:53 AM, Eugenio Perez Martin wrote: > > On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer > > wrote: > >> Decouples the IOVA allocator from the IOVA->HVA tree and instead adds > >> the allocated IOVA range to an IOVA-only tree (i

Re: [PATCH v2] aspeed: Deprecate the tacoma-bmc machine

2024-08-30 Thread Cédric Le Goater
Hello, I solved the problem by adding support for IBM Bonnell (which instantiates the TPM chip through its devicetree file, similar to tacoma-bmc) to my local copy of qemu. Hmm, did you copy the rainier-bmc machine definition ? For aspeed_machine_bonnell_class_init(), pretty much yes, sinc

Re: [PATCH 10/13] pnv/xive: Add special handling for pool targets

2024-08-30 Thread Cédric Le Goater
On 8/29/24 22:27, Mike Kowal wrote: On 8/29/2024 7:14 AM, Cédric Le Goater wrote: On 8/1/24 22:30, Michael Kowal wrote: From: Glenn Miles Hypervisor "pool" targets do not get their own interrupt line and instead must share an interrupt line with the hypervisor "physical" targets. This also m

Re: [PATCH 11/13] pnv/xive: Update PIPR when updating CPPR

2024-08-30 Thread Cédric Le Goater
On 8/29/24 22:35, Mike Kowal wrote: On 8/29/2024 7:29 AM, Cédric Le Goater wrote: On 8/1/24 22:30, Michael Kowal wrote: From: Glenn Miles Current code was updating the PIPR inside the xive_tctx_accept() function instead of the xive_tctx_set_cppr function, which is where the HW would have it

Re: [PATCH RESEND v9 7/9] rust: add crate to expose bindings and interfaces

2024-08-30 Thread Junjie Mao
On 8/30/2024 2:43 PM, Manos Pitsidianakis wrote: 🎱 On Fri, 30 Aug 2024, 04:19 Junjie Mao, > wrote: On 8/28/2024 9:08 PM, Alex Bennée wrote: > Manos Pitsidianakis mailto:manos.pitsidiana...@linaro.org>> writes: > >> Add rust/qemu-api, which expose

Re: [RFC PATCH 1/2] hw/arm/sbsa-ref: Enable CXL Host Bridge by pxb-cxl

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 12:15:56 +0800 Yuquan Wang wrote: > The memory layout places 1M space for 16 host bridge register regions > in the sbsa-ref memmap. In addition, this creates a default pxb-cxl > (bus_nr=0xfe) bridge with one cxl-rp on sbsa-ref. If you are only supporting 1 host bridge you cou

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-30 Thread Peter Maydell
On Fri, 30 Aug 2024 at 06:48, Nico Boehr wrote: > > Quoting Peter Maydell (2024-08-29 17:53:02) > > I repro'd *something*, but it wasn't quite this. I got: > > > > > > [4.691853] clk: Disabling unused clocks > > [4.695419] Freeing unused kernel image (initmem) memory: 6520K > > [4.6954

Re: [PATCH] hw/arm/boot: Report error msg if loading elf/dtb failed

2024-08-30 Thread Peter Maydell
On Fri, 30 Aug 2024 at 08:24, Changbin Du wrote: > > Print errors before exit. Do not exit silently. > > Signed-off-by: Changbin Du > --- > hw/arm/boot.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/arm/boot.c b/hw/arm/boot.c > index d480a7da02cf..17c01f299831 100644 > --- a/hw/

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-30 Thread Sahil
Hi, On Tuesday, August 27, 2024 9:00:36 PM GMT+5:30 Eugenio Perez Martin wrote: > On Wed, Aug 21, 2024 at 2:20 PM Sahil wrote: > > [...] > > I have been trying to test my changes so far as well. I am not very clear > > on a few things. > > > > Q1. > > I built QEMU from source with my changes and

Re: [RFC PATCH 2/2] hw/arm/sbsa-ref: Support CXL Fixed Memory Window

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 12:15:57 +0800 Yuquan Wang wrote: > In order to provide CFMWs on sbsa-ref, this extends 1TB space > from the hole above RAM Memory [SBSA_MEM] for CXL Fixed Memory > Window. 0xA00 is chosen as the base address of this > space because of 3 reasons: > > 1) It is more sui

Re: [RFC PATCH edk2-platforms 2/2] SbsaQemu: AcpiTables: Add CEDT Table

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 11:15:45 +0800 Yuquan Wang wrote: > Provide CXL Early Discovery Table that describes the static CXL > Platform Components of sbsa-ref. > > This adds a static CXL Host Bridge structure and a CXL Fixed Memory > Window structure which are implemented as two independent space on

RE: [PATCH 1/1] platform-bus: fix refcount leak

2024-08-30 Thread Xingtao Yao (Fujitsu)
> -Original Message- > From: qemu-devel-bounces+yaoxt.fnst=fujitsu@nongnu.org > On Behalf Of Gao > Shiyuan via > Sent: Thursday, August 29, 2024 9:10 PM > To: Paolo Bonzini > Cc: qemu-devel@nongnu.org; gaoshiy...@baidu.com > Subject: [PATCH 1/1] platform-bus: fix refcount leak > >

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-30 Thread Eugenio Perez Martin
On Fri, Aug 30, 2024 at 12:20 PM Sahil wrote: > > Hi, > > On Tuesday, August 27, 2024 9:00:36 PM GMT+5:30 Eugenio Perez Martin wrote: > > On Wed, Aug 21, 2024 at 2:20 PM Sahil wrote: > > > [...] > > > I have been trying to test my changes so far as well. I am not very clear > > > on a few things.

Re: [PATCH] hw/arm/boot: Report error msg if loading elf/dtb failed

2024-08-30 Thread duchangbin via
On Fri, Aug 30, 2024 at 11:05:59AM +0100, Peter Maydell wrote: > On Fri, 30 Aug 2024 at 08:24, Changbin Du wrote: > > > > Print errors before exit. Do not exit silently. > > > > Signed-off-by: Changbin Du > > --- > > hw/arm/boot.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/

[PATCH v2] hw/arm/boot: Report error msg if loading elf/dtb failed

2024-08-30 Thread Changbin Du via
Print errors before exit. Do not exit silently. Signed-off-by: Changbin Du --- v2: remove msg for arm_load_dtb. --- hw/arm/boot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d480a7da02cf..e15bf097a559 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@

Re: [RFC PATCH edk2-platforms 1/2] SbsaQemu: Add acpi0016 & acpi0017 objects into DSDT

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 11:15:44 +0800 Yuquan Wang wrote: > This adds relevant definitions and descriptions of acpi0016 and > acpi0017 to support CXL. > > With the implementation of pxb-cxl on the original pcie host bridge, > the previous space layout of mmio32 & mmio64 have to be divided to > provi

Re: [PATCH RESEND v9 7/9] rust: add crate to expose bindings and interfaces

2024-08-30 Thread Alex Bennée
Junjie Mao writes: > On 8/28/2024 9:08 PM, Alex Bennée wrote: >> Manos Pitsidianakis writes: >> >>> Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and >>> provides some declaration macros for symbols visible to the rest of >>> QEMU. >> As mentioned on IRC I'm hitting a com

Re: [PATCH] target/riscv: Stop timer with infinite timecmp

2024-08-30 Thread Vladimir Isaev
Hi Andrew, 29.08.2024 11:40, Andrew Jones wrote: > While the spec doesn't state it, setting timecmp to UINT64_MAX is > another way to stop a timer, as it's considered setting the next > timer event to occur at infinity. I think this should be explicitly stated in the spec, since some software ma

[PATCH 0/2] crypto: misc pbkdf fixes for testing & algorithm compat

2024-08-30 Thread Daniel P . Berrangé
Daniel P. Berrangé (2): crypto: check gnutls & gcrypt support the requested pbkdf hash tests/unit: always build the pbkdf crypto unit test crypto/pbkdf-gcrypt.c | 2 +- crypto/pbkdf-gnutls.c | 2 +- tests/unit/meson.build | 4 +--- tests/unit/test-crypto-pbkdf.c |

[PATCH 2/2] tests/unit: always build the pbkdf crypto unit test

2024-08-30 Thread Daniel P . Berrangé
The meson rules were excluding the pbkdf crypto test when gnutls was the crypto backend. It was then excluded again in #if statements in the test file. Rather than update these conditions, remove them all, and use the result of the qcrypto_pbkdf_supports() function to determine whether to skip tes

[PATCH 1/2] crypto: check gnutls & gcrypt support the requested pbkdf hash

2024-08-30 Thread Daniel P . Berrangé
Both gnutls and gcrypt can be configured to exclude support for certain algorithms via a runtime check against system crypto policies. Thus it is not sufficient to have a compile time test for hash support in their pbkdf implementations. Signed-off-by: Daniel P. Berrangé --- crypto/pbkdf-gcrypt.

Re: [PATCH] crypto: run qcrypto_pbkdf2_count_iters in a new thread

2024-08-30 Thread Daniel P . Berrangé
On Tue, Aug 13, 2024 at 10:19:28AM -0300, Tiago Pasqualini wrote: > CPU time accounting in the kernel has been demonstrated to have a > sawtooth pattern[1][2]. This can cause the getrusage system call to > not be as accurate as we are expecting, which can cause this calculation > to stall. > > The

Re: [PATCH 2/8] python/qapi: change "FIXME" to "TODO"

2024-08-30 Thread Markus Armbruster
John Snow writes: > qemu.git/python/setup.cfg disallows checking in any code with "XXX", > "FIXME" or "TODO" in the comments. Soften the restriction to only > prohibit "FIXME", and change the two occurrences of "FIXME" in qapi to > read "TODO" instead. > > Signed-off-by: John Snow I don't like

[PATCH 2/2] qemu/osdep: handle sysconf(_SC_OPEN_MAX) return value == -1

2024-08-30 Thread Clément Léger
On some systems (MacOS for instance), sysconf(_SC_OPEN_MAX) can return -1. In that case we should fallback to using the OPEN_MAX define. According to "man sysconf", the OPEN_MAX define should be present and provided by either unistd.h and/or limits.h so include them for that purpose. For other OSes

[PATCH 0/2] oslib: fix OSes support for qemu_close_all_open_fd()

2024-08-30 Thread Clément Léger
Some OSes (MacOS, FreeBSD) were not correctly handled by the original close_fd() code. Handle them by fixing the path for self process open file descriptors location as well as sysconf(_SC_OPEN_MAX) potentially returning -1 on MacOS. --- Clément Léger (2): qemu/osdep: fix current process fds pa

[PATCH 1/2] qemu/osdep: fix current process fds path for other OSes

2024-08-30 Thread Clément Léger
While Linux and Solaris uses /proc/self/fd, other OSes (MacOS, FreeBSD) uses /dev/fd. In order to support theses OSes, use /dev/fd as a fallback. Fixes: 4ec5ebea078e ("qemu/osdep: Move close_all_open_fds() to oslib-posix") Reported-by: Daniel P. Berrangé Signed-off-by: Clément Léger --- util/os

Re: [PATCH 1/2] qemu/osdep: fix current process fds path for other OSes

2024-08-30 Thread Daniel P . Berrangé
On Fri, Aug 30, 2024 at 01:14:49PM +0200, Clément Léger wrote: > While Linux and Solaris uses /proc/self/fd, other OSes (MacOS, > FreeBSD) uses /dev/fd. In order to support theses OSes, use /dev/fd as > a fallback. > > Fixes: 4ec5ebea078e ("qemu/osdep: Move close_all_open_fds() to oslib-posix") >

Re: [RFC PATCH 1/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 10:11:17 +0800 Yuquan Wang wrote: One request - when cross posting to multiple lists, it is useful to add something to the patch title to make it clear what is EDK2, what is QEMU etc. [RFC EDK2 PATCH 1/1] It might irritate the EDK2 folk but it is useful for everyone else to

Re: [RFC PATCH 0/2] Sbsa-ref CXL Enablement

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 12:15:55 +0800 Yuquan Wang wrote: > RFC because > - Many contents are ported from Jonathan' patch on qemu virt design > > - Bring plenty of PCDs values and modifying the original PCIE values > > - Less experience and not particularly confident in ACPI area so this might be >

Re: [PATCH 2/2] qemu/osdep: handle sysconf(_SC_OPEN_MAX) return value == -1

2024-08-30 Thread Daniel P . Berrangé
On Fri, Aug 30, 2024 at 01:14:50PM +0200, Clément Léger wrote: > On some systems (MacOS for instance), sysconf(_SC_OPEN_MAX) can return > -1. In that case we should fallback to using the OPEN_MAX define. > According to "man sysconf", the OPEN_MAX define should be present and > provided by either un

Re: [PATCH 7/8] python/qapi: move scripts/qapi to python/qemu/qapi

2024-08-30 Thread Markus Armbruster
John Snow writes: > This is being done for the sake of unifying the linting and static type > analysis configurations between scripts/qapi and python/qemu/*. > > With this change, the qapi module will now be checked by mypy, flake8, > pylint, isort etc under all python versions from 3.8 through 3

Re: [PATCH v4 15/35] tests/functional: enable pre-emptive caching of assets

2024-08-30 Thread Thomas Huth
On 30/08/2024 09.42, Daniel P. Berrangé wrote: On Fri, Aug 30, 2024 at 09:38:17AM +0200, Thomas Huth wrote: On 29/08/2024 12.15, Daniel P. Berrangé wrote: On Tue, Aug 27, 2024 at 04:24:59PM +0200, Thomas Huth wrote: On 27/08/2024 15.16, Thomas Huth wrote: On 23/08/2024 09.28, Philippe Mathieu

Re: [PATCH 7/8] python/qapi: move scripts/qapi to python/qemu/qapi

2024-08-30 Thread Daniel P . Berrangé
On Fri, Aug 30, 2024 at 01:20:35PM +0200, Markus Armbruster wrote: > John Snow writes: > > > This is being done for the sake of unifying the linting and static type > > analysis configurations between scripts/qapi and python/qemu/*. > > > > With this change, the qapi module will now be checked by

Re: [PATCH 2/2] qemu/osdep: handle sysconf(_SC_OPEN_MAX) return value == -1

2024-08-30 Thread Michael Tokarev
30.08.2024 14:14, Clément Léger wrote: On some systems (MacOS for instance), sysconf(_SC_OPEN_MAX) can return -1. In that case we should fallback to using the OPEN_MAX define. According to "man sysconf", the OPEN_MAX define should be present and provided by either unistd.h and/or limits.h so incl

Re: [PATCH 1/2] qemu/osdep: fix current process fds path for other OSes

2024-08-30 Thread Michael Tokarev
30.08.2024 14:14, Clément Léger: While Linux and Solaris uses /proc/self/fd, other OSes (MacOS, FreeBSD) uses /dev/fd. In order to support theses OSes, use /dev/fd as a fallback. Fixes: 4ec5ebea078e ("qemu/osdep: Move close_all_open_fds() to oslib-posix") Reported-by: Daniel P. Berrangé Signed-

Re: [PATCH v4 15/35] tests/functional: enable pre-emptive caching of assets

2024-08-30 Thread Daniel P . Berrangé
On Fri, Aug 30, 2024 at 01:27:15PM +0200, Thomas Huth wrote: > On 30/08/2024 09.42, Daniel P. Berrangé wrote: > > On Fri, Aug 30, 2024 at 09:38:17AM +0200, Thomas Huth wrote: > > > On 29/08/2024 12.15, Daniel P. Berrangé wrote: > > > > On Tue, Aug 27, 2024 at 04:24:59PM +0200, Thomas Huth wrote: >

Re: [PATCH v6 RESEND 0/5] Power11 support for QEMU [PSeries]

2024-08-30 Thread Aditya Gupta
Hi Amit, On 29/08/24 17:49, Amit Machhiwal wrote: Hi Aditya, On 2024/07/31 11:20 AM, Aditya Gupta wrote: Overview Split "Power11 support for QEMU" into 2 patch series: pseries & powernv. This patch series is for pseries support for Power11. As Power11 core is same as Power10, h

[RFC V1 0/6] Live Update: tap and vhost

2024-08-30 Thread Steve Sistare
Add CPR support for tap with/without vhost. Works for cpr-exec and cpr-transfer. Steve Sistare (6): Revert "vhost-backend: remove vhost_kernel_reset_device()" tap: common return label tap: fix net_init_tap() return code migration: cpr_get_fd_param helper tap: cpr support tap: postload

[RFC V1 1/6] Revert "vhost-backend: remove vhost_kernel_reset_device()"

2024-08-30 Thread Steve Sistare
This reverts commit e6383293eb01928692047e617665a742cca87e23. The reset function is needed for CPR. Signed-off-by: Steve Sistare --- hw/virtio/vhost-backend.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c index 833804d..9b75141 10

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-30 Thread Nico Boehr
Quoting Peter Maydell (2024-08-30 12:01:47) > On Fri, 30 Aug 2024 at 06:48, Nico Boehr wrote: > > > > Quoting Peter Maydell (2024-08-29 17:53:02) > > > I repro'd *something*, but it wasn't quite this. I got: > > > > > > > > > [4.691853] clk: Disabling unused clocks > > > [4.695419] Freeing

[RFC V1 6/6] tap: postload fix for cpr

2024-08-30 Thread Steve Sistare
After cpr-exec of a multi-queue NIC, if any queues are unused, then the corresponding tap is marked enabled in userland, but it is disabled in the kernel for the fd that was preserved across exec. One cannot call tap_disable() during postload, because that eventually calls IFF_DETACH_QUEUE, which

[RFC V1 4/6] migration: cpr_get_fd_param helper

2024-08-30 Thread Steve Sistare
Add the helper function cpr_get_fd_param, for use by tap and vdpa. Signed-off-by: Steve Sistare --- include/migration/cpr.h | 2 ++ migration/cpr.c | 26 ++ 2 files changed, 28 insertions(+) diff --git a/include/migration/cpr.h b/include/migration/cpr.h index 9a

[RFC V1 5/6] tap: cpr support

2024-08-30 Thread Steve Sistare
Save all tap fd's in canonical order, leveraging the index argument of cpr_save_fd. For the i'th queue, the tap device fd is saved at index 2*i, and the vhostfd (if any) at index 2*i+1. tap and vhost fd's are passed by name to the monitor when a NIC is hot plugged, but the name is not known to qe

[RFC V1 3/6] tap: fix net_init_tap() return code

2024-08-30 Thread Steve Sistare
When net_init_tap() succeeds for a multi-queue device, it returns a non-zero ret=1 code to its caller, because of this code where ret becomes 1 when g_unix_set_fd_nonblocking succeeds. Luckily, the only current call site checks for negative, rather than non-zero. ret = g_unix_set_fd_nonblocki

Re: [PATCH 2/2] qemu/osdep: handle sysconf(_SC_OPEN_MAX) return value == -1

2024-08-30 Thread Clément Léger
On 30/08/2024 13:31, Michael Tokarev wrote: > 30.08.2024 14:14, Clément Léger wrote: >> On some systems (MacOS for instance), sysconf(_SC_OPEN_MAX) can return >> -1. In that case we should fallback to using the OPEN_MAX define. >> According to "man sysconf", the OPEN_MAX define should be present

[RFC V1 2/6] tap: common return label

2024-08-30 Thread Steve Sistare
Modify net_init_tap so every return branches to a common label, for common cleanup in a subsequent patch. No functional change. Signed-off-by: Steve Sistare --- net/tap.c | 54 -- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-30 Thread Peter Maydell
On Fri, 30 Aug 2024 at 12:56, Nico Boehr wrote: > > Quoting Peter Maydell (2024-08-30 12:01:47) > > I ran overnight with none of the patchset applied, and it never > > failed (as expected). Running with just the first virtio-ccw > > patch does fall over fairly quickly. So something's up with > > t

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-30 Thread Peter Maydell
On Fri, 30 Aug 2024 at 13:04, Peter Maydell wrote: > > On Fri, 30 Aug 2024 at 12:56, Nico Boehr wrote: > > > > Quoting Peter Maydell (2024-08-30 12:01:47) > > > I ran overnight with none of the patchset applied, and it never > > > failed (as expected). Running with just the first virtio-ccw > > >

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-30 Thread Thomas Huth
On 30/08/2024 14.17, Peter Maydell wrote: On Fri, 30 Aug 2024 at 13:04, Peter Maydell wrote: On Fri, 30 Aug 2024 at 12:56, Nico Boehr wrote: Quoting Peter Maydell (2024-08-30 12:01:47) I ran overnight with none of the patchset applied, and it never failed (as expected). Running with just t

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-08-30 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > On 29.08.2024 02:41, Fabiano Rosas wrote: >> "Maciej S. Szmigiero" writes: >> >>> From: "Maciej S. Szmigiero" >>> >>> A new function multifd_queue_device_state() is provided for device to queue >>> its state for transmission via a multifd channel. >>> >>> Signed

Re: [PATCH v2 11/17] migration/multifd: Add an explicit MultiFDSendData destructor

2024-08-30 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > This way if there are fields there that needs explicit disposal (like, for > example, some attached buffers) they will be handled appropriately. > > Add a related assert to multifd_set_payload_type() in order to make sure > that thi

[PATCH v5 02/44] tests/avocado/boot_xen.py: fetch kernel during test setUp()

2024-08-30 Thread Thomas Huth
From: Cleber Rosa The kernel is a common blob used in all tests. By moving it to the setUp() method, the "fetch asset" plugin will recognize the kernel and attempt to fetch it and cache it before the tests are started. Signed-off-by: Cleber Rosa Reviewed-by: Akihiko Odaki Tested-by: Marcin Ju

[PATCH v5 13/44] tests/functional: Convert avocado tests that just need a small adjustment

2024-08-30 Thread Thomas Huth
These simple tests can be converted to stand-alone tests quite easily, e.g. by just setting the machine to 'none' now manually or by adding "-cpu" command line parameters, since we don't support the corresponding avocado tags in the new python test framework. Reviewed-by: Daniel P. Berrangé Teste

[PATCH v5 14/44] tests/functional: add a module for handling asset download & caching

2024-08-30 Thread Thomas Huth
From: Daniel P. Berrangé The 'Asset' class is a simple module that declares a downloadable asset that can be cached locally. Downloads are stored in the user's home dir at ~/.cache/qemu/download, using a sha256 sum of the URL. Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daud

[PATCH v5 09/44] tests/functional: Set up logging

2024-08-30 Thread Thomas Huth
Create log files for each test separately, one file that contains the basic logging and one that contains the console output. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 27 +- 1 file changed, 26 insertions(+),

[PATCH v5 07/44] python: Install pycotap in our venv if necessary

2024-08-30 Thread Thomas Huth
The upcoming functional tests will require pycotap for providing TAP output from the python-based tests. Since we want to be able to run some of the tests offline by default, too, let's install it along with meson in our venv if necessary (it's size is only 5 kB, so adding the wheel here should not

[PATCH v5 10/44] tests/Makefile.include: Increase the level of indentation in the help text

2024-08-30 Thread Thomas Huth
The next patch is going to add some entries that need more space between the command and the help text, so let's increase the indentation here first. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Thomas Huth --- tests/Makefile.in

[PATCH v5 17/44] tests/functional: Convert some tests that download files via fetch_asset()

2024-08-30 Thread Thomas Huth
Now that we've got the Asset class with pre-caching, we can convert some Avocado tests that use fetch_asset() for downloading their required files. Signed-off-by: Thomas Huth --- MAINTAINERS | 12 ++--- tests/avocado/machine_mips_loongson3v.py | 39

[PATCH v5 06/44] tests/avocado/boot_linux_console: Remove the s390x subtest

2024-08-30 Thread Thomas Huth
We've got a much more sophisticated, Fedora-based test for s390x ("test_s390x_fedora" in another file) already, so the test in boot_linux_console.py seems to be rather a waste of precious test cycles. Thus move the command line check and delete the s390x test in boot_linux_console.py. Reviewed-by:

[PATCH v5 27/44] tests/functional: Convert the ppc_hv avocado test into a standalone test

2024-08-30 Thread Thomas Huth
A straight forward conversion, we just also have to remove the decorator @skipUnless(os.getenv('SPEED')) since all non-trivial functional tests are running in SPEED=thorough mode now. Also make sure that the extracted assets are writable, so that the test does not fail if it gets re-run and there a

[PATCH v5 08/44] tests/functional: Add base classes for the upcoming pytest-based tests

2024-08-30 Thread Thomas Huth
The files are mostly a copy of the tests/avocado/avocado_qemu/__init__.py file with some adjustments to get rid of the Avocado dependencies (i.e. we also have to drop the LinuxSSHMixIn and LinuxTest for now). The emulator binary and build directory are now passed via environment variables that wil

[PATCH v5 05/44] tests/avocado/avocado_qemu: Fix the "from" statements in linuxtest.py

2024-08-30 Thread Thomas Huth
Without this change, the new Avocado v103 fails to find the tests that are based on the LinuxTest class. Suggested-by: Cleber Rosa Tested-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/linuxtest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v5 28/44] tests/functional: Convert the m68k nextcube test with tesseract

2024-08-30 Thread Thomas Huth
The code that handles running of tesseract needs to be tweaked a little bit to be able to run without the functions from avocado.utils, and while we're at it, drop some legacy stuff that was still there due to Tesseract 3 support that we already dropped a while ago. Reviewed-by: Philippe Mathieu-D

[PATCH v5 01/44] tests/avocado: machine aarch64: standardize location and RO access

2024-08-30 Thread Thomas Huth
From: Cleber Rosa The tests under machine_aarch64_virt.py and machine_aarch64_sbsaref.py should not be writing to the ISO files. By adding "media=cdrom" the "ro" is automatically set. While at it, let's use a single code style and hash for the ISO url. Signed-off-by: Cleber Rosa Tested-by: Ma

[PATCH v5 21/44] tests/functional: Convert the x86_cpu_model_versions test

2024-08-30 Thread Thomas Huth
Nothing thrilling in here, it's just a straight forward conversion. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/functional/meson.build | 1 + .../test_x86_cpu_

[PATCH v5 25/44] tests/functional: Convert most ppc avocado tests into standalone tests

2024-08-30 Thread Thomas Huth
Nothing thrilling in here, just straight forward conversions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- MAINTAINERS | 9 +-- tests/functional/meson.build | 11 .../test_ppc64_powernv.py}| 56 ++

[PATCH v5 30/44] tests/functional: Convert the rx_gdbsim avocado test into a standalone test

2024-08-30 Thread Thomas Huth
Provide a "gzip_uncompress" function based on the standard "gzip" module to avoid the usage of avocado.utils here. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/functional/meson.

[PATCH v5 03/44] tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of image

2024-08-30 Thread Thomas Huth
From: Cleber Rosa When the OpenBSD based tests are run in parallel, the previously single instance of the image would become corrupt. Let's give each test its own snapshot. Signed-off-by: Cleber Rosa Suggested-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Marcin Juszkiewicz

[PATCH v5 12/44] tests/functional: Convert simple avocado tests into standalone python tests

2024-08-30 Thread Thomas Huth
These test are rather simple and don't need any modifications apart from adjusting the "from avocado_qemu" line. To ease debugging, make the files executable and add a shebang line and Python '__main__' handling, too, so that these tests can now be run by executing them directly. Reviewed-by: Dani

[PATCH v5 20/44] tests/functional: Convert the s390x avocado tests into standalone tests

2024-08-30 Thread Thomas Huth
These tests use archive.lzma_uncompress() from the Avocado utils, so provide a small helper function for this, based on the standard lzma module from Python instead. And while we're at it, replace the MD5 hashes in the topology test with proper SHA256 hashes, since MD5 should not be used anymore n

[PATCH v5 16/44] tests/functional: Allow asset downloading with concurrent threads

2024-08-30 Thread Thomas Huth
When running "make -j$(nproc) check-functional", tests that use the same asset might be running in parallel. Improve the downloading to detect this situation and wait for the other thread to finish the download. Signed-off-by: Thomas Huth --- tests/functional/qemu_test/asset.py | 62

[PATCH v5 34/44] tests/functional: Convert Aarch64 SBSA-Ref avocado tests

2024-08-30 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Since SBSA_FLASH files are not tarballs, use lzma_uncompress() method. Avocado used to set a timeout of 11 tests * 180s = 1980s. Hopefully 600s should be sufficient. Running on macOS Sonoma / Apple silicon M1: $ QEMU_TEST_TIMEOUT_EXPE

[PATCH v5 35/44] tests/functional: Convert Aarch64 Virt machine avocado tests

2024-08-30 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hash to SHA256 since SHA1 should not be used anymore nowadays. Provide get_qemu_img() helper in qemu_test. $ make check-functional-aarch64 V=1 ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_aarch64_virt_gicv2

[PATCH v5 18/44] tests/functional: Add a function for extracting files from an archive

2024-08-30 Thread Thomas Huth
Some Avocado-based tests use the "archive" module from avocado.utils to extract files from an archive. To be able to use these tests without Avocado, we have to provide our own function for extracting files. Fortunately, there is already the tarfile module that will provide us with this functionali

[PATCH v5 00/44] Convert avocado tests to normal Python unittests

2024-08-30 Thread Thomas Huth
The Avocado v88 that we use in QEMU is already on a life support system: It is not supported by upstream anymore, and with the latest versions of Python, it won't work anymore since it depends on the "imp" module that has been removed in Python 3.12. There have been several attempts to update the

[PATCH v5 36/44] tests/functional: Convert mips64el Fuloong2e avocado test (1/2)

2024-08-30 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Since the asset is expected locally and the test is guarded with RESCUE_YL_PATH, keep it under the 'quick' category. $ RESCUE_YL_PATH=/path/to/resc

[PATCH v5 44/44] docs/devel/testing: Add documentation for functional tests

2024-08-30 Thread Thomas Huth
Document the new functional testing framework. The text is originally based on the Avocado documentation, but heavily modified to match the new framework. Signed-off-by: Thomas Huth --- docs/devel/testing/functional.rst | 338 ++ docs/devel/testing/index.rst |

[PATCH v5 32/44] tests/functional: Convert the vnc test

2024-08-30 Thread Thomas Huth
Nothing thrilling in here, it's just a straight forward conversion. Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + tests/{avocado/vnc.py => functional/test_vnc.py} | 12 +++- 2 files changed, 8 insertions(+), 5 deletions(-) rename tests/{avocado/

[PATCH v5 11/44] tests/functional: Prepare the meson build system for the functional tests

2024-08-30 Thread Thomas Huth
Provide a meson.build file for the upcoming python-based functional tests, and add some wrapper glue targets to the tests/Makefile.include file. We are going to use two "speed" modes for the functional tests: The "quick" tests can be run at any time (i.e. also during "make check"), while the "thoro

[PATCH v5 33/44] tests/functional: Convert ARM Integrator/CP avocado tests

2024-08-30 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. $ QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 make check-functional-arm ... 6/6 qemu:func-thorough+func-arm-thorough+thorough / func-arm-arm_integratorcp

[PATCH v5 19/44] tests/functional: Convert some avocado tests that needed avocado.utils.archive

2024-08-30 Thread Thomas Huth
Instead of using the "archive" module from avocado.utils, switch these tests to use the new wrapper function that is based on the "tarfile" module instead. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- MAIN

[PATCH v5 37/44] tests/functional: Add QemuUserTest class

2024-08-30 Thread Thomas Huth
From: Philippe Mathieu-Daudé Per commit 5334df4822 ("tests/avocado: Introduce QemuUserTest base class"): Similarly to the 'System' Test base class with methods for testing system emulation, the QemuUserTest class contains methods useful to test user-mode emulation. Signed-off-by: Philippe

[PATCH v5 41/44] docs/devel: Split testing docs from the build docs and move to separate folder

2024-08-30 Thread Thomas Huth
Building and testing are two separate topics, so let's split the testing into a separate category and move the related files into a separate folder. Signed-off-by: Thomas Huth --- docs/devel/index-build.rst | 14 -- docs/devel/index.rst

[PATCH v5 40/44] gitlab-ci: Add "check-functional" to the build tests

2024-08-30 Thread Thomas Huth
Now that we converted many tests from the "check-avocado" test suite to the "check-functional" test suite, we should make sure that these also get tested in the CI. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest-templat

[PATCH v5 26/44] tests/functional: Convert the ppc_amiga avocado test into a standalone test

2024-08-30 Thread Thomas Huth
Use the Python standard zipfile module instead of avocado.utils for extracting the ZIP file that we download here, and use the standard subprocess module for running the "tail" command. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- MAINTAI

[PATCH v5 42/44] docs/devel/testing: Split the Avocado documentation into a separate file

2024-08-30 Thread Thomas Huth
The main testing documentation file got very overloaded already. Thus let's split the Avocado information into a separate file. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- docs/devel/testing/avocado.rst | 581 + docs/devel/testing/index.rst |

[PATCH v5 31/44] tests/functional: Convert the linux_initrd avocado test into a standalone test

2024-08-30 Thread Thomas Huth
While we're at it, update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_linux_initrd.py} | 37 +++ 2 files changed, 22 insertions(+

[PATCH v5 23/44] tests/functional: Convert the riscv_opensbi avocado test into a standalone test

2024-08-30 Thread Thomas Huth
The avocado test defined test functions for both, riscv32 and riscv64. Since we can run the whole file with multiple targets in the new framework, we can now consolidate the functions so we have to only define one function per machine now. However, we have to mark the "spike" test as flaky now sin

[PATCH v5 39/44] tests/avocado: Remove unused QemuUserTest class

2024-08-30 Thread Thomas Huth
From: Philippe Mathieu-Daudé The single test that was using the QemuUserTest class has been converted to the functional test framework. This class is now unused, remove it. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240822104238.75045-4-phi...@linaro.org> Signed-off-by: Thomas Huth -

[PATCH v5 24/44] tests/functional: Convert the virtio_gpu avocado test into a standalone test

2024-08-30 Thread Thomas Huth
Nothing thrilling in here, it's just a straight forward conversion. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_virtio_gpu.py} | 64 +-- 2 files changed, 30 insertions(+),

[PATCH v5 15/44] tests/functional: enable pre-emptive caching of assets

2024-08-30 Thread Thomas Huth
From: Daniel P. Berrangé Many tests need to access assets stored on remote sites. We don't want to download these during test execution when run by meson, since this risks hitting test timeouts when data transfers are slow. Add support for pre-emptive caching of assets by setting the env var QEM

[PATCH v5 04/44] Bump avocado to 103.0

2024-08-30 Thread Thomas Huth
From: Cleber Rosa This bumps Avocado to latest the LTS release. An LTS release is one that can receive bugfixes and guarantees stability for a much longer period and has incremental minor releases made. Even though the 103.0 LTS release is pretty a rewrite of Avocado when compared to 88.1, the

[PATCH v5 38/44] tests/functional: Convert ARM bFLT linux-user avocado test

2024-08-30 Thread Thomas Huth
From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Expose cpio_extract() in qemu_test.utils for possible reuse. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240822104238.75045-3-phi...@linaro.

[PATCH v5 43/44] docs/devel/testing: Rename avocado_qemu.Test class

2024-08-30 Thread Thomas Huth
The avocado_qemu.Test class has been renamed a while back in commit 2283b627bc ("tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest"), so we should reflect this now in the documentation, too. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- docs/devel/testing/avocado.rst |

  1   2   >