Re: [PATCH 09/88] esp: update TC check logic in do_dma_pdma_cb() to check for TC == 0

2024-02-08 Thread Mark Cave-Ayland
On 01/02/2024 11:36, Paolo Bonzini wrote: Il gio 1 feb 2024, 12:25 Mark Cave-Ayland > ha scritto: On 01/02/2024 10:46, Paolo Bonzini wrote: > On Fri, Jan 12, 2024 at 1:55 PM Mark Cave-Ayland > mailto:mark.cave-ayl...@ilande.co.uk>> wrote:

[PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Kevin Wolf
'a == b ? false : true' is a rather convoluted way of writing 'a != b'. Use the more obvious way to write it. Signed-off-by: Kevin Wolf --- iothread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iothread.c b/iothread.c index 6c1fc8c856..e1e9e04736 100644 ---

[PATCH] MAINTAINERS: add Jesper as reviewer on hw/nvme

2024-02-08 Thread Klaus Jensen
: 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440 change-id: 20240208-maintainers-add-jesper-d10e88ef88ee Best regards, -- Klaus Jensen

pc-bios/optionrom can't be built anymore since 33ab4787422b04

2024-02-08 Thread Michael Tokarev
Commit v7.0.0-1454-g33ab478742 "configure: enable cross-compilation of optionrom" effectively broke building of optionroms on anything but real i386 or using newly supported cross/docker image. Before that, it was trivial to do that using native x86_64 tools. # Mac OS X ships with a broken

Re: [PATCH 13/14] migration: Use migrate_has_error() in close_return_path_on_source()

2024-02-08 Thread Fabiano Rosas
Cédric Le Goater writes: > On 2/8/24 14:07, Fabiano Rosas wrote: >> Cédric Le Goater writes: >> >>> close_return_path_on_source() retrieves the migration error from the >>> the QEMUFile '->to_dst_file' to know if a shutdown is required. This >>> shutdown is required to exit the return-path

[PATCH] hw/i386: return an error message when mb magic/pvh note could not be found

2024-02-08 Thread nathan
When using a non-linux kernel where the multiboot magic is misconfigured the following message would display: "linux kernel too old to load a ram disk". This patch instead, displays a more descriptive error message: "could not find multiboot magic or PVH ELF Note". The linux specific boot

Re: [PATCH] MAINTAINERS: add Jesper as reviewer on hw/nvme

2024-02-08 Thread Jesper Devantier
> nvme > M: Keith Busch > M: Klaus Jensen > +R: Jesper Devantier > L: qemu-bl...@nongnu.org > S: Supported > F: hw/nvme/* > > --- > base-commit: 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440 > change-id: 20240208-maintainers-add-jesper-d10e88ef88ee > > Best regards, > -- > Klaus Jensen > >

Re: [PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Peter Maydell
On Thu, 8 Feb 2024 at 14:22, Kevin Wolf wrote: > > Am 08.02.2024 um 11:48 hat Philippe Mathieu-Daudé geschrieben: > > BTW using the same pattern: > > > > -- >8 -- > > diff --git a/hw/nvram/xlnx-zynqmp-efuse.c b/hw/nvram/xlnx-zynqmp-efuse.c > > index ec98456e5d..d074762a25 100644 > > ---

[PATCH] hw/nvme: fix invalid check on mcl

2024-02-08 Thread Klaus Jensen
> ns->id_ns.mcl) { --- base-commit: 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440 change-id: 20240208-fix-copy-mcl-check-3a6d95327154 Best regards, -- Klaus Jensen

Re: [PATCH 1/2] migration/multifd: Cleanup TLS iochannel referencing

2024-02-08 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Commit a1af605bd5 ("migration/multifd: fix hangup with TLS-Multifd due to > blocking handshake") introduced a thread for TLS channels, which will > resolve the issue on blocking the main thread. However in the same commit > p->c is slightly abused

Re: [PATCH v2 7/8] mips: allow compiling out CONFIG_MIPS_ITU

2024-02-08 Thread Paolo Bonzini
On Wed, Feb 7, 2024 at 8:12 PM Philippe Mathieu-Daudé wrote: > > Hi Paolo, > > On 7/2/24 12:14, Paolo Bonzini wrote: > > itc_reconfigure() is referenced from TCG, provide a stub if needed. > > This makes it possible to build a QEMU binary that only includes > > boards without a CPS device (only

Re: [PATCH trivial] qemu-options.hx: document that tftp=dir is readonly

2024-02-08 Thread Peter Maydell
On Thu, 8 Feb 2024 at 06:02, Michael Tokarev wrote: > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1286 > Signed-off-by: Michael Tokarev > --- > qemu-options.hx | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/qemu-options.hx b/qemu-options.hx > index

Re: [PATCH 13/14] migration: Use migrate_has_error() in close_return_path_on_source()

2024-02-08 Thread Fabiano Rosas
Cédric Le Goater writes: > close_return_path_on_source() retrieves the migration error from the > the QEMUFile '->to_dst_file' to know if a shutdown is required. This > shutdown is required to exit the return-path thread. However, in > migrate_fd_cleanup(), '->to_dst_file' is cleaned up before

Re: [PATCH 1/2] migration/multifd: Cleanup TLS iochannel referencing

2024-02-08 Thread Avihai Horon
On 08/02/2024 5:51, pet...@redhat.com wrote: External email: Use caution opening links or attachments From: Peter Xu Commit a1af605bd5 ("migration/multifd: fix hangup with TLS-Multifd due to blocking handshake") introduced a thread for TLS channels, which will resolve the issue on blocking

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-08 Thread Jonathan Cameron via
On Wed, 7 Feb 2024 17:34:15 + Jonathan Cameron wrote: > On Fri, 2 Feb 2024 16:56:18 + > Peter Maydell wrote: > > > On Fri, 2 Feb 2024 at 16:50, Gregory Price > > wrote: > > > > > > On Fri, Feb 02, 2024 at 04:33:20PM +, Peter Maydell wrote: > > > > Here we are trying to take

Re: [PULL 1/1] virtio-blk: avoid using ioeventfd state in irqfd conditional

2024-02-08 Thread Kevin Wolf
Am 08.02.2024 um 06:37 hat Michael Tokarev geschrieben: > 06.02.2024 18:31, Stefan Hajnoczi : > > Requests that complete in an IOThread use irqfd to notify the guest > > while requests that complete in the main loop thread use the traditional > > qdev irq code path. The reason for this conditional

Re: [PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Laurent Vivier
Le 08/02/2024 à 11:16, Kevin Wolf a écrit : 'a == b ? false : true' is a rather convoluted way of writing 'a != b'. Use the more obvious way to write it. Signed-off-by: Kevin Wolf --- iothread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iothread.c b/iothread.c

Re: [PATCH v3 3/3] hw: Set virtio-iommu aw-bits default value on pc_q35 and arm virt

2024-02-08 Thread Cédric Le Goater
On 2/8/24 11:10, Eric Auger wrote: Currently the default input range can extend to 64 bits. On x86, when the virtio-iommu protects vfio devices, the physical iommu may support only 39 bits. Let's set the default to 39, as done for the intel-iommu. On ARM we set 48b as a default (matching SMMUv3

Re: [PATCH v3 0/4] make vm-build-freebsd fixes

2024-02-08 Thread Alex Bennée
Ilya Leoshkevich writes: > On Wed, 2024-02-07 at 15:02 +, Alex Bennée wrote: >> Ilya Leoshkevich writes: >> >> > v2: >> > https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg00890.html >> > v2 -> v3: Structure the meson check similar to have_asan_fiber; >> >   Reduce the

Re: [PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Philippe Mathieu-Daudé
On 8/2/24 11:16, Kevin Wolf wrote: 'a == b ? false : true' is a rather convoluted way of writing 'a != b'. Use the more obvious way to write it. Signed-off-by: Kevin Wolf --- iothread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iothread.c b/iothread.c index

Re: pc-bios/optionrom can't be built anymore since 33ab4787422b04

2024-02-08 Thread Michael Tokarev
08.02.2024 16:38, Michael Tokarev: Commit v7.0.0-1454-g33ab478742 "configure: enable cross-compilation of optionrom" effectively broke building of optionroms on anything but real i386 or using newly supported cross/docker image.  Before that, it was trivial to do that using native x86_64 tools.

Re: [PATCH] ui/console: Fix console resize with placeholder surface

2024-02-08 Thread Marc-André Lureau
Hi On Wed, Feb 7, 2024 at 10:38 PM Tianlan Zhou wrote: > > In `qemu_console_resize()`, the old surface of the console is keeped if the > new > console size is the same as the old one. If the old surface is a placeholder, > and the new size of console is the same as the placeholder surface

Re: [PATCH] hw/char/pl011: Add support for loopback

2024-02-08 Thread Peter Maydell
On Wed, 7 Feb 2024 at 05:03, Tong Ho wrote: > > This patch adds loopback for sent characters as well as > modem-control signals. > > Loopback of send and modem-control is often used for uart > self tests in real hardware but missing from current pl011 > model, resulting in self-test failures when

Re: [PATCH] hw/nvme: fix invalid check on mcl

2024-02-08 Thread Klaus Jensen
On Feb 8 21:33, Minwoo Im wrote: > On 24-02-08 13:22:48, Klaus Jensen wrote: > > From: Klaus Jensen > > > > The number of logical blocks within a source range is converted into a > > 1s based number at the time of parsing. However, when verifying the copy > > length we add one again, causing

Re: [PATCH 01/14] migration: Add Error** argument to .save_setup() handler

2024-02-08 Thread Cédric Le Goater
On 2/7/24 21:11, Philippe Mathieu-Daudé wrote: On 7/2/24 14:33, Cédric Le Goater wrote: The purpose is to record a potential error in the migration stream if qemu_savevm_state_setup() fails. Most of the current .save_setup() handlers can be modified to use the Error argument instead of managing

Re: [PATCH] hw/nvme: fix invalid check on mcl

2024-02-08 Thread Minwoo Im
nvme_copy_source_range_parse(iocb->ranges, idx, iocb->format, NULL, > , NULL, NULL, NULL); > -copy_len += nlb + 1; > +copy_len += nlb; > } > > if (copy_len > ns->id_ns.mcl) { > > --- > base-commit: 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440 > change-id: 20240208-fix-copy-mcl-check-3a6d95327154 > > Best regards, > -- > Klaus Jensen > >

Re: [PATCH 13/14] migration: Use migrate_has_error() in close_return_path_on_source()

2024-02-08 Thread Cédric Le Goater
On 2/8/24 14:07, Fabiano Rosas wrote: Cédric Le Goater writes: close_return_path_on_source() retrieves the migration error from the the QEMUFile '->to_dst_file' to know if a shutdown is required. This shutdown is required to exit the return-path thread. However, in migrate_fd_cleanup(),

Re: [PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Kevin Wolf
Am 08.02.2024 um 11:48 hat Philippe Mathieu-Daudé geschrieben: > On 8/2/24 11:16, Kevin Wolf wrote: > > 'a == b ? false : true' is a rather convoluted way of writing 'a != b'. > > Use the more obvious way to write it. > > > > Signed-off-by: Kevin Wolf > > --- > > iothread.c | 3 +-- > > 1

[PATCH v3 0/3] VIRTIO-IOMMU: Introduce an aw-bits option

2024-02-08 Thread Eric Auger
In [1] and [2] we attempted to fix a case where a VFIO-PCI device protected with a virtio-iommu is assigned to an x86 guest. On x86 the physical IOMMU may have an address width (gaw) of 39 or 48 bits whereas the virtio-iommu exposes a 64b input address space by default. Hence the guest may try to

[PATCH v3 3/3] hw: Set virtio-iommu aw-bits default value on pc_q35 and arm virt

2024-02-08 Thread Eric Auger
Currently the default input range can extend to 64 bits. On x86, when the virtio-iommu protects vfio devices, the physical iommu may support only 39 bits. Let's set the default to 39, as done for the intel-iommu. On ARM we set 48b as a default (matching SMMUv3 SMMU_IDR5.VAX == 0). We use

[PATCH v3 2/3] virtio-iommu: Trace domain range limits as unsigned int

2024-02-08 Thread Eric Auger
Use %u format to trace domain_range limits. Signed-off-by: Eric Auger Reviewed-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater --- hw/virtio/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index

[PATCH v3 1/3] virtio-iommu: Add an option to define the input range width

2024-02-08 Thread Eric Auger
aw-bits is a new option that allows to set the bit width of the input address range. This value will be used as a default for the device config input_range.end. By default it is set to 64 bits which is the current value. Signed-off-by: Eric Auger Reviewed-by: Zhenzhong Duan Reviewed-by: Cédric

Re: [PATCH v2 1/3] virtio-iommu: Add an option to define the input range width

2024-02-08 Thread Jean-Philippe Brucker
On Thu, Feb 08, 2024 at 09:16:35AM +0100, Eric Auger wrote: > >> diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c > >> index ec2ba11d1d..7870bdbeee 100644 > >> --- a/hw/virtio/virtio-iommu.c > >> +++ b/hw/virtio/virtio-iommu.c > >> @@ -1314,7 +1314,11 @@ static void

Re: building qemu on a system with libxkbcommon installed but not xkeyboard-config produces an core dump

2024-02-08 Thread Peter Maydell
On Tue, 6 Feb 2024 at 06:35, Zhang Wen wrote: > I'm building my own system following the Linux From Scratch package, which is > at > https://www.linuxfromscratch.org. > I accidently built libxkbcommon package but not xkeyboard-config > package, and then > while building qemu I saw this problem.

Re: [PATCH v8 2/3] hw/arm: Connect STM32L4x5 EXTI to STM32L4x5 SoC

2024-02-08 Thread Philippe Mathieu-Daudé
On 8/2/24 11:34, Inès Varhol wrote: Hi, > De: Philippe > Envoyé: mercredi 7 février 2024 23:02 CET > > Hi Inès, > > (this is now commit 52671f69f7). > > On 9/1/24 17:06, Inès Varhol wrote: > > Tested-by: Philippe Mathieu-Daudé > > Reviewed-by: Philippe Mathieu-Daudé > >

Re: [RFC PATCH 14/14] migration: Fix return-path thread exit

2024-02-08 Thread Fabiano Rosas
Cédric Le Goater writes: > In case of error, close_return_path_on_source() can perform a shutdown > to exit the return-path thread. However, in migrate_fd_cleanup(), > 'to_dst_file' is closed before calling close_return_path_on_source() > and the shutdown fails, leaving the source and

Re: [PULL 1/1] virtio-blk: avoid using ioeventfd state in irqfd conditional

2024-02-08 Thread Michael Tokarev
08.02.2024 11:42, Kevin Wolf wrote: The patch email itself was CCed to qemu-stable and even contained a note for backporting to stable: https://lists.gnu.org/archive/html/qemu-block/2024-01/msg00278.html Ahh. Yes. I'm having a large(ish) queue in stable and missed the fact I already has

Re: [PATCH v8 2/3] hw/arm: Connect STM32L4x5 EXTI to STM32L4x5 SoC

2024-02-08 Thread Inès Varhol
Hi, > De: Philippe > Envoyé: mercredi 7 février 2024 23:02 CET >  > Hi Inès, >  > (this is now commit 52671f69f7). >  > On 9/1/24 17:06, Inès Varhol wrote: > > Tested-by: Philippe Mathieu-Daudé > > Reviewed-by: Philippe Mathieu-Daudé > > Reviewed-by: Alistair Francis > >

Re: [PATCH 2/2] migration/multifd: Drop registered_yank

2024-02-08 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > With a clear definition of p->c protocol, where we only set it up if the > channel is fully established (TLS or non-TLS), registered_yank boolean will > have equal meaning of "p->c != NULL". > > Drop registered_yank by checking p->c instead. > >

Re: [PATCH v3 0/3] VIRTIO-IOMMU: Introduce an aw-bits option

2024-02-08 Thread Jean-Philippe Brucker
On Thu, Feb 08, 2024 at 11:10:16AM +0100, Eric Auger wrote: > In [1] and [2] we attempted to fix a case where a VFIO-PCI device > protected with a virtio-iommu is assigned to an x86 guest. On x86 > the physical IOMMU may have an address width (gaw) of 39 or 48 bits > whereas the virtio-iommu

Re: [PATCH 0/1] Sending small fix for NPCM GMAC test to properly test on Nuvoton 7xx

2024-02-08 Thread Peter Maydell
On Tue, 6 Feb 2024 at 23:23, Nabih Estefan wrote: > > > Nabih Estefan (1): > tests/qtest: Fixing GMAC test to run in 7xx This fails "make check". Perhaps you forgot to configure QEMU with the arm-softmmu target enabled when doing your build and test? ===

Re: [PATCH v3 0/3] VIRTIO-IOMMU: Introduce an aw-bits option

2024-02-08 Thread Eric Auger
Hi Jean, On 2/8/24 15:42, Jean-Philippe Brucker wrote: > On Thu, Feb 08, 2024 at 11:10:16AM +0100, Eric Auger wrote: >> In [1] and [2] we attempted to fix a case where a VFIO-PCI device >> protected with a virtio-iommu is assigned to an x86 guest. On x86 >> the physical IOMMU may have an address

Re: [PATCH v2 8/8] mips: do not list individual devices from configs/

2024-02-08 Thread Bernhard Beschow
Am 7. Februar 2024 13:55:51 UTC schrieb Paolo Bonzini : >Il mer 7 feb 2024, 14:18 BALATON Zoltan ha scritto: > >> > if (defaults_enabled() && object_class_by_name("pci-ohci")) { >> > pci_create_simple(pci_bus, -1, "pci-ohci"); >> > -usb_create_simple(usb_bus_find(-1),

Re: [PATCH v3 1/3] hw/i2c: core: Add reset

2024-02-08 Thread Peter Maydell
On Fri, 2 Feb 2024 at 20:48, Joe Komlodi wrote: > > It's possible for a reset to come in the middle of a transaction, which > causes the bus to be in an old state when a new transaction comes in. > > Signed-off-by: Joe Komlodi > --- > hw/i2c/core.c| 19 +++ >

Re: [RFC PATCH 0/5] QEMU v7.2.0 aarch64 Nested Virtualization Support

2024-02-08 Thread Miguel Luis
Hi Eric, > On 8 Feb 2024, at 15:55, Eric Auger wrote: > > Hi Miguel, > > On 2/27/23 17:37, Miguel Luis wrote: >> This series adds ARMv8.3/8.4 nested virtualization support in KVM mode. >> >> To enable nested virtualization for a guest, the host must expose EL2 >> support via QEMU command line

[PATCH v3 03/11] hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary

2024-02-08 Thread Philippe Mathieu-Daudé
Instead of filling an array of all the possible IRQs, only call qdev_get_gpio_in() when an IRQ is used. Remove the array from RX62NState. Doing so we avoid calling qdev_get_gpio_in() on an unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/rx/rx62n.h | 1 - hw/rx/rx62n.c

[PATCH v3 06/11] hw/misc/macio: Realize IDE controller before accessing it

2024-02-08 Thread Philippe Mathieu-Daudé
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/macio/macio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index c9f22f8515..db662a2065 100644 --- a/hw/misc/macio/macio.c

[PATCH v3 08/11] hw/sparc/sun4m: Realize DMA controller before accessing it

2024-02-08 Thread Philippe Mathieu-Daudé
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index e782c8ec7a..d52e6a7213 100644 --- a/hw/sparc/sun4m.c +++

[PATCH v3 10/11] hw/sparc/leon3: Initialize GPIO before realizing CPU devices

2024-02-08 Thread Philippe Mathieu-Daudé
Inline cpu_create() in order to call qdev_init_gpio_in_named_with_opaque() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index

[PATCH v3 04/11] hw/i386/pc_q35: Realize LPC PCI function before accessing it

2024-02-08 Thread Philippe Mathieu-Daudé
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7ca3f465e0..f67e5a55df 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@

[PATCH v3 05/11] hw/ppc/prep: Realize ISA bridge before accessing it

2024-02-08 Thread Philippe Mathieu-Daudé
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 1a6cd05c61..4eb5477069 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -278,9 +278,9 @@

Re: [PATCH v3 04/11] hw/i386/pc_q35: Realize LPC PCI function before accessing it

2024-02-08 Thread BALATON Zoltan
On Thu, 8 Feb 2024, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7ca3f465e0..f67e5a55df 100644

Re: [PATCH v3 8/9] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-02-08 Thread fan
On Wed, Jan 24, 2024 at 04:50:04PM +, Jonathan Cameron wrote: > On Tue, 7 Nov 2023 10:07:12 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Since fabric manager emulation is not supported yet, the change implements > > the functions to add/release dynamic capacity extents as

Re: [PATCH v3 2/6] util/bufferiszero: introduce an inline wrapper

2024-02-08 Thread Richard Henderson
On 2/6/24 21:13, Alexander Monakov wrote: Thank you. I agree we shouldn't penalize non-x86 hosts here, but to be honest I'd really like to keep this optimization because so many places in Qemu invoke buffer_is_zero with a constant length, allowing the compiler to optimize out the length test.

Re: [PULL v2 00/39] tcg patch queue

2024-02-08 Thread Peter Maydell
On Tue, 6 Feb 2024 at 03:22, Richard Henderson wrote: > > v2: Fix rebase error in patch 38 (tcg/s390x: Support TCG_COND_TST{EQ,NE}). > > > r~ > > > The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: > > Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru

[PATCH trivial v2] qemu-options.hx: document that tftp=dir is readonly

2024-02-08 Thread Michael Tokarev
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1286 Signed-off-by: Michael Tokarev --- v2: include suggestion by Peter. Not keeping Reviewed-by tags. qemu-options.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index

Re: [PULL 00/12] s390x, tests and misc. patches

2024-02-08 Thread Peter Maydell
On Tue, 6 Feb 2024 at 10:43, Thomas Huth wrote: > > The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: > > Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into > staging (2024-02-03 13:31:58 +) > > are available in the Git repository at: > >

Re: [PULL v3 0/3] Host Memory Backends and Memory devices queue 2024-02-06

2024-02-08 Thread Peter Maydell
On Tue, 6 Feb 2024 at 07:22, David Hildenbrand wrote: > > The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: > > Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into > staging (2024-02-03 13:31:58 +) > > are available in the Git repository at: >

Re: [PATCH v3 3/3] hw/i2c: smbus_slave: Reset state on reset

2024-02-08 Thread Peter Maydell
On Fri, 2 Feb 2024 at 20:48, Joe Komlodi wrote: > > If a reset comes while the SMBus device is not in its idle state, it's > possible for it to get confused on valid transactions post-reset. > > Signed-off-by: Joe Komlodi > --- > hw/i2c/smbus_slave.c | 9 + > 1 file changed, 9

Re: [PATCH 08/13] hw/arm/mps3r: Initial skeleton for mps3-an536 board

2024-02-08 Thread Cédric Le Goater
+/* + * The MPS3 DDR is 3GiB, but on a 32-bit host QEMU doesn't permit + * emulation of that much guest RAM, so artificially make it smaller. + */ +#if HOST_LONG_BITS == 32 +#define MPS3_DDR_SIZE (1 * GiB) +#else +#define MPS3_DDR_SIZE (3 * GiB) +#endif Generically, can we migrate a VM

Re: [RFC PATCH 0/5] QEMU v7.2.0 aarch64 Nested Virtualization Support

2024-02-08 Thread Eric Auger
Hi Miguel, On 2/8/24 18:33, Miguel Luis wrote: > Hi Eric, > >> On 8 Feb 2024, at 15:55, Eric Auger wrote: >> >> Hi Miguel, >> >> On 2/27/23 17:37, Miguel Luis wrote: >>> This series adds ARMv8.3/8.4 nested virtualization support in KVM mode. >>> >>> To enable nested virtualization for a guest,

Re: [PATCH] kvm: emit GUEST_PANICKED event in case of abnormal KVM exit

2024-02-08 Thread Andrey Drobyshev
On 1/25/24 18:36, Andrey Drobyshev wrote: > On 1/11/24 15:15, Andrey Drobyshev wrote: >> On 11/1/23 18:13, Denis V. Lunev wrote: >>> On 11/1/23 16:23, Andrey Drobyshev wrote: Currently we emit GUEST_PANICKED event in case kvm_vcpu_ioctl() returns KVM_EXIT_SYSTEM_EVENT with the event type

Re: [PATCH 01/13] disas/hppa: Add disassembly for qemu specific instructions

2024-02-08 Thread Richard Henderson
On 2/7/24 08:20, del...@kernel.org wrote: From: Helge Deller Add disassembly of opcodes for "HALT QEMU", "RESET QEMU" and "RESTORE SHR" (restore shadow registers). Signed-off-by: Helge Deller --- disas/hppa.c | 4 1 file changed, 4 insertions(+) Reviewed-by: Richard Henderson r~

[PATCH] target/arm: Don't get MDCR_EL2 in pmu_counter_enabled() before checking ARM_FEATURE_PMU

2024-02-08 Thread Peter Maydell
It doesn't make sense to read the value of MDCR_EL2 on a non-A-profile CPU, and in fact if you try to do it we will assert: #6 0x74b95e96 in __GI___assert_fail (assertion=0x565a8c70 "!arm_feature(env, ARM_FEATURE_M)", file=0x565a6e5c "../../target/arm/helper.c", line=12600,

Re: [PATCH trivial v2] qemu-options.hx: document that tftp=dir is readonly

2024-02-08 Thread Peter Maydell
On Thu, 8 Feb 2024 at 15:40, Michael Tokarev wrote: > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1286 > Signed-off-by: Michael Tokarev > --- > v2: include suggestion by Peter. >Not keeping Reviewed-by tags. > > qemu-options.hx | 2 ++ > 1 file changed, 2 insertions(+) > >

Re: [PATCH 03/14] memory: Add Error** argument to .log_global*() handlers

2024-02-08 Thread Philippe Mathieu-Daudé
Hi Cédric, On 7/2/24 14:33, Cédric Le Goater wrote: Modify memory_global_dirty_log_start() and memory_global_dirty_log_stop() to also take an Error** parameter and report the error in the callers. Aside from error reporting, there should be no functional changes. Cc: Stefano Stabellini Cc:

Re: [PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Philippe Mathieu-Daudé
On 8/2/24 15:28, Peter Maydell wrote: On Thu, 8 Feb 2024 at 14:22, Kevin Wolf wrote: Am 08.02.2024 um 11:48 hat Philippe Mathieu-Daudé geschrieben: BTW using the same pattern: -- >8 -- diff --git a/hw/nvram/xlnx-zynqmp-efuse.c b/hw/nvram/xlnx-zynqmp-efuse.c index ec98456e5d..d074762a25

Re: [PATCH v2 6/8] isa: extract FDC37M81X to a separate file

2024-02-08 Thread Bernhard Beschow
Am 7. Februar 2024 11:14:08 UTC schrieb Paolo Bonzini : >isa-superio.c currently defines a SuperIO chip that is not used >by any other user of the faile. Extract the chip to a separate file. > >Signed-off-by: Paolo Bonzini Reviewed-by: Bernhard Beschow

[PATCH V3 09/13] migration: notifier error checking

2024-02-08 Thread Steve Sistare
Check the status returned by migration notifiers and report errors. If notifiers fail, call the notifiers again so they can clean up. None of the notifiers return an error status at this time. Signed-off-by: Steve Sistare --- include/migration/misc.h | 3 ++- migration/migration.c| 40

[PATCH V3 12/13] vfio: allow cpr-reboot migration if suspended

2024-02-08 Thread Steve Sistare
Allow cpr-reboot for vfio if the guest is in the suspended runstate. The guest drivers' suspend methods flush outstanding requests and re-initialize the devices, and thus there is no device state to save and restore. The user is responsible for suspending the guest before initiating cpr, such as

[PATCH V3 05/13] migration: remove postcopy_after_devices

2024-02-08 Thread Steve Sistare
postcopy_after_devices and migration_in_postcopy_after_devices are no longer used, so delete them. Signed-off-by: Steve Sistare --- include/migration/misc.h | 1 - migration/migration.c| 7 --- migration/migration.h| 2 -- 3 files changed, 10 deletions(-) diff --git

[PATCH V3 07/13] migration: per-mode notifiers

2024-02-08 Thread Steve Sistare
Keep a separate list of migration notifiers for each migration mode. Suggested-by: Peter Xu Signed-off-by: Steve Sistare --- include/migration/misc.h | 2 ++ migration/migration.c| 22 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git

[PATCH V3 08/13] migration: refactor migrate_fd_connect failures

2024-02-08 Thread Steve Sistare
Move common code for the error path in migrate_fd_connect to a shared fail label. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- migration/migration.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/migration/migration.c

[PATCH V3 13/13] migration: update cpr-reboot description

2024-02-08 Thread Steve Sistare
Clarify qapi for cpr-reboot migration mode, and add vfio support. Signed-off-by: Steve Sistare --- qapi/migration.json | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 8197083..c83e0c0

[PATCH V3 00/13] allow cpr-reboot for vfio

2024-02-08 Thread Steve Sistare
Allow cpr-reboot for vfio if the guest is in the suspended runstate. The guest drivers' suspend methods flush outstanding requests and re-initialize the devices, and thus there is no device state to save and restore. The user is responsible for suspending the guest before initiating cpr, such as

[PATCH V3 02/13] migration: remove error from notifier data

2024-02-08 Thread Steve Sistare
Remove the error object from opaque data passed to notifiers. Use the new error parameter passed to the notifier instead. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- hw/virtio/vhost-user.c | 8 include/migration/misc.h | 1 - migration/postcopy-ram.c | 1 -

Re: [PATCH v2] target/riscv: Update $ra with current $pc in trans_cm_jalt()

2024-02-08 Thread Richard Henderson
On 2/6/24 22:18, Jason Chien wrote: The original implementation sets $pc to the address read from the jump vector table first and links $ra with the address of the next instruction after the updated $pc. After jumping to the updated $pc and executing the next ret instruction, the program jumps

Re: [PATCH 02/13] target/hppa: Add "diag 0x101" for console output support

2024-02-08 Thread Richard Henderson
On 2/7/24 08:20, del...@kernel.org wrote: @@ -484,3 +486,33 @@ uint64_t HELPER(hshradd)(uint64_t r1, uint64_t r2, uint32_t sh) } return ret; } + +/* + * diag_console_output() is a helper function used during the initial bootup + * process of the SeaBIOS-hppa firmware. During the

Re: [PATCH 04/17] migration/multifd: Set p->running = true in the right place

2024-02-08 Thread Avihai Horon
On 06/02/2024 12:25, Peter Xu wrote: External email: Use caution opening links or attachments On Tue, Jan 30, 2024 at 08:44:19PM +0200, Avihai Horon wrote: On 30/01/2024 7:57, Peter Xu wrote: External email: Use caution opening links or attachments On Mon, Jan 29, 2024 at 02:20:35PM

Re: migration-test random intermittent failure, openbsd VM

2024-02-08 Thread Fabiano Rosas
Peter Maydell writes: +cc Daniel. > Random intermittent in migration-test when running the tests > in the openbsd VM (i.e. what you get from 'make -C build vm-build-openbsd') > Any ideas? Where's your HEAD at? > > 106/847 qemu:qtest+qtest-x86_64 / qtest-x86_64/migration-test >

Re: [PATCH 09/88] esp: update TC check logic in do_dma_pdma_cb() to check for TC == 0

2024-02-08 Thread Paolo Bonzini
On Thu, Feb 8, 2024 at 10:46 AM Mark Cave-Ayland wrote: > > On 01/02/2024 11:36, Paolo Bonzini wrote: > > > Il gio 1 feb 2024, 12:25 Mark Cave-Ayland > > ha scritto: > > > > On 01/02/2024 10:46, Paolo Bonzini wrote: > > > > > On Fri, Jan 12, 2024 at

[PATCH v3 00/11] hw: Strengthen SysBus & QBus API

2024-02-08 Thread Philippe Mathieu-Daudé
Hi, This series ensure following is called *before* a device is realized: - qbus_new() - sysbus_init_mmio() - qdev_init_gpio_in_named_with_opaque() and these are called *after* it is: - sysbus_mmio_map() - sysbus_connect_irq(), - qdev_connect_gpio_out() - qdev_connect_gpio_out_named() Patches

[PATCH v3 02/11] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h'

2024-02-08 Thread Philippe Mathieu-Daudé
"qemu/units.h" is not used in the "hw/rx/rx62n.h" header, include it in the source where it is. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/rx/rx62n.h | 1 - hw/rx/rx-gdbsim.c | 1 + hw/rx/rx62n.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v3 01/11] hw/ide/ich9: Use AHCIPCIState typedef

2024-02-08 Thread Philippe Mathieu-Daudé
QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ich.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index

Re: [PATCH 08/13] hw/arm/mps3r: Initial skeleton for mps3-an536 board

2024-02-08 Thread Philippe Mathieu-Daudé
On 8/2/24 18:07, Cédric Le Goater wrote: +/* + * The MPS3 DDR is 3GiB, but on a 32-bit host QEMU doesn't permit + * emulation of that much guest RAM, so artificially make it smaller. + */ +#if HOST_LONG_BITS == 32 +#define MPS3_DDR_SIZE (1 * GiB) +#else +#define MPS3_DDR_SIZE (3 * GiB) +#endif

