Re: [PATCH for-8.3 v2 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2023-11-09 Thread Philippe Mathieu-Daudé
Hi David, +Markus/Bernhard On 6/11/23 20:49, David Woodhouse wrote: From: David Woodhouse Eliminate direct access to nd_table[] and nb_nics by processing the the Xen and ISA NICs first and then calling pci_init_nic_devices() for the rest. Signed-off-by: David Woodhouse Reviewed-by: Paul

Re: [PATCH 0/2] s390x/pci: small set of fixes

2023-11-09 Thread Cédric Le Goater
Hello Matthew, On 11/9/23 23:53, Matthew Rosato wrote: The following set of changes are associated with issues exposed by testing of the 'vfio: Adopt iommufd' series. The first patch fixes an existing assumption that a vfio device will always have a group fd (which is no longer true if cdev is

Re: [PATCH v6 06/21] net: Remove flag propagation

2023-11-09 Thread Pavel Dovgalyuk
You need to bump REPLAY_VERSION in replay/replay.c, because your patch changes the replay log format. Otherwise, for replay part: Acked-by: Pavel Dovgalyuk On 30.10.2023 08:12, Akihiko Odaki wrote: There is no defined flag now. Signed-off-by: Akihiko Odaki --- include/net/filter.h|

[PATCH v2 0/4] Live Migration Acceleration with IAA Compression

2023-11-09 Thread Yuan Liu
Hi, I am writing to submit a code change aimed at enhancing live migration acceleration by leveraging the compression capability of the Intel In-Memory Analytics Accelerator (IAA). The implementation of the IAA (de)compression code is based on Intel Query Processing Library (QPL), an open-source

[PATCH v2 1/4] migration: Introduce multifd-compression-accel parameter

2023-11-09 Thread Yuan Liu
Introduce the multifd-compression-accel option to enable or disable live migration data (de)compression accelerator. The default value of multifd-compression-accel is auto, and the enabling and selection of the accelerator are automatically detected. By setting multifd-compression-accel=none, the

[PATCH v2 4/4] multifd: Introduce QPL compression accelerator

2023-11-09 Thread Yuan Liu
Intel Query Processing Library (QPL) is an open-source library for data compression, it supports the deflate compression algorithm, compatible with Zlib and GZIP. QPL supports both software compression and hardware compression. Software compression is based on instruction optimization to

[PATCH v2 3/4] configure: add qpl option

2023-11-09 Thread Yuan Liu
the Query Processing Library (QPL) is an open-source library that supports data compression and decompression features. add --enable-qpl and --disable-qpl options to enable and disable the QPL compression accelerator. The QPL compression accelerator can accelerate the Zlib compression algorithm

[PATCH v2 2/4] multifd: Implement multifd compression accelerator

2023-11-09 Thread Yuan Liu
when starting multifd live migration, if the compression method is enabled, compression method can be accelerated using accelerators. Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou --- migration/multifd.c | 38 -- migration/multifd.h | 8 2 files

Re: [PATCH for-8.3 v2 04/46] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()

2023-11-09 Thread Philippe Mathieu-Daudé
Hi David, On 6/11/23 20:49, David Woodhouse wrote: From: David Woodhouse The loop over nd_table[] to add PCI NICs is repeated in quite a few places. Add a helper function to do it. Some platforms also try to instantiate a specific model in a specific slot, to match the real hardware. Add

Re: [PATCH v6 3/4] python: add binary

2023-11-09 Thread Philippe Mathieu-Daudé
On 8/11/23 16:38, Maksim Davydov wrote: Add a supportive property to access the path to the qemu binary Signed-off-by: Maksim Davydov --- python/qemu/machine/machine.py | 5 + 1 file changed, 5 insertions(+) diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py

Re: [PING] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-09 Thread Cédric Le Goater
Hello John, On 11/9/23 23:18, John Platts wrote: What is the status of integrating the fixes to the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c? You sent a couple of times the same patch : https://patchwork.ozlabs.org/project/qemu-ppc/list/?submitter=87426

Re: [PATCH] Fix segmentation fault when VM shutdown with virtio-gpu unplugged

2023-11-09 Thread Binfeng Wu via
Sorry for this mistake. Please check now. Please let us know if we need resubmit it. >From e798cf68b1a4043dcf8dda9b895812c1dab88da2 Mon Sep 17 00:00:00 2001 From: wangmeiling Date: Fri, 10 Nov 2023 10:17:54 +0800 Subject: [PATCH] Fix segmentation fault when VM shutdown with virtio-gpu unplugged

Re: [PATCH 2/2] s390x/pci: only limit DMA aperture if vfio DMA limit reported

2023-11-09 Thread Thomas Huth
On 09/11/2023 23.53, Matthew Rosato wrote: If the host kernel lacks vfio DMA limit reporting, do not attempt to shrink the guest DMA aperture. Fixes: df202e3ff3 ("s390x/pci: shrink DMA aperture to be bound by vfio DMA limit") Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 2 +-

Re: QTest framework does not capture toggled irq line

2023-11-09 Thread Thomas Huth
On 10/11/2023 04.40, Gustavo Romero wrote: Hi folks, I'm writing a test for a device that has one IRQ output line that is toggled (raised then lowered) by the device to trigger a CPU interrupt. Afaics the QTest framework does not provide a way to capture when an output line is raised because

Re: [PATCH] Fix segmentation fault when VM shutdown with virtio-gpu unplugged

2023-11-09 Thread Michael S. Tsirkin
On Fri, Nov 10, 2023 at 12:39:16PM +0800, Binfeng Wu wrote: > From: wangmeiling > > In the virtio-gpu unrealize process, the vdev structure has been cleaned up. > However, vm_change_state_handler is not cleaned up yet, which is related to > vdev. This handler will be cleaned up when VM shutdown,

Re: [PATCH 1/2] s390x/pci: bypass vfio DMA counting when using cdev

2023-11-09 Thread Philippe Mathieu-Daudé
[Sent too fast by inadvertence...] Hi Matthew, On 10/11/23 06:21, Philippe Mathieu-Daudé wrote: On 9/11/23 23:53, Matthew Rosato wrote: The current code assumes that there is always a vfio group, but that's no longer guaranteed with the iommufd backend when using cdev.  In this case, we don't

Re: [PATCH 1/2] s390x/pci: bypass vfio DMA counting when using cdev

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 23:53, Matthew Rosato wrote: The current code assumes that there is always a vfio group, but that's no longer guaranteed with the iommufd backend when using cdev. In this case, we don't need to track the vfio dma limit anyway. Signed-off-by: Matthew Rosato ---

[PATCH] Fix segmentation fault when VM shutdown with virtio-gpu unplugged

2023-11-09 Thread Binfeng Wu via
From: wangmeiling In the virtio-gpu unrealize process, the vdev structure has been cleaned up. However, vm_change_state_handler is not cleaned up yet, which is related to vdev. This handler will be cleaned up when VM shutdown, but the vdev is already a null pointer at this time, this will lead

Re: [PULL 55/63] hw/cxl/mbox: Add support for background operations

2023-11-09 Thread Davidlohr Bueso
On Thu, 09 Nov 2023, Peter Maydell wrote: On Tue, 7 Nov 2023 at 10:13, Michael S. Tsirkin wrote: From: Davidlohr Bueso Support background commands in the mailbox, and update cmd_infostat_bg_op_sts() accordingly. This patch does not implement mbox interrupts upon completion, so the kernel

Re: [PULL 57/63] hw/cxl: Add support for device sanitation

2023-11-09 Thread Davidlohr Bueso
On Thu, 09 Nov 2023, Peter Maydell wrote: On Tue, 7 Nov 2023 at 10:13, Michael S. Tsirkin wrote: From: Davidlohr Bueso Make use of the background operations through the sanitize command, per CXL 3.0 specs. Traditionally run times can be rather long, depending on the size of the media.

QTest framework does not capture toggled irq line

2023-11-09 Thread Gustavo Romero
Hi folks, I'm writing a test for a device that has one IRQ output line that is toggled (raised then lowered) by the device to trigger a CPU interrupt. Afaics the QTest framework does not provide a way to capture when an output line is raised because the API functions, e.g. qtest_get_irq(), read

Re: [PULL 0/1] xen-virtio-fix-1-tag

2023-11-09 Thread Stefan Hajnoczi
Hi Stefano, I merged this, but please renew your GPG key and use the standard pull request format where the git ref is included after the repo URL in the future so that tooling is able to process your pull request: are available in the Git repository at:

RE: [PATCH v5 19/20] kconfig: Activate IOMMUFD for s390x machines

2023-11-09 Thread Duan, Zhenzhong
>-Original Message- >From: Matthew Rosato >Sent: Friday, November 10, 2023 7:00 AM >Subject: Re: [PATCH v5 19/20] kconfig: Activate IOMMUFD for s390x machines > >On 11/9/23 6:45 AM, Zhenzhong Duan wrote: >> From: Cédric Le Goater >> >> Signed-off-by: Cédric Le Goater >> Signed-off-by:

RE: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-09 Thread Duan, Zhenzhong
Hi Jason, Joao, >-Original Message- >From: Jason Gunthorpe >Sent: Thursday, November 9, 2023 10:35 PM >Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend > >On Thu, Nov 09, 2023 at 01:21:59PM +, Joao Martins wrote: >> On 09/11/2023 13:09, Jason Gunthorpe wrote:

Re: [PULL 0/1] Tracing patches

2023-11-09 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/1] xen-virtio-fix-1-tag

2023-11-09 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

RE: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-09 Thread Duan, Zhenzhong
>-Original Message- >From: Markus Armbruster >Sent: Thursday, November 9, 2023 5:05 PM >Subject: Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object > >Cédric Le Goater writes: > >> On 11/8/23 11:30, Markus Armbruster wrote: >>> Cédric Le Goater writes: >>> Hello

Re: [PATCH] Implementation of SJA1000 CAN-bus devices that support MSI (PCI capability 0x05). - Implementation of multiple MSI vector support for SJA1000 devices. - Added can_pcm26d2ca_pci.c; support

2023-11-09 Thread Deniz Eren
Hi, Just wondering if I need to do anything else to get this patch across the line? It's basically support for a new type of CANbus device with PCI MSI capability, which hasn't been supported before in QEmu CAN stack. Best regards, Deniz Get Outlook for iOS

Re: [PATCH-for-8.2 v4 10/10] hw/char/pl011: Implement TX FIFO

2023-11-09 Thread Richard Henderson
On 11/9/23 11:28, Philippe Mathieu-Daudé wrote: If the UART back-end chardev doesn't drain data as fast as stdout does or blocks, buffer in the TX FIFO to try again later. This avoids having the IO-thread busy waiting on chardev back-ends, reported recently when testing the Trusted Reference

Re: [PATCH] include/hw/xen: Use more inclusive language in comment

2023-11-09 Thread Andrew Cooper
On 09/11/2023 5:40 pm, Thomas Huth wrote: > Let's improve the wording here. > > Signed-off-by: Thomas Huth Thankyou for the patch, but this is a verbatim copy of a set of Xen headers. Would you mind submitting a correction to xen.git:xen/include/public/hvm/params.h first, and then syncing the

Re: [PATCH-for-8.2 v4 09/10] hw/char/pl011: Add transmit FIFO to PL011State

2023-11-09 Thread Richard Henderson
On 11/9/23 11:28, Philippe Mathieu-Daudé wrote: @@ -436,6 +438,24 @@ static const VMStateDescription vmstate_pl011_clock = { } }; +static bool pl011_xmit_fifo_state_needed(void *opaque) +{ +PL011State* s = opaque; + +return !fifo8_is_empty(>xmit_fifo); +} + +static const

