]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
3 months agotarget/hppa: Update SeaBIOS-hppa to version 23
Helge Deller [Tue, 17 Mar 2026 19:38:54 +0000 (20:38 +0100)] 
target/hppa: Update SeaBIOS-hppa to version 23

New SeaBIOS-hppa v23 release with various fixes for qemu-v11:
- Various fixes to support CPUs with 40 and 44 bits physical address
- Fix PAT_CPU call when asking for current CPU
- Add function to stop CPU in PDC_PROC
- Prevent execution of some functions when running as PAT firmware
- Tune cache parameters to speed up cache flushes in operating systems
- Revert resetting LSI SCSI with ODE on HP3000

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
3 months agohw/hppa: Fix crash of 64-bit HP-UX 11 while flushing caches
Helge Deller [Sun, 15 Mar 2026 18:16:02 +0000 (19:16 +0100)] 
hw/hppa: Fix crash of 64-bit HP-UX 11 while flushing caches

HP-UX 11 64-bit reads at bootup a word from address CPU_HPA + 0x500
while flushing the the cache of a T600.
Add a memory handler to avoid crashing while reading this word.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
3 months agohw/pci-host/astro: Use proper region names
Helge Deller [Sun, 15 Mar 2026 18:00:00 +0000 (19:00 +0100)] 
hw/pci-host/astro: Use proper region names

All 64-bit hppa machines have at least 4 Elroy PCI busses in the system.
Make sure to use proper names in the qemu device tree, e.g. "elroy0" or
"elroy2-pci-mmio", to be able to distinguish between the various chips.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
3 months agotarget/hppa: Always map 64-bit firmware at 0xfffffff0f0000000
Helge Deller [Fri, 13 Mar 2026 18:43:09 +0000 (19:43 +0100)] 
target/hppa: Always map 64-bit firmware at 0xfffffff0f0000000

I checked on a physical A500, C3700 and C8000 machine and all load their
64-bit PDC (Firmware) at 0xfffffff0f0000000, independed if the CPU uses
40 or 44 physical address bits.
For qemu we will do the same and load the 64-bit SeaBIOS-hppa at the
same address for our emulated machines.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
3 months agohw/hppa: Adjust physical addresses of Astro and Elroy
Helge Deller [Fri, 13 Mar 2026 18:38:39 +0000 (19:38 +0100)] 
hw/hppa: Adjust physical addresses of Astro and Elroy

Adjust the addresses of the Astro and Elroy PCI chips to a
44-bit physical address space when running a PA8700 CPU.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
3 months agohw/hppa: Fix description of the HP A400-44 server
Helge Deller [Fri, 13 Mar 2026 18:34:37 +0000 (19:34 +0100)] 
hw/hppa: Fix description of the HP A400-44 server

The HP A400-44 machine has a height of 2U and is a noisy server machine
which was usually running in the datacenter.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
3 months agohw/display/tcx: Init memory regions in realize
BALATON Zoltan [Mon, 16 Mar 2026 13:06:51 +0000 (14:06 +0100)] 
hw/display/tcx: Init memory regions in realize

Thomas reported test failure:

  $ export QTEST_QEMU_BINARY=./qemu-system-sparc
  $ tests/qtest/device-introspect-test -m thorough
  ...
  # Testing device 'sun-tcx'
  RAMBlock "tcx.prom" already registered, abort!
  Broken pipe
  ../../devel/qemu/tests/qtest/libqtest.c:210: kill_qemu() detected QEMU
  death from signal 6 (Aborted) (core dumped)
  Aborted (core dumped)

Issue is the qom introspect test will create yet another sun-tcx device
causing double register of the memory region.

Fix it by removing the init method and move memory region creation in
realize.

Reported-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/3b87e6d9-a027-4dcd-a995-857e16c8b2e6@redhat.com
Fixes: 653c4fa5b0 hw/display/{cg3.tcx}: Do not use memory_region_init_rom_nomigrate
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Link: https://lore.kernel.org/r/20260316130651.5C8735968DE@zero.eik.bme.hu
[peterx: amend commit message, fix tag, add link]
Signed-off-by: Peter Xu <peterx@redhat.com>
3 months agomemory: Set mr->ram before RAM Block allocation
Xiaoyao Li [Thu, 12 Mar 2026 06:34:20 +0000 (14:34 +0800)] 
memory: Set mr->ram before RAM Block allocation

Commit 2fb627ef2f48 ("memory: Factor out common ram region initialization")
introduced a helper function memory_region_set_ram_block(), which causes
mr->ram to be set to true after the RAM Block allocation by
qemu_ram_alloc_*().

It leads to the assertion

  g_assert(memory_region_is_ram(mr));

in memory_region_set_ram_discard_manager() being triggered when creating
RAM Block with the RAM_GUEST_MEMFD flag.

Fix this by restoring the original behavior of setting mr->ram before
RAM Block allocation.

Closes: https://gitlab.com/qemu-project/qemu/-/work_items/3330
Reported-by: Farrah Chen <farrah.chen@intel.com>
Link: https://lore.kernel.org/r/df63fdf0-05ea-4de0-8009-c52703e4b052@amd.com
Reported-by: Kim Phillips <kim.phillips@amd.com>
Fixes: 2fb627ef2f48 ("memory: Factor out common ram region initialization")
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Tested-by: Kim Phillips <kim.phillips@amd.com>
Link: https://lore.kernel.org/r/20260312063420.973637-1-xiaoyao.li@intel.com
Signed-off-by: Peter Xu <peterx@redhat.com>
3 months agotarget/riscv: Support Smpmpmt extension
Jay Chang [Thu, 5 Mar 2026 03:44:29 +0000 (11:44 +0800)] 
target/riscv: Support Smpmpmt extension

The Smpmpmt extension provides a mechanism to control memory attributes
at the granularity of PMP (Physical Memory Protection) registers, similar
to how Svpbmt controls memory attributes at the page level.

Version 0.6
https://github.com/riscv/riscv-isa-manual/blob/smpmpmt/src/smpmpmt.adoc#svpbmt

Signed-off-by: Jay Chang <jay.chang@sifive.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260305034429.74739-1-jay.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agohw/riscv/riscv-iommu: Free instance_init allocations in instance_finalize
Peter Maydell [Sat, 7 Mar 2026 12:52:22 +0000 (12:52 +0000)] 
hw/riscv/riscv-iommu: Free instance_init allocations in instance_finalize

The riscv-iommu device makes various allocations in its
instance_init method. These will leak when QMP inits an
object of this type to introspect it, as can be seen if you
run 'make check' with the address sanitizer enabled:

Direct leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x5d8415b6ed9d in calloc (/home/pm215/qemu/build/san/qemu-system-riscv32+0x1832d9d) (BuildId: fedcc313e48ba803d63837329c37fd609dd50849)
    #1 0x75c0502f1771 in g_malloc0 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63771) (BuildId: 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
    #2 0x5d8416d09391 in riscv_iommu_instance_init /home/pm215/qemu/build/san/../../hw/riscv/riscv-iommu.c:2463:18
    #3 0x5d841710483f in object_initialize_with_type /home/pm215/qemu/build/san/../../qom/object.c:570:5
    #4 0x5d8417104ee9 in object_initialize /home/pm215/qemu/build/san/../../qom/object.c:578:5
    #5 0x5d8417104ee9 in object_initialize_child_with_propsv /home/pm215/qemu/build/san/../../qom/object.c:608:5
    #6 0x5d8417104db1 in object_initialize_child_with_props /home/pm215/qemu/build/san/../../qom/object.c:591:10
    #7 0x5d8417106506 in object_initialize_child_internal /home/pm215/qemu/build/san/../../qom/object.c:645:5
    #8 0x5d8416d16a12 in riscv_iommu_sys_init /home/pm215/qemu/build/san/../../hw/riscv/riscv-iommu-sys.c:199:5
    #9 0x5d841710483f in object_initialize_with_type /home/pm215/qemu/build/san/../../qom/object.c:570:5
    #10 0x5d841710661f in object_new_with_type /home/pm215/qemu/build/san/../../qom/object.c:774:5
    #11 0x5d841755d956 in qmp_device_list_properties /home/pm215/qemu/build/san/../../qom/qom-qmp-cmds.c:206:11

(and other similar backtraces).

Fix these by freeing the resources we allocate in instance_init in
instance_finalize.  In some cases we were freeing these in unrealize,
and in some cases not at all.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260307125222.3656140-1-peter.maydell@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agofpu: Fix unexpected exception flags when converting infinity to OCP E4M3
Max Chou [Thu, 26 Feb 2026 07:18:15 +0000 (15:18 +0800)] 
fpu: Fix unexpected exception flags when converting infinity to OCP E4M3

Infinity is a special case distinct from numeric overflow:
- Numeric overflow: finite value exceeds format's max normal
  -> overflow|inexact
- Infinity conversion: input is already infinite
  -> no flags

This commit fixes the unexpect exception flags by relocating the float
exception flag update flow to be outside the uncanon_e4m3_overflow.
And raising the overflow|inexact for numeric overflow in uncanon_normal.

Fixes: 27e989f99c ("fpu: Add conversion routines for OCP FP8 E4M3")
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Max Chou <max.chou@sifive.com>
Message-ID: <20260226071817.1417875-3-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agofpu: Fix repacking issues in the uncanonical step for E4M3 overflow
Max Chou [Thu, 26 Feb 2026 07:18:14 +0000 (15:18 +0800)] 
fpu: Fix repacking issues in the uncanonical step for E4M3 overflow

In the uncanonical step, the input FloatParts will be repacked to the
target FloatFmt. This commit fixes following issues after calling
uncanon_e4m3_overflow in the uncanon/uncanon_normal functions.

- Add the local exp update after calling uncanon_e4m3_overflow in the
  parts_uncanon_normal function.
- Add the fraction shift after calling uncanon_e4m3_overflow in the
  parts_uncanon function.

Fixes: 27e989f99c ("fpu: Add conversion routines for OCP FP8 E4M3")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
Message-ID: <20260226071817.1417875-2-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agohw/riscv: Remove deprecated 'riscv, delegate' device-tree property
Philippe Mathieu-Daudé [Fri, 27 Feb 2026 23:28:37 +0000 (00:28 +0100)] 
hw/riscv: Remove deprecated 'riscv, delegate' device-tree property

The "riscv,delegate" DT property was added in QEMU 7.0 as part of
the AIA APLIC support.  The property changed name during the
review process in Linux and the correct name ended up being
"riscv,delegation". The incorrect name was added as alias, and
deprecated in v9.1 (commit 38facfa8432), so can be removed for
v11.0.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Message-ID: <20260227232838.23392-1-philmd@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agohw/dma: sifive_pdma: Set done bit upon completion
Jay Chang [Wed, 4 Mar 2026 03:08:16 +0000 (11:08 +0800)] 
hw/dma: sifive_pdma: Set done bit upon completion

Ensure that the 'done' bit is set upon transfer completion, even if
an error occurs, since all transfers are considered completed regardless
of success or failure.

Signed-off-by: Jay Chang <jay.chang@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260304030816.33209-1-jay.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agoMAINTAINERS: Add myself as a reviewer for RISC-V TCG CPUs
Chao Liu [Thu, 26 Feb 2026 10:20:08 +0000 (18:20 +0800)] 
MAINTAINERS: Add myself as a reviewer for RISC-V TCG CPUs

