]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
11 hours agoUpdate version for v11.0.0-rc3 release master v11.0.0-rc3
Peter Maydell [Thu, 9 Apr 2026 20:18:56 +0000 (21:18 +0100)] 
Update version for v11.0.0-rc3 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
17 hours agoMerge tag 'hw-misc-20260409' of https://github.com/philmd/qemu into staging
Peter Maydell [Thu, 9 Apr 2026 14:54:41 +0000 (15:54 +0100)] 
Merge tag 'hw-misc-20260409' of https://github.com/philmd/qemu into staging

Misc HW patches

Few hw/ fixes and a keymap one.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmnXtasACgkQ4+MsLN6t
# wN6TYxAAkfAJ+bFx35zYD1BJXS9ozboprLFR6EtGzEzomOSNSio4W0Dh+X3G6R69
# CZ6AW11J+17JtIsvVp4UrZVT1Seq4nhEl+LVCvJtIgpKkDv4o1IZh+jyIpwRxlZ8
# JweahVgOgc3z9r+gEM8GTrZmux9P3fYjELPt+71tsrgiVWhXntOyO3MriRHD4+1m
# pYMKEh3FEd84VVacKVArnxf/ThUlgxd+nt+KjXMpPnW7oDlLnqaVahn5qqqDgYX8
# Kgva7g7Z30ZCrxuOa+9Fx2FsTof8EW6htGbSr8kfa8gzzveUYRmEFvRFpuTE7rX7
# 4LItAUaKKUsA65cbXPXPNB+3Ua2odtNgjhvbudTsRnpcKNfTW203ct7R9h9OnfIu
# WROnegR4qFi1uVRFaI0NUxS9pOWCtK4MotnmBtJPwTBB9xP6qch6i8pOLj7loNEo
# QC2AN1RB0N6u3mSXdMWUaWsbsCq7Mw2j7YIpj0N8Cg7/sCzzAXR1XEmHl1bPesbc
# D/f89ck2kBe8wFHphkTxkIu1USPMxP9nVYt/UU+dh3iusXu5wzp26a/TSMoCYCYl
# LTd/8mYPvAFK71icgZwaGvzhJagA9EYExL2RAWCQZ56K8GG5UvsHmriQovyNMBgX
# QRNlKU6X+fbnv5lHOUVVRtPcT4xz7xYycfm2I9bqLXt4aLDRkxs=
# =i6vx
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Apr  9 15:20:27 2026 BST
# 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 'hw-misc-20260409' of https://github.com/philmd/qemu:
  qemu-keymap: fix altgr modifier lookup for newer xkeyboard-config
  ati-vga: Fix check for overflowing vram
  hw/timer: ibex_timer: Update IRQs after writing CTRL
  ati-vga: Fix pitch and offset registers mask

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
18 hours agoqemu-keymap: fix altgr modifier lookup for newer xkeyboard-config
Dietmar Maurer [Wed, 8 Apr 2026 09:14:59 +0000 (11:14 +0200)] 
qemu-keymap: fix altgr modifier lookup for newer xkeyboard-config

xkeyboard-config 2.37 removed the "AltGr" virtual modifier in favor
of mapping upper groups directly to Mod5. Since then,
xkb_keymap_mod_get_index(map, "AltGr") returns XKB_MOD_INVALID, so
AltGr-based keysyms were never generated.

See: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/473f9bc32f9ba869829cc0d06a75cd1f2560aa60

Try "AltGr" first, and fall back to "Mod5" for compatibility with
both old and new xkeyboard-config versions.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260408091459.4001711-1-dietmar@proxmox.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
18 hours agoati-vga: Fix check for overflowing vram
BALATON Zoltan [Wed, 8 Apr 2026 10:49:35 +0000 (12:49 +0200)] 
ati-vga: Fix check for overflowing vram

Take into account the bytes per pixels when checking for accessing
beyond end of vram area.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260408104935.1A55A5969F6@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
18 hours agohw/timer: ibex_timer: Update IRQs after writing CTRL
Alistair Francis [Tue, 7 Apr 2026 04:36:13 +0000 (14:36 +1000)] 
hw/timer: ibex_timer: Update IRQs after writing CTRL

When writing to rv_timer.CTRL after setting the compare values the timer
doesn't fire as we don't update the interrupts. Ensure we update the
interrupts after a write to the rv_timer.CTRL register.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/2796
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Message-ID: <20260407043614.372871-5-alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
18 hours agoati-vga: Fix pitch and offset registers mask
BALATON Zoltan [Sat, 4 Apr 2026 11:13:18 +0000 (13:13 +0200)] 
ati-vga: Fix pitch and offset registers mask

Remove the Radeon specific masks for offset and pitch registers. While
the documentation is not clear about it I believe it is a copy&paste
error from the combined DST_PITCH_OFFSET register that has less bits
so more constrained than the individual registers which should not
have this mask.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-ID: <20260404111318.8334E596A22@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
21 hours agoMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Peter Maydell [Thu, 9 Apr 2026 10:58:04 +0000 (11:58 +0100)] 
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* virtio-scsi: fix cdb_size issue

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmnXhEYUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroMx5ggAqWT2APURWbs4tz16RhC3GlIWdxxo
# zb+xEtwX9s/G1Pb18R6+ZJdOjW1EeKut84K/q+jkkQ514kfzXJFNlonqKnajvJ3i
# YcQ7TL8o2F7PDeAWlJ/vgQJuAAvXnTqk8ppuqz75W1cJnA6vLBCaCA0nUiUNMXR2
# fIMot1a5l2yH1V4IzspIJDkP1oNIfqhPG4/89sraJPhmKqhGw/gDfLsJ/oZ1C2LI
# sm9qmMSsHsyV6gW3TbOn3mCt1R7+16JwvF/E6HsSXaK8u/UJxLPzlfQGjaKBDtE3
# HpVNtKY4XJzSWR6zbWw10dqQbT2h7WwHEbHCnYhnCJs9RMDu+t2evpmMGw==
# =Z7CW
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Apr  9 11:49:42 2026 BST
# 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:
  virtio-scsi: pass the same cdb_size to virtio_scsi_pop_req and virtio_scsi_handle_cmd_req_prepare

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
21 hours agohw/uefi: fix heap overflow (CVE-2026-5744)
Gerd Hoffmann [Wed, 8 Apr 2026 07:34:02 +0000 (09:34 +0200)] 
hw/uefi: fix heap overflow (CVE-2026-5744)

When copying the request response into the pio transfer buffer the code
skips the 'struct mm_header' but does not consider that when calculating
transfer size, so it will copy 24 (== sizeof(struct mm_header)) extra
bytes, which can overflow uv->pio_xfer_buffer.

Fix that by copying the complete buffer, including the header, which
also makes the pio code path consistent with the (unaffected) dma code
path.

Fixes: CVE-2026-5744
Fixes: 90ca4e03c27d ("hw/uefi: add var-service-core.c")
Reported-by: Yuma Kurogome <yumak@ricsec.co.jp>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20260408073403.3410541-1-kraxel@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
21 hours agovirtio-scsi: pass the same cdb_size to virtio_scsi_pop_req and virtio_scsi_handle_cmd...
Paolo Bonzini [Fri, 27 Mar 2026 21:00:09 +0000 (22:00 +0100)] 
virtio-scsi: pass the same cdb_size to virtio_scsi_pop_req and virtio_scsi_handle_cmd_req_prepare

Ensure that there is no allocation/usage mismatch when requests
are processed in virtio_scsi_handle_cmd_vq.  To do this,
retrieve the value once and pass it to both functions.

For other calls to virtio_scsi_pop_req the extra size
can be 0, because control and event requests fit
entirely in VirtIOSCSIReq.

Reported-by: Jihe Wang <wangjihe.mail@gmail.com>
Tested-by: Jihe Wang <wangjihe.mail@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: CVE-2026-5763
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
37 hours agoMerge tag 'hw-misc-20260407' of https://github.com/philmd/qemu into staging
Peter Maydell [Wed, 8 Apr 2026 18:16:36 +0000 (19:16 +0100)] 
Merge tag 'hw-misc-20260407' of https://github.com/philmd/qemu into staging

Misc HW patches

Few fixes, mostly for VGA display models.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmnVffgACgkQ4+MsLN6t
# wN4vAw/+OpYUXgVIE82vn6eJQPewiFm/oq7Bi2iHWtB51JLGy+eckbVrahG5M74g
# dvr2x+1APsweNizhkHz6m00UdCDmhli8N+p9xOa2F61LjYCszZBteR7DhMdPVF33
# GuptAXnyZZkeN0lvD+hYfk2KBNCGGOz2r96XUsuSoOS6BwgTzqlpaZ3mL4YaQbLD
# KED9wsqqKHgUrgZa7yzH4IFx4iuQoRTEeXUfa/BOnYUMKs7zlf8+x8a/93GM2fqK
# HRHi27Dw52DI0wSKZ97i67a+pP291S5BbSBnLb37HZeOdS5AUa3hHuoXKNhdd1O1
# PbQT1Rs0cPBkQ/YEeJySfQbRNS6fk2W/fz1yKVUaUzgWgXZxRJuAIml0JyudfhMr
# g4/g882St0b8umQRqePgmCUHWeG/bpVvsRPZN+lm6jobpk69htbGtR0pYO/dRCkZ
# aZWTGulPqnPNLMQG/qkYCFCPX4NpJfrl1VWSwCXRLt8d4r1CrnqmwfqmgQCsMkRd
# UJtHqYeYPHT4ivW/Vbn3cEUY1c5kRLjlPjWO6mAZCKCwnPyK5p3f4hSStLJlra6k
# /bidMyIJXvYHPCgHRzTDWsx2tV1tL3iyGlxEae3BTcPlUiXOczxsoKEqvg487nh6
# tmzodtsOHpNXnuZQb3rFdiGdzKUhhpobex7mKzef7xEFOKA2adk=
# =7zMH
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Apr  7 22:58:16 2026 BST
# 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 'hw-misc-20260407' of https://github.com/philmd/qemu:
  ati-vga: Do not crash on 24 bits per pixel
  ati-vga: Update mode on CRTC_PITCH change
  ati-vga: Fix setting CRTC_OFFSET
  hw/arm/omap_sx1: map CS3 at the correct base
  cirrus-vga: Make frame buffer endianness little endian by default
  docs/about/removed-features: Replace 'since' -> 'removed in'

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
43 hours agoMerge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging
Peter Maydell [Wed, 8 Apr 2026 12:34:10 +0000 (13:34 +0100)] 
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging

trivial patches for 2026-04-08

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEZKoqtTHVaQM2a/75gqpKJDselHgFAmnWM84ACgkQgqpKJDse
# lHgJMxAAuz4rJQh51cTA1vKa/Pte//BZ4ro9dVnCi2ogCVjmy/ZaD6r2B8ZJtpHo
# RMXbTrswGF1Hs6J5HxztcMHNHE9fO+2CGjhgjujCsvs72Msdp5j6TjQ61DzIG3UL
# jz3g7fGPxabOyiJcMi61QMIMwcOQlS4WSZhvcRtxixc6KpY6fx5uCXpvEKUIzumQ
# WSmTkHVah4C8D05jUWmD5jF2krAUvf0XjsGDIYidjXRwsnORnBSZdHGoukQ8rGl9
# 6OjvuWT9UZIM7nXv76lPkk3APVFL4q9FMNoc3GxcTzHMWyvYknOM5KI4tDFhncqh
# 0gvie5OalWCxrzq8inGy3o+3v0/ggsOG/mjyN9tR5nas6qsqzya6PHaPoXbLn/uq
# ibsV+LOtjo65w0uJUV1LRn1TwG6bBQBKO1pdYmx3SouaY8dF9UsNTsvhiyFOdBge
# 7ZnjzoMmD33USkSWbAL5icGHSAShsIvJkQfWd8lrsx46dzuePC/DwGp8S384sNA+
# j0Ecqd/ar0cBfGi9mToKHufrGZS4S4R4xdVU41k2eA5AmhaEQ4D3BkWaZC7ocx59
# Q5s2N/XMDK6CX7OEkIAEy6Oi8DyO8vl/hozEI/USpc6OqUM/eX74WH7dR2fKaDZa
# D+36iSHOKQK2wgPVHaeBrfjobgFXY+/MGFGPMlvk9Z4q4zQNZ2Y=
# =XP94
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Apr  8 11:54:06 2026 BST
# 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:
  util: fix missing aio_wait sym in qemu guest agent only build
  Allow building qemu tools on 32-bit hosts
  util/meson.build: do not add cpuinfo-$arch to util_ss for 32bit CPUs

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
43 hours agoutil/readline: Fix out-of-bounds access in readline_insert_char().
Nguyen Dinh Phi [Mon, 6 Apr 2026 05:04:54 +0000 (13:04 +0800)] 
util/readline: Fix out-of-bounds access in readline_insert_char().