Re: [PATCH] virtio-snd: check AUD_register_card return value

2023-11-09 Thread Michael S. Tsirkin
On Thu, Nov 09, 2023 at 06:03:15PM +, Peter Maydell wrote: > On Thu, 9 Nov 2023 at 17:53, Michael S. Tsirkin wrote: > > > > On Thu, Nov 09, 2023 at 04:25:04PM +, Peter Maydell wrote: > > > On Thu, 9 Nov 2023 at 16:21, Manos Pitsidianakis > > > wrote: > > > > > > > > AUD_register_card

Re: [PATCH-for-8.2 v4 04/10] hw/char/pl011: Extract pl011_write_txdata() from pl011_write()

2023-11-09 Thread Richard Henderson
On 11/9/23 11:28, Philippe Mathieu-Daudé wrote: When implementing FIFO, this code will become more complex. Start by factoring it out to a new pl011_write_txdata() function. No functional change intended. ... @@ -262,19 +273,13 @@ static void pl011_write(void *opaque, hwaddr offset,

Re: [PATCH-for-8.2 v4 02/10] util/fifo8: Introduce fifo8_peek_buf()

2023-11-09 Thread Richard Henderson
On 11/9/23 11:28, Philippe Mathieu-Daudé wrote: To be able to peek at FIFO content without popping it, introduce the fifo8_peek_buf() method by factoring common content from fifo8_pop_buf(). Reviewed-by: Francisco Iglesias Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée ---

Re: [PATCH-for-8.2 v4 01/10] util/fifo8: Allow fifo8_pop_buf() to not populate popped length

2023-11-09 Thread Richard Henderson
On 11/9/23 11:28, Philippe Mathieu-Daudé wrote: There might be cases where we know the number of bytes we can pop from the FIFO, or we simply don't care how many bytes is returned. Allow fifo8_pop_buf() to take a NULL numptr. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Francisco

Re: [PATCH] target/arm: HVC at EL3 should go to EL3, not EL2

2023-11-09 Thread Richard Henderson
On 11/9/23 07:19, Peter Maydell wrote: AArch64 permits code at EL3 to use the HVC instruction; however the exception we take should go to EL3, not down to EL2 (see the pseudocode AArch64.CallHypervisor()). Fix the target EL. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Maydell ---

Re: [PATCH v5 19/20] kconfig: Activate IOMMUFD for s390x machines

2023-11-09 Thread Matthew Rosato
On 11/9/23 6:45 AM, Zhenzhong Duan wrote: > From: Cédric Le Goater > > Signed-off-by: Cédric Le Goater > Signed-off-by: Zhenzhong Duan > --- > hw/s390x/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig > index 4c068d7960..26ad104485 100644 >

Re: [PATCH v5 16/20] vfio/ccw: Make vfio cdev pre-openable by passing a file handle

2023-11-09 Thread Matthew Rosato
On 11/9/23 6:45 AM, Zhenzhong Duan wrote: > This gives management tools like libvirt a chance to open the vfio > cdev with privilege and pass FD to qemu. This way qemu never needs > to have privilege to open a VFIO or iommu cdev node. > > Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew

Re: [PATCH v5 15/20] vfio/ccw: Allow the selection of a given iommu backend

2023-11-09 Thread Matthew Rosato
On 11/9/23 6:45 AM, Zhenzhong Duan wrote: > Now we support two types of iommu backends, let's add the capability > to select one of them. This depends on whether an iommufd object has > been linked with the vfio-ccw device: > > If the user wants to use the legacy backend, it shall not > link the

Re: [PATCH v5 13/20] vfio/ap: Allow the selection of a given iommu backend

2023-11-09 Thread Matthew Rosato
On 11/9/23 6:45 AM, Zhenzhong Duan wrote: > Now we support two types of iommu backends, let's add the capability > to select one of them. This depends on whether an iommufd object has > been linked with the vfio-ap device: > > if the user wants to use the legacy backend, it shall not > link the

Re: [PATCH v5 14/20] vfio/ap: Make vfio cdev pre-openable by passing a file handle

2023-11-09 Thread Matthew Rosato
On 11/9/23 6:45 AM, Zhenzhong Duan wrote: > This gives management tools like libvirt a chance to open the vfio > cdev with privilege and pass FD to qemu. This way qemu never needs > to have privilege to open a VFIO or iommu cdev node. > > Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew

[PATCH 2/2] s390x/pci: only limit DMA aperture if vfio DMA limit reported

2023-11-09 Thread Matthew Rosato
If the host kernel lacks vfio DMA limit reporting, do not attempt to shrink the guest DMA aperture. Fixes: df202e3ff3 ("s390x/pci: shrink DMA aperture to be bound by vfio DMA limit") Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 1/2] s390x/pci: bypass vfio DMA counting when using cdev