Add myself as a reviewer for RISC-V TCG CPU related code to better
participate in patch review.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Message-ID: <20260226102008.146928-1-chao.liu.zevorn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agoMAINTAINERS: update my email
Daniel Henrique Barboza [Wed, 17 Dec 2025 19:17:26 +0000 (16:17 -0300)] 
MAINTAINERS: update my email

Also add myself as a "RISC-V TCG target" reviewer.

Signed-off-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251217191726.194767-1-daniel.barboza@oss.qualcomm.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agotarget/riscv: Fix null pointer dereference in cpu_set_exception_base
Djordje Todorovic [Thu, 15 Jan 2026 13:01:17 +0000 (13:01 +0000)] 
target/riscv: Fix null pointer dereference in cpu_set_exception_base

Add missing return statement after logging the error when cs is NULL.
Without this, the function continues to dereference the null pointer.

Resolves: Coverity CID 1644077

Signed-off-by: Djordje Todorovic <djordje.todorovic@htecgroup.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260115130110.2825796-3-djordje.todorovic@htecgroup.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agohw/riscv: Fix integer overflow in cm_base calculation
Djordje Todorovic [Thu, 15 Jan 2026 13:01:16 +0000 (13:01 +0000)] 
hw/riscv: Fix integer overflow in cm_base calculation

Ensure 64-bit arithmetic is used when computing cm_base,
avoiding potential integer overflow.

Resolves: Coverity CID 1644076

Signed-off-by: Djordje Todorovic <djordje.todorovic@htecgroup.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260115130110.2825796-2-djordje.todorovic@htecgroup.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 months agoUpdate version for v11.0.0-rc0 release v11.0.0-rc0
Peter Maydell [Wed, 18 Mar 2026 15:56:51 +0000 (15:56 +0000)] 
Update version for v11.0.0-rc0 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'pr-plugins-20260317' of https://gitlab.com/pbo-linaro/qemu into staging
Peter Maydell [Wed, 18 Mar 2026 10:12:59 +0000 (10:12 +0000)] 
Merge tag 'pr-plugins-20260317' of https://gitlab.com/pbo-linaro/qemu into staging

Changes:
- [PATCH v2 v2] plugins/api-system: Handle migrate_add_blocker() failure (Trieu Huynh <vikingtc4@gmail.com>)
Link: https://lore.kernel.org/qemu-devel/20260317134733.126584-1-vikingtc4@gmail.com
# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEZrmU7KFPfy5auggff5BUDQoc0A8FAmm5p+8ACgkQf5BUDQoc
# 0A9/RAv/TdNX7b8ah5TjRkmdh5HQDF9/bXCBCOiXndRM9wvgPfbZ+5Hm84jXWL3E
# U+NyznaPlpkUE0qomx11yVIV9kVuW5dZYCXUs2LaQqEg9ldT+r69Mt976AfM7yv4
# GkzszVFjfiQkSVllnqcM8McvTnkrS9h64ec5bv16ptyG4vrgmJ9ldsKZBz/1sXNL
# Yh16etRJTWqVOQXxRqOjS0klZh6RKQ2Tpy7T/nNHuI3ED6Gx1rBiXmRMsSkoAm5i
# GGoAoHtitu9DsnvY8XocE6C5F8es7W4gqmg37fSrbGO3AjVLwwW+sBD4a9gFE1GN
# mAJ3SvA/+ViwwzsBJZZJAHRSyJdtw3f998yC3yfZxsIWJmBb6EMIVZHn8J/UMj9D
# P68Ys4ulZgEvKjA6XMlONYYMLKTAo527qFW2qU3PX/mlqp0pw4xhxvTxu3QmutPs
# yijm1kzJ67ziOlwc/QCdf8t7nZaUIk/8HEPmwPCJ4CPhxmQxxsgHzdf4UiLNqQEy
# PlDR9z/Q
# =6Dj9
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 19:13:51 2026 GMT
# gpg:                using RSA key 66B994ECA14F7F2E5ABA081F7F90540D0A1CD00F
# gpg: Good signature from "Pierrick Bouvier <pierrick.bouvier@linaro.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 66B9 94EC A14F 7F2E 5ABA  081F 7F90 540D 0A1C D00F

* tag 'pr-plugins-20260317' of https://gitlab.com/pbo-linaro/qemu:
  plugins/api-system: Handle migrate_add_blocker() failure

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'single-binary-20260317' of https://github.com/philmd/qemu into staging
Peter Maydell [Wed, 18 Mar 2026 10:12:50 +0000 (10:12 +0000)] 
Merge tag 'single-binary-20260317' of https://github.com/philmd/qemu into staging

Few patches related to single binary effort:

- Build some stub files once
- Replace TARGET_PAGE_BITS by qemu_target_page_bits()

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmm6PhwACgkQ4+MsLN6t
# wN63yw//ddngvlvmeL1h3SlOqNYfgk/yb6f1kWj7NjeKws78Vflp0XimxI3Tm94k
# Df7kRgNr8gLFaDawiJRwb2jsd+2mAWq/v/50nc9t0k6U9dmNFVQHDSrSLSKozual
# /AZP1EtWUow44ad7QARj5ccFHwPKT8vjW1trUjKy5hOqgnnSu+VXYul7NFCskMfq
# j52yLL6sOtyjHbzuO3Ndfq67bnQnGmi+2Cu/LjLyIfPrbbm+pziXcwZk3ghJKGxo
# h33VtGewhaIOsRpv2rmxSSZQMlCKRiLBFF5K/oM/V+bZUlhEfmcrDpGx0JZvxjcc
# +XclP4wcAFLepkb+2BnogsXuU57uV+WAU/xqhn0OSqN9IAOza1b0EUBuMji7IFxY
# 3C5X7JkVC/lG1cOvchkIEkZ7bivCidyWbIMphnfoIxWDjtDKjIHT/b1GnjqEbo8n
# lI0bsNR3pDSqi4xqmE+H7yWQqTO2BFdHzRq/o3sWR8lN4lC+MoKLAXx2i824iUgA
# t9TkSLnocxiKZSip/ByWExAE3RgAxetBL16wFxlgJrLIyyGePkzMbSXprGf2El5C
# yIdULTHg0L/dFJu2EJKURLGb8RC/LCvN+oaH206lToDMAsNHqCSyhriLbJ1s+B+B
# bmppVVP3DP//Mp0Y1DJhwd+fsgXZypEzhJ/C+LIMtN0SZWkjwRc=
# =fwcr
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Mar 18 05:54:36 2026 GMT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'single-binary-20260317' of https://github.com/philmd/qemu:
  target/ppc: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
  hw/s390x/vfio: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
  hw/misc: Build 'mac_via' as common unit file
  hw/display: Build stubs once
  fsdev: Build stubs once

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'migration-20260317-pull-request' of https://gitlab.com/farosas/qemu into...
Peter Maydell [Wed, 18 Mar 2026 10:12:39 +0000 (10:12 +0000)] 
Merge tag 'migration-20260317-pull-request' of https://gitlab.com/farosas/qemu into staging

Migration/Qtest pull request

Various fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmm5muIQHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnVpBEADQYBxOt+SzHpHfv/BqJ2dx0zrJK44+wjUd
# gL8iLA7cd0/Rri2gYV1GuVEiNarC10Fg8NSNf/td2HbucDHviwkg9G84GgbjdyXl
# CWs6pseTkCk0X1W+o/fEaXB4ve1ES4RyJwCpWL+QCN3XUNuaMA7YnFB+8ksW2AuA
# lsgNU6mvXHrR8agTl77/G0R5/mVZ5lu5p9gwz09PCXk0nrWyi5j2a7rA2zLneLuk
# jBfEa5b9yX7au/DL/55wMszkA8NRqft0CabJxTZRYO5YNPXvlsJS0L3gWHWDQ9DB
# I895zk2JnagARpiu/v/eHSf+b6nnmE+huAYxv8iXTw9aOet/2aLusJidS+S5IIV4
# 7Lkomis/ch8KqnDMB+SPnW/9TplfKHHa3Jv/3ZphbOwSM6SxjcHHTtUaIvAhQeAt
# DSLBdprDcMePYxi9ugoZLkIHgJGNiWnx+egOrEMa4ShyDXmIlxcjuV4/RtjI158V
# UXK4qPw2f60+Ic+d6gUMpByEX1O2BZziL97qHLAKWYtA9mktL+mX2x6sIEkIjrQJ
# F6dJcE1yvMY6Imhz+zRcS0Dck+vafHGA0DP8t1oxMYcBKeaGrCzuS9jCBQEp10hk
# L/P2jfdgvtlLRXhcoa22Ynn2qNkJDLEAy6+xHH8thkaaYeg52NGO5wGIYe5+F766
# Cekez3u3NA==
# =7Smy
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 18:18:10 2026 GMT
# gpg:                using RSA key AA1B48B0A22326A5A4C364CFC798DC741BEC319D
# gpg:                issuer "farosas@suse.de"
# gpg: Good signature from "Fabiano Rosas <farosas@suse.de>" [unknown]
# gpg:                 aka "Fabiano Almeida Rosas <fabiano.rosas@suse.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: AA1B 48B0 A223 26A5 A4C3  64CF C798 DC74 1BEC 319D

* tag 'migration-20260317-pull-request' of https://gitlab.com/farosas/qemu:
  tests/qtest/test-hmp: Free machine options
  tests/qtest: Don't dup machine name in qtest_cb_for_every_machine callbacks
  migration: fix implicit integer division in migration_update_counters
  migration/options: Fix leaks in StrOrNull qdev accessors
  migration: assert that the same migration handler is not being added twice
  tests/qtest/migration: Force exit-on-error=false
  migration/multifd: Fix leaks of TLS error objects
  tests/qtest/migration: Fix leak in CPR exec test
  io: Fix TLS bye task leak
  tests/qtest/migration: Fix leak of migration tests data

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'for-11.0-pull-request' of https://gitlab.com/marcandre.lureau/qemu into...
Peter Maydell [Wed, 18 Mar 2026 09:17:07 +0000 (09:17 +0000)] 
Merge tag 'for-11.0-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging

Gather various audio/ui/dump patches for 11.0-rc

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmm5jPYACgkQ2ujhCXWW
# nOWsxQ/+LOVsrCjxSQTI7Iygo8ICXBKwjBXOHA9g4PHMSZDD5B+WbCXLXRPfSwkj
# y+zjJpv13pqXXNFKw0MoEz6kIRKFWYq1XbHLgkXt538QIEJ5h5tff0V8YGtk9U0H
# D2ZwUBOWH7OW4VDCFg2BCYNrnC4y2wxFG7lSm5tbeJzkAogsLRDNPf5thvHgdS+U
# oYP2g8WdXx5ZgX8/f9tvDApTPXjfg1eATLy8veSZWkgqaCL8pO5E436sVT+cPRii
# aFQpiTPms6vutOtQpWLHv6Kvffvkk0A1zrdlRrvlEhhWT3v5sBvF5hVH/iEt+LIL
# ldChBtJnzc40ujsdKHSmUV+foCnKQYuWSwzgJaxSg2Rp81yrVZ+L8nz3f8W/raPp
# 5dWr+i6e80+2nUvDL3LA6HOJGz2JtQyaRXc4BgiwePEMKT6RfFW9V4mWRp4ItlRv
# 3mWhGFjPRLEU8kOefAcT77epe1gwLdlpUH3ZjCqECZYUWNu5FjNjPQUZ1kxD3o0K
# 7TyxLrZ6OH9b3mGhum17GBF0tAI3rkErriOxzjQF3UqMsFB9+OZlzQNfQRL/NnYw
# NjmV8JMXRe2+tjxS1bfqcUanmKpxYqiDJPJaoWG08VHuhuXBydfhiOhrG61H1u3N
# yoq5kb8XZ4LiSin+smSl5a9gCa7qZ17ceAAxuuCbItCXuHZ4nsk=
# =K+XO
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 17:18:46 2026 GMT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'for-11.0-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  coreaudio: Initialize the buffer for device change
  audio: Add functions to initialize buffers
  coreaudio: Commit the result of init in the end
  coreaudio: Improve naming
  ui/surface: Avoid including epoxy/gl.h in header files
  ui/console: Remove DisplaySurface::mem_obj
  ui/console: Unify pixman-OpenGL format mapping
  dump: enhance dump_state_prepare fd initialization
  ui/gtk-egl: Ensure EGL surface is available before drawing
  ui/dbus-listener: remove dbus_filter on connection close
  ui/dbus-listener: Fix FBO leak in dbus_cursor_dmabuf
  virtio-gpu: use computed rowstride instead of deriving it from hostmem
  virtio-gpu: fix overflow check when allocating 2d image
  ui/vdagent: add migration blocker when machine version < 10.1
  rutabaga: improve error handling, fix potential crash during init
  audio/mixeng: drop some needless checks

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'pull-ppc-for-11.0-hardfreeze-20260317' of https://gitlab.com/harshpb/qemu...
Peter Maydell [Wed, 18 Mar 2026 09:16:58 +0000 (09:16 +0000)] 
Merge tag 'pull-ppc-for-11.0-hardfreeze-20260317' of https://gitlab.com/harshpb/qemu into staging

ppc queue for 11.0

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEa4EM1tK+EPOIPSFCRUTplPnWj7sFAmm5bZ4ACgkQRUTplPnW
# j7vZvQ/9HlYrlHQD3eQSEyUlVoEkR4piSh/D8sdigOOOdYhPEQZ6spluHg3OLEml
# MvDv2Uz1t8GVKzGuZ19Y18H8wOW0zbjsOa9bfbtO7Mral7LIMbBFLej391czQVQC
# NQ64Wms2B2TwjKDam8msekMkME646m5SanzgT1hGkKmIAKKSCBLwA9Na1HfxdcwQ
# 1TcDpjHBLg0x3OOmkh7V1PYyb7RSIAFRcYEkPnvgEWvIOaGubTVpB7/syb2n+cdq
# ToPy0MvoIdlPID0wFd0t7t3tRPah/ubXD4ubrOEvWLDZ40BtLiB3p1Ou+MUU6lj1
# GfPx7gjW4QG4o5aV4MmsAKxEP6K3RfJcRVjJUa3tl8oJvggS9uwvewEqHT07XBWc
# NmxdEGzgkLCUXAVZLkKjqInz5VJlHROUWpsS8bq1edK09wju1o1CR0B0WDK//Cek
# oqfZtb/6XHvmFrNnJprJvPNOWuhash1XRbL+iyfYxJJwuqIZPkQWjABeD7Fu8/aZ
# Gpw3/2V+CiWJvThe9Z/vIEw/ksl1qigdNCtdVMeO9S8pQAtORZnUvNzWN5QKaVvL
# VjxsFXhiEEn6bdoycJE0V6mfuPGaKcvE/APTDA4dT1b4du8IaUiiqGvGvVY+F1vg
# p7ZpDlJmKd48jbkXnim8YiyXZO3sUUk7tw0N/xwPvCj+56nTv64=
# =OUEg
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 15:05:02 2026 GMT
# gpg:                using RSA key 6B810CD6D2BE10F3883D21424544E994F9D68FBB
# gpg: Good signature from "Harsh Prateek Bora <harsh.prateek.bora@gmail.com>" [full]
# gpg:                 aka "Harsh Prateek Bora <harshpb@linux.ibm.com>" [full]
# Primary key fingerprint: 6B81 0CD6 D2BE 10F3 883D  2142 4544 E994 F9D6 8FBB

* tag 'pull-ppc-for-11.0-hardfreeze-20260317' of https://gitlab.com/harshpb/qemu:
  ppc/pnv: fix dumpdtb option

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'pull-block-2026-03-17' of https://gitlab.com/hreitz/qemu into staging
Peter Maydell [Wed, 18 Mar 2026 09:16:48 +0000 (09:16 +0000)] 
Merge tag 'pull-block-2026-03-17' of https://gitlab.com/hreitz/qemu into staging

Block layer patches for rc0

- Fix race condition in throttle-group code triggering an assertion
  failure
- Fix assertion failure in mirror job when issuing job-complete twice

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCgAwFiEEy2LXoO44KeRfAE00ofpA0JgBnN8FAmm5SG8SHGhyZWl0ekBy
# ZWRoYXQuY29tAAoJEKH6QNCYAZzfMvMP/0IXpGtqMmG4cHvW6KS+VDrX4AOA7ZOg
# 8TP7KhpiFPKxnTzdlSiwlbNGAndUdxA8Ef7z5SUF0kslG9N+Ry3BCG6oB3b1zHAA
# 1Irz30FWny0zlESAvLjsK6KAetGEX/ZKKiEfWjlamZSfWzLI5RK5M8x59SxSene5
# oOe3+nxPV/I2VnXI1+svD3VtPjFxNjx2aA51sUfyuQRMP1II3XUdWCSv6DSb8wAh
# QVTFYWnFK9lHejXIXVOTHas5JG30cvC9fAsIBW8mK5J4rRWJP4zfqq5SQbgg9vtm
# pv0YZS8h0X/Vj3SSbPV6abP4MecVTLvvqCr/gRc+OtHbltK4HFMl3Y29VPDO5vTY
# XCPInFv6D84CliCESx2hGUJx9APScZqH047hxlmTTYdQGO2/RQSI6mr83CoVwKBh
# AmN23A5T2Bru+3zKea8HMwi/8NVtvZUWxJfq/NQRThXtLHILPTzKR6QP2VV8ZyD0
# d4Tqk1CqwE/yitbu9xjxpE5lC3O67q/X8DsH5SYiHJZVxSxQYs4b6LirHmlQrN4F
# aW3TQ7C18re4iqqPK3rlRsgR2q0pEdTbkBqSp5I7ZPU/QKLdklKgYnjI4ZefwjGy
# cMPy94rfP7HINH6SHX6R6AhIqFmPIxr1gPE3IjdOIWEqXV5r89DJ0ehrwWogasFv
# q1Qq7HRBIgwX
# =9y5H
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 12:26:23 2026 GMT
# gpg:                using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
# gpg:                issuer "hreitz@redhat.com"
# gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00  4D34 A1FA 40D0 9801 9CDF

* tag 'pull-block-2026-03-17' of https://gitlab.com/hreitz/qemu:
  block/mirror: fix assertion failure upon duplicate complete for job using 'replaces'
  throttle-group: Fix race condition in throttle_group_restart_queue()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Peter Maydell [Wed, 18 Mar 2026 09:16:26 +0000 (09:16 +0000)] 
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* runstate: handle return code of EOPNOTSUPP properly from rebuild_guest()
* meson: do not hardcode paths to generated files
* rust: fix build when --disable-rust and meson < 1.9
* rust: suggest passing --locked to "cargo install"

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmm6YIAUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroMUCgf/W4sL/UM7+SWErMtpO5pHFu+bM15F
# 4wDq7DcGi0xD9CbjSfLy089+kDT5zhCU3/CFTWLRe78V4gEyNBAmRsb03M8NNyrw
# cw3iDoOMeHnMdhhJXIb2eZrohq9oavvvGAaOSMfH8FxMlhH+548MNQcgRLA4UgFS
# gcgYBoD7o+o4WLEgS7yCe904h3lX89wptv8ULMNLpBXxc7LFOXggwX6d1+An9pZO
# UAFW2qQnxg+OH0TIh7gH/GweGZLQsDMg39NMnJNpoRg4W91bZYZZAo1AoVMOIILE
# JPPQ73xNRAFSgao9s9+ObuLPdyxycxnSzrAZBlePvBqIbTgiCdQ1Xe7ysQ==
# =BEea
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Mar 18 08:21:20 2026 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  rust: suggest passing --locked to "cargo install"
  rust: fix build when --disable-rust and meson < 1.9
  build-sys: use the "run" variable
  runstate: handle return code of EOPNOTSUPP properly from rebuild_guest()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agorust: suggest passing --locked to "cargo install"
Paolo Bonzini [Wed, 18 Mar 2026 07:35:21 +0000 (08:35 +0100)] 
rust: suggest passing --locked to "cargo install"

Without the option, cargo will try using the latest version of the
dependencies of bindgen-cli. While it will obviously respect the
constraints in Cargo.toml, old versions of Cargo do not have
version-constrained resolution and will choke on dependencies
that need Rust 2024.

Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 months agotarget/ppc: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
Philippe Mathieu-Daudé [Fri, 13 Mar 2026 04:09:52 +0000 (05:09 +0100)] 
target/ppc: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()

Get the target page bits at runtime.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260313062055.2188-3-philmd@linaro.org>

3 months agohw/s390x/vfio: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
Philippe Mathieu-Daudé [Fri, 13 Mar 2026 05:34:33 +0000 (06:34 +0100)] 
hw/s390x/vfio: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()

Get the target page bits at runtime.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260313062055.2188-4-philmd@linaro.org>

3 months agohw/misc: Build 'mac_via' as common unit file
Philippe Mathieu-Daudé [Fri, 13 Mar 2026 04:52:08 +0000 (05:52 +0100)] 
hw/misc: Build 'mac_via' as common unit file

Nothing there is target-specific anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260313062055.2188-39-philmd@linaro.org>

3 months agohw/display: Build stubs once
Philippe Mathieu-Daudé [Tue, 24 Feb 2026 18:14:34 +0000 (19:14 +0100)] 
hw/display: Build stubs once

Move stubs to the global stub_ss[] source set. These files
are now built once for all binaries, instead of one time
per system binary.

Add pixman to qemuutil library dependencies since pixman is
transitively included, which is needed to be able to include
prototypes for stubs we declared:

  In file included from include/ui/console.h:4,
  include/ui/qemu-pixman.h:10:10: fatal error: pixman.h: No such file or directory
     10 | #include <pixman.h>
        |          ^~~~~~~~~~

On OpenBSD, opengl headers are not available in default
include path, and thus we need to add opengl to list of
qemuutil dependencies, otherwise we get:

  In file included from ../hw/display/acpi-vga-stub.c:4:
  In file included from ../hw/display/vga_int.h:28:
  In file included from include/ui/console.h:9:
  include/ui/surface.h:11:11: fatal error: 'epoxy/gl.h' file not found
  # include <epoxy/gl.h>
            ^~~~~~~~~~~~
  1 error generated.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20260225035739.42848-8-philmd@linaro.org>
Co-developed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260315070834.198331-4-pierrick.bouvier@linaro.org>

3 months agoplugins/api-system: Handle migrate_add_blocker() failure
Trieu Huynh [Tue, 17 Mar 2026 13:47:33 +0000 (22:47 +0900)] 
plugins/api-system: Handle migrate_add_blocker() failure

