Re: [PATCH 01/12] file-posix: remove incorrect coroutine_fn calls

2023-06-01 Thread Paolo Bonzini
Il gio 1 giu 2023, 15:50 Eric Blake ha scritto: > > @@ -2696,7 +2696,7 @@ static int coroutine_fn > raw_co_truncate(BlockDriverState *bs, int64_t offset, > > } > > > > if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) { > > -int64_t cur_length = raw_co_getlength(bs); > > +

Re: [PATCH v14 06/10] monitor: adding tb_stats hmp command

2023-06-01 Thread Richard Henderson
On 6/1/23 00:20, Wu, Fei wrote: On 6/1/2023 9:23 AM, Richard Henderson wrote: On 5/30/23 01:35, Fei Wu wrote: From: "Vanderson M. do Rosario" Adding tb_stats [start|pause|stop|filter] command to hmp. This allows controlling the collection of statistics. It is also possible to set the level of

[PATCH] hvf: Report HV_DENIED error

2023-06-01 Thread Antonio Caggiano
In case the resulting binary is not signed with the proper entitlement, handle and report the HV_DENIED error. Signed-off-by: Antonio Caggiano --- accel/hvf/hvf-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 0043f4d308..679907a147 100

[PATCH] hvf: Handle EC_INSNABORT

2023-06-01 Thread Antonio Caggiano
Instead of aborting immediately, try reading the physical address where the instruction should be fetched by calling address_space_read. This would give any memory regions ops callback a chance to allocate and/or register an RAM/Alias memory region needed for resolving that physical address. Then,

Re: [PATCH v3 0/3] Trivial cleanups

2023-06-01 Thread Michael S. Tsirkin
On Thu, Jun 01, 2023 at 01:45:47PM +0100, Mark Cave-Ayland wrote: > On 01/06/2023 13:07, Michael S. Tsirkin wrote: > > > On Thu, May 25, 2023 at 05:03:15PM +0100, Mark Cave-Ayland wrote: > > > On 23/05/2023 20:56, Bernhard Beschow wrote: > > > > > > > This series: > > > > * Removes dead code from

Re: [PATCH v3 4/6] virtio-net: expose virtio_net_supported_guest_offloads()

2023-06-01 Thread Eugenio Perez Martin
On Thu, Jun 1, 2023 at 3:49 PM Hawkins Jiawei wrote: > > To support restoring offloads state in vdpa, need to expose > the function virtio_net_supported_guest_offloads(). > QEMU uses this function to get the guest supported offloads > and no needs to send the corresponding CVQ command if guest do

Re: [PATCH v2 4/6] virtio-net: expose virtio_net_supported_guest_offloads()

2023-06-01 Thread Eugenio Perez Martin
On Thu, Jun 1, 2023 at 3:59 PM Hawkins Jiawei wrote: > > On 2023/6/1 21:43, Eugenio Perez Martin wrote: > > On Thu, Jun 1, 2023 at 11:05 AM Hawkins Jiawei wrote: > >> > >> On Thu, 1 Jun 2023 at 16:48, Hawkins Jiawei wrote: > >>> > >>> To support restoring offloads state in vdpa, need to expose >

[PATCH] vfio: Implement a common device info helper

2023-06-01 Thread Alex Williamson
A common helper implementing the realloc algorithm for handling capabilities. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Signed-off-by: Alex Williamson --- RFCv2 -> v1: Remove spurious semicolon hw/s390x/s390-pci-vfio.c | 37 hw/vfio/c

Re: [PATCH v2 1/1] hw/arm/sbsa-ref: add XHCI controller on PCIe

2023-06-01 Thread Richard Henderson
On 5/31/23 23:37, Yuquan Wang wrote: The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. Hence, this add an XHCI on PCIe to provide a usb controller with 64-bit DMA capablity. Signed-off-by: Yuquan Wang --- hw/arm/sbs

Re: [PATCH] hvf: Report HV_DENIED error

2023-06-01 Thread Peter Maydell
On Thu, 1 Jun 2023 at 15:27, Antonio Caggiano wrote: > > In case the resulting binary is not signed with the proper entitlement, > handle and report the HV_DENIED error. > > Signed-off-by: Antonio Caggiano > --- > accel/hvf/hvf-all.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ac

Re: [PATCH] hvf: Handle EC_INSNABORT

2023-06-01 Thread Peter Maydell
On Thu, 1 Jun 2023 at 15:33, Antonio Caggiano wrote: > > Instead of aborting immediately, try reading the physical address where > the instruction should be fetched by calling address_space_read. This > would give any memory regions ops callback a chance to allocate and/or > register an RAM/Alias

Re: [PATCH 0/2] bulk: Remove pointless QOM casts

2023-06-01 Thread Richard Henderson
On 6/1/23 02:34, Philippe Mathieu-Daudé wrote: As per Markus suggestion in [*], use Coccinelle to remove pointless QOM cast macro uses. Since we have more than 1000 QOM types, add a script to generate the semantic patch. [*]https://lore.kernel.org/qemu-devel/87mt1jafjt@pond.sub.org/ Philipp

Re: [PATCH] vfio: Implement a common device info helper

2023-06-01 Thread Robin Voetter
On 6/1/23 16:45, Alex Williamson wrote: > A common helper implementing the realloc algorithm for handling > capabilities. > > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Cédric Le Goater > Signed-off-by: Alex Williamson Reviewed-by: Robin Voetter > --- > > RFCv2 -> v1: Remove spur

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-01 Thread Peter Maydell
On Wed, 31 May 2023 at 17:37, Leif Lindholm wrote: > > On 2023-05-31 16:27, Peter Maydell wrote: > > On Wed, 31 May 2023 at 15:58, Graeme Gregory wrote: > >>> The current sbsa-ref cannot use EHCI controller which is only > >>> able to do 32-bit DMA, since sbsa-ref doesn't have RAM above 4GB. > >>

[PULL v2 00/11] Tracing patches

2023-06-01 Thread Stefan Hajnoczi
The following changes since commit c6a5fc2ac76c5ab709896ee1b0edd33685a67ed1: decodetree: Add --output-null for meson testing (2023-05-31 19:56:42 -0700) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request for you to fetch changes up to 3671

[PULL v2 02/11] trace-events: remove the remaining vcpu trace events

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée While these are all in helper functions being designated vcpu events complicates the removal of the dynamic vcpu state code. TCG plugins allow you to instrument vcpu_[init|exit|idle]. We rename cpu_reset and make it a normal trace point. Reviewed-by: Stefan Hajnoczi Reviewed-

[PULL v2 01/11] *-user: remove the guest_user_syscall tracepoints

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée This is pure duplication now. Both bsd-user and linux-user have builtin strace support and we can also track syscalls via the plugins system. Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-

[PULL v2 09/11] tcg: remove the final vestiges of dstate

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée Now we no longer have dynamic state affecting things we can remove the additional fields in cpu.h and simplify the TB hash calculation. For the benchmark: hyperfine -w 2 -m 20 \ "./arm-softmmu/qemu-system-arm -cpu cortex-a15 \ -machine type=virt,highmem=off \

[PULL v2 07/11] trace: remove code that depends on setting vcpu

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée Now we no longer have any events that are for vcpus we can start excising the code from the trace control. As the vcpu parameter is encoded as part of QMP we just stub out the has_vcpu/vcpu parameters rather than alter the API. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard

[PULL v2 10/11] hw/9pfs: use qemu_xxhash4

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée No need to pass zeros as we have helpers that do that for us. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Christian Schoenebeck Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-11-alex.ben...@lina

[PULL v2 08/11] trace: remove control-vcpu.h

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-9-alex.

[PULL v2 03/11] trace: remove vcpu_id from the TraceEvent structure

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée This does involve temporarily stubbing out some helper functions before we excise the rest of the code. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-4-alex.ben...

[PULL v2 04/11] scripts/qapi: document the tool that generated the file

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée This makes it a little easier for developers to find where things where being generated. Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Alex Bennée Message-id: 20230526165401.574

[PULL v2 11/11] accel/tcg: include cs_base in our hash calculations

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée We weren't using cs_base in the hash calculations before. Since the arm front end moved a chunk of flags in a378206a20 (target/arm: Move mode specific TB flags to tb->cs_base) they comprise of an important part of the execution state. Widen the tb_hash_func to include cs_base a

[PULL v2 05/11] docs/deprecated: move QMP events bellow QMP command section

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée Also rename the section to make the fact this is part of the management protocol even clearer. Suggested-by: Markus Armbruster Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-6-alex.ben...@linaro.org Signed-off-by: Stefan Hajnoczi --- docs/about/deprecated.rst

Re: [PATCH v5 0/2] block/blkio: support fd passing for virtio-blk-vhost-vdpa driver

2023-06-01 Thread Stefan Hajnoczi
On Tue, May 30, 2023 at 09:19:39AM +0200, Stefano Garzarella wrote: > v5: > - moved `features` to the object level to simplify libvirt code [Jonathon] > - wrapped a line too long in the documentation [Markus] > - added Stefan R-b tags > > v4: > https://lore.kernel.org/qemu-devel/20230526150304.15

Re: [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-06-01 Thread Richard Henderson
On 5/31/23 23:48, Wu, Fei wrote: On 6/1/2023 9:08 AM, Richard Henderson wrote: On 5/30/23 01:35, Fei Wu wrote: +    qatomic_add(&tcg_ctx->prof.cpu_exec_time, profile_getclock() - ti); You can't qatomic_add a 64-bit value on a 32-bit host. Right, I only changed the counters to size_t, didn't

[PULL v2 06/11] qapi: make the vcpu parameters deprecated for 8.1

2023-06-01 Thread Stefan Hajnoczi
From: Alex Bennée I don't think I can remove the parameters directly but certainly mark them as deprecated. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-id: 20230526165401.574474-7-alex.ben...@linaro.org Me

Re: [RFC] linux-user/riscv: Add syscall riscv_hwprobe

2023-06-01 Thread Richard Henderson
On 6/1/23 05:27, Robbin Ehn wrote: This patch adds the new syscall for the "RISC-V Hardware Probing Interface" (https://docs.kernel.org/riscv/hwprobe.html). Signed-off-by: Robbin Ehn --- linux-headers/asm-riscv/unistd.h | 9 +++ linux-user/riscv/cpu_loop.c | 119 ++

Re: [PATCH v3 1/1] hw/arm/aspeed:Add vpd data for Rainier machine

2023-06-01 Thread Ninad Palsule
Hello Cedric, On 5/26/23 1:18 AM, Cédric Le Goater wrote: On 5/25/23 21:57, Ninad Palsule wrote: Hello Cedric, On 5/25/23 1:37 AM, Cédric Le Goater wrote: [ ... ] However, regarding Cédric's log above, a reboot is expected on the first boot of a fresh image when there's valid VPD availabl

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-06-01 Thread Richard Henderson
On 6/1/23 05:48, Wu, Fei wrote: On 6/1/2023 7:51 PM, Alex Bennée wrote: "Wu, Fei" writes: On 5/30/2023 6:08 PM, Alex Bennée wrote: "Wu, Fei" writes: On 5/30/2023 1:01 PM, Wu, Fei wrote: On 5/30/2023 12:07 PM, Richard Henderson wrote: On 5/29/23 04:49, Fei Wu wrote:

[PULL 0/8] Block patches

2023-06-01 Thread Stefan Hajnoczi
The following changes since commit c6a5fc2ac76c5ab709896ee1b0edd33685a67ed1: decodetree: Add --output-null for meson testing (2023-05-31 19:56:42 -0700) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to 98b126

[PULL 7/8] block/blkio: use qemu_open() to support fd passing for virtio-blk

2023-06-01 Thread Stefan Hajnoczi
From: Stefano Garzarella Some virtio-blk drivers (e.g. virtio-blk-vhost-vdpa) supports the fd passing. Let's expose this to the user, so the management layer can pass the file descriptor of an already opened path. If the libblkio virtio-blk driver supports fd passing, let's always use qemu_open(

[PULL 2/8] block/nvme: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id: 20230530180959.1

[PULL 8/8] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-06-01 Thread Stefan Hajnoczi
From: Stefano Garzarella The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the fd passing through the new 'fd' property. Since now we are using qemu_open() on '@path' if the virtio-blk driver supports the fd passing, let's announce it. In this way, the management layer can pass the fil

[PULL 6/8] block: remove bdrv_co_io_plug() API

2023-06-01 Thread Stefan Hajnoczi
No block driver implements .bdrv_co_io_plug() anymore. Get rid of the function pointers. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id: 20230530180959.1108766-7-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- inc

[PULL 1/8] block: add blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Introduce a new API for thread-local blk_io_plug() that does not traverse the block graph. The goal is to make blk_io_plug() multi-queue friendly. Instead of having block drivers track whether or not we're in a plugged section, provide an API that allows them to defer a function call until we're u

[PULL 4/8] block/io_uring: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id: 20230530180959.1

[PULL 5/8] block/linux-aio: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Note that a dev_max_batch check is dropped in laio_io_unplug() because the semantics of unplug_fn() are different from .bdrv_co_unplug(): 1.

[PULL 3/8] block/blkio: convert to blk_io_plug_call() API

2023-06-01 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefano Garzarella Acked-by: Kevin Wolf Message-id: 20230530180959.1

Re: [PATCH 1/2] target/arm: Use x86 intrinsics to implement PMULL.P64

2023-06-01 Thread Ard Biesheuvel
On Thu, 1 Jun 2023 at 15:01, Peter Maydell wrote: > > On Thu, 1 Jun 2023 at 13:33, Ard Biesheuvel wrote: > > > > Signed-off-by: Ard Biesheuvel > > --- > > host/include/i386/host/cpuinfo.h | 1 + > > target/arm/tcg/vec_helper.c | 26 +++- > > util/cpuinfo-i386.c

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Peter Xu
Thanks for looking into this.. definitely worthwhile. On Wed, May 31, 2023 at 02:23:59PM +0100, Daniel P. Berrangé wrote: > There are 27 pre-copy live migration scenarios being tested. In all of > these we force non-convergance and run for one iteration, then let it > converge and wait for complet

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-01 Thread Marcin Juszkiewicz
W dniu 1.06.2023 o 17:01, Peter Maydell pisze: On Wed, 31 May 2023 at 17:37, Leif Lindholm wrote: Ah, thanks! That explains why we did the thing that made no sense :) To skip the migration hazard, my prefernece is we just leave the EHCI device in for now, and add a separate XHCI on PCIe. We

[PATCH v5 0/4] Add gdbstub support to HVF

2023-06-01 Thread francesco . cagnin
From: Francesco Cagnin This patch series aims to add gdbstub support to HVF (the 'QEMU accelerator on macOS that employs Hypervisor.framework') on Apple Silicon hosts. The proposed implementation, structured like the KVM counterpart, handles single-stepping, software breakpoints, hardware breakp

[PATCH v5 1/4] arm: move KVM breakpoints helpers

2023-06-01 Thread francesco . cagnin
From: Francesco Cagnin These helpers will be also used for HVF. Aside from reformatting a couple of comments for 'checkpatch.pl' and updating meson to compile 'hyp_gdbstub.c', this is just code motion. Signed-off-by: Francesco Cagnin Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- ta

[PATCH v5 4/4] hvf: add guest debugging handlers for Apple Silicon hosts

2023-06-01 Thread francesco . cagnin
From: Francesco Cagnin Guests can now be debugged through the gdbstub. Support is added for single-stepping, software breakpoints, hardware breakpoints and watchpoints. The code has been structured like the KVM counterpart. While guest debugging is enabled, the guest can still read and write the

[PATCH v5 3/4] hvf: add breakpoint handlers

2023-06-01 Thread francesco . cagnin
From: Francesco Cagnin Required for guest debugging. The code has been structured like the KVM counterpart. Signed-off-by: Francesco Cagnin --- accel/hvf/hvf-accel-ops.c | 109 ++ accel/hvf/hvf-all.c | 17 ++ include/sysemu/hvf.h | 22 ++

[PATCH v5 2/4] hvf: handle access for more registers

2023-06-01 Thread francesco . cagnin
From: Francesco Cagnin Required for guest debugging. Signed-off-by: Francesco Cagnin --- target/arm/hvf/hvf.c | 213 +++ 1 file changed, 213 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index ad65603445..e221e37055 100644 --- a

Re: [PATCH] hvf: Handle EC_INSNABORT

2023-06-01 Thread Antonio Caggiano
Hi Peter, On 01/06/2023 16:58, Peter Maydell wrote: On Thu, 1 Jun 2023 at 15:33, Antonio Caggiano wrote: Instead of aborting immediately, try reading the physical address where the instruction should be fetched by calling address_space_read. This would give any memory regions ops callback a c

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 11:30:10AM -0400, Peter Xu wrote: > Thanks for looking into this.. definitely worthwhile. > > On Wed, May 31, 2023 at 02:23:59PM +0100, Daniel P. Berrangé wrote: > > There are 27 pre-copy live migration scenarios being tested. In all of > > these we force non-convergance an

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Peter Xu
On Wed, May 31, 2023 at 02:24:00PM +0100, Daniel P. Berrangé wrote: > The migration test cases that actually exercise live migration want to > ensure there is a minimum of two iterations of pre-copy, in order to > exercise the dirty tracking code. > > Historically we've queried the migration statu

Re: [PATCH] SDL: OpenGL 3 window context

2023-06-01 Thread Marc-André Lureau
Hi On Thu, Jun 1, 2023 at 6:30 PM Antonio Caggiano wrote: > SDL renderer creates an OpenGL 2.1 context while QEMU expects minimum > OpenGL version 3.3 or ES 3.0. To fix this we create an OpenGL context > directly, ignoring the SDL renderer when OpenGL is enabled. > > Signed-off-by: Antonio Caggi

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Peter Xu
On Thu, Jun 01, 2023 at 04:39:48PM +0100, Daniel P. Berrangé wrote: > On Thu, Jun 01, 2023 at 11:30:10AM -0400, Peter Xu wrote: > > Thanks for looking into this.. definitely worthwhile. > > > > On Wed, May 31, 2023 at 02:23:59PM +0100, Daniel P. Berrangé wrote: > > > There are 27 pre-copy live mig

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 11:53:17AM -0400, Peter Xu wrote: > On Thu, Jun 01, 2023 at 04:39:48PM +0100, Daniel P. Berrangé wrote: > > On Thu, Jun 01, 2023 at 11:30:10AM -0400, Peter Xu wrote: > > > Thanks for looking into this.. definitely worthwhile. > > > > > > On Wed, May 31, 2023 at 02:23:59PM +

Re: [PATCH] hvf: Handle EC_INSNABORT

2023-06-01 Thread Mark Burton
This patch came from a discussion on the KVM call the other day. It may well be the case there is a better/different implementation - so the patch is more by way of asking the question. Re-phrasing your question - I think it boils down to “should HVF (and KVM) support executing instructions from

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 11:46:01AM -0400, Peter Xu wrote: > On Wed, May 31, 2023 at 02:24:00PM +0100, Daniel P. Berrangé wrote: > > The migration test cases that actually exercise live migration want to > > ensure there is a minimum of two iterations of pre-copy, in order to > > exercise the dirty

Re: [PATCH 02/11] qdev-properties-system: Lock AioContext for blk_insert_bs()

2023-06-01 Thread Kevin Wolf
Am 31.05.2023 um 13:02 hat Kevin Wolf geschrieben: > blk_insert_bs() requires that callers hold the AioContext lock for the > node that should be inserted. Take it. > > Signed-off-by: Kevin Wolf > --- > hw/core/qdev-properties-system.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Thomas Huth
On 01/06/2023 14.33, Juan Quintela wrote: Daniel P. Berrangé wrote: ... On a test machine this reduces execution time from 13 minutes to 8 minutes. Signed-off-by: Daniel P. Berrangé Hi I have a different idea to get the migration tests faster. Namely, just stop letting enter the completa

[PATCH v4 00/10] tests/qtest: make migration-test massively faster

2023-06-01 Thread Daniel P . Berrangé
This makes migration-test faster by observing that most of the pre-copy tests don't need to be doing a live migration. They get sufficient code coverage with the guest CPUs paused. On my machine this cuts the overall execution time of migration-test from 13 minutes, down to 8 minutes, without sacr

[PATCH v4 04/10] tests/qtest: get rid of some 'qtest_qmp' usage in migration test

2023-06-01 Thread Daniel P . Berrangé
Some of the usage is just a verbose way of re-inventing the qtest_qmp_assert_success(_ref) methods. Reviewed-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-helpers.c | 8 ++--- tests/qtest/migration-test.c| 52 ---

[PATCH v4 08/10] tests/qtest: distinguish src/dst migration VM stop/resume events

2023-06-01 Thread Daniel P . Berrangé
The 'got_stop' and 'got_resume' global variables apply to the src and dst migration VM respectively. Change their names to make this explicit to developers. Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-test.c | 26 +- 1 file changed, 13 insertions(+), 13 de

[PATCH v4 05/10] tests/qtest: switch to using event callbacks for STOP event

2023-06-01 Thread Daniel P . Berrangé
Change the migration test to use the new qtest event callback to watch for the stop event. This ensures that we only watch for the STOP event on the source QEMU. The previous code would set the single 'got_stop' flag when either source or dest QEMU got the STOP event. Reviewed-by: Juan Quintela A

[PATCH v4 06/10] tests/qtest: replace wait_command() with qtest_qmp_assert_success

2023-06-01 Thread Daniel P . Berrangé
Most usage of wait_command() is followed by qobject_unref(), which is just a verbose re-implementation of qtest_qmp_assert_success(). Reviewed-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-helpers.c | 53 +- tests/qtest/migratio

[PATCH v4 02/10] tests/qtest: add support for callback to receive QMP events

2023-06-01 Thread Daniel P . Berrangé
Currently code must call one of the qtest_qmp_event* functions to fetch events. These are only usable if the immediate caller knows the particular event they want to capture, and are only interested in one specific event type. Adding ability to register an event callback lets the caller capture a r

[PATCH v4 07/10] tests/qtest: capture RESUME events during migration

2023-06-01 Thread Daniel P . Berrangé
When running migration tests we monitor for a STOP event so we can skip redundant waits. This will be needed for the RESUME event too shortly. Signed-off-by: Daniel P. Berrangé --- tests/qtest/migration-helpers.c | 13 + tests/qtest/migration-helpers.h | 2 ++ tests/qtest/migration-

[PATCH v4 03/10] tests/qtest: get rid of 'qmp_command' helper in migration test

2023-06-01 Thread Daniel P . Berrangé
This function duplicates logic of qtest_qmp_assert_success_ref. The qtest_qmp_assert_success_ref method has better diagnostics on failure because it prints the entire QMP response, instead of just asserting on existance of the 'error' key. Reviewed-by: Juan Quintela Signed-off-by: Daniel P. Berra

[PATCH v4 10/10] tests/qtest: massively speed up migration-test

2023-06-01 Thread Daniel P . Berrangé
The migration test cases that actually exercise live migration want to ensure there is a minimum of two iterations of pre-copy, in order to exercise the dirty tracking code. Historically we've queried the migration status, looking for the 'dirty-sync-count' value to increment to track iterations.

[PATCH v4 09/10] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Daniel P . Berrangé
There are 27 pre-copy live migration scenarios being tested. In all of these we force non-convergence and run for one iteration, then let it converge and wait for completion during the second (or following) iterations. At 3 mbps bandwidth limit the first iteration takes a very long time (~30 second

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 06:09:44PM +0200, Thomas Huth wrote: > On 01/06/2023 14.33, Juan Quintela wrote: > > Daniel P. Berrangé wrote: > ... > > > On a test machine this reduces execution time from 13 minutes to > > > 8 minutes. > > > > > > Signed-off-by: Daniel P. Berrangé > > > > Hi > > > >

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Peter Xu
On Thu, Jun 01, 2023 at 04:55:25PM +0100, Daniel P. Berrangé wrote: > On Thu, Jun 01, 2023 at 11:53:17AM -0400, Peter Xu wrote: > > On Thu, Jun 01, 2023 at 04:39:48PM +0100, Daniel P. Berrangé wrote: > > > On Thu, Jun 01, 2023 at 11:30:10AM -0400, Peter Xu wrote: > > > > Thanks for looking into thi

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Peter Xu
On Thu, Jun 01, 2023 at 05:05:23PM +0100, Daniel P. Berrangé wrote: > On Thu, Jun 01, 2023 at 11:46:01AM -0400, Peter Xu wrote: > > On Wed, May 31, 2023 at 02:24:00PM +0100, Daniel P. Berrangé wrote: > > > The migration test cases that actually exercise live migration want to > > > ensure there is

[PATCH 2/4] linux-user/elfload: Expose get_elf_hwcap() on s390x

2023-06-01 Thread Ilya Leoshkevich
It is required for implementing /proc/cpuinfo emulation. Signed-off-by: Ilya Leoshkevich --- linux-user/elfload.c | 2 +- linux-user/loader.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 418ad92598c..49ec9ccc944 100644

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Peter Xu
On Thu, Jun 01, 2023 at 05:17:11PM +0100, Daniel P. Berrangé wrote: > Could we merge this series as-is, and simply re-visit the last patch > afterwards, once we have time to debate the feature about completion > phase synchronization. This sounds good to me too. -- Peter Xu

[PATCH 1/4] s390x/tcg: Fix CPU address returned by STIDP

2023-06-01 Thread Ilya Leoshkevich
In qemu-user-s390x, /proc/cpuinfo contains: cpu number : 0 identification : 00 cpu number : 1 identification : 40 The highest nibble is supposed to contain the CPU address, but it's off by 2 bits. Fix the shift value and provide a symbolic constant for it. Fi

[PATCH 4/4] linux-user: Emulate /proc/cpuinfo on s390x

2023-06-01 Thread Ilya Leoshkevich
Some s390x userspace programs are confused when seeing a foreign /proc/cpuinfo [1]. Add the emulation for s390x; follow the respective kernel code structure where possible. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2211472 Reported-by: Tulio Magno Quites Machado Filho Signed-off-by: Ilya L

[PATCH 0/4] linux-user: Emulate /proc/cpuinfo on s390x

2023-06-01 Thread Ilya Leoshkevich
Hi, This series introduces /proc/cpuinfo linux-user emulation for s390x. /proc/cpuinfo emulation already exists for sparc, hppa and riscv; this series follows the pattern established for these platforms. Patch 1 is a fix for an issue that I noticed while looking for ways to get to the "identifica

[PATCH 3/4] linux-user/elfload: Introduce elf_hwcap_str() on s390x

2023-06-01 Thread Ilya Leoshkevich
It is required for implementing /proc/cpuinfo emulation. Signed-off-by: Ilya Leoshkevich --- linux-user/elfload.c | 27 +++ linux-user/loader.h | 1 + 2 files changed, 28 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 49ec9ccc944..d80d6848

[PATCH 2/6] qtest: bump migration-test timeout to 5 minutes

2023-06-01 Thread Daniel P . Berrangé
The migration test should take between 1 min 30 and 2 mins on reasonably modern hardware. The test is not especially compute bound, rather its running time is dominated by the guest RAM size relative to the bandwidth cap, which forces each iteration to take at least 30 seconds. None the less under

[PATCH 5/6] qtest: bump bios-table-test timeout to 6 minutes

2023-06-01 Thread Daniel P . Berrangé
This is reliably hitting the current 2 minute timeout in GitLab CI for the TCI job, and even hits a 4 minute timeout. At 6 minutes it looks sufficiently reliable. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tes

[PATCH 4/6] qtest: bump aspeed_smc-test timeout to 2 minutes

2023-06-01 Thread Daniel P . Berrangé
On a reasonably modern laptop this test takes 40 seconds with the arm emulator. Raising the timeout to 2 minutes gives greater headroom for slowdown under GitLab CI. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/meso

[PATCH 6/6] mtest2make: stop disabling meson test timeouts

2023-06-01 Thread Daniel P . Berrangé
The mtest2make.py script passes the arg '-t 0' to 'meson test' which disables all test timeouts. This is a major source of pain when running in GitLab CI and a test gets stuck. It will stall until GitLab kills the CI job. This leaves us with little easily consumable information about the stalled te

[PATCH 3/6] qtest: bump qom-test timeout to 7 minutes

2023-06-01 Thread Daniel P . Berrangé
The qom-test is periodically hitting the 5 minute timeout when running on the aarch64 emulator under GitLab CI. Add another 2 minutes headroom to the timeout to improve reliability. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH 1/6] qtest: bump min meson timeout to 60 seconds

2023-06-01 Thread Daniel P . Berrangé
Even some of the relatively fast qtests can sometimes hit the 30 second timeout in GitLab CI under high parallelism/load conditions. Bump the min to 60 seconds to give a higher margin for reliability. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 9 ++--- 1 file changed, 2

[PATCH 0/6] tests: enable meson test timeouts to improve debuggability

2023-06-01 Thread Daniel P . Berrangé
Perhaps the most painful of all the GitLab CI failures we see are the enforced job timeouts: "ERROR: Job failed: execution took longer than 1h15m0s seconds" https://gitlab.com/qemu-project/qemu/-/jobs/4387047648 when that hits the CI log shows what has *already* run, but figuring out what

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 12:17:38PM -0400, Peter Xu wrote: > On Thu, Jun 01, 2023 at 04:55:25PM +0100, Daniel P. Berrangé wrote: > > On Thu, Jun 01, 2023 at 11:53:17AM -0400, Peter Xu wrote: > > > On Thu, Jun 01, 2023 at 04:39:48PM +0100, Daniel P. Berrangé wrote: > > > > On Thu, Jun 01, 2023 at 11:

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 12:22:36PM -0400, Peter Xu wrote: > On Thu, Jun 01, 2023 at 05:05:23PM +0100, Daniel P. Berrangé wrote: > > On Thu, Jun 01, 2023 at 11:46:01AM -0400, Peter Xu wrote: > > > On Wed, May 31, 2023 at 02:24:00PM +0100, Daniel P. Berrangé wrote: > > > > The migration test cases th

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-01 Thread Peter Maydell
On Thu, 1 Jun 2023 at 16:30, Marcin Juszkiewicz wrote: > > W dniu 1.06.2023 o 17:01, Peter Maydell pisze: > > On Wed, 31 May 2023 at 17:37, Leif Lindholm > > wrote: > > >> Ah, thanks! That explains why we did the thing that made no sense :) > >> > >> To skip the migration hazard, my prefernece i

Re: [PATCH 1/1] hw/ide/core.c: fix handling of unsupported commands

2023-06-01 Thread John Snow
On Thu, Jun 1, 2023, 10:03 AM Niklas Cassel wrote: > On Wed, May 24, 2023 at 11:20:41AM -0400, John Snow wrote: > > On Wed, May 24, 2023, 4:17 AM Niklas Cassel wrote: > > > > > On Tue, May 23, 2023 at 10:35:56AM -0400, John Snow wrote: > > > > On Mon, May 22, 2023 at 5:16???PM Mateusz Albecki <

Re: [PATCH] hvf: Handle EC_INSNABORT

2023-06-01 Thread Peter Maydell
On Thu, 1 Jun 2023 at 17:00, Mark Burton wrote: > This patch came from a discussion on the KVM call the other day. > It may well be the case there is a better/different implementation > - so the patch is more by way of asking the question. > > Re-phrasing your question - I think it boils down to “

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Peter Xu
On Thu, Jun 01, 2023 at 05:35:07PM +0100, Daniel P. Berrangé wrote: > If non-live the guest won't have dirtied any pages, so I wasn't > confident there would be sufficient amount of dirty ram to send > to trigger this. Possibly that's being too paranoid though I think it makes sense to keep compre

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Peter Xu
On Thu, Jun 01, 2023 at 05:36:42PM +0100, Daniel P. Berrangé wrote: > > The problem is non-live is already not real world usage in most cases. It > > seems we all agreed that it's the code paths to cover not real world usages > > in the tests, or maybe not? > > The cases that i made run non-live

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-01 Thread Marcin Juszkiewicz
W dniu 1.06.2023 o 18:39, Peter Maydell pisze: So something like below? I only tested does system boot into Debian. To make it work also changes to EDK2 would be needed to list XHCI controller in DSDT. Yes, and you also want to drop the useless EHCI controller, and (as you note) both these thi

Re: [PATCH 2/2] target/i386: Implement PCLMULQDQ using AArch64 PMULL instructions

2023-06-01 Thread Ard Biesheuvel
On Thu, 1 Jun 2023 at 14:33, Ard Biesheuvel wrote: > > Use the AArch64 PMULL{2}.P64 instructions to implement PCLMULQDQ instead > of emulating them in C code if the host supports this. This is used in > the implementation of GCM, which is widely used in IPsec VPN and HTTPS. > > Somewhat surprising

[PATCH] qtest/migration: Document live=true cases

2023-06-01 Thread Peter Xu
Document every single live=true use cases on why it should be done in the live manner. Also document on the parameter so new precopy cases should always use live=off unless with explicit reasonings. Cc: Thomas Huth Cc: Juan Quintela Cc: Daniel P. Berrangé Signed-off-by: Peter Xu --- tests/qt

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-01 Thread Leif Lindholm
+Ard On Thu, Jun 01, 2023 at 16:01:43 +0100, Peter Maydell wrote: > > >> Also has EHCI never worked, or has it worked in some modes and so this > > >> change should be versioned? > > > > > > AIUI, EHCI has never worked and can never have worked, because > > > this board's RAM is all above 4G and t

[PATCH v4 01/10] tests/qtest: add various qtest_qmp_assert_success() variants

2023-06-01 Thread Daniel P . Berrangé
Add several counterparts of qtest_qmp_assert_success() that can * Use va_list instead of ... * Accept a list of FDs to send * Return the response data Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/qtest/libqtest.c | 97 +++--- tests/qtest/

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-01 Thread Ard Biesheuvel
On Thu, 1 Jun 2023 at 20:00, Leif Lindholm wrote: > > +Ard > > On Thu, Jun 01, 2023 at 16:01:43 +0100, Peter Maydell wrote: > > > >> Also has EHCI never worked, or has it worked in some modes and so this > > > >> change should be versioned? > > > > > > > > AIUI, EHCI has never worked and can never

Re: [PATCH] qtest/migration: Document live=true cases

2023-06-01 Thread Daniel P . Berrangé
On Thu, Jun 01, 2023 at 01:29:35PM -0400, Peter Xu wrote: > Document every single live=true use cases on why it should be done in the > live manner. Also document on the parameter so new precopy cases should > always use live=off unless with explicit reasonings. > > Cc: Thomas Huth > Cc: Juan Qu

Re: [PATCH 2/6] qtest: bump migration-test timeout to 5 minutes

2023-06-01 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: The migration test should take between 1 min 30 and 2 mins on reasonably modern hardware. The test is not especially compute bound, rather its running time is dominated by the guest RAM size relative to the bandwidth cap, which forces each iteration

Re: [PATCH 1/6] qtest: bump min meson timeout to 60 seconds

2023-06-01 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: Even some of the relatively fast qtests can sometimes hit the 30 second timeout in GitLab CI under high parallelism/load conditions. Bump the min to 60 seconds to give a higher margin for reliability. Signed-off-by: Daniel P. Berrangé --- tests/q

<    1   2   3   4   5   >