Currently, the readline_insert_char() function is guarded by the cursor
position (cmd_buf_index) rather than the actual buffer fill level(cmd_buf_size).
The current check is:
if (rs->cmd_buf_index < READLINE_CMD_BUF_SIZE)

This logic is flawed because if the command buffer is full and a user moves the
cursor backward (e.g. by sending left arrow key), cmd_buf_index can be
decreased without descreasing of buffer size.
This allow subsequent insertions to increase cmd_buf_size past its maximum
limit of rs->cmd_buf.

Because in the ReadLineState struct, cmd_buf[READLINE_CMD_BUF_SIZE + 1] is
immediately followed by the cmd_buf_index integer, once the buffer size is
sufficiently inflated, the memmove() operation inside readline_insert_char()
can write past the end of cmd_buf[] and overwrites cmd_buf_index itself.

The subsequent line:
rs->cmd_buf[rs->cmd_buf_index] = ch;

then writes the input character to an address determined by the now-corrupted
index.

By providing a specifically crafted input sequence via HMP, this flaw can be
used to redirect the write operation to overwrite any field within the
ReadLineState structure, which can lead to unpredictable behavior or
application crashes.

Fix this by adding the guard to check for buffer fullness.

Cc: qemu-stable@nongnu.org
Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Message-id: 20260406050454.284873-2-phind.uet@gmail.com
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
45 hours agoutil: fix missing aio_wait sym in qemu guest agent only build
Daniel P. Berrangé [Tue, 7 Apr 2026 15:18:17 +0000 (16:18 +0100)] 
util: fix missing aio_wait sym in qemu guest agent only build

Configure QEMU with

 --disable-system --disable-user --disable-tools --enable-guest-agent

and the build with fail with

  FAILED: [code=1] qga/qemu-ga
  ld: libqemuutil.a.p/qapi_qmp-dispatch.c.o: in function `do_qmp_dispatch_bh':
  qapi/qmp-dispatch.c:140:(.text+0x5c): undefined reference to `aio_wait_kick'

This aio_kick() usage was recently introduced in qmp-dispatch.c
without updating the build logic.

Fixes commit fc1a2ec7da531223b3473185dc2584f8a7c6c659
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
45 hours agoAllow building qemu tools on 32-bit hosts
Helge Deller [Sat, 4 Apr 2026 22:40:16 +0000 (00:40 +0200)] 
Allow building qemu tools on 32-bit hosts

Qemu's tools like qemu-img are often needed on 32-bit platforms,
although the actual qemu emulators have been discontinued on 32-bit.

To allow building the tools on 32-bit this patch implements three small
changes:

a) The check in meson.build is changed to still error out if the user
tries to build qemu-system or qemu-user on a 32-bit platform, but allows
building tools (e.g. by "--enable-tools") alone.

b) The compile time check in atomic.h now checks against
sizeof(uint64_t) so that 32-bit environments can still build
successfully, while 128-bit atomic operations are prevented to sneak in.

c) Allow linking against libatomic as long as we don't build the
qemu-system and qemu-user binaries.

Sucessfully tested on the 32-bit big-endian powerpc architecture.

Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2 days agoati-vga: Do not crash on 24 bits per pixel
BALATON Zoltan [Mon, 6 Apr 2026 01:20:31 +0000 (03:20 +0200)] 
ati-vga: Do not crash on 24 bits per pixel

The stn_he_p function only supports power of two sizes so it will
assert if we call it with size 3 that happens with 24 bits per pixel.
It's not clear from the documentation if this should be supported or
not and drivers tested so far don't use it so refuse the parameters
that would crash QEMU for now.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Chad Jablonski <chad@jablonski.xyz>
Message-ID: <20260406012031.335A0596A24@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2 days agoati-vga: Update mode on CRTC_PITCH change
BALATON Zoltan [Fri, 3 Apr 2026 14:59:28 +0000 (16:59 +0200)] 
ati-vga: Update mode on CRTC_PITCH change

When changing line length we need to update display parameters so call
mode change when changing CRTC_PITCH if the value has changed.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Chad Jablonski <chad@jablonski.xyz>
Message-ID: <3f54ff54a873a8f8a0cc5f14660703b4025a69e2.1775228029.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2 days agoati-vga: Fix setting CRTC_OFFSET
BALATON Zoltan [Fri, 3 Apr 2026 14:59:27 +0000 (16:59 +0200)] 
ati-vga: Fix setting CRTC_OFFSET

Offset (display start address) should also be updated when changing
the register value not only on mode change. Fix the register write
mask to hard code bits 0:2 to 0 as the chip docs say and update the
start address on register write. This fixes virtual screen panning for
screens larger than displayed resolution.

As this register allows values that cannot be handled by the VBE_DISPI
X and Y offsets (which is restricted by line length) we add a function
to set it directly not through the VBE offsets.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Tested-by: Chad Jablonski <chad@jablonski.xyz>
Reviewed-by: Chad Jablonski <chad@jablonski.xyz>
Message-ID: <2b8af6022aba06aa98a249ae67922de29d82d86f.1775228029.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2 days agohw/arm/omap_sx1: map CS3 at the correct base
GuoHan Zhao [Fri, 3 Apr 2026 01:44:41 +0000 (09:44 +0800)] 
hw/arm/omap_sx1: map CS3 at the correct base

omap_sx1 wires the "sx1.cs3" region to OMAP_CS2_BASE instead of
OMAP_CS3_BASE.

That places both CS2 and CS3 at the same address and leaves the real
CS3 window unmapped. Point the CS3 region at OMAP_CS3_BASE so the
static chip-select layout matches the OMAP address definitions.

Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Fixes: ba1580299d0 ("omap_sx1: convert to memory API")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260403014441.38725-1-zhaoguohan@kylinos.cn>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2 days agocirrus-vga: Make frame buffer endianness little endian by default
BALATON Zoltan [Wed, 1 Apr 2026 20:53:27 +0000 (22:53 +0200)] 
cirrus-vga: Make frame buffer endianness little endian by default

QEMU VGA defaults to target endianness but real Cirrus VGA is little
endian so set it explicitly in cirrus_init_common() to fix it on big
endian machines.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260401205327.914905969EC@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2 days agodocs/about/removed-features: Replace 'since' -> 'removed in'
Philippe Mathieu-Daudé [Mon, 23 Mar 2026 15:05:09 +0000 (16:05 +0100)] 
docs/about/removed-features: Replace 'since' -> 'removed in'

We use "deprecated since ..." and "removed in ...".
Replace "since" by "removed in" for removed features.

Fixes: 762c8554394 ("vfio: Remove 'vfio-platform'")
Fixes: aeb1a50d4a7 ("vfio: Remove 'vfio-amd-xgbe' device")
Fixes: e50a021a451 ("hw/arm: Remove ast2700a0-evb machine")
Fixes: 4af2433a81b ("docs: Mention 32-bit PPC host as removed")
Fixes: 8ebc416ac17 ("vfio: Remove 'vfio-calxeda-xgmac' device")
Fixes: a80151c9da1 ("hw/sd/sdcard: Remove support for spec v1.10")
Fixes: 269ffaabc84 ("buildsys: Remove support for 32-bit MIPS hosts")
Fixes: fc37c122fff ("migration: Drop deprecated QMP migrate argument @detach")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260323151934.92880-1-philmd@linaro.org>

2 days agoMerge tag 'pull-target-arm-20260407' of https://gitlab.com/pm215/qemu into staging
Peter Maydell [Tue, 7 Apr 2026 17:55:04 +0000 (18:55 +0100)] 
Merge tag 'pull-target-arm-20260407' of https://gitlab.com/pm215/qemu into staging

target-arm queue:
 * docs/system: remove extraneous sentence
 * target/arm: fix fault_s1ns for stage 2 faults
 * target/arm: do_ats_write(): avoid assertion when ptw failed

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmnVRJIZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3iy2EACmribMFgzcPttAFU9Tx3VG
# SZ6jvm3xexspyh0bQe/P47gV2oZgvTepEYzteM0b6b6hOfiDFHCFzXXjyfcTqhxU
# LkeDXysB54zKjnHThihTnD3065JndwSYQdIQx+P3hk1Lcq3uGvZNLHjMRT++N0xv
# Jtp9SLKD9LtJZcEAXtPEy3gxoZwA/3hXp03EooO9TpZHDEdhTFxTmP9DVLeaAU9T
# zH1CwIPvZv2g1ep82fKuVM2TNNazPC60RIy4jiyiMAKAFgWLdp2bpes8MfXu24Au
# mAFdZJirVI8/oBQn+WaM1o9zVcIPuXqpK1AfFa9KRxYJx35dS3fUEC80vhdcL7gO
# HQP0ZmnKqWxB2CN8b7sEAjLyLjScE5GMqWbbTUckfJoFdQF1jcmfxRpl8t5VI/p/
# /2lCIwFjSerRiRrqwbUMss1ue37IpwZ8dWUkpKPhwnlBUe/Ts41DMZeQ9Cf/HieZ
# 6RgfcXszTQWwUESOPooy593Smw2pwKfB3Gmpq7khwIPtu5WLMhDKiQhTA1t4r7YM
# /BmNXUCAoiTIN2S8IXxe23ORXcPlQ4EyFDDBh0h4gAeX0eQCgUAcfkmDlRZb7Rbj
# sIVuAFOd1YW8sz3AHoXXH4bq0oPeh5MeWZJwcp1djTV3j1Cdyz9L9I0eFF+OWtj/
# MNvSBK7/IIapbLenws8GHg==
# =eIR5
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Apr  7 18:53:22 2026 BST
# 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-20260407' of https://gitlab.com/pm215/qemu:
  docs/system: remove extraneous sentence
  target/arm: fix fault_s1ns for stage 2 faults
  target/arm: do_ats_write(): avoid assertion when ptw failed

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 days agodocs/system: remove extraneous sentence
Alex Bennée [Mon, 6 Apr 2026 16:56:48 +0000 (17:56 +0100)] 
docs/system: remove extraneous sentence

Lest we confuse the reader about something we are no longer showing in
the example.

Fixes: 132f8ec799c (target/arm: change default pauth algorithm to impdef)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-id: 20260406165648.997995-1-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 days agotarget/arm: fix fault_s1ns for stage 2 faults
Alex Bennée [Sun, 5 Apr 2026 11:24:10 +0000 (12:24 +0100)] 
target/arm: fix fault_s1ns for stage 2 faults

The computation of s1ns was simply wrong. For Stage 2 faults, it
should indicate whether the faulting IPA is in the Non-Secure IPA
space. Correct the logic to check for ARMSS_NonSecure and drop the
extraneous s2_mmu_idx test.

This is effectively a change in the intended semantics of the
ARMMMUFaultInfo::s1ns field, so that we no longer try to make it
exactly match HPFAR_EL2.NS but instead set it for any stage 2 fault
on an NS IPA, relying on users of the field to check whether the
fault is to be taken to Secure EL2 before propagating the field to
the HPFAR_EL2.NS bit.  Since the actual writing of HPFAR_EL2.NS is
already gated by arm_is_secure_below_el3(env), we only need to update
the comments to document this change of semantics.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/2568
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20260405112410.603223-1-alex.bennee@linaro.org
[PMM: also update comments about the s1ns field]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 days agoutil/meson.build: do not add cpuinfo-$arch to util_ss for 32bit CPUs
Michael Tokarev [Wed, 25 Mar 2026 13:49:26 +0000 (16:49 +0300)] 
util/meson.build: do not add cpuinfo-$arch to util_ss for 32bit CPUs

qemu dropped support for 32bit CPUs recently, so this change is an
additional clean-up on top.  But in theory it will allow building
qemu-guest-agent on a 32bit system.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 days agotarget/arm: do_ats_write(): avoid assertion when ptw failed
Peter Maydell [Tue, 31 Mar 2026 09:23:05 +0000 (10:23 +0100)] 
target/arm: do_ats_write(): avoid assertion when ptw failed

In do_ats_write() we try to assert that the cacheattrs from
get_phys_addr_for_at() are in the form we expect:

    /*
     * ATS operations only do S1 or S1+S2 translations, so we never
     * have to deal with the ARMCacheAttrs format for S2 only.
     */
    assert(!res.cacheattrs.is_s2_format);