migrate_add_blocker() can fail (e.g. if migration is already in
progress), in which case it returns a negative value and populates
its errp argument with the reason.

The previous code ignored the return value. Pass &error_fatal so
that on failure QEMU exits cleanly with an informative error message
rather than continuing in an inconsistent state.

Resolves: CID 1645470
Signed-off-by: Trieu Huynh <vikingtc4@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260317134733.126584-1-vikingtc4@gmail.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
3 months agofsdev: Build stubs once
Philippe Mathieu-Daudé [Tue, 24 Feb 2026 16:25:35 +0000 (17:25 +0100)] 
fsdev: Build stubs once

Move stubs to the global stub_ss[] source set. These files
are now built once for all binaries, instead of one time
per system binary.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20260225035739.42848-11-philmd@linaro.org>

3 months agotests/qtest/test-hmp: Free machine options
Fabiano Rosas [Fri, 13 Mar 2026 18:29:54 +0000 (15:29 -0300)] 
tests/qtest/test-hmp: Free machine options

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260313182957.28432-3-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agotests/qtest: Don't dup machine name in qtest_cb_for_every_machine callbacks
Fabiano Rosas [Fri, 13 Mar 2026 18:29:53 +0000 (15:29 -0300)] 
tests/qtest: Don't dup machine name in qtest_cb_for_every_machine callbacks

The qtest_get_machines function caches the list of machines in a
static variable. Dup'ing the machine->name string only serves to leak
that memory when a single test is executed.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260313182957.28432-2-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agomigration: fix implicit integer division in migration_update_counters
Aadeshveer Singh [Mon, 16 Mar 2026 13:45:09 +0000 (19:15 +0530)] 
migration: fix implicit integer division in migration_update_counters

switchover_bw is a uint64_t, so switchover_bw / 1000 results in an
integer division. This value is then assigned to expected_bw_per_ms
which is of type double. This results in losing precision and is type
unsafe. Adding explicit cast ensures floating-point division.

Signed-off-by: Aadeshveer Singh <aadeshveer07@gmail.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260316134509.157964-1-aadeshveer07@gmail.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agocoreaudio: Initialize the buffer for device change
Akihiko Odaki [Wed, 4 Mar 2026 06:16:59 +0000 (15:16 +0900)] 
coreaudio: Initialize the buffer for device change

Reallocate buffers when the active device change as the required buffer
size may differ.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu>
Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260304-coreaudio-v8-6-bf1d40731e73@rsg.ci.i.u-tokyo.ac.jp>

3 months agoaudio: Add functions to initialize buffers
Akihiko Odaki [Wed, 4 Mar 2026 06:16:58 +0000 (15:16 +0900)] 
audio: Add functions to initialize buffers

These functions can be used to re-initialize buffers when hardware
parameters change due to device hotplug, for example.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260304-coreaudio-v8-5-bf1d40731e73@rsg.ci.i.u-tokyo.ac.jp>

3 months agocoreaudio: Commit the result of init in the end
Akihiko Odaki [Wed, 4 Mar 2026 06:16:57 +0000 (15:16 +0900)] 
coreaudio: Commit the result of init in the end

init_out_device may only commit some part of the result and leave the
state inconsistent when it encounters a fatal error or the device gets
unplugged during the operation, which is expressed by
kAudioHardwareBadObjectError or kAudioHardwareBadDeviceError. Commit the
result in the end of the function so that it commits the result iff it
sees no fatal error and the device remains plugged.

With this change, handle_voice_change can rely on core->outputDeviceID
to know whether the output device is initialized after calling
init_out_device.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260304-coreaudio-v8-4-bf1d40731e73@rsg.ci.i.u-tokyo.ac.jp>

3 months agocoreaudio: Improve naming
Akihiko Odaki [Wed, 4 Mar 2026 06:16:56 +0000 (15:16 +0900)] 
coreaudio: Improve naming

coreaudio had names that are not conforming to QEMU codding style.
coreaudioVoiceOut also had some members that are prefixed with redundant
words like "output" or "audio".
Global names included "out" to tell they are specific to output devices,
but this rule was not completely enforced.
The frame size had three different names "frameSize", "bufferFrameSize",
and "frameCount".

Replace identifiers to fix these problems.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260304-coreaudio-v8-3-bf1d40731e73@rsg.ci.i.u-tokyo.ac.jp>

3 months agoui/surface: Avoid including epoxy/gl.h in header files
Akihiko Odaki [Tue, 3 Mar 2026 13:08:56 +0000 (22:08 +0900)] 
ui/surface: Avoid including epoxy/gl.h in header files

include/ui/shader.h and include/ui/surface.h are included by files that
do not depend on Epoxy so they shouldn't include epoxy/gl.h. Otherwise,
compilations of these files can fail because the path to the directory
containing epoxy/gl.h may not be passed to the compiler.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260303-gl-v1-3-d90f0a237a52@rsg.ci.i.u-tokyo.ac.jp>

3 months agoui/console: Remove DisplaySurface::mem_obj
Akihiko Odaki [Tue, 3 Mar 2026 13:08:55 +0000 (22:08 +0900)] 
ui/console: Remove DisplaySurface::mem_obj

Only spice uses it so move it to spice.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260303-gl-v1-2-d90f0a237a52@rsg.ci.i.u-tokyo.ac.jp>

3 months agoui/console: Unify pixman-OpenGL format mapping
Akihiko Odaki [Tue, 3 Mar 2026 13:08:54 +0000 (22:08 +0900)] 
ui/console: Unify pixman-OpenGL format mapping

console_gl_check_format() was supposed to check if the pixman format is
supported by surface_gl_create_texture(), but it missed
PIXMAN_BE_x8r8g8b8 and PIXMAN_BE_a8r8g8b8, which are properly mapped to
OpenGL formats by surface_gl_create_texture().

Fix the discrepancy of the two functions by sharing the code to map
pixman formats to OpenGL ones.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260303-gl-v1-1-d90f0a237a52@rsg.ci.i.u-tokyo.ac.jp>

3 months agodump: enhance dump_state_prepare fd initialization
Nikolai Barybin [Thu, 11 Sep 2025 12:36:55 +0000 (15:36 +0300)] 
dump: enhance dump_state_prepare fd initialization

Initializing descriptor with zero is unsafe: during cleanup we risk to
unconditional close of fd == 0 in case dump state wasn't fully
initialized. Thus, let's init fd with -1 value and check its value
before closing it.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20250911123656.413160-2-nikolai.barybin@virtuozzo.com>

3 months agoui/gtk-egl: Ensure EGL surface is available before drawing
Dongwon Kim [Tue, 3 Mar 2026 01:11:51 +0000 (17:11 -0800)] 
ui/gtk-egl: Ensure EGL surface is available before drawing

The EGL surface and context are destroyed when a new GTK window is
created. We must ensure these are recreated and initialized before
any rendering happens in gd_egl_refresh.

Currently, the check for a pending draw is performed before the
surface initialization block. This can result in an attempt to
draw when the EGL surface (vc->gfx.esurface) is not yet available.

This patch moves the drawing check after the surface initialization
to ensure a valid surface exists before rendering in gd_egl_refresh.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260303011151.1925827-1-dongwon.kim@intel.com>

3 months agoui/dbus-listener: remove dbus_filter on connection close
Marc-André Lureau [Tue, 3 Mar 2026 16:41:12 +0000 (17:41 +0100)] 
ui/dbus-listener: remove dbus_filter on connection close

The dbus filter holds a strong reference to the DBusDisplayListener
(via GDestroyNotify) to ensure the listener remains alive while the
filter may still be running in another thread. This creates a
reference cycle (ddl -> conn -> filter -> ddl) that prevents the
listener from being freed.

Break the cycle by connecting to the connection's "closed" signal
and removing the filter when the connection closes.

Fixes: commit fa88b85dea96 ("ui/dbus: filter out pending messages when scanout")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 months agoui/dbus-listener: Fix FBO leak in dbus_cursor_dmabuf
Marc-André Lureau [Tue, 3 Mar 2026 16:36:06 +0000 (17:36 +0100)] 
ui/dbus-listener: Fix FBO leak in dbus_cursor_dmabuf

cursor_fb is a local egl_fb that gets an FBO allocated via
egl_fb_setup_for_tex but is never destroyed, leaking the
framebuffer object on every cursor update.

Add egl_fb_destroy() after the cursor data has been read.

Fixes: commit 142ca628a7 ("ui: add a D-Bus display backend")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 months agovirtio-gpu: use computed rowstride instead of deriving it from hostmem
Marc-André Lureau [Tue, 10 Mar 2026 21:26:54 +0000 (01:26 +0400)] 
virtio-gpu: use computed rowstride instead of deriving it from hostmem

Since calc_image_hostmem() already computes the stride, return it and
use it directly. This is both simpler and more correct.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-Id: <20260311-cve-v1-2-f72b4c7c1ab2@redhat.com>

3 months agovirtio-gpu: fix overflow check when allocating 2d image
Marc-André Lureau [Tue, 10 Mar 2026 21:26:53 +0000 (01:26 +0400)] 
virtio-gpu: fix overflow check when allocating 2d image

The calc_image_hostmem() comment says pixman_image_create_bits() checks
for overflow. However, this relied on the facts that "bits" was NULL and
it performed it when it was introduced. Since commit 9462ff4695aa, the
"bits" argument can be provided and the check is no longer applied.

Promotes the computation to uint64_t and adds an explicit overflow check
to avoid potential later OOB read/write on the image data.

Fixes: CVE-2026-3886
Fixes: ZDI-CAN-27578
Fixes: 9462ff4695aa ("virtio-gpu/win32: allocate shareable 2d resources/images")
Reported-by: Zero Day Initiative <zdi-disclosures@trendmicro.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-Id: <20260311-cve-v1-1-f72b4c7c1ab2@redhat.com>

3 months agoui/vdagent: add migration blocker when machine version < 10.1
Fiona Ebner [Tue, 10 Mar 2026 14:25:39 +0000 (15:25 +0100)] 
ui/vdagent: add migration blocker when machine version < 10.1

In QEMU 10.1, commit 5d56bff11e ("ui/vdagent: add migration support")
added migration support for the vdagent chardev and commit 42000e0013
("ui/vdagent: remove migration blocker") removed the migration
blocker. No compat for older machine versions was added, so migration
with pre-10.1 machine version, from a 10.1 binary to a pre-10.1 binary
will result in a failure when loading the VM state in the target
instance:

> Unknown savevm section or instance 'vdagent' 0. Make sure that your
> current VM setup matches your saved VM setup, including any
> hotplugged devices

Add a compat flag to block migration when the machine version is less
than 10.1 to avoid this.

Cc: qemu-stable@nongnu.org
Fixes: 42000e0013 ("ui/vdagent: remove migration blocker")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260310142552.240877-1-f.ebner@proxmox.com>

3 months agorutabaga: improve error handling, fix potential crash during init
Marc-André Lureau [Tue, 27 Jan 2026 12:09:34 +0000 (16:09 +0400)] 
rutabaga: improve error handling, fix potential crash during init