Re: [External] Re: [PATCH 3/6] migration/multifd: Support for zero pages transmission in multifd format.

2024-02-08 Thread Hao Xiang
On Tue, Feb 6, 2024 at 8:25 PM Peter Xu wrote: > > On Tue, Feb 06, 2024 at 11:19:05PM +, Hao Xiang wrote: > > diff --git a/migration/multifd.c b/migration/multifd.c > > index 25cbc6dc6b..a20d0ed10e 100644 > > --- a/migration/multifd.c > > +++ b/migration/multifd.c > > @@ -264,6 +264,7 @@

Re: [PATCH v3 2/3] hw/i2c/smbus_slave: Add object path on error prints

2024-02-08 Thread Peter Maydell
On Fri, 2 Feb 2024 at 20:48, Joe Komlodi wrote: > > The current logging doesn't tell us which specific smbus device is an > error state. > > Signed-off-by: Joe Komlodi > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 0/6] target/arm: assorted mte fixes

2024-02-08 Thread Peter Maydell
On Wed, 7 Feb 2024 at 02:52, Richard Henderson wrote: > > Changes for v3: > - As if /sys/devices/system/cpu/cpu/mte_tcf_preferred is "sync". > - Fix do_st_zpa as well as do_ld_zpa. Oops. > > Because of the above, I dropped Gustavo's t-b. > > > r~ > > > Richard Henderson (6): >