2023-11-09 Thread Matthew Rosato
The current code assumes that there is always a vfio group, but that's no longer guaranteed with the iommufd backend when using cdev. In this case, we don't need to track the vfio dma limit anyway. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 6 +- 1 file changed, 5

[PATCH 0/2] s390x/pci: small set of fixes

2023-11-09 Thread Matthew Rosato
The following set of changes are associated with issues exposed by testing of the 'vfio: Adopt iommufd' series. The first patch fixes an existing assumption that a vfio device will always have a group fd (which is no longer true if cdev is used, which can only happen once the iommufd backend is

Re: [PING] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-09 Thread John Platts
What is the status of integrating the fixes to the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c? The bug that is currently there with the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros is that float_invalid_cvt is incorrectly called if the current source value is

Re: [PATCH] hv-balloon: avoid alloca() usage

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 17:02, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" alloca() is frowned upon, replace it with g_malloc0() + g_autofree. Signed-off-by: Maciej S. Szmigiero --- hw/hyperv/hv-balloon.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) Reviewed-by:

Re: [PATCH v2 1/2] buildsys: Bump minimal meson version required to v1.2.3

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:01, Paolo Bonzini wrote: We need meson v1.2.3 to build QEMU on macOS Sonoma. It also build fine all our CI jobs, so let's use it as our "good enough" packaged wheel. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1939 Suggested-by: Paolo Bonzini Signed-off-by: Philippe

Re: [PATCH v2 1/2] buildsys: Bump minimal meson version required to v1.2.3

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 22:21, John Snow wrote: On Thu, Nov 9, 2023 at 12:01 PM Paolo Bonzini wrote: We need meson v1.2.3 to build QEMU on macOS Sonoma. It also build fine all our CI jobs, so let's use it as our "good enough" packaged wheel. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1939

Re: [PATCH v2 1/2] buildsys: Bump minimal meson version required to v1.2.3

2023-11-09 Thread BALATON Zoltan
On Thu, 9 Nov 2023, John Snow wrote: On Thu, Nov 9, 2023 at 12:01 PM Paolo Bonzini wrote: We need meson v1.2.3 to build QEMU on macOS Sonoma. It also build fine all our CI jobs, so let's use it as our "good enough" packaged wheel. Resolves:

Re: [PATCH v6 3/4] python: add binary

2023-11-09 Thread John Snow
On Wed, Nov 8, 2023 at 10:39 AM Maksim Davydov wrote: > > Add a supportive property to access the path to the qemu binary > > Signed-off-by: Maksim Davydov > --- > python/qemu/machine/machine.py | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/python/qemu/machine/machine.py

Re: [PATCH] docs: document what configure does with virtual environments

2023-11-09 Thread John Snow
Whoops, didn't mean to reply off-list. On Thu, Nov 9, 2023 at 4:34 PM John Snow wrote: > > On Thu, Nov 9, 2023 at 10:59 AM Paolo Bonzini wrote: > > > > Given the recent confusion around how QEMU detects the system > > Meson installation, and/or decides to install its own, it is > > time to fill

[RFC PATCH] Hexagon (target/hexagon) Make generators object oriented

2023-11-09 Thread Taylor Simpson
RFC - This patch handles gen_tcg_funcs.py. I'd like to get comments on the general approach before working on the other Python scripts. The generators are generally a bunch of Python if-then-else statements based on the regtype and regid. Encapsulate regtype/regid into a class hierarchy.

Re: [PATCH v2 1/2] buildsys: Bump minimal meson version required to v1.2.3

2023-11-09 Thread John Snow
On Thu, Nov 9, 2023 at 12:01 PM Paolo Bonzini wrote: > > > We need meson v1.2.3 to build QEMU on macOS Sonoma. > > > > It also build fine all our CI jobs, so let's use it as our > > "good enough" packaged wheel. > > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1939 > >

Re: [PATCH-for-8.2 v4 00/10] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop

2023-11-09 Thread Philippe Mathieu-Daudé
Hi Peter, On 9/11/23 20:29, Peter Maydell wrote: On Thu, 9 Nov 2023 at 19:28, Philippe Mathieu-Daudé wrote: Missing review: #10 Hi, This series add support for (async) FIFO on the transmit path of the PL011 UART. Hi; what's the rationale for the "for-8.2" targeting here? What bug are we

Re: [PULL 2/5] ui/gtk-egl: Check EGLSurface before doing scanout

2023-11-09 Thread Volker Rümelin
> From: Antonio Caggiano > > The first time gd_egl_scanout_texture() is called, there's a possibility > that the GTK drawing area might not be realized yet, in which case its > associated GdkWindow is NULL. This means gd_egl_init() was also skipped > and the EGLContext and EGLSurface stored in

[PATCH-for-8.2 v4 00/10] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop

2023-11-09 Thread Philippe Mathieu-Daudé
Missing review: #10 Hi, This series add support for (async) FIFO on the transmit path of the PL011 UART. Since v3: - Document migration bits (Alex, Richard) - Just check FIFO is not empty in pl011_xmit_fifo_state_needed (rth) - In pl011_xmit check TX enabled first, and ignore < 8-bit TX (rth)

Re: [PATCH v2 10/11] qapi: golang: Add CommandResult type to Go

2023-11-09 Thread Victor Toso
Hi, On Thu, Nov 09, 2023 at 10:24:20AM -0800, Andrea Bolognani wrote: > On Mon, Oct 16, 2023 at 05:27:03PM +0200, Victor Toso wrote: > > This patch adds a struct type in Go that will handle return values > > for QAPI's command types. > > > > The return value of a Command is, encouraged to be,

[PATCH-for-8.2 v4 04/10] hw/char/pl011: Extract pl011_write_txdata() from pl011_write()

2023-11-09 Thread Philippe Mathieu-Daudé
When implementing FIFO, this code will become more complex. Start by factoring it out to a new pl011_write_txdata() function. No functional change intended. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- hw/char/pl011.c | 21 + 1 file changed, 13

[PATCH-for-8.2 v4 07/10] hw/char/pl011: Check if receiver is enabled

2023-11-09 Thread Philippe Mathieu-Daudé
Do not receive characters when UART or receiver are disabled. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/char/pl011.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 9c43cb47bf..ca931be139

[PATCH-for-8.2 v4 06/10] hw/char/pl011: Warn when using disabled transmitter

2023-11-09 Thread Philippe Mathieu-Daudé
We shouldn't transmit characters when the full UART or its transmitter is disabled. However we don't want to break the possibly incomplete "my first bare metal assembly program"s, so we choose to simply display a warning when this occurs. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex

Re: [PATCH-for-8.2 v4 00/10] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop

2023-11-09 Thread Peter Maydell
On Thu, 9 Nov 2023 at 19:28, Philippe Mathieu-Daudé wrote: > > Missing review: #10 > > Hi, > > This series add support for (async) FIFO on the transmit path > of the PL011 UART. Hi; what's the rationale for the "for-8.2" targeting here? What bug are we fixing? thanks -- PMM

[PATCH-for-8.2 v4 09/10] hw/char/pl011: Add transmit FIFO to PL011State

2023-11-09 Thread Philippe Mathieu-Daudé
In order to make the next commit easier to review, introduce the transmit FIFO, but do not yet use it. When migrating from new to old VM: - if the fifo is empty, migration will still work because of the subsection. - if the fifo is not empty, the subsection will be ignored, with the only

[PATCH-for-8.2 v4 08/10] hw/char/pl011: Rename RX FIFO methods

2023-11-09 Thread Philippe Mathieu-Daudé
In preparation of having a TX FIFO, rename the RX FIFO methods. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- hw/char/pl011.c | 10 +- hw/char/trace-events | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH-for-8.2 v4 10/10] hw/char/pl011: Implement TX FIFO