When virtio_gpu_rutabaga_get_num_capsets() returns 0, virtio_init()
isn't called and the device later crashes during realize.
==72545==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x556ad6f7ba9e bp 0x7ffe6958f810 sp 0x7ffe6958f7e0 T0)
==72545==The signal is caused by a READ memory access.
==72545==Hint: address points to the zero page.
#0 0x556ad6f7ba9e in virtio_memory_listener_commit ../hw/virtio/virtio.c:4034
#1 0x556ad6a24c96 in listener_add_address_space ../system/memory.c:3128
#2 0x556ad6a25d15 in memory_listener_register ../system/memory.c:3216
#3 0x556ad6f7bf11 in virtio_device_realize ../hw/virtio/virtio.c:4075

Rework error handling of the function to set Error appropriately. 0
capset may be ok now.

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 months agoaudio/mixeng: drop some needless checks
Marc-André Lureau [Tue, 24 Feb 2026 16:32:29 +0000 (17:32 +0100)] 
audio/mixeng: drop some needless checks

The NULL checks for be, name, callback_fn, and as in
audio_mixeng_backend_open_{in,out} are redundant: the callers
audio_be_open_{in,out} already assert that name, callback_fn, and as
are non-NULL, and dereference be unconditionally via
AUDIO_BACKEND_GET_CLASS(be) before the call.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260224163229.2918858-1-marcandre.lureau@redhat.com>

3 months agomigration/options: Fix leaks in StrOrNull qdev accessors
Fabiano Rosas [Thu, 12 Mar 2026 20:46:19 +0000 (17:46 -0300)] 
migration/options: Fix leaks in StrOrNull qdev accessors

Fix a couple of possible leaks detected by Coverity. Both are
currently harmless. This code is only used for the very specific
purpose of maintaining compatibility of a few migration options which
can be set via QEMU command line (-global migration.tls-*). The
command line interface is not supported and only used during
development and testing.

1) The setter function set_StrOrNull() is invoked whenever the -global
migration.tls-* command line options are set. The way it could leak is
that the temporary "StrOrNull *str_or_null" object is allocated before
calling the visitor, which could fail and cause an early return of the
function, leaving *ptr unset and str_or_null leaking.

2) The getter function get_StrOrNull() is unreachable code. It's only
there to provide a complete implementation of the property. Still, the
way it could leak is that the temporary "StrOrNull *str_or_null" might
be allocated and is simply never returned to the caller nor freed.

Fix the possible leaks:

1) at set_StrOrNull(): change the allocation of str_or_null to happen
only after the visit call has returned successfully.

2) at get_StrOrNull(): assert that the object is non-NULL, there is no
need for a temporary object.

The reason it should be non-NULL is that the property is initialized
by the default setter of the qdev property. The initialization is
unlikely to fail because the call to the setter is setup by qdev,
which has boilerplate ensuring the to-be-set object is allocated and
of the correct type. Moreover, passing NULL via command line to
-global migration.tls-* is not possible.

A programming error could result in an invalid call to the setter,
which would leave the object NULL and cause a crash in the getter, but
that's not a worthwhile scenario to protect against given the low
probability of this code being even reached.

While here, update the comment about why there's no QNULL in this
StrOrNull property to be more clear.

Fixes: CID 1643919
Fixes: CID 1643920
Cc: Markus Armbruster <armbru@redhat.com>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Link: https://lore.kernel.org/qemu-devel/20260312204619.1969-1-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agomigration: assert that the same migration handler is not being added twice
Ani Sinha [Wed, 11 Mar 2026 07:01:14 +0000 (12:31 +0530)] 
migration: assert that the same migration handler is not being added twice

Currently the code that adds a migration blocker does not check if the same
blocker already exists. Assert that the migration handler being added has
not been added already.

CC: Markus Armbruster <armbru@redhat.com>
CC: Peter Xu <peterx@redhat.com>
CC: Prasad Pandit <pjp@fedoraproject.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260311070114.164434-1-anisinha@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agotests/qtest/migration: Force exit-on-error=false
Fabiano Rosas [Wed, 11 Mar 2026 21:34:18 +0000 (18:34 -0300)] 
tests/qtest/migration: Force exit-on-error=false

Some tests can cause QEMU to exit(1) too early while the incoming
coroutine has not yielded for a first time yet. This trips ASAN
because resources related to dispatching the incoming process will
still be allocated in the io/channel.c layer without a
straight-forward way for the migration code to clean them up.

As an example of one such issue, the UUID validation happens early
enough that the temporary socket from qio_net_listener_channel_func()
still has an elevated refcount. If it fails, the listener dispatch
code never gets to free the resource:

Direct leak of 400 byte(s) in 1 object(s) allocated from:
    #0 0x55e668890a07 in malloc asan_malloc_linux.cpp:68:3
    #1 0x7f3c7e2b6648 in g_malloc ../glib/gmem.c:130
    #2 0x55e66a8ef05f in object_new_with_type ../qom/object.c:767:15
    #3 0x55e66a8ef178 in object_new ../qom/object.c:789:12
    #4 0x55e66a93bcc6 in qio_channel_socket_new ../io/channel-socket.c:70:31
    #5 0x55e66a93f34f in qio_channel_socket_accept ../io/channel-socket.c:401:12
    #6 0x55e66a96752a in qio_net_listener_channel_func ../io/net-listener.c:64:12
    #7 0x55e66a94bdac in qio_channel_fd_source_dispatch ../io/channel-watch.c:84:12
    #8 0x7f3c7e2adf4b in g_main_dispatch ../glib/gmain.c:3476
    #9 0x7f3c7e2adf4b in g_main_context_dispatch_unlocked ../glib/gmain.c:4284
    #10 0x7f3c7e2b00c8 in g_main_context_dispatch ../glib/gmain.c:4272

The exit(1) also requires some tests to setup qtest to expect a return
code of 1 from the QEMU process. Although we can check migration
status changes to be fairly certain where the failure happened, there
is always the possibility of QEMU exiting for another reason and the
test passing. This happens frequently with sanitizers enabled, but
also risks masking issues in the regular build.

Stop allowing the incoming migration to exit and instead require the
tests to wait for the FAILED state and end QEMU gracefully with
qtest_quit.

In practice this means setting exit-on-error=false for every incoming
migration, changing MIG_TEST_FAIL_DEST_QUIT_ERR to MIG_TEST_FAIL and
waiting for a change of state where necessary.

With this, the MIG_TEST_FAIL_DEST_QUIT_ERR error result is now unused,
remove it.

The affected tests are:
validate_uuid_error
multifd_tcp_cancel
dirty_limit
precopy_unix_tls_x509_default_host
precopy_tcp_tls_no_hostname
tcp_tls_x509_mismatch_host
dbus_vmstate_missing_src
dbus_vmstate_missing_dst