However, the GetPhysAddrResult struct documents that its fields are
only valid when the page table walk succeeded.  For a two stage page
table walk which fails during stage two, we will return early from
get_phys_addr_twostage() and depending on the fault type the
res.cacheattrs may have been initialized with the stage 2 cache attr
information in stage 2 format.  In this case we will incorrectly
assert here.

Fix the assertion to not look at the res fields if the lookup failed.

Note for stable backports: the do_ats_write() function is in
target/arm/helper.c in older QEMU versions, but the change to the
assert line is the same.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3328
Fixes: 9f225e607f21 ("target/arm: Postpone interpretation of stage 2 descriptor attribute bits")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20260331092305.2062580-1-peter.maydell@linaro.org

8 days agoUpdate version for v11.0.0-rc2 release v11.0.0-rc2
Peter Maydell [Wed, 1 Apr 2026 19:48:02 +0000 (20:48 +0100)] 
Update version for v11.0.0-rc2 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 days agoMerge tag 'firmware-20260401-for-11.0-pull-request' of https://gitlab.com/kraxel...
Peter Maydell [Wed, 1 Apr 2026 15:47:41 +0000 (16:47 +0100)] 
Merge tag 'firmware-20260401-for-11.0-pull-request' of https://gitlab.com/kraxel/qemu into staging

igvm bugfixes

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmnM6lEACgkQTLbY7tPo
# cTg9BhAA1WRZUp8e3G7wUwZPf8JGztEExXRC8ageNp6c4cmY8WB9BmqdteH4afo/
# ulKzwNk7aI8AdyG5OlIl+aI9MyfEMiOEstdL+Hu2nt8o0Ve5h5uXh9NmqTbcHxNU
# G3lwzTR1mjE5zm8/PZ0mQDMD7MMMbAPrpVCxbUSg13oWxQCG0Tl38w8n9G2RCTZe
# PE1XMRp/tzumzmraxTkCRwleD4Ctq298gS4DG7k8Zlits8Wwak5dDFvphwV7X/na
# Aix4DF0mtXgHHZ4szjX5HZGQq824JdY6keq8vq30kE87rA2/Qz9evhgRelYPPiLH
# /QFGUhHEwL4o5fMZkID852QXA85wRL9XulPIU08jF15jkkhOQZo6nYYQDJvTjtpz
# Lji++Pm8EFxvbDqO8TrSagXA0Y7DQ0GTzj5wuJ/5jIePA1trfV9dypjrT9vpOIg/
# iKM+kT8vb05Fid0v12thI0/7bAcnTMv+BNjtkiMYkQ8PIgSfEDbHYS6OBelXSHY0
# aw8I85UORuzqq5DDFRvY7WqpZ4Rd+vHDh9lBpnPEI6QheLFSV39zHpveNlB14z4Q
# r7CO9pQKvxU44qEpIiDQ36AJT8udBt4e9rBpBoRTbq77hbU0APKllpn89yb0YckQ
# uhoJnF8glP7kuu0aMz8OLHDFvZwmlSm/HuOFw4pbmE0WtLPnEcY=
# =rhi3
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Apr  1 10:50:09 2026 BST
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* tag 'firmware-20260401-for-11.0-pull-request' of https://gitlab.com/kraxel/qemu:
  igvm: fix parent object type in IgvmCfg struct
  igvm: fix memory leak on failed memory region init
  igvm: switch to PRIx64

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 days agoMerge tag 'pull-linux-user-20260401' of https://gitlab.com/pm215/qemu into staging
Peter Maydell [Wed, 1 Apr 2026 09:49:09 +0000 (10:49 +0100)] 
Merge tag 'pull-linux-user-20260401' of https://gitlab.com/pm215/qemu into staging

linux-user:
 * don't incorrectly sign extend guest addresses from mlock etc
 * fix name_to_handle_at when AT_HANDLE_MNT_ID_UNIQUE flag is set
 * update select timeout writeback
 * make openat2() use -L for absolute paths
 * correctly handle SIGSEGV generated when trying to deliver
   a synchronous signal

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmnM6b0ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3utoEACFpsqPLc4bTYZfIOy7Q8qW
# Kd9w/QT2Wyp5eZ52efxXopimpB7yKfIbHOB6MF1lHELfwkrDZ04CcD2q+JSR9Zce
# Zydl11nMdmhIzsWmfUju5qzrQQmx+F9pjC2nntt6QAqixMKqj6DLNEClK9QXp1WX
# q9XfJVju5JgciiUlC/Ne01GmKv1xGV3PkZy6BOzi1n3BVFyqb+wWP1G83KKIYoSN
# VCgs5IOh53qEwlPYMKzDJAUJhc3Ba2LvC4xQ2rAZlHTAoejcJHMtKjd/8ZNebGTo
# juO+7GpqxBhAQUFrmsaLidD7kiNcTMpWV5N25BDG+QFlD7pRdwk7hPrrtTHUCw7c
# H+HKKmCTUoTgoucNzkfokX58YTOOyG4Uh2eRnQ03SCd2bVX2Oesq2WYIkaJ6kY/D
# JukzaTGHLZHYzze7vmZe0dGdWWFox5MqbuNOuALan+sCq+VsznCOI2quXFovU/9m
# OCYRYwB5sAPmAd1yVvkwl53xfhyXvwCPJhzBTq9YfY6RAtqufgq1zfFPiMqvQNMi
# AZRTIcB+YXxk3fOa/xAMKF7GAzYujNbKCC/DTE2EnaqgpDHqUyQxQXSUJiAiR0os
# yI1XL/1I7dKEsV+ZdNJtQiWFdLJvi0f3C15jq1ICqzQViI2Dk27MVNAhYhda4ueo
# sr9PJ85vQk8bKu7+Ng2qYg==
# =jmT5
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Apr  1 10:47:41 2026 BST
# 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-linux-user-20260401' of https://gitlab.com/pm215/qemu:
  bsd-user, linux-user: signal: recursive signal delivery fix
  linux-user: Make openat2() use -L for absolute paths
  linux-user: update select timeout writeback
  linux-user: fix name_to_handle_at when AT_HANDLE_MNT_ID_UNIQUE flag is set
  include/user/guest-host.h: Provide g2h etc for both abi_ptr and vaddr
  include: Don't include guest-host.h in cpu-ldst.h

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agoMerge tag 'hppa-more-v11-fixes-pull-request' of https://github.com/hdeller/qemu-hppa...
Peter Maydell [Tue, 31 Mar 2026 19:46:13 +0000 (20:46 +0100)] 
Merge tag 'hppa-more-v11-fixes-pull-request' of https://github.com/hdeller/qemu-hppa into staging

HPPA patches for qemu-v11

A few late fixes for the HPPA architecture for QEMU v11:
- graphics support was broken for 64-bit machines. This series adds
  support for VGA graphics for Linux guests
- the various memory ranges were not correctly implemented
- TOC/NMI was not working on 64-bit machines
- minor 64-bit HP-UX boot fixes (but HP-UX 64-bit still crashes)

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCacwXxAAKCRD3ErUQojoP
# X7NxAQCBszDUKsNX5KiB+cxW1AfT1Gyzo4q9T0NNULO5v2Fn7gD/YVzgtZ6F+crK
# 1eG1R0aVekPmx+NClsCLvy/dX1YmTww=
# =L+6i
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 31 19:51:48 2026 BST
# 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 'hppa-more-v11-fixes-pull-request' of https://github.com/hdeller/qemu-hppa:
  target/hppa: Update SeaBIOS-hppa to version 24
  hw/hppa: Implement memory ranges
  target/hppa: Fix TOC handler for 64-bit CPUs
  hw/pci-host/astro: Add GMMIO mapping
  hw/pci-host/astro: Fix LMMIO DIRECT mappings
  hw/pci-host/astro: Implement LMMIO registers
  hw/pci-host/astro: Fix initial addresses in IOC
  hw/pci-host/astro: Make astro address arrays accessible for other users

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agotarget/hppa: Update SeaBIOS-hppa to version 24
Helge Deller [Tue, 31 Mar 2026 18:24:24 +0000 (20:24 +0200)] 
target/hppa: Update SeaBIOS-hppa to version 24

New SeaBIOS-hppa v24 release with various fixes for qemu-v11:
- Initialize Astro chip with relevant LMMIO, GMMIO and others
- Disable Artist on 64-bit machines
- Fully implement parisc memory ranges
- Change inventory to list CPU first for HP-UX
- Allow 715 to boot from HP-UX 11iv1 CD-ROM
- Prepare for MULTICELL machines
- Initialize PCI_CACHE_LINE_SIZE PCI value
- Call TOC/HPMC handler code from OS if installed

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agohw/hppa: Implement memory ranges
Helge Deller [Sun, 29 Mar 2026 22:11:12 +0000 (00:11 +0200)] 
hw/hppa: Implement memory ranges

All 64-bit PA-RISC machines split the memory into (up to 3) different
memory ranges, which are mapped at specific addresses.  This patch
mimics the mapping as it's done on physical machines, which includes the
3.75 GB split for C3700, and 1 GB split for newer 64-bit PAT machines
like the A400.

SeaBIOS-hppa needs to know how the memory split is done, so add a new
memsplit_addr variable which stores the specific split address and hand
this over to SeaBIOS-hppa via fwcfg.

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agotarget/hppa: Fix TOC handler for 64-bit CPUs
Helge Deller [Sun, 29 Mar 2026 18:46:52 +0000 (20:46 +0200)] 
target/hppa: Fix TOC handler for 64-bit CPUs

When the TOC handler is triggered, e.g. by using the "NMI" command
in the QEMU monitor, make sure to call the full 64-bit TOC handler
address in SeaBIOS-hppa firmware.
This fixes the TOC handler on 64-bit CPUs (and 64-bit SeaBIOS).

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agohw/pci-host/astro: Add GMMIO mapping
Helge Deller [Sat, 28 Mar 2026 23:34:59 +0000 (00:34 +0100)] 
hw/pci-host/astro: Add GMMIO mapping

Implement the GMMIO mapping.

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agohw/pci-host/astro: Fix LMMIO DIRECT mappings
Helge Deller [Sat, 28 Mar 2026 23:30:36 +0000 (00:30 +0100)] 
hw/pci-host/astro: Fix LMMIO DIRECT mappings

Fix the existing code which has the mask wrong.
Implement the direct mapping via overlapping subregion with priority 3
to make sure the direct mapping gets precedence over the LMMIO region.

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agohw/pci-host/astro: Implement LMMIO registers
Helge Deller [Sat, 28 Mar 2026 23:26:14 +0000 (00:26 +0100)] 
hw/pci-host/astro: Implement LMMIO registers

Add code to adjust the memory mapping windows according to the LMMIO registers
in Astro.  This allows SeaBIOS-hppa to configure Astro depending on existing
PCI cards, and especially makes it possible to enable a VGA PCI card.

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agohw/pci-host/astro: Fix initial addresses in IOC
Helge Deller [Sat, 28 Mar 2026 23:15:12 +0000 (00:15 +0100)] 
hw/pci-host/astro: Fix initial addresses in IOC

F-Extend the LMMIO and IOS distributed addresses.
Use the 44-bit address for the IOS distributed address.

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agohw/pci-host/astro: Make astro address arrays accessible for other users
Helge Deller [Sat, 28 Mar 2026 23:12:09 +0000 (00:12 +0100)] 
hw/pci-host/astro: Make astro address arrays accessible for other users

Move the tables out of astro_realize(). This is needed because follow-up
patches will need those tables.

Signed-off-by: Helge Deller <deller@gmx.de>
9 days agobsd-user, linux-user: signal: recursive signal delivery fix
Nicholas Piggin [Sat, 21 Mar 2026 13:56:22 +0000 (23:56 +1000)] 
bsd-user, linux-user: signal: recursive signal delivery fix

Synchronous signals must accommodate a synchronous signal being
raised during delivery, as asynchronous ones do. For example
badframe errors during delivery will cause SIGSEGV to be raised.

Without this fix, cpu_loop() runs process_pending_signals() which
delivers the first synchronous signal (e.g., SIGILL) which fails
to set the handler and forces SIGSEGV, but that is not picked up.
process_pending_signals() returns. Then cpu_loop() runs cpu_exec()
again, which attempts to execute the same instruction, another
SIGILL.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20260321135624.581398-3-npiggin@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agolinux-user: Make openat2() use -L for absolute paths
Sun Haoyu [Tue, 17 Mar 2026 05:38:27 +0000 (13:38 +0800)] 
linux-user: Make openat2() use -L for absolute paths