2023-11-09 Thread Philippe Mathieu-Daudé
If the UART back-end chardev doesn't drain data as fast as stdout does or blocks, buffer in the TX FIFO to try again later. This avoids having the IO-thread busy waiting on chardev back-ends, reported recently when testing the Trusted Reference Stack and using the socket backend:

[PATCH-for-8.2 v4 05/10] hw/char/pl011: Extract pl011_read_rxdata() from pl011_read()

2023-11-09 Thread Philippe Mathieu-Daudé
To keep MemoryRegionOps read/write handlers with similar logic, factor pl011_read_txdata() out of pl011_read(), similar to what the previous commit did to pl011_write(). No functional change intended. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/char/pl011.c | 41

[PATCH-for-8.2 v4 02/10] util/fifo8: Introduce fifo8_peek_buf()

2023-11-09 Thread Philippe Mathieu-Daudé
To be able to peek at FIFO content without popping it, introduce the fifo8_peek_buf() method by factoring common content from fifo8_pop_buf(). Reviewed-by: Francisco Iglesias Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- include/qemu/fifo8.h | 27

[PATCH-for-8.2 v4 01/10] util/fifo8: Allow fifo8_pop_buf() to not populate popped length

2023-11-09 Thread Philippe Mathieu-Daudé
There might be cases where we know the number of bytes we can pop from the FIFO, or we simply don't care how many bytes is returned. Allow fifo8_pop_buf() to take a NULL numptr. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Alex Bennée ---