Also add a comment to QEMU source explaining that the incoming
coroutine might block for a while until it yields as this is the
actual root cause of the issue.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Link: https://lore.kernel.org/qemu-devel/20260311213418.16951-6-farosas@suse.de
[assert that key doesn't already exists]
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agomigration/multifd: Fix leaks of TLS error objects
Fabiano Rosas [Wed, 11 Mar 2026 21:34:17 +0000 (18:34 -0300)] 
migration/multifd: Fix leaks of TLS error objects

The code currently ignores errors from multifd threads that happen
after a first error has already been propagated. Make sure the
subsequent errors are freed appopriately.

This fixes a leak of the TLS session->werr when the certificate
validation fails after multifd threads are already running. The first
writes on the threads will fail deep into the gnutls stack.

No need to check if(err) because the callers are all under a similar
check.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Link: https://lore.kernel.org/qemu-devel/20260311213418.16951-5-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agotests/qtest/migration: Fix leak in CPR exec test
Fabiano Rosas [Wed, 11 Mar 2026 21:34:16 +0000 (18:34 -0300)] 
tests/qtest/migration: Fix leak in CPR exec test

The string was being dup'ed only to get around the const of the
qdict_get_str() return value.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Link: https://lore.kernel.org/qemu-devel/20260311213418.16951-4-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agoio: Fix TLS bye task leak
Fabiano Rosas [Wed, 11 Mar 2026 21:34:15 +0000 (18:34 -0300)] 
io: Fix TLS bye task leak

Recent fixes to TLS tasks memory handling have left the TLS bye task
uncovered. Fix by freeing the task in the same way the handshake task
is freed.

Direct leak of 704 byte(s) in 4 object(s) allocated from:
    #1 0x7f5909b1d6a0 in g_malloc0 ../glib/gmem.c:163
    #2 0x557650496d61 in qio_task_new ../io/task.c:58:12
    #3 0x557650475d7f in qio_channel_tls_bye ../io/channel-tls.c:352:12
    #4 0x55764f7a1bb4 in migration_tls_channel_end ../migration/tls.c:159:5
    #5 0x55764f709750 in migration_ioc_shutdown_gracefully ../migration/multifd.c:462:9
    #6 0x55764f6fcf53 in multifd_send_terminate_threads ../migration/multifd.c:493:13
    #7 0x55764f6fcafb in multifd_send_shutdown ../migration/multifd.c:580:5
    #8 0x55764f6e1b14 in migration_cleanup ../migration/migration.c:1323:9
    #9 0x55764f6f5bac in migration_cleanup_bh ../migration/migration.c:1350:5

Fixes: d39d0f3acd ("io: fix cleanup for TLS I/O source data on cancellation")
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260311213418.16951-3-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agotests/qtest/migration: Fix leak of migration tests data
Fabiano Rosas [Wed, 11 Mar 2026 21:34:14 +0000 (18:34 -0300)] 
tests/qtest/migration: Fix leak of migration tests data

When the migration-test is invoked with the '-p' flag (to run a single
test), the glib code won't call the destroy function for the
not-executed tests, causing the MigrationTest wrapper data to leak.

This doesn't affect make check, but affects debugging use-cases where
having a leak pop up in ASAN output is extra annoying.

Fix by adding the tests data to a list and freeing them all at the end
of migration-test execution. Any tests actually dispatched by glib
will have the destroy function called as usual.

Note that migration_test_add_suffix() is altered to call
migration_test_add() so that there's only one place adding the data to
the list.

Performance is not an issue at the moment, we have < 100 tests.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Link: https://lore.kernel.org/qemu-devel/20260311213418.16951-2-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
3 months agoppc/pnv: fix dumpdtb option
Shivang Upadhyay [Wed, 11 Mar 2026 14:35:49 +0000 (20:05 +0530)] 
ppc/pnv: fix dumpdtb option

The '-machine dumpdtb' command line option stopped working on
PowerPC/pnv systems after recent design change [1].

Fixing this by generating fdt blob in `pnv_init`.

[1] https://lore.kernel.org/qemu-devel/20250206151214.2947842-1-peter.maydell@linaro.org/

Cc: Aditya Gupta <adityag@linux.ibm.com>
Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-stable@nongnu.org
Fixes: 8fd2518ef2f8d34 ("hw: Centralize handling of -machine dumpdtb option")
Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Aditya Gupta <adityag@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/20260311143549.118720-1-shivangu@linux.ibm.com
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
3 months agoblock/mirror: fix assertion failure upon duplicate complete for job using 'replaces'
Fiona Ebner [Wed, 11 Mar 2026 14:54:25 +0000 (15:54 +0100)] 
block/mirror: fix assertion failure upon duplicate complete for job using 'replaces'

If s->replace_blocker was already set by an earlier invocation of
mirror_complete(), then there will be an assertion failure when
error_setg() is called for it a second time. The bdrv_op_block_all()
and bdrv_ref() operations should only be done a single time too.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20260311145717.668492-2-f.ebner@proxmox.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
3 months agorust: fix build when --disable-rust and meson < 1.9
Paolo Bonzini [Sat, 14 Mar 2026 07:50:51 +0000 (08:50 +0100)] 
rust: fix build when --disable-rust and meson < 1.9

Commit e65030ed50ee moved rust_std and build.rust_std from per-target
override_options into the project's default_options, in order to avoid
repetition.  However, default_options are validated unconditionally at
project initialization, even when Rust is disabled.  This breaks builds
with meson < 1.9.0 which does not know about "build.rust_std":

  meson.build:1:0: ERROR: Unknown option: "build.rust_std".

Make the options conditional on the meson version, since Rust only
supports new versions of Meson anyway.

Fixes: e65030ed50ee ("rust: remove unnecessary repetitive options")
Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 months agobuild-sys: use the "run" variable
Marc-André Lureau [Wed, 11 Feb 2026 10:33:05 +0000 (14:33 +0400)] 
build-sys: use the "run" variable

Avoid unused variables and hand-written path, this should also help meson
to figure out the relation between the commands.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Link: https://lore.kernel.org/r/20260211103305.3112657-1-marcandre.lureau@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 months agoMerge tag 'pr-plugins-20260316' of https://gitlab.com/pbo-linaro/qemu into staging
Peter Maydell [Tue, 17 Mar 2026 10:20:30 +0000 (10:20 +0000)] 
Merge tag 'pr-plugins-20260316' of https://gitlab.com/pbo-linaro/qemu into staging

Changes:
- [PATCH] contrib/plugins/uftrace.c: fix depth for exit events (Pierrick Bouvier <pierrick.bouvier@linaro.org>)
Link: https://lore.kernel.org/qemu-devel/20260313063441.2048882-1-pierrick.bouvier@linaro.org
# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEZrmU7KFPfy5auggff5BUDQoc0A8FAmm4kCsACgkQf5BUDQoc
# 0A8gRQv+LZIiG75VL5cy+tpdD+kcwu+hsQ5Y6qGA6zs9TrdARxKtQ2Ozg9VjrMGE
# bTzhxo7ldwEjcki8bvi4yYN3uXtJzg/PODYcN7KWdqihunS97Iqr64Fd5aqkmNkV
# LNBbeLh+9qqtLY/k0YyR5yNJZ+9XuPatG+x/gG7WE0Ij3rMI2y1RIW7oq0MeBVuH
# gY9fsH80CL8wJC+LHkJDwpDXZyFLTh2+Q7kUGk51E3FYDQzHzV8Zewrmy3Vu+1RD
# 1+3EIBbC8e0fjYZEG6FFn0cBjx+TH11y2eN8JRvnmsMqoYRONSd2rUBQG5KFYcvO
# tJzDMCm7rfDWS+URs9SAb0a9mW0QNPBtZhhW5amHVFBQwIxpnznzC+xMCl51GUQe
# 1cNCzUCMhjSkFFUhvbWpB5IjQhDT6vKQ2y+telUDQ3VG1k914slEi2bIBECIEFeu
# u3X/4fCSU25rsXrjadbUKrnahRf9kGWmw1vZoZzGkb95HUpG3mgOXt7n8Ej9q1kt
# RBB/+NwN
# =q1H1
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 16 23:20:11 2026 GMT
# gpg:                using RSA key 66B994ECA14F7F2E5ABA081F7F90540D0A1CD00F
# gpg: Good signature from "Pierrick Bouvier <pierrick.bouvier@linaro.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 66B9 94EC A14F 7F2E 5ABA  081F 7F90 540D 0A1C D00F

* tag 'pr-plugins-20260316' of https://gitlab.com/pbo-linaro/qemu:
  contrib/plugins/uftrace.c: fix depth for exit events

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agocontrib/plugins/uftrace.c: fix depth for exit events
Pierrick Bouvier [Fri, 13 Mar 2026 06:34:41 +0000 (23:34 -0700)] 
contrib/plugins/uftrace.c: fix depth for exit events

Uftrace plugin was recording wrong depth for exit events, resulting in
incoherent traces, especially for partial ones.

Thanks to Honggyu Kim, one of the original author of uftrace, who
spotted the issue.
https://github.com/namhyung/uftrace/pull/2031#issuecomment-4051762627

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260313063441.2048882-1-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
3 months agothrottle-group: Fix race condition in throttle_group_restart_queue()
Alberto Garcia [Thu, 12 Mar 2026 12:12:00 +0000 (13:12 +0100)] 
throttle-group: Fix race condition in throttle_group_restart_queue()

When a timer is fired a pending I/O request is restarted and
tg->any_timer_armed is reset so other requests can be scheduled.

However we're resetting any_timer_armed first in timer_cb() before
the request is actually restarted, and there's a window between both
moments in which another thread can arm the same timer, hitting an
assertion in throttle_group_restart_queue().

This can be solved by deferring the reset of tg->any_timer_armed to
the moment when the queue is actually restarted, which is protected by
tg->lock, preventing other threads from arming the timer before that.

In addition to that, throttle_group_restart_tgm() is also updated to
hold tg->lock while the timer is being inspected. Here we consider
three different scenarios:

- If the tgm has a timer set, fire it immediately
- If another tgm has a timer set, restart the queue anyway
- If there is no timer set in this group then simulate a timer that
  fires immediately, by setting tg->any_timer_armed in order to
  prevent other threads from arming a timer in the meantime.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3194
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-Id: <825598ef34ad384d936da19d634eda75598508f7.1773316842.git.berto@igalia.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
3 months agoMerge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging
Peter Maydell [Mon, 16 Mar 2026 13:07:33 +0000 (13:07 +0000)] 
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging

trivial patches for 2026-03-16

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEZKoqtTHVaQM2a/75gqpKJDselHgFAmm34HIACgkQgqpKJDse
# lHjIwA/9G+XvpJHAXsK8QdPQAlrcCstV9GYJ/+wprclWM6rsWf+zQQ4RvQqxj4ue
# YzYmK37LVp2QyxNHACN5BYR/k7VUxjgdDZgu2bj3gw2A9XFkwnUHZuzvNaWPllit
# ugeeDP9dA+gM+YrUhPSwmDSX03KZrF1hipaQqPdFpCRaN1guvtNfnveqgGgE4eRm
# svwv40z0+kQW7pg/7cpPCp0ATdeYoLV84jOcEpR7gVdheektrIC2rQSUNl4Eqg1b
# VrvvoGZ+M4sJOyzz/jFEauWEYOjRT/3t0B1fy4jyUVOAKaDsPRBS1R3XvYGmgfEG
# OusGvluoLXdQ53xcdE448wTO9pQFnMjmrWsqtVyevyD3Rd0x1Rl2sQwZ4qoq5rgr
# Ck6ruvSnBM8tthSHktpYLdI1pcjAp3xS7LsVK+bQk9sJuIYiDczgDpsnkg/YgbtA
# Gqbbh1/2WIufpRd9HhhFo5yEzWfoHvGgSI1AytIkG4/VRKS5vXQ+sbGV2j4oVBte
# Wpx87zWaZytqdkA5i3EzOY/3JT63tpyEbzpZc35psGo6z/khUrdzqpLUwmt8MNNH
# oxadGK3B/r6rfaXOo9zN1ACCp1tY9D/OCow7MTPdnU5ySMkIzKO59akpw9SoShzC
# O8Ok0j/onHZbZwIt7rYAWODbeIN4zyoVsKbk1xFV2+CGoHWeOK8=
# =KGOq
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 16 10:50:26 2026 GMT
# gpg:                using RSA key 64AA2AB531D56903366BFEF982AA4A243B1E9478
# gpg: Good signature from "Michael Tokarev <mjt@debian.org>" [full]
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>" [full]
# gpg:                 aka "Michael Tokarev <mjt@tls.msk.ru>" [full]
# Primary key fingerprint: 9D8B E14E 3F2A 9DD7 9199  28F1 61AD 3D98 ECDF 2C8E
#      Subkey fingerprint: 64AA 2AB5 31D5 6903 366B  FEF9 82AA 4A24 3B1E 9478

* tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu:
  rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL, and stop checking for epoll in meson.build
  meson.build: do not check for epoll.h (CONFIG_EPOLL)
  linux-user: assume epoll is always present
  meson.build: stop checking for inotify_init()
  linux-user: assume inotify sycalls are always present
  meson.build: stop checking for splice()
  linux-user/syscall.c: assume splice is always present
  docs: Move xbzrle.txt into the migration folder and convert to rst
  target/i386: fix NULL pointer dereference in legacy-cache=off handling
  hw/usb/core.c: reorder usage and assertion of p->ep
  system/physmem.c: remove useless assertion of block
  dump/dump.c: reorder usage and assertion of block
  migration/savevm.c: reorder usage and assertion of mis->from_src_file

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'pull-target-arm-20260316' of https://gitlab.com/pm215/qemu into staging
Peter Maydell [Mon, 16 Mar 2026 13:07:17 +0000 (13:07 +0000)] 
Merge tag 'pull-target-arm-20260316' of https://gitlab.com/pm215/qemu into staging

target-arm queue:
 * hw/net/rtl8319: Work around GCC sanitizer / -Wstringop-overflow bug
 * semihosting: Correctly byteswap data when CPU is in big-endian mode
 * hw/dma/pl080: Fix various minor bugs
 * MAINTAINERS: Remove some no-longer active maintainers
 * tests/qtest: Use g_strdup_printf() in various arm tests

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmm33l8ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3ssREACHRyPRM/BdgjxLcQ+mZDYl
# WLSJzytrgdBmUsALt1T6hKMAfAdtdNVbLO/4r9r1zSDhXWcHOd+hsiq0IF+F6CZd
# qKIB++aVrNDWA5v0tlz+j4kQNCeFOX/u53CB9nZtaV/dMrAZbiuOulxDzd9grKJi
# m3ZT7YfIAV6nNLp/J7Q7P8rvM5quN/1ohTGqKSmMgLAZgqa0ac8cV3NYqVpnd4Jc
# +pqoQQb54uKpMKRacAUX2OMk6XuxDI3szdciVQLLhhrglwMo3xoAwpX600lAcvYv
# 2D+8nb5A90u7pfIY4xGajIBqiBP5PQC2RiTUd0qRmOklnVx7gRHaI9N1LOA/DtX1
# YKCPuH3CZEuZ+s4bWH9+ahaHbu5eHmqhxlp+CdICWbf+MBa1bCig2gT6su26AeHs
# hEcLt9QQwKAfjegs4S9J90ph13LADau8VkSIP6WMfTuDmNesQY6/JlaGq8/qWrfL
# WfJF8i9fHpEX7OSy+/CwUS02HTDrn2MRTmAt2ihee5oYRuEdmSfYCjMvt5Nhbej3
# nzNWBw/BpgdNsdIPfJSoNWP/VQTTX6rYvUQh4+Z90SVqFyfGSCb9JOVg6Ab39Q8p
# gfjkIU2NwhZmDCjh4CqJLihKCPCUiFKlYrvOpAHkuDXcLqzLvF03A7WIHs4cA5+T
# PwUs4qJF8kpBsJOdshbQAQ==
# =V7Lm
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 16 10:41:35 2026 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20260316' of https://gitlab.com/pm215/qemu:
  tests/qtest/aspeed_gpio-test: Use g_strdup_printf() instead of char arrays
  tests/qtest/ast2700-gpio-test: Use g_strdup_printf() instead of char arrays
  tests/qtest/arm-cpu-features: Use g_strdup_printf() instead of char arrays
  tests/qtest/ast2700-sgpio-test: Use g_strdup_printf() instead of char arrays
  MAINTAINERS: Remove Chris Browy
  MAINTAINERS: Remove Andrey Smirnov
  MAINTAINERS: Remove Radoslaw Biernacki
  MAINTAINERS: Remove Eduardo Habkost
  MAINTAINERS: Remove Cameron Esfahani
  MAINTAINERS: Remove Hannes Reinecke
  hw/dma/pl080: Ignore bottom 2 bits of LLI register
  hw/dma/pl080: Update interrupts after pl080_run()
  hw/dma/pl080: Handle bogus swidth and dwidth in transfers
  semihosting/uaccess: Use the cpu_internal_tswap() functions
  include/exec: Provide the cpu_internal_tswap() functions
  include/hw/core: Rename virtio_is_big_endian to internal_is_big_endian
  hw/net/rtl8319: Work around GCC sanitizer / -Wstringop-overflow bug

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agorename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL, and stop checking for epoll in meson...
Michael Tokarev [Fri, 9 Jan 2026 21:22:25 +0000 (00:22 +0300)] 
rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL, and stop checking for epoll in meson.build

Since CONFIG_EPOLL is now unused, it's okay to
perform this rename, to make it less ugly.

Since epoll is linux-specific and is always present on linux,
define CONFIG_EPOLL to 1 on linux, without compile-time test.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agomeson.build: do not check for epoll.h (CONFIG_EPOLL)
Michael Tokarev [Fri, 9 Jan 2026 21:19:38 +0000 (00:19 +0300)] 
meson.build: do not check for epoll.h (CONFIG_EPOLL)

The only place where we used CONFIG_EPOLL was linux-user,
which now enables it unconditionally.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agolinux-user: assume epoll is always present
Michael Tokarev [Fri, 9 Jan 2026 21:14:57 +0000 (00:14 +0300)] 
linux-user: assume epoll is always present

epoll is in linux since 2.6 (glibc 2.3.2).
epoll_init1 has been added in 2.6.27 (glibc 2.9).
There's no need to check for its presence, including all other
epoll-related syscalls.

Modern architectures don't have epoll_create(), only
epoll_create1(), so keep conditional around the former.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agomeson.build: stop checking for inotify_init()
Michael Tokarev [Fri, 9 Jan 2026 20:48:09 +0000 (23:48 +0300)] 
meson.build: stop checking for inotify_init()

the only place in qemu which used the check for inotify_init()
was linux-user, which now assumes inotify_init() is always
present.  There's no need to check for this function anymore.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agolinux-user: assume inotify sycalls are always present
Michael Tokarev [Fri, 9 Jan 2026 20:46:02 +0000 (23:46 +0300)] 
linux-user: assume inotify sycalls are always present

inotify_init() and other syscalls appeared in linux 2.6.13,
inotify_init1() - in linux 2.6.27.

There's no need to check their presence on linux anymore.

Keep condition on TARGET_NR_inotify_init because modern
architectures have only more generic inotify_init1().

Other, not linux-specific, places of the code checks for
inotify_init1() syscall only.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agomeson.build: stop checking for splice()
Michael Tokarev [Fri, 9 Jan 2026 20:28:09 +0000 (23:28 +0300)] 
meson.build: stop checking for splice()

CONFIG_SPLICE was only needed for linux-user/, where it is not
used anymore (assuming splice &Co is always present)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agolinux-user/syscall.c: assume splice is always present
Michael Tokarev [Fri, 9 Jan 2026 20:27:05 +0000 (23:27 +0300)] 
linux-user/syscall.c: assume splice is always present

splice() &Co are defined since linux 2.6.17 (glibc 2.5).
Assume it is always present.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agodocs: Move xbzrle.txt into the migration folder and convert to rst
Thomas Huth [Tue, 10 Mar 2026 09:28:22 +0000 (10:28 +0100)] 
docs: Move xbzrle.txt into the migration folder and convert to rst

xbzrle is a feature of migration and thus this file should go
into the docs/devel/migration/ folder. While we're at it, turn
it into proper .rst format, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agotarget/i386: fix NULL pointer dereference in legacy-cache=off handling
Sergei Heifetz [Thu, 5 Mar 2026 06:04:31 +0000 (11:04 +0500)] 
target/i386: fix NULL pointer dereference in legacy-cache=off handling

The check that xcc->model is not NULL occurs after it is dereferenced
inside x86_cpu_get_versioned_cache_info(), so something like
`-cpu host,legacy-cache=off` leads to a segfault rather than an error.
This patch fixes that.

Fixes: cca0a000d06f897411a8a ("target/i386: allow versioned CPUs to specify new cache_info")
Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
[Mjt: simplify the following condition too]
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agohw/usb/core.c: reorder usage and assertion of p->ep
Sergei Heifetz [Sun, 8 Feb 2026 10:39:58 +0000 (15:39 +0500)] 
hw/usb/core.c: reorder usage and assertion of p->ep

Reorder the code so the assertion of p->ep occurs before it is
used in the subsequent lines.

Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agosystem/physmem.c: remove useless assertion of block
Sergei Heifetz [Sun, 8 Feb 2026 10:39:57 +0000 (15:39 +0500)] 
system/physmem.c: remove useless assertion of block

It is useless to assert that block is not NULL because it is
already dereferenced in the first line of the function.

The assertion is also unnecessary because the function is called
in only two places, and `block` can't be NULL in either of them:
- In `migration/ram.c`, we have already dereferenced `block` in
  the code just before the call.
- In `system/memory.c`, we assert `mr->ram_block` before passing
  it to the function.

(We could split the declaration and initialization of oldsize,
but then we would need to remove the const qualifier. As the
assertion is useless anyway, removing the const qualifier seems
worse.)

Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agodump/dump.c: reorder usage and assertion of block
Sergei Heifetz [Sun, 8 Feb 2026 10:39:56 +0000 (15:39 +0500)] 
dump/dump.c: reorder usage and assertion of block

Reorder the code so the assertion of block occurs before it is
used in the subsequent lines.

Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agomigration/savevm.c: reorder usage and assertion of mis->from_src_file
Sergei Heifetz [Sun, 8 Feb 2026 10:39:55 +0000 (15:39 +0500)] 
migration/savevm.c: reorder usage and assertion of mis->from_src_file

Reorder the code so the assertion of mis->from_src_file occurs before
the call to migration_ioc_unregister_yank_from_file, which dereferences
it in qemu_file_get_ioc.

Fixes: 39675ffffb3394 ("migration: Move the yank unregister of channel_close out")
Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
3 months agoMerge tag 'pull-request-2026-03-16' of https://gitlab.com/thuth/qemu into staging
Peter Maydell [Mon, 16 Mar 2026 10:43:15 +0000 (10:43 +0000)] 
Merge tag 'pull-request-2026-03-16' of https://gitlab.com/thuth/qemu into staging

* Fix various crashes that can occur when starting QEMU with -device xyz,help
* Update various sections in the MAINTAINERS file

# -----BEGIN PGP SIGNATURE-----
#
# iQIyBAABCgAdFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmm33eAACgkQLtnXdP5w
# LbUAnA/2NUNIRc18cIAmC5AABoLPeLd96ndPXoayMc78fdJXeM4GsFHqQ0Qqj56B
# nSZY9nHHzv8f9n+pVISoffuywP0ldR7+ThKVyps8rkmsXDuBsdNwZU829toq43lg
# V0+/UtyxrZLujV581TrmKlPf25sY5BV96YHWzXuUm2E5ikrSzqNcm+1ZNRRhWa5R
# gu0bhfAcILnmXxYYrIO/JWM38j7Kz2BHLGN2A8UepORhs5gUg5vk33RaTrzDfbwN
# rTxLKjLxYEPV2E9YTBsmMQqsiBomHjw66g5Rtq68KE26RodPeEdLsk9Yd7WbWfEf
# HGnZ/l2aZ8OoaricIvUdMQmkAVjxZE4b+a6AiZ38KsJ/3XEXQqbkvGRW3OCkAWOY
# kzRuxWJKoPIkvm4jfN39cZEtzHnXdrNgiVCwGuMn0BwqHOPIF/W+5XImOW1dqlTL
# CfR11yjUdpW33/hWmXtHkAYDlf5cP7/eL/KStrSv3DkG9/CNTAfwEvjkOyBq3C+K
# J/aiufIkbkUr8ZpfJ+eledbAkvvv1/d8/u5vlqyVa4sL7hdcaxQrUDxjojrE7EoM
# xB0eS4eFZNsRQn3YrvqyCMxwwO16HyeOOYSv/7Z2wixe/FCRQEjxl02/430ITVNS
# MB1/fKUWd4/SUY+BqtBHSo4qNPEbmxzOXKVEJHLS2bqqnDmEcg==
# =0ClG
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 16 10:39:28 2026 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [undefined]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2026-03-16' of https://gitlab.com/thuth/qemu:
  MAINTAINERS: Add another reviewer to s390x boot
  MAINTAINERS: Downgrade the functional testing section to "Odd Fixes"
  MAINTAINERS: Remove myself from various sections
  MAINTAINERS: Update the s390x maintainers
  MAINTAINERS: Update S390-ccw boot maintainers/reviewers
  hw/acpi: generic_event_device: Don't call qdev_get_machine in initfn
  hw/arm: fsl-imx6: Don't call qdev_get_machine in soc init
  hw/arm: fsl-imx8mp: Don't call qdev_get_machine in soc init
  hw/arm: fsl-imx7: Don't call qdev_get_machine in soc init
  hw/arm: xlnx-zynqmp: Don't call qdev_get_machine in soc init
  hw/riscv: microchip_pfsoc: Don't call qdev_get_machine in soc init
  hw/riscv: sifive_e: Don't call qdev_get_machine in soc init
  target/mips/cpu: Move initialization of memory region to realize function
  target/xtensa/cpu: Move initialization of memory region to realize function

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'linux-user-for-v11-pull-request' of https://github.com/hdeller/qemu-hppa...
Peter Maydell [Mon, 16 Mar 2026 10:42:41 +0000 (10:42 +0000)] 
Merge tag 'linux-user-for-v11-pull-request' of https://github.com/hdeller/qemu-hppa into staging

Two linux-user patches

Two linux-user patches from Razvan Ghiorghe.

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCabRXkwAKCRD3ErUQojoP
# X8E4AQDtltuCmD+RnJ5yWNAh4Rx8kOU/tChL8kE44NjMz9HdxAEA37DKINiPHCOs
# G7kmfKqwUpJWVSXeMjUp0iaNOUydbAw=
# =ahOd
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Mar 13 18:29:39 2026 GMT
# gpg:                using EDDSA key BCE9123E1AD29F07C049BBDEF712B510A23A0F5F
# gpg: Good signature from "Helge Deller <deller@gmx.de>" [unknown]
# gpg:                 aka "Helge Deller <deller@kernel.org>" [unknown]
# gpg:                 aka "Helge Deller <deller@debian.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 4544 8228 2CD9 10DB EF3D  25F8 3E5F 3D04 A7A2 4603
#      Subkey fingerprint: BCE9 123E 1AD2 9F07 C049  BBDE F712 B510 A23A 0F5F

* tag 'linux-user-for-v11-pull-request' of https://github.com/hdeller/qemu-hppa:
  linux-user: fix mremap with old_size=0 for shared mappings
  linux-user: Fix zero_bss for RX PT_LOAD segments

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMAINTAINERS: Add another reviewer to s390x boot
Eric Farman [Fri, 13 Mar 2026 19:48:10 +0000 (20:48 +0100)] 
MAINTAINERS: Add another reviewer to s390x boot

Jason offered to help review this area of code;
let's make sure he's notified of changes.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Message-ID: <20260313194810.1844241-2-farman@linux.ibm.com>
Acked-by: Jason J. Herne <jjherne@linux.ibm.com>
Acked-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agoMAINTAINERS: Downgrade the functional testing section to "Odd Fixes"
Thomas Huth [Fri, 13 Mar 2026 11:34:22 +0000 (12:34 +0100)] 
MAINTAINERS: Downgrade the functional testing section to "Odd Fixes"

I won't have that much time for QEMU anymore in the future, so downgrade
the status of the "functional testing framework" section to "Odd Fixes"
to avoid wrong expectations. While we're at it, also switch to my other
e-mail address here that I'm already using for the other sections where
I am still listed as maintainer / reviewer.

Message-ID: <20260313113424.15583-5-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agoMAINTAINERS: Remove myself from various sections
Thomas Huth [Fri, 13 Mar 2026 11:34:21 +0000 (12:34 +0100)] 
MAINTAINERS: Remove myself from various sections

I likely won't have much time in the future for QEMU anymore, so
remove myself from various sections that have already enough other
maintainers / reviewers.

Message-ID: <20260313113424.15583-4-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agoMAINTAINERS: Update the s390x maintainers
Thomas Huth [Fri, 13 Mar 2026 11:34:20 +0000 (12:34 +0100)] 
MAINTAINERS: Update the s390x maintainers

I'm going to move to another project next month, so I will not have
enough time to take care of s390x patches anymore. Fortunately,
Cornelia volunteered to take over the job of collecting s390x patches,
and Eric and Matthew offered help to back her up, so we can keep
the "S390 general architecture support" section in the "supported"
state. Thanks for your help, Cornelia, Eric and Matthew!

Message-ID: <20260313113424.15583-3-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agoMAINTAINERS: Update S390-ccw boot maintainers/reviewers
Jared Rossi [Fri, 13 Mar 2026 11:34:19 +0000 (12:34 +0100)] 
MAINTAINERS: Update S390-ccw boot maintainers/reviewers

Christian Borntraeger is no longer active in this space.  Promote myself to
maintainer and demote Christian to reviewer.

Signed-off-by: Jared Rossi <jrossi@linux.ibm.com>
Acked-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260310142118.1120291-1-jrossi@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260313113424.15583-2-thuth@redhat.com>

3 months agohw/acpi: generic_event_device: Don't call qdev_get_machine in initfn
Alistair Francis [Thu, 12 Mar 2026 04:31:58 +0000 (14:31 +1000)] 
hw/acpi: generic_event_device: Don't call qdev_get_machine in initfn

Calling qdev_get_machine() in the acpi_ged_initfn function would result
in the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-aarch64 -S -display none -M virt -device acpi-ged,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the ram slots of the machine. So instead of initialising the GED in
the init let's instead do it in the realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-8-alistair.francis@wdc.com>
[thuth: Replaced soc_init with acpi_ged_initfn in the patch description]
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/arm: fsl-imx6: Don't call qdev_get_machine in soc init
Alistair Francis [Thu, 12 Mar 2026 04:31:57 +0000 (14:31 +1000)] 
hw/arm: fsl-imx6: Don't call qdev_get_machine in soc init

Calling qdev_get_machine() in the soc_init function would result in
the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-aarch64 -S -display none -M virt -device fsl-imx6,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the number of CPUs in the machine. So instead of initialising the CPUs in
the SoC init let's instead do it in the realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-7-alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/arm: fsl-imx8mp: Don't call qdev_get_machine in soc init
Alistair Francis [Thu, 12 Mar 2026 04:31:56 +0000 (14:31 +1000)] 
hw/arm: fsl-imx8mp: Don't call qdev_get_machine in soc init

Calling qdev_get_machine() in the soc_init function would result in
the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-aarch64 -S -display none -M virt -device fsl-imx8mp,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the number of CPUs in the machine. So instead of initialising the CPUs in
the SoC init let's instead do it in the realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-6-alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/arm: fsl-imx7: Don't call qdev_get_machine in soc init
Alistair Francis [Thu, 12 Mar 2026 04:31:55 +0000 (14:31 +1000)] 
hw/arm: fsl-imx7: Don't call qdev_get_machine in soc init

Calling qdev_get_machine() in the soc_init function would result in
the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-aarch64 -S -display none -M virt -device fsl-imx7,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the number of CPUs in the machine. So instead of initialising the CPUs in
the SoC init let's instead do it in the realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-5-alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/arm: xlnx-zynqmp: Don't call qdev_get_machine in soc init
Alistair Francis [Thu, 12 Mar 2026 04:31:54 +0000 (14:31 +1000)] 
hw/arm: xlnx-zynqmp: Don't call qdev_get_machine in soc init

Calling qdev_get_machine() in the soc_init function would result in
the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-aarch64 -S -display none -M virt -device xlnx-zynqmp,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the number of CPUs in the machine. So instead of initialising the CPUs in
the SoC init let's instead do it in the realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-4-alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/riscv: microchip_pfsoc: Don't call qdev_get_machine in soc init
Alistair Francis [Thu, 12 Mar 2026 04:31:53 +0000 (14:31 +1000)] 
hw/riscv: microchip_pfsoc: Don't call qdev_get_machine in soc init

Calling qdev_get_machine() in the soc_init function would result in
the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-riscv64 -S -display none -M virt -device microchip.pfsoc,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the number of CPUs in the machine. So instead of setting the CPU
num-harts in the init function let's set it in realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-3-alistair.francis@wdc.com>
[thuth: Fix a complaint from checkpatch.pl with regards to multi-line comment]
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/riscv: sifive_e: Don't call qdev_get_machine in soc init
Alistair Francis [Thu, 12 Mar 2026 04:31:52 +0000 (14:31 +1000)] 
hw/riscv: sifive_e: Don't call qdev_get_machine in soc init

Calling qdev_get_machine() in the soc_init function would result in
the following assert

    ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed.

when trying to run

    ./qemu-system-riscv64 -S -display none -M virt -device riscv.sifive.e.soc,help

as the machine wasn't created yet. We call qdev_get_machine() to obtain
the number of CPUs in the machine. So instead of setting the CPU
num-harts in the init function let's set it in realise where the machine
will exist.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260312043158.4191378-2-alistair.francis@wdc.com>
[thuth: Fix a complaint from checkpatch.pl with regards to multi-line comment]
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agotarget/mips/cpu: Move initialization of memory region to realize function
Thomas Huth [Wed, 11 Mar 2026 21:16:29 +0000 (22:16 +0100)] 
target/mips/cpu: Move initialization of memory region to realize function

When introspecting the Loongson-3A4000 CPUs from the command line, QEMU
currently crashes:

 $ ./qemu-system-mips64el -device Loongson-3A4000-mips64-cpu,help
 qemu-system-mips64el: ../../devel/qemu/system/physmem.c:1401:
  register_multipage: Assertion `num_pages' failed.
 Aborted (core dumped)

Move the initialization of the memory regions to the realize function
to fix this problem.

Reported-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <87y0jxzdrk.fsf@pond.sub.org>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260311211629.118608-1-thuth@redhat.com>

3 months agotarget/xtensa/cpu: Move initialization of memory region to realize function
Thomas Huth [Wed, 11 Mar 2026 20:25:03 +0000 (21:25 +0100)] 
target/xtensa/cpu: Move initialization of memory region to realize function

When introspecting the xtensa CPUs from the command line, QEMU currently
crashes:

 $ ./qemu-system-xtensa -device dc233c-xtensa-cpu,help
 qemu-system-xtensa: ../../devel/qemu/system/physmem.c:1401:
  register_multipage: Assertion `num_pages' failed.
 Aborted (core dumped)

Move the initialization of the memory regions to the realize function
to fix this problem.

Reported-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260311202503.107026-1-thuth@redhat.com>

3 months agorunstate: handle return code of EOPNOTSUPP properly from rebuild_guest()
Ani Sinha [Tue, 10 Mar 2026 09:44:48 +0000 (15:14 +0530)] 
runstate: handle return code of EOPNOTSUPP properly from rebuild_guest()

If rebuild_guest() accelerator callback returns EOPNOTSUPP, this means that the
accelerator does not support rebuilding the guest state. Handle this case
properly and separately from other error return codes.

Fixes: 4003e5e65fe0("hw/accel: add a per-accelerator callback to change VM accelerator handle")
Reported-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Link: https://lore.kernel.org/r/20260310094450.35861-2-anisinha@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 months agotests/qtest/aspeed_gpio-test: Use g_strdup_printf() instead of char arrays
Peter Maydell [Tue, 10 Mar 2026 15:33:34 +0000 (15:33 +0000)] 
tests/qtest/aspeed_gpio-test: Use g_strdup_printf() instead of char arrays

Older versions of gcc with -Wformat-overflow=2 don't like the usage of
fixed size char arrays in this test; gcc 7.5.0 (SUSE Linux) says:

../tests/qtest/aspeed_gpio-test.c: In function ‘test_set_input_pins’:
../tests/qtest/aspeed_gpio-test.c:149:36: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
             sprintf(name, "gpio%c%d", c, i);
                                    ^
../tests/qtest/aspeed_gpio-test.c:149:13: note: ‘sprintf’ output between 7 and 17 bytes into a destination of size 16
             sprintf(name, "gpio%c%d", c, i);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This can't actually happen because of the limited size of the values
being substituted in.  However rather than require readers to check
whether the arrays really have been declared large enough, we prefer
to use g_strdup_printf() for this kind of string work.

Reported-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20260310153334.3063224-3-peter.maydell@linaro.org

3 months agotests/qtest/ast2700-gpio-test: Use g_strdup_printf() instead of char arrays
Peter Maydell [Tue, 10 Mar 2026 15:33:33 +0000 (15:33 +0000)] 
tests/qtest/ast2700-gpio-test: Use g_strdup_printf() instead of char arrays

Older versions of gcc with -Wformat-overflow=2 don't like the usage of
fixed size char arrays in this test; gcc 7.5.0 (SUSE Linux) says:

../tests/qtest/ast2700-gpio-test.c: In function ‘test_input_pins’:
../tests/qtest/ast2700-gpio-test.c:54:36: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
             sprintf(name, "gpio%c%d", c, i);
                                    ^
../tests/qtest/ast2700-gpio-test.c:54:13: note: ‘sprintf’ output between 7 and 17 bytes into a destination of size 16
             sprintf(name, "gpio%c%d", c, i);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This can't actually happen because of the limited size of the values
being substituted in.  However rather than require readers to check
whether the arrays really have been declared large enough, we prefer
to use g_strdup_printf() for this kind of string work.

Reported-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20260310153334.3063224-2-peter.maydell@linaro.org