Re: [PATCH] hw/audio: Fix logic error in hda audio

2023-11-20 Thread Marc-André Lureau
On Thu, Nov 16, 2023 at 1:48 PM zhouyang23 via wrote: > > Commit b7639b7dd0 introduced a logic error about mixer and nomixer. > Cause use micro_mixemu when there is no mixer in HDAAudioState, but > use micro_nomixemu wehen there has a mixer in HDAAuditState. > > Signed-off-by: zhouyang23 Reviewe

Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object

2023-11-20 Thread Cédric Le Goater
A similar issue with a fix submitted below, ccing related people. https://lists.gnu.org/archive/html/qemu-devel/2023-11/msg02937.html It looks the fix will not work for hotplug. Or below qemu cmdline may help: "-cpu host,host-phys-bits-limit=39" don't you have the same issue with legacy VFIO co

Re: [PATCH v5 00/14] tpm: introduce TPM CRB SysBus device

2023-11-20 Thread Marc-André Lureau
Hi On Tue, Nov 14, 2023 at 11:25 PM Joelle van Dyne wrote: > > On Tue, Nov 14, 2023 at 1:38 AM Marc-André Lureau > wrote: > > > > Hi > > > > On Tue, Nov 14, 2023 at 6:10 AM Joelle van Dyne wrote: > > > > > > The impetus for this patch set is to get TPM 2.0 working on Windows 11 > > > ARM64. >

Re: [PATCH v3] migration: free 'saddr' since be no longer used

2023-11-20 Thread Daniel P . Berrangé
On Mon, Nov 20, 2023 at 11:14:28AM +0800, Zongmin Zhou wrote: > Since socket_parse() will allocate memory for 'saddr',and its value > will pass to 'addr' that allocated by migrate_uri_parse(), > then 'saddr' will no longer used,need to free. > But due to 'saddr->u' is shallow copying the contents o

Re: [PATCH v6 00/21] vfio: Adopt iommufd

2023-11-20 Thread Eric Auger
Hi Zhenzhong, On 11/14/23 11:09, Zhenzhong Duan wrote: > Hi, > > Thanks all for giving guides and comments on previous series, this is > the remaining part of the iommufd support. > > Based on Cédric's suggestion, replace old config method for IOMMUFD > with Kconfig. > > Based on Jason's suggestio

Re: [PATCH v3 02/70] RAMBlock: Add support of KVM private guest memfd

2023-11-20 Thread David Hildenbrand
On 16.11.23 03:45, Xiaoyao Li wrote: On 11/16/2023 1:54 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Add KVM guest_memfd support to RAMBlock so both normal hva based memory and kvm guest memfd based private memory can be associated in one RAMBlock. Introduce new flag RAM_G

Re: [PATCH v3 0/4] virtio: Refactor vhost input stub

2023-11-20 Thread Michael S. Tsirkin
On Mon, Nov 20, 2023 at 12:37:17PM +0800, Leo Yan wrote: > This series is to refactor vhost stub vhost-user-input. I tagged this. Given we are in freeze, this will me merged after the release. To help make sure I don't lose this please ping me after the release. Thanks!

Re: [PATCH v3 02/70] RAMBlock: Add support of KVM private guest memfd

2023-11-20 Thread David Hildenbrand
uint8_t memory_region_get_dirty_log_mask(MemoryRegion *mr) { uint8_t mask = mr->dirty_log_mask; diff --git a/system/physmem.c b/system/physmem.c index fc2b0fee0188..0af2213cbd9c 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -1841,6 +1841,20 @@ static void ram_block_add(RAMBlock

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-20 Thread David Hildenbrand
... did you shamelessly copy that from hw/virtio/virtio-mem.c ? ;) Get caught. This should be factored out into a common helper. Sure, will do it in next version. Factor it out in a separate patch. Then, this patch is get small that you can just squash it into #2. And my comment rega

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-20 Thread Michael S. Tsirkin
On Sun, Nov 19, 2023 at 07:34:58PM -0600, Dan Hoffman wrote: > As far as I can tell, yes. Any optimization level above O0 does not have this > issue (on this version of Clang, at least) Aha, this is with -O0. That makes sense. We have: ;; --enable-debug) # Enable debugging options that a

Re: [PATCH v3 04/70] HostMem: Add mechanism to opt in kvm guest memfd via MachineState

2023-11-20 Thread David Hildenbrand
On 16.11.23 03:53, Xiaoyao Li wrote: On 11/16/2023 2:14 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Add a new member "require_guest_memfd" to memory backends. When it's set to true, it enables RAM_GUEST_MEMFD in ram_flags, thus private kvm guest_memfd will be allocated dur