[PATCH-for-8.2 v4 03/10] hw/char/pl011: Split RX/TX path of pl011_reset_fifo()

2023-11-09 Thread Philippe Mathieu-Daudé
To be able to reset the RX or TX FIFO separately, split pl011_reset_fifo() in two. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- hw/char/pl011.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git

Re: [PATCH v3 0/1] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
Alex Bennée writes: > Greg Manning writes: > > v1-v2: Added the signed-off-by line. > > v2-v3: Fixed the issue reference. > > > > Greg Manning (1): > > plugins: fix win plugin tests on cross compile > > > > .gitlab-ci.d/crossbuilds.yml | 2 +- > > contrib/plugins/Makefile | 2 +- > >

Re: [PATCH v2] ppc/pnv: Fix potential overflow in I2C model

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:15, Cédric Le Goater wrote: Coverity warns that "i2c_bus_busy(i2c->busses[i]) << i" might overflow because the expression is evaluated using 32-bit arithmetic and then used in a context expecting a uint64_t. While we are at it, introduce a PNV_I2C_MAX_BUSSES constant and check the

Re: [PATCH] tests/tsan: Rename the file with the entries that should be ignored

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:47, Thomas Huth wrote: Let's use a better file name here. Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 4 ++-- tests/tsan/{blacklist.tsan => ignore.tsan} | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename

Re: [PATCH v3 00/11] qdev: Make array properties user accessible again

2023-11-09 Thread Philippe Mathieu-Daudé
Hi Kevin, On 9/11/23 18:42, Kevin Wolf wrote: Array properties have been inaccessible since commit f3558b1b both on the command line and in QMP. This series reworks them so that they are made accessible again in these external interfaces, this time as JSON lists. See patch 11 for details.

Re: [PATCH v2 08/11] qapi: golang: Generate qapi's event types in Go

2023-11-09 Thread Victor Toso
Hi, On Thu, Nov 09, 2023 at 09:59:50AM -0800, Andrea Bolognani wrote: > On Mon, Oct 16, 2023 at 05:27:01PM +0200, Victor Toso wrote: > > This patch handles QAPI event types and generates data structures in > > Go that handles it. > > > > We also define a Event interface and two helper functions

Re: [PATCH v3 10/11] qdev: Make netdev properties work as list elements

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:42, Kevin Wolf wrote: The 'name' parameter of QOM setters is primarily used to specify the name of the currently parsed input element in the visitor interface. For top-level qdev properties, this is always set and matches 'prop->name'. However, for list elements it is NULL,

Re: [PATCH v3 09/11] qom: Add object_property_set_default_list()

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:42, Kevin Wolf wrote: This function provides a default for properties that are accessed using the list visitor interface. The default is always an empty list. Signed-off-by: Kevin Wolf Reviewed-by: Peter Maydell --- include/qom/object.h | 8 qom/object.c | 6

Re: [PATCH v3 01/11] hw/i386/pc: Use qdev_prop_set_array()

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:42, Kevin Wolf wrote: Instead of manually setting "foo-len" and "foo[i]" properties, build a QList and use the new qdev_prop_set_array() helper to set the whole array property with a single call. Signed-off-by: Kevin Wolf Reviewed-by: Peter Maydell --- hw/i386/pc.c | 8

Re: [PATCH] include/hw/xen: Use more inclusive language in comment

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:40, Thomas Huth wrote: Let's improve the wording here. Signed-off-by: Thomas Huth --- include/hw/xen/interface/hvm/params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 00/11] qapi-go: add generator for Golang interface