openat2() ignored the -L prefix and opened host files directly.
For example, openat2("/tmp/file") opened /tmp/file on the host, not
QEMU_LD_PREFIX/tmp/file like openat() does.

Fix this by using path() to rewrite absolute paths. Skip this
when RESOLVE_BENEATH or RESOLVE_IN_ROOT is set:
- RESOLVE_BENEATH rejects absolute paths anyway
- RESOLVE_IN_ROOT resolves relative to dirfd

Now openat() and openat2() work in the same way.

Link: https://gitlab.com/qemu-project/qemu/-/work_items/3341
Signed-off-by: Sun Haoyu <shyliuli@aosc.io>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20260317053827.25051-1-shyliuli@aosc.io
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agolinux-user: update select timeout writeback
Sun Haoyu [Fri, 20 Mar 2026 11:16:47 +0000 (19:16 +0800)] 
linux-user: update select timeout writeback

The Linux kernel writes back the remaining timeout for select-family
syscalls in poll_select_finish(). If that writeback fails, it keeps
the original return value.

However, QEMU only writes back the timeout on success. If the writeback
fails, QEMU returns -TARGET_EFAULT. This can lose the remaining
timeout and change the return value.

Update do_select(), do_pselect6(), and do_ppoll() to always write back
the timeout to match the Linux kernel's behavior. If the timeout
writeback fails, keep the original return value.

Tested with the issue reproducer.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3343
Signed-off-by: Sun Haoyu <shyliuli@aosc.io>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20260320111647.138984-1-shyliuli@aosc.io
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agolinux-user: fix name_to_handle_at when AT_HANDLE_MNT_ID_UNIQUE flag is set
Clayton Craft [Thu, 26 Mar 2026 05:59:36 +0000 (22:59 -0700)] 
linux-user: fix name_to_handle_at when AT_HANDLE_MNT_ID_UNIQUE flag is set

Linux 6.12 added AT_HANDLE_MNT_ID_UNIQUE, which indicates that mount_id
is 64-bits. If name_to_handle_at is called with this flag set then qemu
passes a 4 byte int to the kernel, which then tries to store 8 bytes in
a 4 byte variable, causing a SIGSEGV[1][2].

This stores mount_id in a 64-bit var if the flag is set.

1. https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4431
2. https://github.com/systemd/systemd/issues/41279

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Message-id: 20260325-fix-name-to-handle-at-v1-1-49fb922e6fd3@craftyguy.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agoinclude/user/guest-host.h: Provide g2h etc for both abi_ptr and vaddr
Peter Maydell [Mon, 30 Mar 2026 14:31:23 +0000 (15:31 +0100)] 
include/user/guest-host.h: Provide g2h etc for both abi_ptr and vaddr

In commit 7804c84a ("include/user: Use vaddr in guest-host.h") we
changed all the functions in guest-host.h that took or returned their
guest address argument in type abi_ptr to instead use vaddr.

This introduced regressions for the case of a 32-bit guest and an
address above 2GB for the common situation where the address is a
syscall argument stored in a variable of type 'abi_long'.  With
abi_ptr (which will be an unsigned 32-bit type for 32-bit guests),
the address is cast to unsigned 32-bit, and then zero-extended to
64-bits in g2h_untagged_vaddr().  With the switch to vaddr (which is
always a 64-bit unsigned type), the guest address will instead be
sign-extended to 64 bits, which gives the wrong answer.

Fix this by providing two versions of the affected functions: the
standard names (g2h(), g2h_untagged(), guest_addr_valid_untagged(),
guest_range_valid_untagged(), cpu_untagged_addr()) return to using
the logically-correct abi_ptr type; new versions with a _vaddr()
prefix use the vaddr type.

accel/tcg/user-exec.c must change to use the _vaddr() versions; this
is the only file that uses guest-host.h that we want to compile once.
All the other uses are in linux-user and bsd-user code that
inherently has to know the sizes of target-ABI types.

Cc: qemu-stable@nongnu.org
Fixes: 7804c84a ("include/user: Use vaddr in guest-host.h")
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3333
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20260330143123.1685142-3-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agoMerge tag 'for-upstream' of https://gitlab.com/kmwolf/qemu into staging
Peter Maydell [Tue, 31 Mar 2026 16:51:08 +0000 (17:51 +0100)] 
Merge tag 'for-upstream' of https://gitlab.com/kmwolf/qemu into staging

Block layer patches

- ide: Fix potential assertion failure on VM stop for PIO read error
- scsi: Don't consider LOGICAL UNIT NOT SUPPORTED guest recoverable
- vhost-user-blk-server: fix opt_io_size=1 causing severe Windows I/O degradation
- monitor: Fix deadlock in monitor_cleanup
- Fix filename references in comments

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmnL4dURHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9aG/BAAiZ1XYu46Ct9+IdopoPYhEK+T7m7PuEUR
# KJPvdp0J6mVwVBehUjacmKvCtBQUbUF8x7PD6NMF3Q+7qkVqhmngbb4s5ks/zUQi
# MxZTJF1Yps9EZ6mI3bA6caV9PzegQSOA4p+RhOXaDt7lhXhBFt6lCVFVB5eCma+a
# 1dOxAbKD6geftaMvB1uQu5qYAtclATw1Gl4YSkdaO+UKGizce6YdKYOvFwU53EvO
# 4cRrrVzk7i5act61HcwT6xNSFJ+Fgmwcn+EiD0Uw/hOFzf8nXNS0DME7QJKjr6Ug
# Adv/439sUk5J1A//S3liSQ8D9SZBdi2yS7quMy4ggbwz9CqQvUi3ejenpOJtn8yG
# ylyhHmd4dnr8QC1Zf/3SbZ1hbLWn69y+rmV+e2uJF59bpWRMvqxeJX+D4DPe5LZp
# E8pckNmqkqkBfsPuM0nzW5qdPmkioZ+i2pEgAQ99tkUlcfFLvrlEaCr9AVKgDcZn
# B2HjaZPLrZtXEKMtKM4RXt7h8F33Zxnvy8chSdqW6J0BaWvPtFO7bJn2elAgibum
# ZBigvhfwkw9xxzlGmudTbNMz8Fnpc/KBue8bhzDkOe4AybcVwuefG3VIyI8tLkG9
# IoHxbeQM6+yHXjrvn3OLWLJ7HQ0EyBsRE9cpZN4p/3rSS5G7RWfNdAIuzwLamZQ3
# lmzdXf9++1E=
# =JiFt
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 31 16:01:41 2026 BST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* tag 'for-upstream' of https://gitlab.com/kmwolf/qemu:
  block: Fix crash after setting latency historygram with single bin
  vhost-user-blk-server: fix opt_io_size=1 causing severe Windows I/O degradation
  monitor: Fix deadlock in monitor_cleanup
  block: Fix references in bdrv_bsc_*() function comments
  scsi: Don't consider LOGICAL UNIT NOT SUPPORTED guest recoverable
  ide: Fix potential assertion failure on VM stop for PIO read error

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agoinclude: Don't include guest-host.h in cpu-ldst.h
Peter Maydell [Mon, 30 Mar 2026 14:31:22 +0000 (15:31 +0100)] 
include: Don't include guest-host.h in cpu-ldst.h