[PATCH for-9.0] hw: Add compat machines for 9.0

2023-11-20 Thread Cornelia Huck
Add 9.0 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 17 ++--- hw/i386/pc_q35.c | 13

Re: [PATCH v3 07/70] physmem: Relax the alignment check of host_startaddr in ram_block_discard_range()

2023-11-20 Thread David Hildenbrand
On 16.11.23 03:56, Xiaoyao Li wrote: On 11/16/2023 2:20 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Commit d3a5038c461 ("exec: ram_block_discard_range") introduced ram_block_discard_range() which grabs some code from ram_discard_range(). However, during code movement, it c

Re: [PATCH RFC v2 1/2] hw/arm: Add minimal support for the STM32L4x5 SoC

2023-11-20 Thread Philippe Mathieu-Daudé
Hi Inès, On 15/11/23 08:59, ~inesvarhol wrote: From: Inès Varhol This patch adds a new STM32L4x5 SoC, it is necessary to add support for the B-L475E-IOT01A board. The implementation is derived from the STM32F405 SoC. The implementation contains no peripherals, only memory regions are implement

RE: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object

2023-11-20 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Sent: Monday, November 20, 2023 4:25 PM >Subject: Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object > > A similar issue with a fix submitted below, ccing related people. > https://lists.gnu.org/archive/html/

RE: [PATCH v6 00/21] vfio: Adopt iommufd