Re: [RFC PATCH 0/5] QEMU v7.2.0 aarch64 Nested Virtualization Support

2024-02-08 Thread Eric Auger
Hi Miguel, On 2/27/23 17:37, Miguel Luis wrote: > This series adds ARMv8.3/8.4 nested virtualization support in KVM mode. > > To enable nested virtualization for a guest, the host must expose EL2 > support via QEMU command line switches: > > -machine virt,accel=kvm,virtualization=on > >

Re: [PATCH v3 06/11] hw/misc/macio: Realize IDE controller before accessing it

2024-02-08 Thread BALATON Zoltan
On Thu, 8 Feb 2024, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/macio/macio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index

Re: [PATCH] block: allocate aligned write buffer for 'truncate -m full'

2024-02-08 Thread Andrey Drobyshev
On 1/25/24 18:46, Vladimir Sementsov-Ogievskiy wrote: > On 11.12.23 13:55, Andrey Drobyshev wrote: >> In case we're truncating an image opened with O_DIRECT, we might get >> -EINVAL on write with unaligned buffer.  In particular, when running >> iotests/298 with '-nocache' we get: >> >> qemu-io:

Re: [PATCH v2 4/8] isa: fix ISA_SUPERIO dependencies

2024-02-08 Thread Bernhard Beschow
Am 7. Februar 2024 11:14:06 UTC schrieb Paolo Bonzini : >ISA_SUPERIO does not provide an ISA bus, so it should not select the symbol: >instead it requires one. Among its users, VT82C686 is the only one that >is a PCI-ISA bridge and does not already select ISA_BUS. > >Signed-off-by: Paolo