We currently include user/guest-host.h from accel/tcg/cpu-ldst.h.
However that file doesn't need anything from guest-host.h, since we
removed the uses of g2h() in commit 9b74d403b30e ("accel/tcg: Move
user-only tlb_vaddr_to_host out of line").

Move the include of guest-host.h to where it's actually needed.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20260330143123.1685142-2-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agoMerge tag 'hw-misc-20260331' of https://github.com/philmd/qemu into staging
Peter Maydell [Tue, 31 Mar 2026 14:21:44 +0000 (15:21 +0100)] 
Merge tag 'hw-misc-20260331' of https://github.com/philmd/qemu into staging

Misc HW patches

Few fixes and MAINTAINERS updates.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmnLyKIACgkQ4+MsLN6t
# wN5PNw/9ELCMUEt9V+K4NvfHYEeBAj3TvjxqJSoZ2NI8NrOP4edzWz690D4Hdqg/
# Ptt+OpgQicfxCpFrH3VNC7v69zaVRPB17BAlwMOJDF7x/2vRa4RsaPDpM3zYy3NA
# Rc+ujc/Umt8T3O0qVVcRExGx4XhHyo7ed55GPMXNcMFmG2ndmX2K/ZJfRCBWqSjd
# aMsqG/ZnT5WR7MgWL4jOC3oZsOg53FlNl4cVDV5HuVKzR8kK3M2u1nDFB2Oyi7Wa
# /9d6h5lwXRW5VrccNMM2wSoQqeYiChq7/ZcxBgmZrgbq9vlsSFQ/ea+3NloTLbx9
# 7SVwR7XHL2Bo8Civ6VjmyStt8bRCNOAYD4cg2br/EDhO9rnyVNpaCcYprAcK9I+H
# CKcwWBzKvgzkboCqU5rXrE1m5E+eZX9xiz3K0J7up+m72rGunhOIeou4gAY4wtFj
# d7F5dCzzC7wn+iIK45KtDpGTb9chlOoTTx0auwco9Av1C5ZqqoVa1+Dpf4wKnb2+
# 2Hzpz5L7R8UxYWTyYuL3ZDOqaVc5ZIpxrYwbzLI8VO1lHN0vPfzNLXfUaIPO4XNm
# JL0GDUV4CetFVAQJHFckUEpI+NAGkajvmY5bckwSA1CXWGDqGmRIuaL9ML9R79/V
# yZUZ0z/WHJQlH8Q953BE2SxQzhql/ZKDQeQSP/LVmVaJW2arBAw=
# =vddZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 31 14:14:10 2026 BST
# 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 'hw-misc-20260331' of https://github.com/philmd/qemu:
  MAINTAINERS: fix OSUOSL typo
  hw/hppa: Disable Artist graphics card on 64-bit machines
  hw/pci-host/astro: Update copyright and documentation link
  ati-vga: Add upper limit to x-linear-aper-size property
  ati-vga: Silence warning about operator precedence
  target/i386: Treat qtest like TCG for supported-features
  target/i386/cpu.c: Correct minor grammar error in warning
  backends/igvm: switch to PRIx64
  target/mips: save CP0 timer in vmstate
  MAINTAINERS: Separate QDev section from QOM one
  ppc/pnv: generate dtb after machine initialization is complete

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agoblock: Fix crash after setting latency historygram with single bin
Kevin Wolf [Tue, 31 Mar 2026 10:26:08 +0000 (12:26 +0200)] 
block: Fix crash after setting latency historygram with single bin

Passing an empty list of boundaries to block-latency-histogram-set sets
up a state that leads to a NULL pointer dereference when the next
request should be accounted for. This is not a useful configuration, so
just error out if the user tries to set it.

The crash can easily be reproduced with the following script:

    qmp() {
    cat <<EOF
    {'execute':'qmp_capabilities'}
    {'execute':'block-latency-histogram-set',
     'arguments': {'id':'ide0','boundaries':[]}}
    {'execute':'cont'}
    EOF
    }

    qmp | ./qemu-system-x86_64 -S -qmp stdio \
        -drive if=none,format=raw,file=null-co:// \
        -device ide-hd,drive=none0,id=ide0

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20260331102608.60882-1-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9 days agovhost-user-blk-server: fix opt_io_size=1 causing severe Windows I/O degradation
Max Makarov [Mon, 30 Mar 2026 19:34:51 +0000 (22:34 +0300)] 
vhost-user-blk-server: fix opt_io_size=1 causing severe Windows I/O degradation

The QSD vhost-user-blk export sets opt_io_size=1 and min_io_size=1 in
the virtio config. These values are reported to the guest through the
VPD Block Limits page as OptimalTransferLength=1 block (512 bytes)
and OptimalTransferLengthGranularity=1 block.

Windows respects these hints and splits all I/O into ~512-byte
requests, causing ~100x sequential throughput degradation (150 MB/s
instead of 15+ GB/s). Linux is unaffected as its block layer ignores
these values.

Set both to 0 which means "not reported" per the SCSI Block Limits
VPD spec, allowing Windows to use its own optimal I/O size defaults.

Signed-off-by: Max Makarov <maxpain@linux.com>
Message-ID: <20260330193451.76037-1-maxpain@linux.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9 days agomonitor: Fix deadlock in monitor_cleanup
hongmianquan [Fri, 27 Mar 2026 13:10:24 +0000 (21:10 +0800)] 
monitor: Fix deadlock in monitor_cleanup

During qemu_cleanup, if a non-coroutine QMP command (e.g.,
query-commands) is concurrently received and processed by the
mon_iothread, it can lead to a deadlock in monitor_cleanup.

The root cause is a race condition between the main thread's shutdown
sequence and the coroutine's dispatching mechanism. When handling a
non-coroutine QMP command, qmp_dispatcher_co schedules the actual
command execution as a bottom half in iohandler_ctx and then yields. At
this suspended point, qmp_dispatcher_co_busy remains true.

Subsequently, the main thread in monitor_cleanup(), sets
qmp_dispatcher_co_shutdown, and calls qmp_dispatcher_co_wake(). Since
qmp_dispatcher_co_busy is already true, the aio_co_wake is skipped. The
main thread then enters the AIO_WAIT_WHILE_UNLOCKED loop, it executes
the scheduled BH (do_qmp_dispatch_bh) via aio_poll(iohandler_ctx,
false), which attempts to wake up the coroutine, aio_co_wake schedules a
new wake-up BH in iohandler_ctx. The main thread then blocks
indefinitely in aio_poll(qemu_aio_context, true), while the coroutine's
wake-up BH is starved in iohandler_ctx, qmp_dispatcher_co never reaches
termination, resulting in a deadlock.

The execution sequence is illustrated below:

 IO Thread                 Main Thread (qemu_aio_context)        qmp_dispatcher_co (iohandler_ctx)
    |                                 |                                        |
    |-- query-commands                |                                        |
    |-- qmp_dispatcher_co_wake()      |                                        |
    |    (sets busy = true)           |                                        |
    |                                 |   <-- Wakes up in iohandler_ctx -->    |
    |                                 |                                        |-- qmp_dispatch()
    |                                 |                                        |-- Schedules BH (do_qmp_dispatch_bh)
    |                                 |                                        |-- qemu_coroutine_yield()
    |                                 |                                            [State: Suspended, busy=true]
    |   [ quit triggered ]            |
    |                                 |-- monitor_cleanup()
    |                                 |-- qmp_dispatcher_co_shutdown = true
    |                                 |-- qmp_dispatcher_co_wake()
    |                                 |    -> Checks busy flag. It's TRUE!
    |                                 |    -> Skips aio_co_wake().
    |                                 |
    |                                 |-- AIO_WAIT_WHILE_UNLOCKED:
    |                                 |   |-- aio_poll(iohandler_ctx, false)
    |                                 |   |    -> Executes do_qmp_dispatch_bh
    |                                 |   |    -> Schedules 'co_schedule_bh' in iohandler_ctx
    |                                 |   |
    |                                 |   |-- aio_poll(qemu_aio_context, true)
    |                                 |   |    -> Blocks indefinitely! (Deadlock)
    |                                 |
    |                                 X (Main thread sleeping)                 X (Waiting for next iohandler_ctx poll)

To fix this, we add an explicit aio_wait_kick() in do_qmp_dispatch_bh()
to break the main loop out of its blocking poll, allowing it to evaluate
the loop condition and poll iohandler_ctx.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: hongmianquan <hongmianquan@bytedance.com>
Signed-off-by: wubo.bob <wubo.bob@bytedance.com>
Message-ID: <20260327131024.51947-1-hongmianquan@bytedance.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9 days agoMAINTAINERS: fix OSUOSL typo
Alex Bennée [Tue, 31 Mar 2026 07:04:01 +0000 (08:04 +0100)] 
MAINTAINERS: fix OSUOSL typo

It stands for Oregon State University Open Source Lab.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20260331070401.1125840-1-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agohw/hppa: Disable Artist graphics card on 64-bit machines
Helge Deller [Mon, 30 Mar 2026 21:18:49 +0000 (23:18 +0200)] 
hw/hppa: Disable Artist graphics card on 64-bit machines

The original Artist graphics used the GSC bus, was often installed in old
32-bit machines (e.g. 715) and can not be used on 64-bit machines.
This is why this patch makes the artist driver dependend on the Lasi chip,
which was never used in a 64-bit machine.

Note that there exists a variant of Artist for the PCI-bus (Visualize-EG PCI).
It has quite some differences in the registers, and would require that we write
a PCI ROM for it, so that Linux and HP-UX would be able to use it.

Instead, for now, users can simply use a standard VGA or ATI PCI graphics card
on Linux.  This can be enabled on the command line with "-device ati-vga" or
"-device VGA".  If the "-nographic" option is omitted, a PCI OCHI controller
with USB keyboard and USB mouse will be added automatically.

This fixes graphics support on 64-bit hppa machines and allows us to boot up a
64-bit Linux installation with VGA graphics.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260330211859.19317-3-deller@kernel.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agohw/pci-host/astro: Update copyright and documentation link
Helge Deller [Mon, 30 Mar 2026 21:18:48 +0000 (23:18 +0200)] 
hw/pci-host/astro: Update copyright and documentation link

Update the link to the documentation, which was still pointing to the
Wiki page. In the meantime the PA-RISC wiki was converted to a
read-the-docs website.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260330211859.19317-2-deller@kernel.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agoati-vga: Add upper limit to x-linear-aper-size property
BALATON Zoltan [Mon, 30 Mar 2026 21:09:17 +0000 (23:09 +0200)] 
ati-vga: Add upper limit to x-linear-aper-size property

Coverity warns in CID 1645968 about possible integer overflow. This
should never happen but to ensure that, add an upper limit on the
x-linear-aper-size. This may not silence the warning but makes sure
users cannot cause an overflow.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <541ffffdaa4c67b9dcbca6c2498e69b137bce95d.1774904832.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agoati-vga: Silence warning about operator precedence
BALATON Zoltan [Mon, 30 Mar 2026 21:09:16 +0000 (23:09 +0200)] 
ati-vga: Silence warning about operator precedence

Coverity in CID 1645969 warns about possible operator precendence
issue which is a false positive in this case but simplify the
expression to silence the warning.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <24161ec41f118ad097387f8a84897dee7b4747b8.1774904832.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agotarget/i386: Treat qtest like TCG for supported-features
Peter Maydell [Mon, 30 Mar 2026 15:14:37 +0000 (16:14 +0100)] 
target/i386: Treat qtest like TCG for supported-features

In x86_cpu_get_supported_feature_word() we figure out the supported
features differently for each accelerator. The default case is
"set all feature bits"; however this triggers a warning because
it enables two features which conflict with each other:

$ ./build/x86/qemu-system-x86_64   -cpu max -accel qtest -S
qemu-system-x86_64: warning: this feature conflicts with APX: CPUID[eax=07h,ecx=00h].EBX.mpx [bit 14]
qemu-system-x86_64: warning: this feature conflicts with MPX: CPUID[eax=07h,ecx=01h].EDX.apxf [bit 21]

Treat qtest like TCG here, to avoid the complaint.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20260330151437.1787008-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agotarget/i386/cpu.c: Correct minor grammar error in warning
Peter Maydell [Mon, 30 Mar 2026 15:13:09 +0000 (16:13 +0100)] 
target/i386/cpu.c: Correct minor grammar error in warning

Fix a minor error in the grammar of the warning messages
produced if both MPX and APX are enabled:

$ ./build/x86/qemu-system-x86_64   -cpu max -accel qtest -S
qemu-system-x86_64: warning: this feature conflicts with APX: CPUID[eax=07h,ecx=00h].EBX.mpx [bit 14]
qemu-system-x86_64: warning: this feature conflicts with MPX: CPUID[eax=07h,ecx=01h].EDX.apxf [bit 21]

Fixes: 91bc4d81078a ("i386/cpu: Add APX EGPRs into xsave area")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260330151309.1786787-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agobackends/igvm: switch to PRIx64
Luigi Leonardi [Mon, 30 Mar 2026 12:43:07 +0000 (14:43 +0200)] 
backends/igvm: switch to PRIx64

Use the PRIx64 format macro instead of %lX for uint64_t values.

This is to improve portability as %lX is not necessarily 64 bit long.

Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Message-ID: <20260330-igvm_fixes-v1-1-03587a5a808b@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agotarget/mips: save CP0 timer in vmstate
Trieu Huynh [Sun, 29 Mar 2026 11:37:32 +0000 (20:37 +0900)] 
target/mips: save CP0 timer in vmstate

The MIPS R4K CP0 timer (env->timer) is not included in vmstate_mips_cpu,
so after loadvm the QEMUTimer has no scheduled expiry. This causes
qemu_poll_ns() to block indefinitely and the guest to freeze until an
external I/O event (e.g. a keypress) wakes the main loop.

Fix by adding an optional vmstate subsection for the timer, following
the same pattern used by ARM (gt_timer), RISC-V (env.stimer), SPARC
(qtimer), and OpenRISC (timer).

The .needed callback returns false when env->timer is NULL (KVM mode),
keeping the subsection optional for backwards compatibility with
existing snapshots.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1987
Signed-off-by: Trieu Huynh <vikingtc4@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260329113732.482619-1-vikingtc4@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agoMAINTAINERS: Separate QDev section from QOM one
Philippe Mathieu-Daudé [Wed, 25 Mar 2026 14:42:17 +0000 (15:42 +0100)] 
MAINTAINERS: Separate QDev section from QOM one

QDev is about QEMU devices model API, while
QOM is about QEMU object model in plain C.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Message-Id: <20260325151728.45378-2-philmd@linaro.org>

9 days agoppc/pnv: generate dtb after machine initialization is complete
Shivang Upadhyay [Tue, 24 Mar 2026 13:50:26 +0000 (19:20 +0530)] 
ppc/pnv: generate dtb after machine initialization is complete

Currently, the machine dtb is generated in pnv_init(), before all devices
are fully initialized. This can result in an incomplete dtb for the system,
as seen in bug [1].

Fix this by deferring dtb generation until machine initialization is complete,
using the machine_init_done_notifier hook.

[1] https://lore.kernel.org/all/20260323231612.GA2637687@ax162/

Cc: Aditya Gupta <adityag@linux.ibm.com>
Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-stable@nongnu.org
Reported-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Fixes: a16d4c2f162a86d ("ppc/pnv: fix dumpdtb option")
Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Aditya Gupta <adityag@linux.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20260327124136.983955-1-shivangu@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9 days agoblock: Fix references in bdrv_bsc_*() function comments
Yunjian Long [Wed, 25 Mar 2026 01:42:04 +0000 (09:42 +0800)] 
block: Fix references in bdrv_bsc_*() function comments

Some functions are defined in block_int-io.h, so the correct
annotation is block_int-io.h rather than block_int.h

Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn>
Message-ID: <20260325094204300GFCZYBzAE00cSWaldbDcT@zte.com.cn>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9 days agoMerge tag 'for-11.0-rc-pull-request' of https://gitlab.com/marcandre.lureau/qemu...
Peter Maydell [Tue, 31 Mar 2026 12:41:29 +0000 (13:41 +0100)] 
Merge tag 'for-11.0-rc-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging

Various UI & audio fixes for 11.0-rc

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmnLmTsACgkQ2ujhCXWW
# nOUKig//Z6OlzPu5bmwwXulJpVsnwMHG5l+gftbYgs7p2XuMNFuejTQzHO6Ozns2
# chLJ3Of0xm9Z8NsQ2DZJThXjBUCanXCAOsuMYCAGy5PP2vTNBklwc6Sfm0a357cY
# um9E7GN21Kgc8CPizR/b5sv0enTZUT0JXPGapLZpuX2lOPrGpRXHA5thRtwcfaQP
# CHXJ6inWEgz3hXTTgxslvKIlwlTaH5EvjMWbjWgda//V/ZV2x8643o8n2qwO5spL
# ZY8j3TbPr10f4YnfwVcoRLfxnAswXeuk6LkJne0zv8WAQUOOkmi78H6oOmOCoJrt
# Lj08WXU+BJXZS6RKNN20eS1AmcHa2Z+59jXzwRDSRkskugeGACFlx/hbBMZwhbR9
# 0siL/dLJUdQhO/XiCYerN/HNwTy9j0lw4PWFNBBNPn66ykQQZWii4bzMWsVwt5IY
# yKhBQuAvHiN/wre0/NV914TuGWVHqwRYA37SPuLl7VfiR6hVJwTSUK7FscbswTLg
# WGjXB/uxn2XQJnYDXV9WaUHKAOIJ228HXBWLEB5vW55ZkJIl3xT5GL93kX8oFjSh
# 1vy3rVwrMO7UdS0UVhvXZC6E0tmI/fu67jcI8cQsENK6eqnXMdQEKY7otblW9LzM
# pesEUc7LKYFbYbxX8627MnbNU52HXan/XeV2otUJiX9ssUoIdag=
# =qtVg
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 31 10:51:55 2026 BST
# 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-rc-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  tests: don't build audio tests when no audio drivers are enabled
  ui/vnc-jobs: clear source tag
  ui/vnc-jobs: fix VncRectEntry leak on job cleanup
  ui/dbus: tear down clipboard callbacks on display finalize
  ui/dbus: associate add_client completion with its request
  audio/mixeng: fix sw/hw mixup in audio_pcm_sw_init_

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
9 days agoscsi: Don't consider LOGICAL UNIT NOT SUPPORTED guest recoverable
Kevin Wolf [Mon, 30 Mar 2026 12:16:35 +0000 (14:16 +0200)] 
scsi: Don't consider LOGICAL UNIT NOT SUPPORTED guest recoverable

When commit bdf9613b introduced scsi_sense_buf_is_guest_recoverable(),
it included LOGICAL UNIT NOT SUPPORTED in the list of guest recoverable
sense codes. It doesn't really explain how the codes to be in the list
were selected.

As the LUN doesn't come from the guest, but from the block backend
(usually the SCSI device on the host that was opened with host_device,
but it could also be the iscsi block driver), there is really no way the
guest could influence this.

It seems that on some storage arrays, LOGICAL UNIT NOT SUPPORTED can
happen during failover operations. When combined with multipath, the
request should be retried on another path instead of being reported to
the guest, which would offline the filesystem in response.

Simply returning false in scsi_sense_buf_is_guest_recoverable() will
enable the retry logic in file-posix, and will also make sure that if
the error persists, the configured error policy is respected so that the
VM can be stopped.

Buglink: https://redhat.atlassian.net/browse/RHEL-158212
Fixes: bdf9613b7f87 ('scsi: explicitly list guest-recoverable sense codes')
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20260330121635.49205-1-kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9 days agoide: Fix potential assertion failure on VM stop for PIO read error
Kevin Wolf [Thu, 26 Mar 2026 16:51:24 +0000 (17:51 +0100)] 
ide: Fix potential assertion failure on VM stop for PIO read error

ide_sector_read() as well as its callers neglect to call ide_set_retry()
before starting I/O. If the I/O fails, this means that the retry
information is stale. In particular, ide_handle_rw_error() has an
assertion that s->bus->retry_unit == s->unit, which can fail if either
there was no previous request or it came from another device on the bus.
If the assertion weren't there, a wrong request would be retried after
resuming the VM.

Fix this by adding a ide_set_retry() call to ide_sector_read().

This affects only reads because ide_transfer_start() does call
ide_set_retry(). For writes, the data transfer comes first and the I/O
is only started when the data has been read into s->io_buffer, so by
that time, ide_set_retry() has been called. For reads, however, the I/O
comes first and only then the data is transferred to the guest, so the
call in ide_transfer_start() is too late.

Buglink: https://redhat.atlassian.net/browse/RHEL-153537
Reported-by: Tingting Mao <timao@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20260326165124.138593-1-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9 days agotests: don't build audio tests when no audio drivers are enabled
Anton Kuchin [Fri, 27 Mar 2026 16:45:51 +0000 (16:45 +0000)] 
tests: don't build audio tests when no audio drivers are enabled

When there are no audio drivers configure fails with "ERROR: Command
cannot have '@INPUT@', since no input files were specified".

Fixes: 3220b38a8d ("tests: start manual audio backend test")
Signed-off-by: Anton Kuchin <antonkuchin@nebius.com>
Message-ID: <DB8P190MB07142E1BA8DEEA8B2E41D5B2DB57A@DB8P190MB0714.EURP190.PROD.OUTLOOK.COM>
[ Marc-André - use empty modinfo stub ]
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
9 days agoMerge tag 'migration-20260330-pull-request' of https://gitlab.com/farosas/qemu into...
Peter Maydell [Tue, 31 Mar 2026 08:39:52 +0000 (09:39 +0100)] 
Merge tag 'migration-20260330-pull-request' of https://gitlab.com/farosas/qemu into staging

Migration pull request

- Fix dirty limit (-m thorough) test
- Fix a few error message strings

# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmnKx94QHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnXp7EADLdY2S5gVgc8/R/b0uZRzj9f0A9vrkK2S8
# bcUHJxhY+PkJhUnNRr2l4PuyiwLCKefDWc0gnl9J0mFZ/gqVnkAPEZhVS+hOwjZm
# 6KyHWwEz9hBqU0RmIq/RmVsvKw+jRqAIZ2k43N4aOy38TbRK1o5PLrK8T4Zouycq
# grsg383xahcHUx/RZDGilGXWONeOnnv/Tg8v6rqL51eGa8BllOTZRxqMlXD/r53/
# EyLAdr3gmeawL9o7aLU6bodRwRREWGAPyvHMKB6VBautu28MsMmPjpdAbP+i3aYY
# JoKreKxO1mXvV8UL8xYOTVLbR52qACQ35Q+YKplrT4vO8yqVhN+nr8XVeQmQi2gF
# elLWi//ir6ZQggArkGSIfLdkzsyuLtNlHLtT7i35xudWUx1KcEDuT3i18OY6Qfd+
# faJr9JZPQ0I0QWMo7qRDjfUSzgYYOYoAdrfuG5xND+z2X3W4BK4E8dL4uJ5Eipad
# 8q/yRZf2KbY2vzR/VDRVUXOyVcirV0bg0v3Y7iAdaffIyia/htFvtJoZHNMhKhzU
# zoqa6VtipHJT5YLstei2Nzol9u0ghh7snWmzUKFnPjlbOfP8L11r7hNd6iYW0lFY
# GegIgZWyqwhccIAzAndqS14bwN/yRiDcH1FiZH8wYJaT4gcaTtgRzI5JGA08Ahhc
# SVKJrpsq7A==
# =ynIi
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 30 19:58:38 2026 BST
# 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-20260330-pull-request' of https://gitlab.com/farosas/qemu:
  tests/qtest/migration: Fix slow test dirty_limit
  migration: Fix references to parameter names in error messages
  migration: Fix up error message for max-cpu-throttle

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agoigvm: fix parent object type in IgvmCfg struct
Luigi Leonardi [Mon, 30 Mar 2026 12:43:09 +0000 (14:43 +0200)] 
igvm: fix parent object type in IgvmCfg struct

IgvmCfg is defined as an Object but, currently, its first member is an
ObjectClass.

Replace ObjectClass with Object.

Fixes: c1d466d267cf ("backends/igvm: Add IGVM loader and configuration")
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Message-ID: <20260330-igvm_fixes-v1-3-03587a5a808b@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 days agoigvm: fix memory leak on failed memory region init
Luigi Leonardi [Mon, 30 Mar 2026 12:43:08 +0000 (14:43 +0200)] 
igvm: fix memory leak on failed memory region init

When memory_region_init_* fail, `igvm_pages` is not freed causing a leak.

Free `igvm_pages` in the error path.

Fixes: c1d466d267cf ("backends/igvm: Add IGVM loader and configuration")
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Message-ID: <20260330-igvm_fixes-v1-2-03587a5a808b@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 days agoigvm: switch to PRIx64
Luigi Leonardi [Mon, 30 Mar 2026 12:43:07 +0000 (14:43 +0200)] 
igvm: switch to PRIx64

Use the PRIx64 format macro instead of %lX for uint64_t values.

This is to improve portability as %lX is not necessarily 64 bit long.

Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Message-ID: <20260330-igvm_fixes-v1-1-03587a5a808b@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 days agoMerge tag 'pull-target-arm-20260330' of https://gitlab.com/pm215/qemu into staging
Peter Maydell [Mon, 30 Mar 2026 18:53:58 +0000 (19:53 +0100)] 
Merge tag 'pull-target-arm-20260330' of https://gitlab.com/pm215/qemu into staging

target-arm queue:
 * target/arm: Don't skip access flag fault for AccessType_AT
 * hw/net/rocker: Avoid double-free of l2_flood.group_ids
 * MAINTAINERS updates
 * hw/arm/xilinx_zynq: Use strcasecmp to parse boot-mode option values

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmnKxl0ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3i+bD/49nGG+lfkDEXxTl0CU+8Wp
# jQsZnKTox38hQA39Mdpi2yMnQLnOdjVlUloUiGp43jGnoqRRD60j3jrncytPRoPN
# ez4TZV0w/WHpGp1kj8UzKbe96XdMK6eQNSN+fnZHGsqz3F9mprQsX/qN461zIe8T
# AO4tg/Fk1omWpE7KqM6Y93T+00DcGjgjoQaVxkb97JPHsIEgZeqzZ8GZ5NgHPAWo
# +73bFW3jG3UbpCQwSycrVOduuyBMxeagnrXXlhPwrv5g7DLP5QA/F0RGj41VZD2U
# tYIGFBm3D+haQ0R6yLFHZQG3cnysroaGcw+pwSOf2M/iNV1D7h7zv3CaGsR3fgVq
# 6ZLYjCV0T0chDMCjeGAclTTYi8kLq2flMdu+RHmcN+pDP6rJjyBmRaha7jLLhRey
# bMQCYlYzZRsPn1F6wmy3mcX9Qpj4eBTFAu+fxoJ6JIOAZL6wAohfrTWPWpPI+yjK
# 9AFYEfizzonQYH/ItxWBHB5vYhq76CtsJZcwkAV5pyQsVdT87hlTjza5oNh/B6LP
# VCG6sdAdqFsgQ8ehzhnX3fNlfQe2nCcFstFnodD/6ee4rcU+Gq1op5bQW74rx+hC
# dm8EoM9iy5eJ1UTAPANlfmgUgsV/fYrCeS0vEMIvh5KEqoCARxTbPMn9iGQHgnjV
# dc8He30avuBBRh/LlOViJQ==
# =/KNp
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 30 19:52:13 2026 BST
# 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-20260330' of https://gitlab.com/pm215/qemu:
  hw/arm/xilinx_zynq: Use strcasecmp to parse boot-mode option values
  MAINTAINERS: Remove Igor Mitsyanko
  MAINTAINERS: Remove Riku Voipio
  hw/net/rocker: Avoid double-free of l2_flood.group_ids
  target/arm: Don't skip access flag fault for AccessType_AT

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agohw/arm/xilinx_zynq: Use strcasecmp to parse boot-mode option values
Peter Maydell [Mon, 30 Mar 2026 15:18:07 +0000 (16:18 +0100)] 
hw/arm/xilinx_zynq: Use strcasecmp to parse boot-mode option values

In zynq_set_boot_mode() where we parse the string the user has set
the boot-mode option to, we use strncasecmp(str, "qspi", 4) and so
on.  This is wrong, because it means that we will ignore any trailing
junk on the end of the option string, and handle
 -machine boot-mode=sdXYZZY
the same as
 -machine boot-mode=sd

In the documentation we say:
 Supported values are ``jtag``, ``sd``, ``qspi`` and ``nor``.
and that's obviously what we meant to implement.

The correct tool for this job is a simple strcasecmp operation.
Switch to that.

We use the g_ascii_strcasecmp() rather than plain strcasecmp()
because we're comparing ASCII strings here and don't want the
potentially locale-specific behaviour that strcasecmp() implies (and
we're trying to standardize on the glib function for this kind of
string comparison).

Fixes: 7df3747c92d13 ("hw/arm/xilinx_zynq: Add boot-mode property")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20260327145012.907264-1-peter.maydell@linaro.org

10 days agoMAINTAINERS: Remove Igor Mitsyanko
Peter Maydell [Mon, 30 Mar 2026 15:18:07 +0000 (16:18 +0100)] 
MAINTAINERS: Remove Igor Mitsyanko

Igor Mitsyanko doesn't wish to be listed in MAINTAINERS any more;
remove his email from the relevant sections.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20260323134741.4114629-3-peter.maydell@linaro.org

10 days agoMAINTAINERS: Remove Riku Voipio
Peter Maydell [Mon, 30 Mar 2026 15:18:07 +0000 (16:18 +0100)] 
MAINTAINERS: Remove Riku Voipio

Riku Voipio doesn't wish to be listed in MAINTAINERS any more;
remove his email from the relevant sections.

This moves the "overall usermode emulation" section to Orphan status.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20260323134741.4114629-2-peter.maydell@linaro.org

10 days agohw/net/rocker: Avoid double-free of l2_flood.group_ids
Peter Maydell [Mon, 30 Mar 2026 15:18:06 +0000 (16:18 +0100)] 
hw/net/rocker: Avoid double-free of l2_flood.group_ids

In of_dpa_cmd_add_l2_flood(), we allocate memory for the
group->l2_flood.group_ids array, freeing any previous array.
However, in the error-exit path we free the group_ids memory but do
not clear the pointer to NULL.  This means that if the guest causes
us to take the error-exit path and then later call the function
again, we will try again to free the memory we already freed.

Fix this by clearing the group_ids pointer in the error exit
path, so we maintain the invariant of "either it points at
allocated memory, or it is NULL" (both being valid to g_free()).

Cc: qemu-stable@nongnu.org
Fixes: dc488f88806 ("rocker: add new rocker switch device")
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3253
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20260324193530.375628-1-peter.maydell@linaro.org

10 days agotarget/arm: Don't skip access flag fault for AccessType_AT
Zenghui Yu [Mon, 30 Mar 2026 15:18:06 +0000 (16:18 +0100)] 
target/arm: Don't skip access flag fault for AccessType_AT

As per the pseudo code from DDI0487 M.a.a (on J1-16021) AArch64.S1Walk():

  // Check descriptor AF bit
  elsif (descriptor<10> == '0' && walkparams.ha == '0' &&
          (!accdesc.acctype IN {AccessType_DC, AccessType_IC} ||
           boolean IMPLEMENTATION_DEFINED "Generate access flag fault on IC/DC operations")) then
      fault.statuscode = Fault_AccessFlag;

an access flag fault should be generated for AccessType_AT, if the AF bit
is 0 and !param.ha.

Besides, we should continue to not raise the access flag fault for
in_debug = true which is what we've been doing previously (before commit
efebeec13d07) for LPAE and is what intention of the debugger access
codepath is.

