Re: [PATCH] hw/char: suppress sunmouse events with no changes

2024-08-20 Thread Richard Henderson
On 8/20/24 09:18, Carl Hauser wrote: @@ -959,6 +960,15 @@ static void sunmouse_event(void *opaque, int ch; trace_escc_sunmouse_event(dx, dy, buttons_state); + +    /* Don't send duplicate events without motion */ +    if (dx == 0 && +    dy == 0 && +    (s->sunmouse_prev_stat

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Deepak Gupta
On Mon, Aug 19, 2024 at 05:01:25PM -0700, Deepak Gupta wrote: zicfiss protects shadow stack using new page table encodings PTE.W=0, PTE.R=0 and PTE.X=0. This encoding is reserved if zicfiss is not implemented or if shadow stack are not enabled. Loads on shadow stack memory are allowed while store

Re: [PULL 3/5] tests/avocado: apply proper skipUnless decorator

2024-08-20 Thread Thomas Huth
On 20/08/2024 00.31, Philippe Mathieu-Daudé wrote: On 16/8/24 09:22, Thomas Huth wrote: From: Cleber Rosa Commit 9b45cc993 added many cases of skipUnless for the sake of organizing flaky tests.  But, Python decorators *must* follow what they decorate, so the newlines added should *not* exist t

Re: [PULL 3/5] tests/avocado: apply proper skipUnless decorator

2024-08-20 Thread Thomas Huth
On 20/08/2024 10.03, Thomas Huth wrote: On 20/08/2024 00.31, Philippe Mathieu-Daudé wrote: On 16/8/24 09:22, Thomas Huth wrote: From: Cleber Rosa Commit 9b45cc993 added many cases of skipUnless for the sake of organizing flaky tests.  But, Python decorators *must* follow what they decorate, s

Re: [RFC PATCH] scripts/lsan-suppressions: Add a LeakSanitizer suppressions file

2024-08-20 Thread Peter Maydell
On Mon, 19 Aug 2024 at 23:23, Alex Bennée wrote: > > Peter Maydell writes: > > > Add a LeakSanitizer suppressions file that documents and suppresses > > known false-positive leaks in either QEMU or its dependencies. > > To use it you'll need to set > > LSAN_OPTIONS="suppressions=/path/to/script

Re: [PATCH] scripts/coccinelle: New range.cocci

2024-08-20 Thread Peter Maydell
On Thu, 25 Jul 2024 at 06:55, Yao Xingtao via wrote: > > This is the semantic patch from commit 7b3e371526 "cxl/mailbox: make > range overlap check more readable" > > Signed-off-by: Yao Xingtao > --- > scripts/coccinelle/range.cocci | 49 ++ > 1 file changed, 49 i

Re: apparent memory leak from object-add+object-del of memory-backend-ram

2024-08-20 Thread Peter Maydell
On Mon, 19 Aug 2024 at 20:07, David Hildenbrand wrote: > > On 19.08.24 18:24, Peter Maydell wrote: > > Hi; I'm looking at a memory leak apparently in the host memory backend > > code that you can see from the qmp-cmd-test. Repro instructions: > > Hi Peter, > > > > > (1) build QEMU with '--cc=clang

Re: [PATCH] .travis.yml: Install python3-tomli in all build jobs

2024-08-20 Thread Stefan Weil via
Am 24.06.24 um 12:31 schrieb Thomas Huth: On 24/06/2024 12.09, Alex Bennée wrote: Thomas Huth writes: Since commit 1f97715c83 ('Revert "python: use vendored tomli"') this package is a hard requirement for compiling QEMU, so install it now in all Travis jobs, too. AFAICT the only repo curren

Re: [PATCH v1 07/15] tcg/riscv: Implement vector mov/dup{m/i}

2024-08-20 Thread Richard Henderson
On 8/13/24 21:34, LIU Zhiwei wrote: +case TCG_TYPE_V64: +case TCG_TYPE_V128: +case TCG_TYPE_V256: +tcg_debug_assert(ret > TCG_REG_V0 && arg > TCG_REG_V0); +tcg_target_set_vec_config(s, type, prev_vece); +tcg_out_opc_vv(s, OPC_VMV_V_V, ret, TCG_REG_V0, arg, true

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Richard Henderson
On 8/20/24 17:35, Deepak Gupta wrote: +    /* If shadow stack instruction initiated this access, treat it as store */ +    if (mmu_idx & MMU_IDX_SS_WRITE) { +    access_type = MMU_DATA_STORE; +    } + I think I forgot to address this. Do you still want me to fix this up like you had suggest

Re: [PATCH v1 07/15] tcg/riscv: Implement vector mov/dup{m/i}

2024-08-20 Thread LIU Zhiwei
On 2024/8/20 17:00, Richard Henderson wrote: On 8/13/24 21:34, LIU Zhiwei wrote: +    case TCG_TYPE_V64: +    case TCG_TYPE_V128: +    case TCG_TYPE_V256: +    tcg_debug_assert(ret > TCG_REG_V0 && arg > TCG_REG_V0); +    tcg_target_set_vec_config(s, type, prev_vece); +    tcg_out_o

[PATCH] MAINTAINERS: Add myself as a reviewer of VT-d

2024-08-20 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3584d6a6c6..b12973f595 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3672,6 +3672,7 @@ VT-d Emulation M: Michael S. Tsirkin R: Jason Wang R: Yi Liu +R: C

Re: [PATCH 1/8] python/qapi: correct re.Match type hints for 3.13

2024-08-20 Thread Philippe Mathieu-Daudé
On 20/8/24 02:23, John Snow wrote: typing.Match was removed in Python 3.13, so we need to use re.Match instead. However, Python 3.8 doesn't support using re.Match as a type hint directly, so we need a conditional for now. The import is written oddly so that "Match" is explicitly re-exported for

[PATCH v4] hw/ppc: Implement -dtb support for PowerNV

2024-08-20 Thread Aditya Gupta
Currently any device tree passed with -dtb option in QEMU, was ignored by the PowerNV code. Read and pass the passed -dtb to the kernel, thus enabling easier debugging with custom DTBs. The existing behaviour when -dtb is 'not' passed, is preserved as-is. But when a '-dtb' is passed, it complete

Re: [PULL for-9.1 1/1] hw/nvme: fix leak of uninitialized memory in io_mgmt_recv

2024-08-20 Thread Philippe Mathieu-Daudé
Hi Klaus, On 20/8/24 06:45, Klaus Jensen wrote: From: Klaus Jensen Yutaro Shimizu from the Cyber Defense Institute discovered a bug in the NVMe emulation that leaks contents of an uninitialized heap buffer if subsystem and FDP emulation are enabled. Was this patch posted on the list for revi

Re: [PATCH v2 0/2] *-user: Handle short reads in mmap_h_gt_g

2024-08-20 Thread Philippe Mathieu-Daudé
On 20/8/24 07:08, Richard Henderson wrote: Richard Henderson (2): linux-user: Handle short reads in mmap_h_gt_g bsd-user: Handle short reads in mmap_h_gt_g Series: Reviewed-by: Philippe Mathieu-Daudé

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

2024-08-20 Thread Aditya Gupta
Hi, Any comments on this ? Thanks, Aditya Gupta On 31/07/24 11:20, Aditya Gupta wrote: Overview Split "Power11 support for QEMU" into 2 patch series: pseries & powernv. This patch series is for pseries support for Power11. As Power11 core is same as Power10, hence much of th

Re: [PATCH] MAINTAINERS: Add myself as a reviewer of VT-d

2024-08-20 Thread Philippe Mathieu-Daudé
On 20/8/24 11:51, CLEMENT MATHIEU--DRIF wrote: Signed-off-by: Clément Mathieu--Drif --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH-for-9.1 v3 0/2] hw/i386/pc: Fix vmport option handling

2024-08-20 Thread Philippe Mathieu-Daudé
On 17/8/24 17:24, Kamil Szczęk wrote: Kamil Szczęk (2): hw/i386/pc: Unify vmport=auto handling hw/i386/pc: Ensure vmport prerequisites are fulfilled Series merged, thanks.

Re: [PULL for-9.1 1/1] hw/nvme: fix leak of uninitialized memory in io_mgmt_recv

2024-08-20 Thread Klaus Jensen
On Aug 20 12:30, Philippe Mathieu-Daudé wrote: > Hi Klaus, > > On 20/8/24 06:45, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Yutaro Shimizu from the Cyber Defense Institute discovered a bug in the > > NVMe emulation that leaks contents of an uninitialized heap buffer if > > subsystem and

Re: [PATCH v16 00/13] Support blob memory and venus on qemu

2024-08-20 Thread Alex Bennée
Dmitry Osipenko writes: > Hello, > > This series enables Vulkan Venus context support on virtio-gpu. > > All virglrender and almost all Linux kernel prerequisite changes > needed by Venus are already in upstream. For kernel there is a pending > KVM patchset that fixes mapping of compound pages ne

Re: [PATCH v2] hw/virtio/vdpa-dev: Check returned value instead of dereferencing @errp

2024-08-20 Thread Michael S. Tsirkin
On Wed, Jul 17, 2024 at 12:26:15AM +0800, Zhao Liu wrote: > As the comment in qapi/error, dereferencing @errp requires > ERRP_GUARD(): > > * = Why, when and how to use ERRP_GUARD() = > * > * Without ERRP_GUARD(), use of the @errp parameter is restricted: > * - It must not be dereferenced, because

KVM Community Call (20/8/24) agenda items?

2024-08-20 Thread Alex Bennée
Hi, The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 20/08/2024 14:00 UTC Are there any agenda items for the sync-up? -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PULL 0/3] virtio: regression fixes

2024-08-20 Thread Michael S. Tsirkin
The following changes since commit 76277cf82f0e1123bd69ec59d22014b8f78485ec: Merge tag 'hw-misc-20240820' of https://github.com/philmd/qemu into staging (2024-08-20 09:17:41 +1000) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qem

[PULL 3/3] virtio-pci: Fix the use of an uninitialized irqfd

2024-08-20 Thread Michael S. Tsirkin
From: Cindy Lu The crash was reported in MAC OS and NixOS, here is the link for this bug https://gitlab.com/qemu-project/qemu/-/issues/2334 https://gitlab.com/qemu-project/qemu/-/issues/2321 In this bug, they are using the virtio_input device. The guest notifier was not supported for this device

[PULL 2/3] hw/audio/virtio-snd: fix invalid param check

2024-08-20 Thread Michael S. Tsirkin
From: Volker Rümelin Commit 9b6083465f ("virtio-snd: check for invalid param shift operands") tries to prevent invalid parameters specified by the guest. However, the code is not correct. Change the code so that the parameters format and rate, which are a bit numbers, are compared with the bit s

[PULL 1/3] vhost: Add VIRTIO_NET_F_RSC_EXT to vhost feature bits

2024-08-20 Thread Michael S. Tsirkin
From: Akihiko Odaki VIRTIO_NET_F_RSC_EXT is implemented in the rx data path, which vhost implements, so vhost needs to support the feature if it is ever to be enabled with vhost. The feature must be disabled otherwise. Fixes: 2974e916df87 ("virtio-net: support RSC v4/v6 tcp traffic for Windows

Re: [PULL for-9.1 0/1] hw/nvme late fix

2024-08-20 Thread Richard Henderson
On 8/20/24 14:45, Klaus Jensen wrote: From: Klaus Jensen Hi, The following changes since commit 48e4ba59a3756aad743982da16bf9b5120d91a0c: Merge tag 'pull-riscv-to-apply-20240819-1' ofhttps://github.com/alistair23/qemu into staging (2024-08-19 14:55:23 +1000) are available in the Git repos

Re: [PATCH] target/arm/helper: Fix timer interrupt masking when HCR_EL2.E2H == 0

2024-08-20 Thread Florian Lugou
> > $ aarch64-none-elf-gcc -ffreestanding -nostdlib -T > > qemu/tests/tcg/aarch64/system/kernel.ld -o test test.S > > > > $ qemu-system-aarch64 \ > > -machine virt,secure=on,gic-version=3 \ > > -cpu cortex-a57 \ > > -kernel test \ > > -display none \ > > -se

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-20 Thread David Hildenbrand
On 14.08.24 14:32, Juraj Marcin wrote: On Tue, Aug 13, 2024 at 6:37 PM Peter Maydell wrote: On Tue, 13 Aug 2024 at 16:39, Juraj Marcin wrote: Some devices need to distinguish cold start reset from waking up from a suspended state. This patch adds new value to the enum, and updates the i386

[PATCH V2 1/1] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-08-20 Thread Gao Shiyuan via
When VHOST_USER_PROTOCOL_F_HOST_NOTIFIER feature negotiated and virtio_queue_set_host_notifier_mr success on system blk device's queue, the VM can't load MBR if the notify region's address above 4GB. Assign the address of notify region in the modern bar above 4G, the vp_notify in SeaBIOS will use

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-20 Thread Peter Maydell
On Tue, 20 Aug 2024 at 12:40, David Hildenbrand wrote: > > On 14.08.24 14:32, Juraj Marcin wrote: > > On Tue, Aug 13, 2024 at 6:37 PM Peter Maydell > > wrote: > >> > >> On Tue, 13 Aug 2024 at 16:39, Juraj Marcin wrote: > >>> > >>> Some devices need to distinguish cold start reset from waking up

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-20 Thread David Hildenbrand
On 20.08.24 13:56, Peter Maydell wrote: On Tue, 20 Aug 2024 at 12:40, David Hildenbrand wrote: On 14.08.24 14:32, Juraj Marcin wrote: On Tue, Aug 13, 2024 at 6:37 PM Peter Maydell wrote: On Tue, 13 Aug 2024 at 16:39, Juraj Marcin wrote: Some devices need to distinguish cold start reset

RE: KVM Community Call (20/8/24) agenda items?

2024-08-20 Thread Brian Cain
> -Original Message- > From: Alex Bennée > Sent: Tuesday, August 20, 2024 5:59 AM > To: QEMU Developers > Cc: Alessandro Di Federico ; Alistair Francis > ; Anton Johansson ; Markus > Armbruster ; Brian Cain ; Daniel P. > Berrange ; Chao Peng ; > c...@nvidia.com; Cédric Le Goater ; c...@

RE: [PATCH v3 2/3] hw/acpi: Upgrade ACPI SPCR table to support SPCR table version 4 format

2024-08-20 Thread JeeHeng Sia
> -Original Message- > From: Sunil V L > Sent: Monday, August 19, 2024 12:10 PM > To: JeeHeng Sia > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; qemu-ri...@nongnu.org; > m...@redhat.com; imamm...@redhat.com; > anisi...@redhat.com; peter.mayd...@linaro.org; shannon.zha...@gmail.com;

[PATCH] vnc: fix crash when no console attached

2024-08-20 Thread marcandre . lureau
From: Marc-André Lureau Since commit e99441a3793b5 ("ui/curses: Do not use console_select()") qemu_text_console_put_keysym() no longer checks for NULL console argument, which leads to a later crash: Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x559ee186 in qem

Re: [PATCH] hvf: arm: Allow creating VMs with > 63GB of RAM on macOS 15+

2024-08-20 Thread Peter Maydell
On Sat, 17 Aug 2024 at 01:37, Danny Canter wrote: > > Peter, thought I’d send this little snippet before getting the rest of V2 > done in case anyone hates this :). I tried to take a similar approach to > kvm_type, > but I’m not sure if this will be looked upon favorably so want an early > opin

Re: [PATCH v1 04/10] hw/arm: xenpvh: Add support for SMP guests

2024-08-20 Thread Edgar E. Iglesias
On Sat, Aug 17, 2024 at 2:45 AM Jason Andryuk wrote: > On 2024-08-16 12:53, Stefano Stabellini wrote: > > On Fri, 16 Aug 2024, Edgar E. Iglesias wrote: > >> On Thu, Aug 15, 2024 at 2:30 AM Stefano Stabellini < > sstabell...@kernel.org> wrote: > >>On Wed, 14 Aug 2024, Edgar E. Iglesias wro

[PATCH v2 00/12] xen: pvh: Partial QOM:fication with new x86 PVH machine

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" This series breaks out parts of the ARM PVH support into an abstract machine that other targets can reuse.. There's a bit of refactoring and some bug-fixes along the way. Finally we add a new x86 xen-pvh machine. The corresponding changes in Xen for PVH x86 are work in

[PATCH v2 05/12] hw/arm: xenpvh: Remove double-negation in warning

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- hw/arm/xen_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index fda65d0d8d..16b3f00992 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -165,7 +165,7 @@ static vo

[PATCH v2 04/12] hw/arm: xenpvh: Add support for SMP guests

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add SMP support for Xen PVH ARM guests. Create ms->smp.max_cpus ioreq servers to handle hotplug. Note that ms->smp.max_cpus will be passed to us by the user (Xen tools) set to the guests maxvcpus. The value in mc->max_cpus is an absolute maximum for the -smp option and

[PATCH v2 09/12] hw/arm: xenpvh: Reverse virtio-mmio creation order

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" We've been creating the virtio-mmio devices in forwards order but since the qbus lists prepend (rather than append) entries, the virtio busses end up with decreasing base address order. Xen enables virtio-mmio nodes in forwards order so there's been a missmatch. So far,

[PATCH v2 12/12] docs/system/i386: xenpvh: Add a basic description

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini --- MAINTAINERS | 1 + docs/system/i386/xenpvh.rst | 49 + docs/system/target-i386.rst | 1 + 3 files changed, 51 insertions(+) create mode 100644 d

[PATCH v2 01/12] MAINTAINERS: Add docs/system/arm/xenpvh.rst

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias Acked-by: Stefano Stabellini --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3584d6a6c6..c2fb0c2f42 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -559,6 +559,7 @@ F: include/hw/xen/

[PATCH v2 07/12] hw/arm: xenpvh: Break out a common PVH machine

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Break out a common Xen PVH machine in preparation for adding a x86 Xen PVH machine. Signed-off-by: Edgar E. Iglesias --- hw/arm/trace-events | 5 - hw/arm/xen_arm.c| 198 +++ hw/xen/meson.build | 1 + hw

[PATCH v2 10/12] hw/xen: pvh-common: Add support for creating PCIe/GPEX

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for optionally creating a PCIe/GPEX controller. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-pvh-common.c | 76 + include/hw/xen/xen-pvh-common.h | 29 + 2 files changed, 105 insertions(+) diff --git

[PATCH v2 06/12] hw/arm: xenpvh: Move stubbed functions to xen-stubs.c

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- hw/arm/meson.build | 5 - hw/arm/xen-stubs.c | 32 hw/arm/xen_arm.c | 20 3 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 hw/arm/xen-stubs.c diff -

[PATCH v2 08/12] hw/arm: xenpvh: Rename xen_arm.c -> xen-pvh.c

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Rename xen_arm.c -> xen-pvh.c to better express that this is a PVH machine and to align with x86 HVM and future PVH machine filenames: hw/i386/xen/xen-hvm.c hw/i386/xen/xen-pvh.c (in preparation) No functional changes. Signed-off-by: Edgar E. Iglesias Reviewed-by: Ste

[PATCH v2 02/12] hw/arm: xenpvh: Update file header to use SPDX

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Update file header to use SPDX and remove stray empty comment line. No functional changes. Signed-off-by: Edgar E. Iglesias Acked-by: Stefano Stabellini --- hw/arm/xen_arm.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/hw/a

[PATCH v2 03/12] hw/arm: xenpvh: Tweak machine description

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Tweak machine description to better express that this is a Xen PVH machine for ARM. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini --- hw/arm/xen_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen

[PATCH v2 11/12] hw/i386/xen: Add a Xen PVH x86 machine

2024-08-20 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add a Xen PVH x86 machine based on the abstract PVH Machine. Signed-off-by: Edgar E. Iglesias --- hw/i386/xen/meson.build | 1 + hw/i386/xen/xen-pvh.c | 121 2 files changed, 122 insertions(+) create mode 100644 hw/i386/xe

[PATCH for-9.1?] migration/multifd: Free MultiFDRecvParams::data

2024-08-20 Thread Peter Maydell
In multifd_recv_setup() we allocate (among other things) * a MultiFDRecvData struct to multifd_recv_state::data * a MultiFDRecvData struct to each multfd_recv_state->params[i].data (Then during execution we might swap these pointers around.) But in multifd_recv_cleanup() we free multifd_recv_st

[PATCH for-9.2 0/9] tests/qtest/migration-test: Fix various leaks

2024-08-20 Thread Peter Maydell
This patchset fixes various leaks that show up if you run migration-test under the clang leak-sanitizer. Since they're all test code problems, this is 9.2 material. The one leak that was really in the QEMU code I have sent a separate patch for: https://patchew.org/QEMU/20240820144429.320176-1-peter

[PATCH for-9.2 7/9] tests/qtest/migration-helpers: Don't dup argument to qdict_put_str()

2024-08-20 Thread Peter Maydell
In migrate_set_ports() we call qdict_put_str() with a value string which we g_strdup(). However qdict_put_str() takes a copy of the value string, it doesn't take ownership of it, so the g_strdup() only results in a leak: Direct leak of 6 byte(s) in 1 object(s) allocated from: #0 0x56298023713e

[PATCH for-9.2 8/9] tests/qtest/migration-test: Don't strdup in get_dirty_rate()

2024-08-20 Thread Peter Maydell
We g_strdup() the "status" string we get out of the qdict in get_dirty_rate(), but we never free it. Since we only use this string while the dictionary is still valid, we don't need to strdup at all; drop the unnecessary call to avoid this leak: Direct leak of 18 byte(s) in 2 object(s) allocated

[PATCH for-9.2 9/9] tests/qtest/migration-test: Don't leak QTestState in test_multifd_tcp_cancel()

2024-08-20 Thread Peter Maydell
In test_multifd_tcp_cancel() we create three QEMU processes: 'from', 'to' and 'to2'. We clean up (via qtest_quit()) 'from' and 'to2' when we call test_migrate_end(), but never clean up 'to', which results in this leak: Direct leak of 336 byte(s) in 1 object(s) allocated from: #0 0x55e984fcd32

[PATCH for-9.2 2/9] tests/qtest/migration-test: Don't leak resp in multifd_mapped_ram_fdset_end()

2024-08-20 Thread Peter Maydell
In multifd_mapped_ram_fdset_end() we call qtest_qmp() but forgot to unref the response QDict we get back, which means it is leaked: Indirect leak of 4120 byte(s) in 1 object(s) allocated from: #0 0x55c0c095d318 in __interceptor_calloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/tes

[PATCH for-9.2 1/9] tests/qtest/migration-test: Fix bootfile cleanup handling

2024-08-20 Thread Peter Maydell
If you invoke the migration-test binary in such a way that it doesn't run any tests, then we never call bootfile_create(), and at the end of main() bootfile_delete() will try to unlink(NULL), which is not valid. This can happen if for instance you tell the test binary to run a subset of tests that

[PATCH for-9.2 4/9] tests/qtest/migration-helpers: Fix migrate_get_socket_address() leak

2024-08-20 Thread Peter Maydell
In migrate_get_socket_address() we leak the SocketAddressList: (cd build/asan && \ ASAN_OPTIONS="fast_unwind_on_malloc=0:strip_path_prefix=/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../" QTEST_QEMU_BINARY=./qemu-system-x86_64 \ ./tests/qtest/migration-test --tap -k -p /x86_64

[PATCH for-9.2 5/9] tests/qtest/migration-test: Free QCRyptoTLSTestCertReq objects

2024-08-20 Thread Peter Maydell
In the migration test we create several TLS certificates with the TLS_* macros from crypto-tls-x509-helpers.h. These macros create both a QCryptoTLSCertReq object which must be deinitialized and also an on-disk certificate file. The migration test currently removes the on-disk file in test_migrate_

[PATCH for-9.2 3/9] tests/qtest/migration-test: Fix leaks in calc_dirtyrate_ready()

2024-08-20 Thread Peter Maydell
In calc_dirtyrate_ready() we g_strdup() a string but then never free it: Direct leak of 19 byte(s) in 2 object(s) allocated from: #0 0x55ead613413e in malloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/tests/qtest/migration-test+0x22f13e) (BuildId: e7cd5c37b2987a1af682b43ee5240b98

[PATCH for-9.2 6/9] tests/unit/crypto-tls-x509-helpers: deinit privkey in test_tls_cleanup

2024-08-20 Thread Peter Maydell
We create a gnutls_x509_privkey_t in test_tls_init(), but forget to deinit it in test_tls_cleanup(), resulting in leaks reported in hte migration test such as: Indirect leak of 8 byte(s) in 1 object(s) allocated from: #0 0x55fa6d11c12e in malloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/bui

Re: [PATCH for-9.2 v6 03/12] hw/riscv: add RISC-V IOMMU base emulation

2024-08-20 Thread Jason Chien
Hi Daniel, On 2024/8/1 下午 11:43, Daniel Henrique Barboza wrote: From: Tomasz Jeznach The RISC-V IOMMU specification is now ratified as-per the RISC-V international process. The latest frozen specifcation can be found at: https://github.com/riscv-non-isa/riscv-iommu/releases/download/v1.0/risc

Re: [PATCH for-9.2 v6 08/12] hw/riscv/riscv-iommu: add Address Translation Cache (IOATC)

2024-08-20 Thread Jason Chien
Hi Daniel, On 2024/8/1 下午 11:43, Daniel Henrique Barboza wrote: From: Tomasz Jeznach The RISC-V IOMMU spec predicts that the IOMMU can use translation caches to hold entries from the DDT. This includes implementation for all cache commands that are marked as 'not implemented'. There are some

RE: [PATCH RFC V3 24/29] target/arm: Add support of *unrealize* ARMCPU during vCPU Hot-unplug

2024-08-20 Thread Salil Mehta via
HI Peter, > From: Peter Maydell > Sent: Monday, August 19, 2024 2:47 PM > To: Salil Mehta > > On Mon, 19 Aug 2024 at 13:58, Salil Mehta > wrote: > > > > Hi Peter, > > > > > From: Peter Maydell > > > > > > We shouldn't need to explicitly call cpu_address_space_destroy() > > > fr

Re: [PATCH for-9.1?] migration/multifd: Free MultiFDRecvParams::data

2024-08-20 Thread Fabiano Rosas
Peter Maydell writes: > In multifd_recv_setup() we allocate (among other things) > * a MultiFDRecvData struct to multifd_recv_state::data > * a MultiFDRecvData struct to each multfd_recv_state->params[i].data > > (Then during execution we might swap these pointers around.) > > But in multifd_re

Re: [PATCH for-9.1] target/i386: Fix tss access size in switch_tss_ra

2024-08-20 Thread Peter Maydell
On Mon, 19 Aug 2024 at 08:42, Richard Henderson wrote: > > The two limit_max variables represent size - 1, just like the > encoding in the GDT, thus the 'old' access was off by one. > Access the minimal size of the new tss: the complete tss contains > the iopb, which may be a larger block than the

[PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-20 Thread nabiev . arman13
From: armanincredible Signed-off-by: armanincredible --- target/ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 731dd8df35..d433fd45fc 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -621,7 +621,

Re: [PATCH for-9.1] target/i386: Fix tss access size in switch_tss_ra

2024-08-20 Thread Pierrick Bouvier
On 8/19/24 00:40, Richard Henderson wrote: The two limit_max variables represent size - 1, just like the encoding in the GDT, thus the 'old' access was off by one. Access the minimal size of the new tss: the complete tss contains the iopb, which may be a larger block than the access api expects,

[PATCH 0/1] hw/nvme: add atomic write support

2024-08-20 Thread Alan Adamson
Since there is work in the Linux NVMe Driver community to add Atomic Write support, it would be desirable to be able to test it with qemu nvme emulation. This patch will focus on supporting NVMe controller atomic write parameters (AWUN and AWUPF) but can be extended to support Namespace paramete

[PATCH 1/1] hw/nvme: add atomic write support

2024-08-20 Thread Alan Adamson
Adds support for the controller atomic parameters: AWUN and AWUPF. Atomic Compare and Write Unit (ACWU) is not currently supported. Writes that adhere to the ACWU and AWUPF parameters are guaranteed to be atomic. New NVMe QEMU Parameters (See NVMe Specification for details): atomic.dn (def

Re: [PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-20 Thread Peter Maydell
On Tue, 20 Aug 2024 at 17:03, wrote: > > From: armanincredible > > Signed-off-by: armanincredible [cc'd the ppc maintainers and list] > --- > target/ppc/machine.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/ppc/machine.c b/target/ppc/machine.c > index 731

Re: [PATCH V2 00/11] Live update: cpr-exec (reconnections)

2024-08-20 Thread Steven Sistare
On 8/13/2024 4:12 PM, Peter Xu wrote: On Wed, Aug 07, 2024 at 03:47:47PM -0400, Steven Sistare wrote: On 8/4/2024 12:10 PM, Peter Xu wrote: On Sat, Jul 20, 2024 at 05:26:07PM -0400, Steven Sistare wrote: On 7/18/2024 11:56 AM, Peter Xu wrote: [...] Lastly, there is no loss of connectivity to

Re: [RFC V1 0/6] Live update: cpr-transfer

2024-08-20 Thread Steven Sistare
On 8/16/2024 2:34 PM, Steven Sistare wrote: On 8/16/2024 11:59 AM, Peter Xu wrote: On Fri, Aug 16, 2024 at 04:36:58PM +0100, Daniel P. Berrangé wrote: On Fri, Aug 16, 2024 at 11:23:01AM -0400, Peter Xu wrote: On Fri, Aug 16, 2024 at 11:13:36AM -0400, Steven Sistare wrote: On 8/15/2024 4:28 PM

RE: [PATCH RFC V3 17/29] arm/virt: Release objects for *disabled* possible vCPUs after init

2024-08-20 Thread Salil Mehta via
> From: Gavin Shan > Sent: Tuesday, August 20, 2024 1:06 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 8/19/24 10:21 PM, Salil Mehta wrote: > >> From: Gavin Shan > >> Sent: Tuesday, August 13, 2024 2:17 AM > >> To: Sal

Re: [PATCH] hw/char: suppress sunmouse events with no changes

2024-08-20 Thread Carl Hauser
Yes, just equality, no masking needed. Boneheaded. I think I could figure out how to do the state migration if that's the direction you want to go. I don't think I could do the migration to qemu_input_handler_register, especially as I would think that the keybo

Re: [PATCH for-9.2 v3 0/6] target/sparc: emulate floating point queue when raising fp traps -- CORRECTION

2024-08-20 Thread Carl Hauser
Do you want me to submit a patch set fixing this or will you? -- Carl On 8/18/24 19:42, Richard Henderson wrote: On 8/18/24 10:03, Carl Hauser wrote: I changed translate.c:4597 from return true; to return advance_pc(dc); and it work

[PATCH v2] .gitlab-ci.d/windows.yml: Disable the qtests in the MSYS2 job

2024-08-20 Thread Thomas Huth
The qtests are broken since a while in the MSYS2 job in the gitlab-CI, likely due to some changes in the MSYS2 environment. So far nobody has neither a clue what's going wrong here, nor an idea how to fix this (in fact most QEMU developers even don't have a Windows environment available for properl

[PULL 1/1] migration/multifd: Free MultiFDRecvParams::data

2024-08-20 Thread Fabiano Rosas
From: Peter Maydell In multifd_recv_setup() we allocate (among other things) * a MultiFDRecvData struct to multifd_recv_state::data * a MultiFDRecvData struct to each multfd_recv_state->params[i].data (Then during execution we might swap these pointers around.) But in multifd_recv_cleanup() w

[PULL 0/1] Migration patches for 2024-08-20

2024-08-20 Thread Fabiano Rosas
The following changes since commit 075fd020afe3150a0e6c4b049705b358b597b65a: Merge tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu into staging (2024-08-20 16:51:15 +1000) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/migratio

[PATCH v8 1/5] docs/migration: add qatzip compression feature

2024-08-20 Thread Yichen Wang
From: Yuan Liu add Intel QATzip compression method introduction Reviewed-by: Nanhai Zou Reviewed-by: Peter Xu Signed-off-by: Yuan Liu Signed-off-by: Yichen Wang --- docs/devel/migration/features.rst | 1 + docs/devel/migration/qatzip-compression.rst | 165 2

[PATCH v8 4/5] migration: Introduce 'qatzip' compression method

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Adds support for 'qatzip' as an option for the multifd compression method parameter, and implements using QAT for 'qatzip' compression and decompression. Acked-by: Markus Armbruster Reviewed-by: Fabiano Rosas Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by

[PATCH v8 2/5] meson: Introduce 'qatzip' feature to the build system

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Add a 'qatzip' feature, which is automatically disabled, and which depends on the QATzip library if enabled. Reviewed-by: Fabiano Rosas Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by: Yichen Wang --- meson.build | 10 ++ meson_o

[PATCH v8 0/5] Implement QATzip compression method

2024-08-20 Thread Yichen Wang
v8: - Rebase changes on top of 2eefd4fcec4b8fe41ceee2a8f00cdec1fe81b75c; - Fix typo and grammars in documentation and comments; v7: - Rebase changes on top of 0173b97a219c63062972744682eba46c560fb7f3 - Added QAT memory requirement introduction in documentations; - Change the configuration options

[PATCH v8 3/5] migration: Add migration parameters for QATzip

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Adds support for migration parameters to control QATzip compression level and to enable/disable software fallback when QAT hardware is unavailable. This is a preparatory commit for a subsequent commit that will actually use QATzip compression. Acked-by: Markus Armbruster Signe

[PATCH v8 5/5] tests/migration: Add integration test for 'qatzip' compression method

2024-08-20 Thread Yichen Wang
From: Bryan Zhang Adds an integration test for 'qatzip'. Reviewed-by: Fabiano Rosas Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang Signed-off-by: Yichen Wang --- tests/qtest/migration-test.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tests/qtest/mi

RE: [PATCH RFC V3 11/29] arm/virt: Create GED dev before *disabled* CPU Objs are destroyed

2024-08-20 Thread Salil Mehta via
Hi Gavin, > From: Gavin Shan > Sent: Tuesday, August 20, 2024 1:22 AM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org; m...@redhat.com > > Hi Salil, > > On 8/19/24 10:10 PM, Salil Mehta wrote: > >> From: Gavin Shan > >> Sent: Tuesday, August 13, 2024 2:05 AM > >

[PATCH for-9.1] hw/loongarch: Fix length for lowram in ACPI SRAT

2024-08-20 Thread Jiaxun Yang
base = VIRT_HIGHMEM_BASE; gap = machine->ram_size - VIRT_LOWMEM_SIZE; --- base-commit: 075fd020afe3150a0e6c4b049705b358b597b65a change-id: 20240820-fix-numa-range-f1f0302e138d Best regards, -- Jiaxun Yang

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Deepak Gupta
On Tue, Aug 20, 2024 at 07:20:48PM +1000, Richard Henderson wrote: On 8/20/24 17:35, Deepak Gupta wrote: +    /* If shadow stack instruction initiated this access, treat it as store */ +    if (mmu_idx & MMU_IDX_SS_WRITE) { +    access_type = MMU_DATA_STORE; +    } + I think I forgot to ad

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Deepak Gupta
On Tue, Aug 20, 2024 at 11:55 AM Deepak Gupta wrote: > > On Tue, Aug 20, 2024 at 07:20:48PM +1000, Richard Henderson wrote: > >On 8/20/24 17:35, Deepak Gupta wrote: > >>>+/* If shadow stack instruction initiated this access, treat it as > >>>store */ > >>>+if (mmu_idx & MMU_IDX_SS_WRITE)

Re: [PATCH for-9.2 v3 0/6] target/sparc: emulate floating point queue when raising fp traps -- CORRECTION

2024-08-20 Thread Richard Henderson
On 8/21/24 02:59, Carl Hauser wrote: Do you want me to submit a patch set fixing this or will you? I will. r~

Re: [PATCH v5 11/15] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-20 Thread Richard Henderson
On 8/21/24 04:55, Deepak Gupta wrote: Something on the below lines? I've one question as well for you in comment. diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index fee31b8037..b4e04fe849 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -46,8 +46,14 @@ typedef struct CPUA

Re: [PULL 18/20] hw/i386/pc: Unify vmport=auto handling

2024-08-20 Thread Richard Henderson
On 8/21/24 06:32, Kamil Szczęk wrote: Also, just as a test I added a single line of code before the assert: pcms->vmport = -1; And, to my surprise, it compiled successfully without any warning and as expected, aborted on the assert: qemu-system-x86_64: ../hw/i386/pc.c:1225: pc_basic_device_in

Re: [PULL 0/3] virtio: regression fixes

2024-08-20 Thread Richard Henderson
On 8/20/24 21:01, Michael S. Tsirkin wrote: The following changes since commit 76277cf82f0e1123bd69ec59d22014b8f78485ec: Merge tag 'hw-misc-20240820' ofhttps://github.com/philmd/qemu into staging (2024-08-20 09:17:41 +1000) are available in the Git repository at: https://git.

Re: [RFC PATCH] accel/tcg: clear all TBs from a page when it is written to

2024-08-20 Thread Richard Henderson
On 8/14/24 16:09, Nicholas Piggin wrote: @@ -1107,6 +1107,9 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages, TranslationBlock *current_tb = retaddr ? tcg_tb_lookup(retaddr) : NULL; #endif /* TARGET_HAS_PRECISE_SMC */ +start &= TARGET_PAGE_MASK; +last

RE: [PATCH] scripts/coccinelle: New range.cocci

2024-08-20 Thread Xingtao Yao (Fujitsu)
> -Original Message- > From: Peter Maydell > Sent: Tuesday, August 20, 2024 4:41 PM > To: Yao, Xingtao/姚 幸涛 > Cc: qemu-devel@nongnu.org > Subject: Re: [PATCH] scripts/coccinelle: New range.cocci > > On Thu, 25 Jul 2024 at 06:55, Yao Xingtao via wrote: > > > > This is the semantic patc

Re: [PATCH v2 04/12] hw/arm: xenpvh: Add support for SMP guests

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add SMP support for Xen PVH ARM guests. > Create ms->smp.max_cpus ioreq servers to handle hotplug. > > Note that ms->smp.max_cpus will be passed to us by the > user (Xen tools) set to the guests maxvcpus. > > The valu

Re: [PATCH v2 05/12] hw/arm: xenpvh: Remove double-negation in warning

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c > index fda65

Re: [PATCH v2 06/12] hw/arm: xenpvh: Move stubbed functions to xen-stubs.c

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/arm/meson.build | 5 - > hw/arm/xen-stubs.c | 32 > hw/arm/xen_arm.c | 20 >

Re: [PATCH v2 07/12] hw/arm: xenpvh: Break out a common PVH machine

2024-08-20 Thread Stefano Stabellini
On Tue, 20 Aug 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Break out a common Xen PVH machine in preparation for > adding a x86 Xen PVH machine. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/arm/trace-events | 5 - > hw/arm

  1   2   >