2023-11-20 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Monday, November 20, 2023 5:15 PM >Subject: Re: [PATCH v6 00/21] vfio: Adopt iommufd > >Hi Zhenzhong, > >On 11/14/23 11:09, Zhenzhong Duan wrote: >> Hi, >> >> Thanks all for giving guides and comments on previous series, this is >> the remaini

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread Kevin Wolf
Am 17.11.2023 um 15:23 hat BALATON Zoltan geschrieben: > On Thu, 16 Nov 2023, BALATON Zoltan wrote: > > On Thu, 16 Nov 2023, Kevin Wolf wrote: > > > Am 16.11.2023 um 11:33 hat Mark Cave-Ayland geschrieben: > > > > This series adds a simple implementation of legacy/native mode > > > > switching for

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-20 Thread Philippe Mathieu-Daudé
(Cc'ing Eric) On 20/11/23 10:28, Michael S. Tsirkin wrote: On Sun, Nov 19, 2023 at 07:34:58PM -0600, Dan Hoffman wrote: As far as I can tell, yes. Any optimization level above O0 does not have this issue (on this version of Clang, at least) Aha, this is with -O0. That makes sense. But then,

Re: [RFC PATCH] configure: don't try a "native" cross for i386

2023-11-20 Thread Paolo Bonzini
On Thu, Nov 16, 2023 at 6:28 PM Alex Bennée wrote: > > As 32 bit x86 become rarer we are starting to run into problems with > search paths. Although we switched to a Debian container we still > favour the native CC on a Bookworm host. As a result we have a broken > cross compile setup which then f

Re: [PATCH for-9.0] hw: Add compat machines for 9.0

2023-11-20 Thread Thomas Huth
On 20/11/2023 10.42, Cornelia Huck wrote: Add 9.0 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 17 +++

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, Kevin Wolf wrote: Am 17.11.2023 um 15:23 hat BALATON Zoltan geschrieben: On Thu, 16 Nov 2023, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Kevin Wolf wrote: Am 16.11.2023 um 11:33 hat Mark Cave-Ayland geschrieben: This series adds a simple implementation of legacy/native mo

Re: [PATCH v6 00/21] vfio: Adopt iommufd

2023-11-20 Thread Eric Auger
Hi Zhengzhong On 11/20/23 11:09, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Sent: Monday, November 20, 2023 5:15 PM >> Subject: Re: [PATCH v6 00/21] vfio: Adopt iommufd >> >> Hi Zhenzhong, >> >> On 11/14/23 11:09, Zhenzhong Duan wrote: >>> Hi, >>> >>> Thanks all

[PATCH] meson: -Wno-error=format-overflow for ubsan

2023-11-20 Thread Akihiko Odaki
ubsan causes wrong -Wformat-overflow warnings as follows: In file included from /usr/include/stdio.h:906, from /home/alarm/q/var/qemu/include/qemu/osdep.h:114, from ../disas/cris.c:21: In function 'sprintf', inlined from 'format_dec' at ../disas/cris.c:1737:3,

[PATCH v2] audio: Free consumed default audio devices

2023-11-20 Thread Akihiko Odaki
Failed default audio devices were removed from the list but not freed, and that made LeakSanitizer sad. Free default audio devices as they are consumed. Signed-off-by: Akihiko Odaki --- V1 -> V2: Set s->dev NULL after free (Marc-André Lureau) audio/audio.c | 5 - 1 file changed, 4 insertion

Re: [PATCH v2] audio: Free consumed default audio devices

2023-11-20 Thread Marc-André Lureau
Hi On Mon, Nov 20, 2023 at 3:29 PM Akihiko Odaki wrote: > > Failed default audio devices were removed from the list but not freed, > and that made LeakSanitizer sad. Free default audio devices as they are > consumed. > > Signed-off-by: Akihiko Odaki Acked-by: Marc-André Lureau > --- > V1 -> V

[PATCH] tests/qtest/migration-test: Fix analyze-migration.py for s390x

2023-11-20 Thread Thomas Huth
The migration stream on s390x contains data for the storage_attributes which the analyze-migration.py cannot handle yet. Add the basic code for handling this, so we can re-enable the check in the migration-test. Signed-off-by: Thomas Huth --- tests/qtest/migration-test.c | 4 +--- scripts/analy

[PATCH-for-8.2?] hw/arm/fsl-imx: Do not ignore Error argument

2023-11-20 Thread Philippe Mathieu-Daudé
Both i.MX25 and i.MX6 SoC models ignore the Error argument when setting the PHY number. Pick &error_abort which is the error used by the i.MX7 SoC (see commit 1f7197deb0 "ability to change the FEC PHY on i.MX7 processor"). Fixes: 74c1330582 ("ability to change the FEC PHY on i.MX25 processor") Fix

Re: [PATCH 00/16] hw/uefi: add uefi variable service

2023-11-20 Thread Alexander Graf
Hey Gerd! On 15.11.23 16:12, Gerd Hoffmann wrote: This patch adds a virtual device to qemu which the uefi firmware can use to store variables. This moves the UEFI variable management from privileged guest code (managing vars in pflash) to the host. Main advantage is that the need to have privi

Re: [PATCH v2] audio: Free consumed default audio devices

2023-11-20 Thread Akihiko Odaki
On 2023/11/20 20:35, Marc-André Lureau wrote: Hi On Mon, Nov 20, 2023 at 3:29 PM Akihiko Odaki wrote: Failed default audio devices were removed from the list but not freed, and that made LeakSanitizer sad. Free default audio devices as they are consumed. Signed-off-by: Akihiko Odaki Acked

[PATCH 2/2] target/riscv/cpu_helper.c: Fix mxr bit behavior

2023-11-20 Thread Ivan Klokov
According to RISCV Specification sect 9.5 on two stage translation when V=1 the vsstatus(mstatus in QEMU's terms) field MXR, which makes execute-only pages readable, only overrides VS-stage page protection. Setting MXR at HS-level(mstatus_hs), however, overrides both VS-stage and G-stage execute-on

Re: [PATCH 2/3] chardev: report blocked write to chardev backend

2023-11-20 Thread Marc-André Lureau
Hi On Thu, Nov 16, 2023 at 3:54 PM Nicholas Piggin wrote: > > If a chardev socket is not read, it will eventually fill and QEMU > can block attempting to write to it. A difficult bug in avocado > tests where the console socket was not being read from caused this > hang. > > warn if a chardev writ

[PATCH 1/2] target/riscv/cpu_helper.c: Invalid exception on MMU translation stage

2023-11-20 Thread Ivan Klokov
According to RISCV priveleged spec sect. 5.3.2 Virtual Address Translation Process access-fault exceptions may raise only after PMA/PMP check. Current implementation generates an acces-fault for mbare mode even if there were no PMA/PMP errors. This patch removes the erroneous MMU mode check and g

[PATCH 0/2] Fix mmu translation with H extension

2023-11-20 Thread Ivan Klokov
A series of patches that correct the conversion of virtual addresses to physical ones. Correct exception for mbare mode and fix MXR bit behavior with MPV\MPV bits. Ivan Klokov (2): target/riscv/cpu_helper.c: Invalid exception on MMU translation stage target/riscv/cpu_helper.c: Fix mxr bit be

Re: [PATCH] tests/qtest/migration-test: Fix analyze-migration.py for s390x

2023-11-20 Thread Fabiano Rosas
Thomas Huth writes: > The migration stream on s390x contains data for the storage_attributes > which the analyze-migration.py cannot handle yet. Add the basic code > for handling this, so we can re-enable the check in the migration-test. > > Signed-off-by: Thomas Huth Reviewed-by: Fabiano Rosas

Re: [PATCH-for-8.2 1/1] tcg/loongarch64: Fix tcg_out_mov() Aborted

2023-11-20 Thread Philippe Mathieu-Daudé
On 20/11/23 07:59, Song Gao wrote: On LoongArch host, we got an Aborted from tcg_out_mov(). qemu-x86_64 configure with '--enable-debug'. (gdb) b /home1/gaosong/code/qemu/tcg/loongarch64/tcg-target.c.inc:312 Breakpoint 1 at 0x2576f0: file /home1/gaosong/code/qemu/tcg/loongarch64/tcg-target.c.

Re: [PATCH 1/1] hw/intc/riscv_aclint:Change the way to get CPUState from hard-base to pu_index

2023-11-20 Thread Philippe Mathieu-Daudé
On 13/11/23 05:25, LeoHou wrote: On 9/11/23 23:26, Philippe Mathieu-Daudé wrote: Hi Leo, First, I can't find your patch in my mailbox, so I'm replying to Dongxue's review. On 9/11/23 03:41, Dongxue Zhang wrote: Reviewed-by: Dongxue Zhang On Thu, Nov 9, 2023 at 10:22 AM Leo Hou wrote:

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread Mark Cave-Ayland
On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode switching for PCI IDE controllers and updates the via-ide device to use it. The approach I take here is to add a new pci_ide_update_mode() func

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread Mark Cave-Ayland
On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode switching for PCI IDE controllers and updates the via-ide device to use it. The approach I take here is to add a new pci_ide_update_mode() func

Re: [PATCH for-8.2 1/3] vl: revert behaviour for -display none

2023-11-20 Thread Peter Maydell
On Fri, 17 Nov 2023 at 14:35, wrote: > > From: Marc-André Lureau > > Commit 1bec1cc0d ("ui/console: allow to override the default VC") changed > the behaviour of the "-display none" option, so that it now creates a > QEMU monitor on the terminal. "-display none" should not be tangled up > with wh

[PATCH-for-8.2?] hw/acpi/erst: Do not ignore Error* in realize handler

2023-11-20 Thread Philippe Mathieu-Daudé
erst_realizefn() calls functions which could update the 'errp' argument, but then ignores it. Use the ERRP_GUARD() macro and check *errp, as suggested in commit ae7c80a7bd ("error: New macro ERRP_GUARD()"). Cc: qemu-sta...@nongnu.org Fixes: f7e26ffa59 ("ACPI ERST: support for ACPI ERST feature") S

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode switching for PCI IDE controllers and updates the via-ide device to use it. The approach I take h

Re: [PATCH] meson: -Wno-error=format-overflow for ubsan

2023-11-20 Thread Philippe Mathieu-Daudé
Hi Akihiko, On 20/11/23 12:23, Akihiko Odaki wrote: ubsan causes wrong -Wformat-overflow warnings as follows: In file included from /usr/include/stdio.h:906, from /home/alarm/q/var/qemu/include/qemu/osdep.h:114, from ../disas/cris.c:21: In function 'sprintf',

Re: [EXTERNAL] [PATCH for-8.2 1/3] vl: revert behaviour for -display none

2023-11-20 Thread David Woodhouse
On Mon, 2023-11-20 at 12:42 +, Peter Maydell wrote: > On Fri, 17 Nov 2023 at 14:35, wrote: > > > > From: Marc-André Lureau > > > > Commit 1bec1cc0d ("ui/console: allow to override the default VC") > > changed > > the behaviour of the "-display none" option, so that it now creates > > a > >

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode switching for PCI IDE controllers and updates the via-ide device to use it. The approach I take h

[RFC-PATCH-for-8.2?] disas/cris: Pass buffer size to format_dec() to avoid overflow warning

2023-11-20 Thread Philippe Mathieu-Daudé
Propagate the buffer size to format_dec() and use snprintf(). This should silence this UBSan -Wformat-overflow warning: In file included from /usr/include/stdio.h:906, from include/qemu/osdep.h:114, from ../disas/cris.c:21: In function 'sprintf', in

Re: [PATCH V5 01/12] cpus: refactor vm_stop

2023-11-20 Thread Fabiano Rosas
Steve Sistare writes: > Refactor the vm_stop functions into one common subroutine do_vm_stop called > with options. No functional change. > > Signed-off-by: Steve Sistare > --- > system/cpus.c | 44 +--- > 1 file changed, 17 insertions(+), 27 deletions(-

Re: [PATCH] meson: -Wno-error=format-overflow for ubsan

2023-11-20 Thread Philippe Mathieu-Daudé
On 20/11/23 14:16, Philippe Mathieu-Daudé wrote: Hi Akihiko, On 20/11/23 12:23, Akihiko Odaki wrote: ubsan causes wrong -Wformat-overflow warnings as follows: In file included from /usr/include/stdio.h:906,   from /home/alarm/q/var/qemu/include/qemu/osdep.h:114,    

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, BALATON Zoltan wrote: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode switching for PCI IDE controllers and updates the via-

[PATCH] system: Use &error_abort in memory_region_init_ram_[device_]ptr()

2023-11-20 Thread Philippe Mathieu-Daudé
If an unexpected error condition happens, we have to abort (&fatal_error is meant for expected errors). Suggested-by: Paolo Bonzini Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- system/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

Re: [PATCH 2/3] chardev: report blocked write to chardev backend

2023-11-20 Thread Nicholas Piggin
On Mon Nov 20, 2023 at 10:06 PM AEST, Marc-André Lureau wrote: > Hi > > On Thu, Nov 16, 2023 at 3:54 PM Nicholas Piggin wrote: > > > > If a chardev socket is not read, it will eventually fill and QEMU > > can block attempting to write to it. A difficult bug in avocado > > tests where the console s

[PATCH RFC v2 2/2] hw/arm: Add minimal support for the B-L475E-IOT01A board

2023-11-20 Thread ~inesvarhol
From: Inès Varhol This commit adds a new B-L475E-IOT01A board using the STM32L475VG SoC. The implementation is derived from the Netduino Plus 2 machine. There are no peripherals implemented, only memory regions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Arnaud Minier Signed-off-by: I

[PATCH RFC v2 1/2] hw/arm: Add minimal support for the STM32L4x5 SoC

2023-11-20 Thread ~inesvarhol
From: Inès Varhol This patch adds a new STM32L4x5 SoC, it is necessary to add support for the B-L475E-IOT01A board. The implementation is derived from the STM32F405 SoC. The implementation contains no peripherals, only memory regions are implemented. Signed-off-by: Arnaud Minier Signed-off-by:

[PATCH RFC v2 0/2] hw/arm: Add minimal support for the B-L475E-IOT01A board

2023-11-20 Thread ~inesvarhol
This patch allows to emulate the B-L475E-IOT01A ARM Cortex-M4 board. This is RFC since the implementation isn't complete yet, there are no implemented peripherals, and it's a first contribution to QEMU. The changes from v1 follow the reviews from Philippe Mathieu-Daudé. We additionally changed the

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread Kevin Wolf
Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: > On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: > > On 19/11/2023 21:43, BALATON Zoltan wrote: > > > On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: > > > > This series adds a simple implementation of legacy/native mode > > > > switching for PCI >

Re: [PATCH] system: Use &error_abort in memory_region_init_ram_[device_]ptr()

2023-11-20 Thread David Hildenbrand
On 20.11.23 14:31, Philippe Mathieu-Daudé wrote: If an unexpected error condition happens, we have to abort (&fatal_error is meant for expected errors). Suggested-by: Paolo Bonzini Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- system/memory.c | 4 ++-- 1 file ch

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, Kevin Wolf wrote: Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode swi

Re: [RFC-PATCH-for-8.2?] disas/cris: Pass buffer size to format_dec() to avoid overflow warning

2023-11-20 Thread Akihiko Odaki
On 2023/11/20 22:22, Philippe Mathieu-Daudé wrote: Propagate the buffer size to format_dec() and use snprintf(). This should silence this UBSan -Wformat-overflow warning: In file included from /usr/include/stdio.h:906, from include/qemu/osdep.h:114, fr

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread Mark Cave-Ayland
On 20/11/2023 13:30, BALATON Zoltan wrote: On Mon, 20 Nov 2023, BALATON Zoltan wrote: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode switching

Re: [PATCH V5 02/12] cpus: stop vm in suspended state

2023-11-20 Thread Fabiano Rosas
Steve Sistare writes: > A vm in the suspended state is not completely stopped. Is this a statement of a fact about VMs in the suspended state in general or is this describing what this patch is trying to fix? > The VCPUs have been paused, but the cpu clock still runs, and runstate > notifiers

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, BALATON Zoltan wrote: On Mon, 20 Nov 2023, Kevin Wolf wrote: Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a sim

Re: [PATCH v3] migration: free 'saddr' since be no longer used

2023-11-20 Thread Peter Xu
On Mon, Nov 20, 2023 at 11:14:28AM +0800, Zongmin Zhou wrote: > Since socket_parse() will allocate memory for 'saddr',and its value > will pass to 'addr' that allocated by migrate_uri_parse(), > then 'saddr' will no longer used,need to free. > But due to 'saddr->u' is shallow copying the contents o

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread Mark Cave-Ayland
On 20/11/2023 13:42, Kevin Wolf wrote: Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple implementation of legacy/native mode sw

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-11-20 Thread Andrea Bolognani
On Fri, May 26, 2023 at 11:10:12AM +0200, Andrew Jones wrote: > On Fri, May 26, 2023 at 04:42:57AM -0400, Andrea Bolognani wrote: > > On Fri, May 26, 2023 at 10:34:36AM +0200, Andrew Jones wrote: > > > On Fri, May 26, 2023 at 03:49:11AM -0400, Andrea Bolognani wrote: > > > > So, are edk2 users the

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2023-11-20 Thread Sunil V L
On Mon, Nov 20, 2023 at 02:29:28PM +, Andrea Bolognani wrote: > On Fri, May 26, 2023 at 11:10:12AM +0200, Andrew Jones wrote: > > On Fri, May 26, 2023 at 04:42:57AM -0400, Andrea Bolognani wrote: > > > On Fri, May 26, 2023 at 10:34:36AM +0200, Andrew Jones wrote: > > > > On Fri, May 26, 2023 at

Re: [PULL 00/27] Trivial patches for 2023-11-16

2023-11-20 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 00/10] Avocado test fixes

2023-11-20 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/7] Error reporting patches for 2023-11-17

2023-11-20 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] target/xtensa fixes for v8.2