Re: [PATCH v3 1/6] linux-user/aarch64: Choose SYNC as the preferred MTE mode

2024-02-08 Thread Peter Maydell
On Wed, 7 Feb 2024 at 20:04, Gustavo Romero wrote: > > > On 2/6/24 11:52 PM, Richard Henderson wrote: > > The API does not generate an error for setting ASYNC | SYNC; that merely > > constrains the selection vs the per-cpu default. For qemu linux-user, > > choose SYNC as the default. > > > > Cc:

Re: [PATCH] target/arm: Don't get MDCR_EL2 in pmu_counter_enabled() before checking ARM_FEATURE_PMU

2024-02-08 Thread Philippe Mathieu-Daudé
On 8/2/24 16:33, Peter Maydell wrote: It doesn't make sense to read the value of MDCR_EL2 on a non-A-profile CPU, and in fact if you try to do it we will assert: #6 0x74b95e96 in __GI___assert_fail (assertion=0x565a8c70 "!arm_feature(env, ARM_FEATURE_M)", file=0x565a6e5c

[PATCH V3 04/13] migration: MigrationEvent for notifiers

2024-02-08 Thread Steve Sistare
Passing MigrationState to notifiers is unsound because they could access unstable migration state internals or even modify the state. Instead, pass the minimal info needed in a new MigrationEvent struct, which could be extended in the future if needed. Suggested-by: Peter Xu Signed-off-by:

[PATCH V3 11/13] vfio: register container for cpr

2024-02-08 Thread Steve Sistare
Define entry points to perform per-container cpr-specific initialization and teardown. Signed-off-by: Steve Sistare --- hw/vfio/container.c | 11 ++- hw/vfio/cpr.c | 19 +++ hw/vfio/iommufd.c | 6 ++ hw/vfio/meson.build

[PATCH V3 03/13] migration: convert to NotifierWithReturn

2024-02-08 Thread Steve Sistare
Change all migration notifiers to type NotifierWithReturn, so notifiers can return an error status in a future patch. For now, pass NULL for the notifier error parameter, and do not check the return value. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- hw/net/virtio-net.c|

[PATCH V3 01/13] notify: pass error to notifier with return

2024-02-08 Thread Steve Sistare
Pass an error object as the third parameter to "notifier with return" notifiers, so clients no longer need to bundle an error object in the opaque data. The new parameter is used in a later patch. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu --- hw/virtio/vhost-user.c | 2 +-

[PATCH V3 06/13] migration: MigrationNotifyFunc

2024-02-08 Thread Steve Sistare
Define MigrationNotifyFunc to improve type safety and simplify migration notifiers. Signed-off-by: Steve Sistare --- hw/net/virtio-net.c | 4 +--- hw/vfio/migration.c | 3 +-- include/migration/misc.h | 7 ++- migration/migration.c| 4 ++-- net/vhost-vdpa.c | 6 ++

[PATCH V3 10/13] migration: stop vm for cpr

2024-02-08 Thread Steve Sistare
When migration for cpr is initiated, stop the vm and set state RUN_STATE_FINISH_MIGRATE before ram is saved. This eliminates the possibility of ram and device state being out of sync, and guarantees that a guest in the suspended state remains suspended, because qmp_cont rejects a cont command in

  1   2   >