Cc: qemu-stable@nongnu.org
Fixes: efebeec13d07 ("target/arm: Skip AF and DB updates for AccessType_AT")
Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev>
Message-id: 20260324160321.96347-1-zenghui.yu@linux.dev
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agotests/qtest/migration: Fix slow test dirty_limit
Fabiano Rosas [Thu, 26 Mar 2026 16:44:05 +0000 (13:44 -0300)] 
tests/qtest/migration: Fix slow test dirty_limit

After the referenced commit, the incoming side doesn't exit
automatically after a failure. Tests that expect the destination to
fail should use -incoming defer, issue QMP migrate-incoming, wait for
the failure event and issue QMP quit.

Fix the dirty_limit test which wasn't updated properly.

Fixes: 4e8c4dda97 ("tests/qtest/migration: Force exit-on-error=false")
Reported-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260326164405.1626-1-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
10 days agomigration: Fix references to parameter names in error messages
Markus Armbruster [Thu, 26 Mar 2026 07:42:46 +0000 (08:42 +0100)] 
migration: Fix references to parameter names in error messages

Migration parameter names separate words with hyphens.  A number of
error messages in migrate_params_check() use underscores instead.
Wrong since day one.  Fix them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260326074247.188674-3-armbru@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
10 days agomigration: Fix up error message for max-cpu-throttle
Markus Armbruster [Thu, 26 Mar 2026 07:42:45 +0000 (08:42 +0100)] 
migration: Fix up error message for max-cpu-throttle