2023-11-09 Thread Victor Toso
Hi, On Thu, Nov 09, 2023 at 10:35:07AM -0800, Andrea Bolognani wrote: > On Mon, Oct 16, 2023 at 05:26:53PM +0200, Victor Toso wrote: > > This patch series intent is to introduce a generator that produces a Go > > module for Go applications to interact over QMP with QEMU. > > > > This is the

Re: [PATCH v2 04/11] qapi: golang: Generate qapi's alternate types in Go

2023-11-09 Thread Victor Toso
Hi, On Thu, Nov 09, 2023 at 09:34:56AM -0800, Andrea Bolognani wrote: > On Mon, Oct 16, 2023 at 05:26:57PM +0200, Victor Toso wrote: > > [*] The exception for optional fields as default is to Types that can > > accept JSON Null as a value. For this case, we translate NULL to a > > member type

Re: [PATCH v2] ppc/pnv: Fix potential overflow in I2C model

2023-11-09 Thread Miles Glenn
On Thu, 2023-11-09 at 18:15 +0100, Cédric Le Goater wrote: > Coverity warns that "i2c_bus_busy(i2c->busses[i]) << i" might > overflow > because the expression is evaluated using 32-bit arithmetic and then > used in a context expecting a uint64_t. > > While we are at it, introduce a

Re: [RFC PATCH 1/2] migration: Report error in incoming migration

2023-11-09 Thread Peter Xu
On Thu, Nov 09, 2023 at 01:58:55PM -0300, Fabiano Rosas wrote: > We're not currently reporting the errors set with migrate_set_error() > when incoming migration fails. > > Signed-off-by: Fabiano Rosas > --- > migration/migration.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git

Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread

2023-11-09 Thread Peter Xu
On Thu, Nov 09, 2023 at 01:58:56PM -0300, Fabiano Rosas wrote: > We cannot operate on the multifd semaphores outside of the multifd > channel thread > because multifd_save_cleanup() can run in parallel and > attempt to destroy the mutexes, which causes an assert. > > Looking at the places where

Re: [RFC PATCH-for-8.2] .gitlab-ci.d/cirrus.yml: Promote NetBSD job as gating

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 18:15, Thomas Huth wrote: On 09/11/2023 17.58, Daniel P. Berrangé wrote: On Thu, Nov 09, 2023 at 04:35:56PM +0100, Philippe Mathieu-Daudé wrote: On 9/11/23 16:35, Philippe Mathieu-Daudé wrote: This Cirrus-CI based job takes ~12min, similarly to macOS job. Signed-off-by: Philippe

Re: [PATCH] ppc/pnv: Fix potential overflow in I2C model

2023-11-09 Thread Philippe Mathieu-Daudé
On 9/11/23 16:54, Cédric Le Goater wrote: On 11/9/23 16:02, Peter Maydell wrote: On Thu, 9 Nov 2023 at 08:06, Cédric Le Goater wrote: Coverity warns that "i2c_bus_busy(i2c->busses[i]) << i" might overflow because the expression is evaluated using 32-bit arithmetic and then used in a context

Re: [PATCH for-8.2] target/sparc: Fix RETURN

2023-11-09 Thread Mark Cave-Ayland
On 08/11/2023 20:47, Richard Henderson wrote: Perform window restore before pc update. Required in order to recognize any window underflow trap with the current pc. Fixes: 86b82fe021f4 ("target/sparc: Move JMPL, RETT, RETURN to decodetree") Reported-by: Mark Cave-Ayland Signed-off-by: Richard

Re: [PATCH v2 00/11] qapi-go: add generator for Golang interface

2023-11-09 Thread Andrea Bolognani
On Mon, Oct 16, 2023 at 05:26:53PM +0200, Victor Toso wrote: > This patch series intent is to introduce a generator that produces a Go > module for Go applications to interact over QMP with QEMU. > > This is the second iteration: > v1:

Re: [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-11-09 Thread Victor Toso
Hi, On Thu, Nov 09, 2023 at 09:29:28AM -0800, Andrea Bolognani wrote: > On Mon, Oct 16, 2023 at 05:27:00PM +0200, Victor Toso wrote: > > This patch handles QAPI union types and generates the equivalent data > > structures and methods in Go to handle it. > > > > The QAPI union type has two types

Re: [PATCH] tests/qemu-iotests/149: Use more inclusive language in this test

2023-11-09 Thread Paolo Bonzini
On 11/9/23 19:09, Thomas Huth wrote: Let's use 'allowlist' and 'ignorelist' here instead of problematic words. Signed-off-by: Thomas Huth --- tests/qemu-iotests/149 | 14 +++--- tests/qemu-iotests/149.out | 8 2 files changed, 11 insertions(+), 11 deletions(-) diff

Re: [PATCH] hw/audio/es1370: Avoid four-letter word

2023-11-09 Thread Daniel P . Berrangé
On Thu, Nov 09, 2023 at 06:01:13PM +, Peter Maydell wrote: > On Thu, 9 Nov 2023 at 17:36, Thomas Huth wrote: > > > > Using certain four-letter words is not good style in source code, > > so let's avoid that. > > > > Signed-off-by: Thomas Huth > > --- > > hw/audio/es1370.c | 3 +-- > > 1

Re: [PATCH v2 10/11] qapi: golang: Add CommandResult type to Go

2023-11-09 Thread Andrea Bolognani
On Mon, Oct 16, 2023 at 05:27:03PM +0200, Victor Toso wrote: > This patch adds a struct type in Go that will handle return values > for QAPI's command types. > > The return value of a Command is, encouraged to be, QAPI's complex > types or an Array of those. > > Every Command has a underlying

[PATCH] tests/qemu-iotests/149: Use more inclusive language in this test

2023-11-09 Thread Thomas Huth
Let's use 'allowlist' and 'ignorelist' here instead of problematic words. Signed-off-by: Thomas Huth --- tests/qemu-iotests/149 | 14 +++--- tests/qemu-iotests/149.out | 8 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/149

Re: [PATCH] hw/audio/es1370: Avoid four-letter word

2023-11-09 Thread Thomas Huth
On 09/11/2023 19.01, Peter Maydell wrote: On Thu, 9 Nov 2023 at 17:36, Thomas Huth wrote: Using certain four-letter words is not good style in source code, so let's avoid that. Signed-off-by: Thomas Huth --- hw/audio/es1370.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

Re: [PATCH] virtio-snd: check AUD_register_card return value

2023-11-09 Thread Peter Maydell
On Thu, 9 Nov 2023 at 17:53, Michael S. Tsirkin wrote: > > On Thu, Nov 09, 2023 at 04:25:04PM +, Peter Maydell wrote: > > On Thu, 9 Nov 2023 at 16:21, Manos Pitsidianakis > > wrote: > > > > > > AUD_register_card might fail. Even though errp was passed as an > > > argument, the call's return

Re: [PATCH] hw/audio/es1370: Avoid four-letter word

2023-11-09 Thread Peter Maydell
On Thu, 9 Nov 2023 at 17:36, Thomas Huth wrote: > > Using certain four-letter words is not good style in source code, > so let's avoid that. > > Signed-off-by: Thomas Huth > --- > hw/audio/es1370.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/hw/audio/es1370.c

Re: [PATCH v2 08/11] qapi: golang: Generate qapi's event types in Go

2023-11-09 Thread Andrea Bolognani
On Mon, Oct 16, 2023 at 05:27:01PM +0200, Victor Toso wrote: > This patch handles QAPI event types and generates data structures in > Go that handles it. > > We also define a Event interface and two helper functions MarshalEvent > and UnmarshalEvent. > > Example: > qapi: > | { 'event':

Re: [PATCH] virtio-snd: check AUD_register_card return value

2023-11-09 Thread Michael S. Tsirkin
On Thu, Nov 09, 2023 at 04:25:04PM +, Peter Maydell wrote: > On Thu, 9 Nov 2023 at 16:21, Manos Pitsidianakis > wrote: > > > > AUD_register_card might fail. Even though errp was passed as an > > argument, the call's return value was not checked for failure. > > For whoever picks up this

[PATCH] tests/tsan: Rename the file with the entries that should be ignored

2023-11-09 Thread Thomas Huth
Let's use a better file name here. Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 4 ++-- tests/tsan/{blacklist.tsan => ignore.tsan} | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename tests/tsan/{blacklist.tsan => ignore.tsan} (57%) diff --git

Re: [PATCH] include/hw/xen: Use more inclusive language in comment

2023-11-09 Thread Daniel P . Berrangé
On Thu, Nov 09, 2023 at 06:40:34PM +0100, Thomas Huth wrote: > Let's improve the wording here. > > Signed-off-by: Thomas Huth > --- > include/hw/xen/interface/hvm/params.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |:

Re: [PATCH] hw/audio/es1370: Avoid four-letter word

2023-11-09 Thread Daniel P . Berrangé
On Thu, Nov 09, 2023 at 06:35:44PM +0100, Thomas Huth wrote: > Using certain four-letter words is not good style in source code, > so let's avoid that. > > Signed-off-by: Thomas Huth > --- > hw/audio/es1370.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Daniel P.

[PATCH v3 03/11] hw/arm/mps2: Use qdev_prop_set_array()

2023-11-09 Thread Kevin Wolf
Instead of manually setting "foo-len" and "foo[i]" properties, build a QList and use the new qdev_prop_set_array() helper to set the whole array property with a single call. Signed-off-by: Kevin Wolf Reviewed-by: Peter Maydell --- hw/arm/mps2.c | 12 1 file changed, 8

  1   2   3   4   >