2023-11-20 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/2] hppa64 fixes

2023-11-20 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 v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 20/11/2023 13:30, BALATON Zoltan wrote: On Mon, 20 Nov 2023, BALATON Zoltan wrote: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a simple imp

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread Kevin Wolf
Am 20.11.2023 um 14:47 hat BALATON Zoltan geschrieben: > On Mon, 20 Nov 2023, Kevin Wolf wrote: > > Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: > > > On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: > > > > The only difference I can think of regarding the BAR zeroing is that the > > > > BMDM

[PATCH-for-8.2] backends/cryptodev: Do not ignore throttle/backends Errors

2023-11-20 Thread Philippe Mathieu-Daudé
Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() can set their Error** argument. Do not ignore them, return early on failure. Cc: qemu-sta...@nongnu.org Fixes: e7a775fd9f ("cryptodev: Account statistics") Fixes: 2580b452ff ("cryptodev: support QoS") Signed-off-by: Philippe M

[PATCH for-8.2] target/arm: Set IL bit for pauth, SVE access, BTI trap syndromes

2023-11-20 Thread Peter Maydell
The syndrome register value always has an IL field at bit 25, which is 0 for a trap on a 16 bit instruction, and 1 for a trap on a 32 bit instruction (or for exceptions which aren't traps on a known instruction, like PC alignment faults). This means that our syn_*() functions should always either t

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 20/11/2023 13:42, Kevin Wolf wrote: Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 19/11/2023 21:43, BALATON Zoltan wrote: On Thu, 16 Nov 2023, Mark Cave-Ayland wrote: This series adds a s

Re: [PATCH v5 00/14] tpm: introduce TPM CRB SysBus device

2023-11-20 Thread Stefan Berger
On 11/20/23 03:29, Marc-André Lureau wrote: Hi On Tue, Nov 14, 2023 at 11:25 PM Joelle van Dyne wrote: On Tue, Nov 14, 2023 at 1:38 AM Marc-André Lureau wrote: Hi On Tue, Nov 14, 2023 at 6:10 AM Joelle van Dyne wrote: The impetus for this patch set is to get TPM 2.0 working on Windo

Re: [PATCH-for-8.2] backends/cryptodev: Do not ignore throttle/backends Errors

2023-11-20 Thread Philippe Mathieu-Daudé
On 20/11/23 15:58, Philippe Mathieu-Daudé wrote: Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() can set their Error** argument. Do not ignore them, return early on failure. Cc: qemu-sta...@nongnu.org Fixes: e7a775fd9f ("cryptodev: Account statistics") Fixes: 2580b452ff (

[PATCH-for-8.2 v2] backends/cryptodev: Do not ignore throttle/backends Errors

2023-11-20 Thread Philippe Mathieu-Daudé
Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() can set their Error** argument. Do not ignore them, return early on failure. Use the ERRP_GUARD() macro as suggested in commit ae7c80a7bd ("error: New macro ERRP_GUARD()"). Cc: qemu-sta...@nongnu.org Fixes: e7a775fd9f ("crypto

[PATCH v2 10/14] testing: move arm system tests into their own folder

2023-11-20 Thread Alex Bennée
Prepare for expanding the arm system tests by cleaning up the test directory. Message-Id: <20231115205542.3092038-9-alex.ben...@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.softmmu-target | 5 ++--

[PATCH v2 08/14] docs/system: clarify limits of using gdbstub in system emulation

2023-11-20 Thread Alex Bennée
It seems some users will try and use the gdbstub to debug userspace inside a system emulation. While possible clarify the limitations of this approach and direct the users to a less head scratching way of debugging user-space. Signed-off-by: Alex Bennée Clarifies: https://gitlab.com/qemu-project/

[PATCH v2 12/14] tests/tcg: enable semiconsole test for Arm

2023-11-20 Thread Alex Bennée
This still remains a MANUAL test due to blocking issues. Signed-off-by: Alex Bennée --- tests/tcg/arm/system/semiconsole.c| 42 +++ tests/tcg/arm/Makefile.softmmu-target | 9 ++ 2 files changed, 51 insertions(+) create mode 100644 tests/tcg/arm/system/semiconsol

[PATCH v2 04/14] plugins: fix win plugin tests on cross compile

2023-11-20 Thread Alex Bennée
From: Greg Manning Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1972 Cross compile gcc is more picky about argument order than msys. Changed the meson command to take the (now renamed) libqemu_plugin_api.a as a lib, rather than an object. This puts it in the right place on both native

[PATCH v2 02/14] .gitlab-ci.d/cirrus: Upgrade macOS to 13 (Ventura)

2023-11-20 Thread Alex Bennée
From: Philippe Mathieu-Daudé macOS 14 "Sonoma" was released on September 2023 [1]. According to QEMU's support policy, we stop supporting the previous major release two years after the the new major release has been published. Replace the macOS 12 (Monterey) testing by macOS 13 (Ventura, release

[PATCH v2 07/14] docs/emulation: expand warning about semihosting

2023-11-20 Thread Alex Bennée
A surprising feature of calls like SYS_READC is this can cause QEMU to indefinitely block as there is no handling for EOF. Clarifies: https://gitlab.com/qemu-project/qemu/-/issues/1963 Signed-off-by: Alex Bennée --- docs/about/emulation.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-20 Thread BALATON Zoltan
On Mon, 20 Nov 2023, Kevin Wolf wrote: Am 20.11.2023 um 14:47 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Kevin Wolf wrote: Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: The only difference I can think of regarding the BAR zeroing

[PATCH v2 01/14] tests/docker: replace fedora-i386 with debian-i686

2023-11-20 Thread Alex Bennée
From: Daniel P. Berrangé Fedora is gradually killing off i386 packages in its repos, via a death-by-1000-cuts process. Thus Debian looks like a better long term bet for i686 build testing. It has the added advantage that we can generate it via lcitool too. Signed-off-by: Daniel P. Berrangé Revi

[PATCH v2 14/14] tests/tcg: finesse the registers check for "hidden" regs

2023-11-20 Thread Alex Bennée
The reason the ppc64 and s390x test where failing was because gdb hides them although they are still accessible via regnum. We can re-arrange the test a little bit and include these two arches in our test. We still don't explicitly fail for registers that just disappear like in the ARM case: xm

Re: [PATCH 1/1] target/arm: enable FEAT_RNG on Neoverse-N2

2023-11-20 Thread Peter Maydell
On Tue, 14 Nov 2023 at 10:34, Marcin Juszkiewicz wrote: > > I noticed that Neoverse-V1 has FEAT_RNG enabled so let enable it also on > Neoverse-N2. > > Signed-off-by: Marcin Juszkiewicz > --- > target/arm/tcg/cpu64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target

[PATCH v2 00/14] random fixes for 8.2 pre-PR (tests, plugins, docs, semihosting)

2023-11-20 Thread Alex Bennée
I've just been trying to clear some of the bugs against various subsystems. These are mostly testing changes and a minor tweak I found while checking up on semihosting behaviour. Enabling arm-softmmu check-tcg tests expands our testing abilities slightly for the 32 bit side of the family. For v2 -

[PATCH v2 11/14] tests/tcg: enable arm softmmu tests

2023-11-20 Thread Alex Bennée
To make it easier to test 32 bit Arm softmmu issues implement a basic boot.S so we can build the multiarch tests. Currently CHECK_UNALIGNED is disabled as I haven't got the right magic set for it to work. Message-Id: <20231115205542.3092038-10-alex.ben...@linaro.org> Signed-off-by: Alex Bennée -

[PATCH v2 13/14] configure: don't try a "native" cross for linux-user

2023-11-20 Thread Alex Bennée
As 32 bit x86 become rarer we are starting to run into problems with search paths. Although we switched to a Debian container we still favour the native CC on a Bookworm host. As a result we have a broken cross compile setup which then fails to build with: BUILD i386-linux-user guest-tests

[PATCH v2 06/14] tests/tcg: fixup Aarch64 semiconsole test

2023-11-20 Thread Alex Bennée
We need to ensure we squash the serial port if we want to hand craft our muxed input. As a bonus emit the example with a V=1 build to make it easier for people to figure out. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.softmmu-target | 5 +++-- 1 file changed, 3 insertions(+), 2 de

[PATCH v2 09/14] hw/core: skip loading debug on all failures

2023-11-20 Thread Alex Bennée
ELF_LOAD_FAILED is one of many negative return codes we can have. Lets treat any positive size_t as a success for loading. Message-Id: <20231115205542.3092038-8-alex.ben...@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- hw/core/loa

[PATCH v2 03/14] tests/docker: merge debian-native with debian-amd64

2023-11-20 Thread Alex Bennée
debian-native isn't really needed and suffers from the problem of tracking a distros dependencies rather than the projects. With a little surgery we can make the debian-amd64 container architecture neutral and allow people to use it to build a native QEMU. Rename it so it follows the same non-arch

Re: [PATCH v2] hw/intc/arm_gicv3: ICC_PMR_EL1 high bits should be RAZ

2023-11-20 Thread Peter Maydell
On Thu, 16 Nov 2023 at 17:28, Ben Dooks wrote: > > The ICC_PMR_ELx and ICV_PMR_ELx bit masks returned from > ic{c,v}_fullprio_mask should technically also remove any > bit above 7 as these are marked reserved (read 0) and should > therefore should not be written as anything other than 0. > > This

[PATCH v2 05/14] target/nios2: Deprecate the Nios II architecture

2023-11-20 Thread Alex Bennée
From: Philippe Mathieu-Daudé See commit 9ba1caf510 ("MAINTAINERS: Mark the Nios II CPU as orphan"), last contribution from Chris was in 2012 [1] and Marek in 2018 [2]. [1] https://lore.kernel.org/qemu-devel/1352607539-10455-2-git-send-email-crwu...@gmail.com/ [2] https://lore.kernel.org/qemu-d

Re: [PATCH for-8.2] target/arm: Fix SME FMOPA (16-bit), BFMOPA

2023-11-20 Thread Peter Maydell
On Fri, 17 Nov 2023 at 19:32, Richard Henderson wrote: > > Perform the loop increment unconditionally, not nested > within the predication. > > Cc: qemu-sta...@nongnu.org > Fixes: 3916841ac75 ("target/arm: Implement FMOPA, FMOPS (widening)") > Resolves: https://gitlab.com/qemu-project/qemu/-/issue

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-20 Thread Richard Henderson
On 11/20/23 02:20, Philippe Mathieu-Daudé wrote: (Cc'ing Eric) On 20/11/23 10:28, Michael S. Tsirkin wrote: On Sun, Nov 19, 2023 at 07:34:58PM -0600, Dan Hoffman wrote: As far as I can tell, yes. Any optimization level above O0 does not have this issue (on this version of Clang, at least) Ah

Re: [PATCH-for-8.2? v2 0/4] hw/arm/stm32xxx: Report error when incorrect CPU is used

2023-11-20 Thread Peter Maydell
On Fri, 17 Nov 2023 at 07:17, Philippe Mathieu-Daudé wrote: > > Series fully reviewed. > > Hi, > > While reviewing this [*] series from Arnaud and Inès, > I realized STM32 based boards don't check the requested > CPU type is correct, and ignore it. Possibly confusing > users. > Since these simple

Re: [Stable-8.1.3 v2 00/59] Patch Round-up for stable 8.1.3, frozen on 2023-11-19

2023-11-20 Thread Thomas Huth
On 19/11/2023 19.19, Michael Tokarev wrote: The following patches are queued for QEMU stable v8.1.3: https://gitlab.com/qemu-project/qemu/-/commits/staging-8.1 Patch freeze is 2023-11-19 (frozen), and the release is planned for 2023-11-21: https://wiki.qemu.org/Planning/8.1 Please respo

Re: [PATCH-for-8.2?] hw/arm/fsl-imx: Do not ignore Error argument

2023-11-20 Thread Peter Maydell
On Mon, 20 Nov 2023 at 11:51, Philippe Mathieu-Daudé wrote: > > Both i.MX25 and i.MX6 SoC models ignore the Error argument when > setting the PHY number. Pick &error_abort which is the error > used by the i.MX7 SoC (see commit 1f7197deb0 "ability to change > the FEC PHY on i.MX7 processor"). > > F

  1   2   3   >