Fixes: 1a739d301232 (migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260326074247.188674-2-armbru@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
10 days agoMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Peter Maydell [Mon, 30 Mar 2026 12:54:56 +0000 (13:54 +0100)] 
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* more WHPX fixes and documentation
* hpet: fix bounds check for s->timer[]
* hpet: lower HPET_MAX_TIMERS to 24
* lsi53c895a: keep SCSIRequest alive during DMA
* lsi53c895a: keep device alive during SCRIPTS execution
* hw/acpi: fix save/restore for MIPS Malta machine

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmnKTQ0UHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroNDAQgAry87O2EtgZBK8084Rn41+8w7Hx4K
# HmKGGLRHunZgOPPbFtLFj8sjmZGqV6MuELf8zBIwheJiaWyp9SqPN2FtwldEwLsG
# C37MsUS02SbfPrJPuAMaDsfeFknHaV/pUWiZIYr5S5+dKckz8P9RUZghCVKBmwyL
# mapNE7/++A2HCX2FnABmAsMMo+kt425kCmkDFryJQ9R7j8vjYo2sHn+WpDRjOLYS
# 0K7a5HBCwE+TrdZC1Q3J17VMhX/sFL/Ms8ByIhwJa+WimZoF/roaDBiK/0iUfVlg
# 196U0rvejdymAMWqIU462fyHvVkeW50FCHjTccmqnrIbFEdL4CFZlnrNxQ==
# =JIqb
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 30 11:14:37 2026 BST
# 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:
  hw/acpi: Do not save/load cpuhp state unconditionally
  lsi53c895a: keep SCSIRequest alive during DMA
  lsi53c895a: keep lsi_request alive as long as the SCSIRequest
  lsi53c895a: keep lsi_request and SCSIRequest in local variables
  lsi53c895a: do not do anything else if a reset is requested by writing ISTAT0
  lsi53c895a: keep a reference to the device while SCRIPTS execute
  hpet: lower HPET_MAX_TIMERS to 24
  hpet: fix bounds check for s->timer[]
  target/i386: emulate: remove redundant logging for unmapped MMIO access
  whpx: i386: trace unsupported MSR accesses
  docs: add WHPX section with initial info
  meson.build: remove i386-softmmu WHPX support

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agoMerge tag 'pull-aspeed-20260330' of https://github.com/legoater/qemu into staging
Peter Maydell [Mon, 30 Mar 2026 12:54:48 +0000 (13:54 +0100)] 
Merge tag 'pull-aspeed-20260330' of https://github.com/legoater/qemu into staging

aspeed queue:

* Complete lost interrupts fix in the Aspeed I2C model
* Fix a vlan tag insertion issue in the ftgmac100 model

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmnKYwYACgkQUaNDx8/7
# 7KHzlw/+OxlsY72otFxNbLWtQEOTQvWPDXvTbKsjlVtZalLM7BE/X+EqG6i9pDmj
# Reujd32F5pDX0pLzvFDqKgkQsFPW2F8jPpVMHDzZZkAjH0F5cckP/GO91WFC1F0x
# w7xlh9LKvw/LQcamR3Ptpb9+zuvG+p0O2tg+dmzUDzYwTt/Y7N25gnK9lUNup1qT
# T68Yy5Wa2YkW0J4/BGHOe9wxdM8tHz5izM69sTrb3nDnryiMWwNyMVIcDI1RyM53
# xMy2sMs/SpjxBYIl8+xfiGMGizjwVIyISb3aMC/OtLMMzxZ7PUaGSZLe63qB4kJF
# nBJ5LRxXTvsA74m9/rNk9S28lTtF4j14YVbMKj9hzt+YZzTumu20wfsTY63qja9K
# XWFqKoyD7Hrwt1grAYLWEl4mTNZNgby6091eNOWdYhv2Ogb3JWrTckCtDPWiJpeo
# c6Q9dewUSY0GDA5+2mOcVcDq4zcbZvVqdXqYH2EUasbmMLre/k/Q4zd7AOsC6U9V
# kPnd+cLPnIxMRBlzVKi/Sg2Non8QHsa/EgPyKYny9A4zGHgpGOAloSsRmv/xW3kH
# PFMpz/wIqudjpa0kJtsbE+v5iRixOTpr8oA8E8dPz8lrW9oVbRmqyQHKpIHOILq9
# M6WDnwxJDUqZS8w8Hk1hJMriQUpYPabYdwiWWdnPeyj9cWGuHFU=
# =ZxRl
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 30 12:48:22 2026 BST
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [full]
# gpg:                 aka "Cédric Le Goater <clg@kaod.org>" [full]
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* tag 'pull-aspeed-20260330' of https://github.com/legoater/qemu:
  net/ftgmac100: preserve full VLAN TCI in TX tag insertion
  hw/i2c/aspeed_i2c: reset and migrate pending_intr_sts

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agoMerge tag 'pull-request-2026-03-30' of https://gitlab.com/thuth/qemu into staging
Peter Maydell [Mon, 30 Mar 2026 10:50:24 +0000 (11:50 +0100)] 
Merge tag 'pull-request-2026-03-30' of https://gitlab.com/thuth/qemu into staging

* Fix some warnings from pylint in the functional tests
* Fix migration of the isa-cirrus-vga device
* Remove obsolete linuxboot.bin prebuilt blob
* Fix migration functional test to check for socat instead of ncat now

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmnKT7YACgkQLtnXdP5w
# LbXqmA/8CUxZvJCxtODkw7jl8dX5yPRFs7HbYlY3RklhO8GhM4GHVo0ywxPAH3RG
# pkwXZwSp9I+ABY3fXwiFjMCYtM66iCR3UIateGonbREQgMn8A0EIeOQlCKF+rvaM
# HKucqanEk/lRAvuWJMEzo/3kPiUgblFieMZqUEdgTxH5YhJxi/IRq3HsESG5NKJn
# R+7u6KrgHJaZLhcLoBCRZ2FAf6wUTv+wpV58LoMsFXYQDRIsUU53u8uDWkUDy5yU
# TKMZOB0E5+Rb94apU2x3i7oAbQP8AX4fEGhzAiN00e8hjm8o5yRMHcK2aC1wpAlC
# VUnBwRPntiWGJKYMhaRS0Pe9gwTbUHvaO61GZpduK+Vip8mG8VRw1Ar71g703Zna
# AIqlJhqR4CS04I6SuF13qtJWmCOHw+sSzU8tMQe7MNGWF1rNuAk1GB5Lm5+nIm2e
# NVn6zGsI0v39ERGjUdCv2GZTZyfFdm+0+vB/nWvaCExsjVKErsaU1t/KNHL9ur2v
# 9x80CubNXy3bV8gnlgBzmgYkLxIyT6QpyPY3moKt9oHimy7XSEcMel80MiWEK8sL
# uPW2BKN+m0gUThuWG/3X9dkg/9nci81yoSpyuRvW8UBegqAFdLUjBfq/iCPNWtpI
# aX8aIgIQBoLfRGjUFBuButkWT2XQlxmp/TqT9FYkfvKAWobPNlU=
# =5aFN
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar 30 11:25:58 2026 BST
# 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-30' of https://gitlab.com/thuth/qemu:
  tests/functional/migration.py: Skip migration_with_exec() if socat is not available
  pc-bios: remove obsolete linuxboot.bin prebuilt blob
  hw/display/cirrus_vga_isa: Disable global_vmstate by default for new machines
  hw/display/vga-isa: Fix migration of the isa-vga device
  tests/functional/qemu_test: Silence warnings from pylint in config.py
  tests/functional/qemu_test: Split huge fetch() function in asset.py
  tests/functional/qemu_test: Silence (most) warnings from pylint in asset.py

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agotests/functional/migration.py: Skip migration_with_exec() if socat is not available
Zhao Liu [Mon, 30 Mar 2026 05:33:00 +0000 (13:33 +0800)] 
tests/functional/migration.py: Skip migration_with_exec() if socat is not available

Commit 643a171f5668 ("tests: Replace ncat with socat in migration test
and drop ncat from containers") replaced ncat with socat, but missed to
skip related test cases if socat is not available, which will cause test
errors on the system without socat.

Fix this by checking socat instead of the original ncat.

Fixes: 643a171f5668 ("tests: Replace ncat with socat in migration test and drop ncat from containers")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20260330053300.2721608-1-zhao1.liu@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
10 days agohw/acpi: Do not save/load cpuhp state unconditionally
Zhao Liu [Mon, 30 Mar 2026 05:30:08 +0000 (13:30 +0800)] 
hw/acpi: Do not save/load cpuhp state unconditionally

Commit 7aa563630b6b ("pc: Start with modern CPU hotplug interface
by default") removed the .needed callback (vmstate_test_use_cpuhp)
from vmstate_cpuhp_state in both piix4.c and ich9.c.

However, PIIX4 is also used by non-PC boards - MIPS Malta, which does
not select CONFIG_ACPI_CPU_HOTPLUG. For MIPS Malta, the linker resolves
vmstate_cpu_hotplug to the stub one in acpi-cpu-hotplug-stub.c, which is
a zero-initialized VMStateDescription with .fields == NULL.

Before commit 7aa563630b6b, .needed() of PIIX4's vmstate_cpuhp_state
returned false for MIPS Malta since PIIX4PMState always initialized the
field cpu_hotplug_legacy as true. Malta implicitly relies on this
initial value to bypass vmstate_cpuhp_state. However, this is unstable
because Malta itself does not support CPU hotplugging, whether via the
legacy way or the modern way.

Commit 7aa563630b6b removed .needed() check for vmstate_cpuhp_state,
this broke the existing dependency that Malta had relied on, forcing
Malta to save and load vmstate_cpuhp_state during the save/load process,
which in turn caused a segmentation fault due to NULL fields in the
stub-compiled code.

Fix this by bringing back the .needed = cpuhp_needed callback for
vmstate_cpuhp_state of PIIX4, that checks
MachineClass::has_hotpluggable_cpus. Boards that do not support CPU
hotplug (only MIPS Malta) will skip this subsection entirely, which
is both correct and consistent with the previous behavior.

At the same time, add a similar .needed() check to ICH9. Although no
boards with ICH9 are affected by this issue, this helps avoid potential
issues in the future.

Reproducer (MIPS Malta):
  $ qemu-img create -f qcow2 dummy.qcow2 32M
  $ qemu-system-mipsel -nographic \
      -drive if=none,format=qcow2,file=dummy.qcow2
  [Type "C-a c" to get the "(qemu)" monitor prompt)]
  (qemu) savevm foo    # segfault

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Fixes: 7aa563630b6b ("pc: Start with modern CPU hotplug interface by default")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3360
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260330053008.2721532-1-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agolsi53c895a: keep SCSIRequest alive during DMA
Paolo Bonzini [Fri, 27 Mar 2026 17:42:45 +0000 (18:42 +0100)] 
lsi53c895a: keep SCSIRequest alive during DMA

Reentrant MMIO can cause the SCSIRequest to be completed, at which
point lsi_request_orphan would drop the last reference.  Anything
that happens afterwards would access freed data.  Keep a reference
to the SCSIRequest and, through req->hba_private, to the lsi_request*
for as long as DMA runs.

Reported-by: Jihe Wang <wangjihe.mail@gmail.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agolsi53c895a: keep lsi_request alive as long as the SCSIRequest
Paolo Bonzini [Fri, 27 Mar 2026 17:40:45 +0000 (18:40 +0100)] 
lsi53c895a: keep lsi_request alive as long as the SCSIRequest

To protect against using the lsi_request after SCSIRequest has been freed,
keep the HBA-private data alive until the last reference to the SCSIRequest
is gone.  Because req->hba_private was used (even if just for an assertion)
to check that the request was still either current or queued, add a boolean
field that is set when the SCSIRequest is cancelled or completed, which
is when the lsi_request would have been unqueued.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agolsi53c895a: keep lsi_request and SCSIRequest in local variables
Paolo Bonzini [Fri, 27 Mar 2026 17:32:17 +0000 (18:32 +0100)] 
lsi53c895a: keep lsi_request and SCSIRequest in local variables

Protect against changes from reentrant device MMIO during DMA, by always
operating on the same request.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agolsi53c895a: do not do anything else if a reset is requested by writing ISTAT0
Paolo Bonzini [Fri, 27 Mar 2026 16:39:15 +0000 (17:39 +0100)] 
lsi53c895a: do not do anything else if a reset is requested by writing ISTAT0

If the device is reset, anything that is done before will not really
be visible.  So do the reset and exit immediately if that is one
of the requests in the value written to ISTAT0.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agoui/vnc-jobs: clear source tag
Marc-André Lureau [Fri, 13 Mar 2026 18:29:12 +0000 (22:29 +0400)] 
ui/vnc-jobs: clear source tag

Avoid potentially removing a dangling source & simplify code.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
10 days agoui/vnc-jobs: fix VncRectEntry leak on job cleanup
Marc-André Lureau [Fri, 13 Mar 2026 16:54:47 +0000 (20:54 +0400)] 
ui/vnc-jobs: fix VncRectEntry leak on job cleanup

When a VncJob is freed, its associated VncRectEntry list must also be
freed. Previously, vnc_job_push() and the disconnected path in
vnc_worker_thread_loop() called g_free(job) directly, leaking all
VncRectEntry allocations.

Introduce vnc_job_free() which iterates and frees the rectangle entries
before freeing the job itself, and use it in both paths.

Also add QLIST_REMOVE() in the worker loop before g_free(entry), so
that entries processed during normal operation are properly unlinked.
Without this, vnc_job_free() would iterate dangling pointers to
already-freed entries, causing use-after-free.

Fixes: bd023f953e5e ("vnc: threaded VNC server")
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
10 days agoui/dbus: tear down clipboard callbacks on display finalize
GuoHan Zhao [Mon, 30 Mar 2026 09:13:10 +0000 (17:13 +0800)] 
ui/dbus: tear down clipboard callbacks on display finalize

The clipboard D-Bus teardown path currently runs when the peer
disappears, but not when DBusDisplay itself is finalized.

That leaves pending clipboard requests and signal handlers associated
with the clipboard proxy active past display teardown.

Add an explicit clipboard fini hook and invoke it from
dbus_display_finalize() so the clipboard teardown also runs during
display destruction.

bixes: ff1a5810f61f ("ui/dbus: add clipboard interface")
Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Message-ID: <20260330091310.42868-1-zhaoguohan@kylinos.cn>
[ Marc-André - Move clipobard finalization to the function]
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
10 days agoui/dbus: associate add_client completion with its request
GuoHan Zhao [Thu, 26 Mar 2026 06:51:11 +0000 (14:51 +0800)] 
ui/dbus: associate add_client completion with its request

Commit 99997823bbbd ("ui/dbus: add p2p=on/off option")
introduced an asynchronous D-Bus client setup path, with the completion
handler reaching back into the global dbus_display state.

This makes the callback effectively operate on whatever request is
current when it runs, rather than the one that created it. A completion
from an older request can therefore clear a newer
add_client_cancellable or install its connection after a replacement
request has already been issued. It also relies on the DBusDisplay
instance remaining alive until completion.

Fix this by passing the DBusDisplay and GCancellable as callback data,
taking references while the async setup is in flight, and only acting
on completion if it still matches the current request. Also drop the
previous cancellable before creating a new request.

Fixes: 99997823bbbd ("ui/dbus: add p2p=on/off option")
Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260326065111.626236-1-zhaoguohan@kylinos.cn>

10 days agoaudio/mixeng: fix sw/hw mixup in audio_pcm_sw_init_
Marc-André Lureau [Tue, 17 Mar 2026 15:02:27 +0000 (19:02 +0400)] 
audio/mixeng: fix sw/hw mixup in audio_pcm_sw_init_

Commit 42061a14358 ("audio/mixeng: replace redundant pcm_info fields
with AudioFormat") accidentally changed the conv/clip function selection
in audio_pcm_sw_init_ to use hw->info.af (the hardware voice format)
instead of sw->info.af (the software voice format). This causes audio
distortion when the software and hardware voices use different formats,
as the wrong conversion functions are applied to the audio data.

Fix by using sw->info.af, restoring the original behavior.

Fixes: 42061a14358c ("audio/mixeng: replace redundant pcm_info fields with AudioFormat")
Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
10 days agolsi53c895a: keep a reference to the device while SCRIPTS execute
Paolo Bonzini [Fri, 27 Mar 2026 16:37:31 +0000 (17:37 +0100)] 
lsi53c895a: keep a reference to the device while SCRIPTS execute

SCRIPTS execution can trigger PCI device unplug and consequently
a use-after-free after the unplug returns.  Avoid this by keeping
the device alive.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3090
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agohpet: lower HPET_MAX_TIMERS to 24
Paolo Bonzini [Fri, 27 Mar 2026 20:46:54 +0000 (21:46 +0100)] 
hpet: lower HPET_MAX_TIMERS to 24

Each timer block occupies 32 bytes, but they only start at
offset 256 of the 1024-byte MMIO register space.  Therefore
the correct limit for HPET_MAX_TIMERS is 24, not 32.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agohpet: fix bounds check for s->timer[]
Paolo Bonzini [Fri, 27 Mar 2026 16:25:06 +0000 (17:25 +0100)] 
hpet: fix bounds check for s->timer[]

Fix an off-by-one issue in QEMU's HPET read and write MMIO handlers.
Both handlers check timer_id > s->num_timers instead of timer_id >=
s->num_timers, allowing a guest to access one timer beyond the valid
range.

The affected slot is initialized properly in hpet_realize, which goes
through all HPET_MAX_TIMERS elements of the array, so even though
it is not reset in hpet_reset() the bug does not cause any use of
uninitialized host memory.  Because of this, and also because (even
though HPET_MAX_TIMERS is 32) the HPET only has room for 24 timers in
its MMIO region, the bug has no security implications.

Commit 869b0afa4fa ("rust/hpet: Drop BqlCell wrapper for num_timers",
2025-06-06) silently fixed the same bug in rust/hw/timer/hpet/src/device.rs.

Reported-by: Yuma Kurogome, Ricerca Security, Inc. <yumak@ricsec.co.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agotarget/i386: emulate: remove redundant logging for unmapped MMIO access
Mohamed Mediouni [Fri, 27 Mar 2026 01:11:52 +0000 (02:11 +0100)] 
target/i386: emulate: remove redundant logging for unmapped MMIO access

ReactOS's install ISO does a bunch of 4-byte accesses
to 0xffdff124. This doesn't happen for the boot ISO.

It looks to be an access relative to the Windows KPCR
which is at 0xffdff000 but mistakenly done prior to
paging being on...

As this logging is redundant with -d invalid_mem,
remove it.

https://geoffchappell.com/studies/windows/km/ntoskrnl/inc/ntos/i386_x/kpcr.htm

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260327011152.4126-5-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agowhpx: i386: trace unsupported MSR accesses
Mohamed Mediouni [Fri, 27 Mar 2026 01:11:51 +0000 (02:11 +0100)] 
whpx: i386: trace unsupported MSR accesses

Not actionable information for users, so stop
having it displayed unconditionally.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Link: https://lore.kernel.org/r/20260327011152.4126-4-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agodocs: add WHPX section with initial info
Mohamed Mediouni [Fri, 27 Mar 2026 01:11:50 +0000 (02:11 +0100)] 
docs: add WHPX section with initial info

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260327011152.4126-3-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 days agomeson.build: remove i386-softmmu WHPX support
Mohamed Mediouni [Fri, 27 Mar 2026 01:11:49 +0000 (02:11 +0100)] 
meson.build: remove i386-softmmu WHPX support

target/i386/emulate is pretty much incompatible
with i386-softmmu and fixing that doesn't look
worthwhile given the binary unification goals...

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260327011152.4126-2-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 days agonet/ftgmac100: preserve full VLAN TCI in TX tag insertion
linhuang [Fri, 27 Mar 2026 07:39:35 +0000 (15:39 +0800)] 
net/ftgmac100: preserve full VLAN TCI in TX tag insertion

The VLAN tag insertion helper took vlan_tci as an 8-bit value, while
the descriptor provides a 16-bit VLAN TCI. This truncated egress tags
and caused VLAN ID corruption (for example, 4088/0x0ff8 became
248/0x00f8 at the receiver).

Change vlan_tci to uint16_t in the TX VLAN insertion path so the full
802.1Q TCI is preserved and transmitted correctly.

Fixes: c2ab73fcbe79 ("ftgmac100: Fix integer overflow in ftgmac100_do_tx()")
Signed-off-by: linhuang <linhuang@ruijie.com.cn>
Link: https://lore.kernel.org/qemu-devel/1471e413d3589b6734819bda2b59b725b74f273a.d551129b.99fc.47f6.86dc.0759227268a2@feishu.cn
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agohw/i2c/aspeed_i2c: reset and migrate pending_intr_sts
GuoHan Zhao [Wed, 25 Mar 2026 08:54:50 +0000 (16:54 +0800)] 
hw/i2c/aspeed_i2c: reset and migrate pending_intr_sts

Commit 7e82393ed058 ("hw/i2c/aspeed: fix lost interrupts on
back-to-back commands") introduced pending_intr_sts to preserve
interrupt bits that collide with already pending status bits.

That deferred interrupt state is consumed later when the guest clears
INTR_STS, but it is not reset in aspeed_i2c_bus_reset() and it is not
part of the bus migration state. A reset can therefore leave stale
deferred bits behind, and migration can silently drop them.

Clear pending_intr_sts on reset and include it in VMState while keeping
compatibility with older migration streams.

Fixes: 7e82393ed058 ("hw/i2c/aspeed: fix lost interrupts on back-to-back commands")
Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Link: https://lore.kernel.org/qemu-devel/20260325085450.126595-1-zhaoguohan@kylinos.cn
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>