Commit graph

125875 commits

Author SHA1 Message Date
Cédric Le Goater
704db3e250 aspeed: Deprecate the fby35 machine
There are no functional tests for the 'fby35' machine which makes
harder to determine when something becomes deprecated or unused.

The 'fby35' machine was originally added as an example of a multi-SoC
system, with the expectation the models would evolve over time in an
heterogeneous system. This hasn't happened and no public firmware is
available to boot it. It can be replaced by the 'ast2700fc', another
multi-SoC machine based on the newer AST2700 SoCs which are excepted
to receive better support in the future.

Cc: Peter Delevoryas <peter@pjd.dev>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Message-ID: <20251126102424.927527-1-clg@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:37:18 +00:00
Sönke Holz
fa2580f574 contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols
Since 8a545a336d, `name` is unbound if --no-prefix-symbols is passed,
causing this script to break when that option is set.

Signed-off-by: Sönke Holz <sholz8530@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20251205105614.13673-1-sholz8530@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:39 +00:00
Alex Bennée
81c5a3f867 plugins/core: allow reading of registers during discon events
We have protections that prevent callbacks that didn't declare
themselves as wanting to access registers. However for discontinuities
the system state is fully rectified so they should always be able to
read the register values.

a1688bc86c (plugins: add hooks for new discontinuity related callbacks)

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Cc: Julian Ganz <neither@nut.email>
Reviewed-by: Julian Ganz <neither@nut.email>
Message-ID: <20251204194902.1340008-12-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:19 +00:00
Alex Bennée
ee6a482e9c MAINTAINERS: update the custom runner entries
Fix a number of issues:

  - update the ubuntu references to 24.0
  - add the s390x and ppc64le yml files
  - replace Works on Arm with Linaro
  - Also mention IBM (s390x) and OSUL (ppc64le) as HW hosts

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251204194902.1340008-11-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:19 +00:00
Alano Song
23a5e2584e docs/devel: Correct typo
Correct typo in atomics.rst

Signed-off-by: Alano Song <AlanoSong@163.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
[AJB: fixed author entry]
Message-ID: <20251204194902.1340008-10-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:19 +00:00
Alex Bennée
6f365f185a docs/devel: update build environment setup documentation
Bring `libvirt-ci` front and centre when discussing dependencies for
QEMU. While we are at it:

  - drop links to additional instructions (libvirt is more upto date)
  - compress pkg installs into a table
  - call out distro/upstream dep difference in a proper note

Message-ID: <20251204194902.1340008-9-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:19 +00:00
Alex Bennée
0b50ff0c0a tests/docker: drop --disable-[tools|system] from all-test-cross
We use this container to build system images in CI which do not honour
QEMU_CONFIGURE_OPTS. Drop the --disables from the container so
developers don not need to jump through hoops trying to replicate that
on their workstations.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251204194902.1340008-8-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:19 +00:00
Alex Bennée
2addcefd69 tests/docker: transition debian-all-test-cross to lcitool
While we are at it bump up to debian-13. As we use this container in
the CI runs this also has the benefit of ensuring our qemu-minimal
dependencies project really has just what we need to build a basic
QEMU.

We add a few extra packages so we can build with clang as well as what
we need to probe for the available cross-compilers in the image.

Message-ID: <20251204194902.1340008-7-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:19 +00:00
Alex Bennée
7cffc86162 tests/lcitool: add bzip2 to the minimal dependency list
You cannot build any softmmu targets without it by default unless you
build with --disable-install-blobs.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251204194902.1340008-5-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:19 +00:00
Thomas Huth
a55d610bac tests/qemu-iotests: Check for a functional "secret" object before using it
QEMU iotests 049, 134 and 158 are currently failing if you compiled
QEMU without the crypto libraries. Thus make sure that the "secret"
object is really usable and skip the tests otherwise.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251205130014.693799-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:26:06 +00:00
Alex Bennée
7242e51517 tests/tcg: honour the available QEMU binaries when running check-tcg
Currently configure can identify all the targets that have
cross-compilers available from the supplied target-list. By default
this is the default_target_list which is all possible targets we can
build.

At the same time the target list passed to meson is filtered down
depending on various factors including not building 64 bit targets on
32 bit hosts. As a result make check-tcg will erroneously attempt to
run tests for which we haven't built a QEMU.

Solve this by filtering the final list of TCG_TEST_TARGETS based on
what actually was configured by meson. Rename the variable that
configure spits out to TCG_TESTS_WITH_COMPILERS for clarity and to
avoid larger churn in the Makefile.

Message-ID: <20251204194902.1340008-4-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:25:51 +00:00
Michael Tokarev
7e71b8e7f2 gitlab-ci.d/cirrus: Update the FreeBSD job to v14.3
The FreeBSD 14.2 job fails since the image disappeared
from the cloud.  We already bumped FreeBSD image to 14.3
in tests/vm in c8958b7eb4 (part of v10.1.0).

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251204205025.2423326-1-mjt@tls.msk.ru>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:25:39 +00:00
Alex Bennée
56a4ba5f88 gitlab: drop explicit pxe-test from the build-tci job
This needs libslirp to run and as debian-all-test-cross will soon be
based on qemu-minimal we won't have it in a few commits.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251204194902.1340008-3-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:16:07 +00:00
Alex Bennée
ca49625616 gitlab: drop --disable-pie from aarch64-all-linux-static build
Since we have upgraded to 24.04 with its new libc we no longer need
this workaround.

Link: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1987438
Suggested-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251204194902.1340008-2-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-05 15:16:07 +00:00
Richard Henderson
ff633bc5d5 include/aarch64/host: Fix atomic16_fetch_{and,or}
The tmp[lh] variables were defined as inputs to the
asm rather than outputs, which meant that the compiler
rightly diagnosed uninitialized inputs.

Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-05 07:50:15 -06:00
Richard Henderson
6833615bfd include/generic/host: Fix atomic128-cas.h.inc for Int128 structure
Use the Int128Alias structure more when we need to convert
between Int128 and __int128_t, when Int128 is a struct.

Fixes the build on aarch64 host with TCI, which forces
the use of the struct.

Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-05 07:50:15 -06:00
Richard Henderson
8c00f56fca tcg/tci: Disable -Wundef FFI_GO_CLOSURES warning
Since we build TCI with FFI (commit 22f15579fa "tcg: Build ffi data
structures for helpers") we get on Darwin:

  In file included from ../../tcg/tci.c:22:
  In file included from include/tcg/helper-info.h:13:
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/ffi/ffi.h:483:5: warning: 'FFI_GO_CLOSURES' is not defined, evaluates to 0 [-Wundef]
    483 | #if FFI_GO_CLOSURES
        |     ^
  1 warning generated.

This was fixed in upstream libffi in 2023, but not backported to MacOSX.
Simply disable the warning locally.

Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-05 07:50:15 -06:00
Richard Henderson
93fa829344 tcg: Remove duplicate test from plugin_gen_mem_callbacks
All callers have already tested tcg_ctx->plugin_insn.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-05 07:50:15 -06:00
Richard Henderson
92cf74baf4 tcg/tci: Introduce INDEX_op_tci_qemu_{ld,st}_rrr
Since d182123974, the number of bits in a MemOpIdx tops out at 17.
which won't fit in the TCI rrm format, thus an assertion failure.
Introduce new opcodes that take the MemOpIdx from a register, as
we already do for qemu_ld2 and qemu_st2.

Fixes: d182123974 ("include/exec/memopidx: Adjust for 32 mmu indexes")
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-05 07:50:15 -06:00
Richard Henderson
41706d3e72 tcg: Zero extend 32-bit addresses for TCI
For native code generation, zero-extending 32-bit addresses for
the slow path helpers happens in tcg_out_{ld,st}_helper_args,
but there isn't really a slow path for TCI, so that didn't happen.

Make the extension for TCI explicit in the opcode stream,
much like we already do for plugins and atomic helpers.

Cc: qemu-stable@nongnu.org
Fixes: 24e46e6c9d ("accel/tcg: Widen tcg-ldst.h addresses to uint64_t")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-05 07:50:15 -06:00
Richard Henderson
864814f71b Block layer patches
- SCSI passthrough: Fix errors on temporarily suspended dm-multipath
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmkxxnERHGt3b2xmQHJl
 ZGhhdC5jb20ACgkQfwmycsiPL9YH0Q//QWDBVYFM+3+OW2cXXj9BmWS1xEUmq4L2
 DVkOOOHx2U7SxRvSlCo+4l9Lo4P3+tHimm+ApqEgWES4MOGZG1qCE1gnfA6tvNaR
 qkq67DoZ9VShiP5FQwyhXkAUm4cPHFFb8ZIpqc8sH1LGxcoA7hq7bI32RzGsiE3U
 pyOD+11z4ARQYqU/YRF8fKqTqwudhgVSIJInBcUCYzuIaUjxl4ZjHxvjRdFMQc2F
 OIhJVNAOJ4cpvPspmAmTrwKFU81xjX6ymIqHenjX+ZJ3QtSLtuPaDDYJdGmXu8F9
 Me9OMnZfP4lu4I6L5kO2JpVAnzHppUSUsJcescs1q+dsqhGCR+tPgPUsYCmMlro5
 yoMIxCdAX7aAWI2wjg4TjYrYNI3FRB9+IL2qqHvW2cthkA6C6Ef+/26EIEkMGzsN
 rAqyjHa8Bo64JPdW8PUyeg+N27qf9ZwSut8KFR/++hM+sHbm2SImSgqJ+WepgYKx
 gIzsXGOOeVQUdbCGXfwzhnzGbOLZMg4nUZDTSnHVvNF/JfdJsgxkm//zFll6PJcH
 3vF7XiA+RoBSea5WiWBaBPWDvDaxsRrkOE/j1GQ/GM8vt6ZK+qplPMBMihXOyfE2
 KS9RwNzhgOAl0XrRpmTVLTLPvZocd9g7XTFiicxIFqJNoMrPNWBSmKEibDMbD5jP
 eo87nHrXS0s=
 =H7YD
 -----END PGP SIGNATURE-----

Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging

Block layer patches

- SCSI passthrough: Fix errors on temporarily suspended dm-multipath

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmkxxnERHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9YH0Q//QWDBVYFM+3+OW2cXXj9BmWS1xEUmq4L2
# DVkOOOHx2U7SxRvSlCo+4l9Lo4P3+tHimm+ApqEgWES4MOGZG1qCE1gnfA6tvNaR
# qkq67DoZ9VShiP5FQwyhXkAUm4cPHFFb8ZIpqc8sH1LGxcoA7hq7bI32RzGsiE3U
# pyOD+11z4ARQYqU/YRF8fKqTqwudhgVSIJInBcUCYzuIaUjxl4ZjHxvjRdFMQc2F
# OIhJVNAOJ4cpvPspmAmTrwKFU81xjX6ymIqHenjX+ZJ3QtSLtuPaDDYJdGmXu8F9
# Me9OMnZfP4lu4I6L5kO2JpVAnzHppUSUsJcescs1q+dsqhGCR+tPgPUsYCmMlro5
# yoMIxCdAX7aAWI2wjg4TjYrYNI3FRB9+IL2qqHvW2cthkA6C6Ef+/26EIEkMGzsN
# rAqyjHa8Bo64JPdW8PUyeg+N27qf9ZwSut8KFR/++hM+sHbm2SImSgqJ+WepgYKx
# gIzsXGOOeVQUdbCGXfwzhnzGbOLZMg4nUZDTSnHVvNF/JfdJsgxkm//zFll6PJcH
# 3vF7XiA+RoBSea5WiWBaBPWDvDaxsRrkOE/j1GQ/GM8vt6ZK+qplPMBMihXOyfE2
# KS9RwNzhgOAl0XrRpmTVLTLPvZocd9g7XTFiicxIFqJNoMrPNWBSmKEibDMbD5jP
# eo87nHrXS0s=
# =H7YD
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 04 Dec 2025 11:35:45 AM CST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* tag 'for-upstream' of https://repo.or.cz/qemu/kevin:
  file-posix: Handle suspended dm-multipath better for SG_IO

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-04 13:37:46 -06:00
Kevin Wolf
2c3165a1a6 file-posix: Handle suspended dm-multipath better for SG_IO
When introducing DM_MPATH_PROBE_PATHS, we already anticipated that
dm-multipath devices might be suspended for a short time when the DM
tables are reloaded and that they return -EAGAIN in this case. We then
wait for a millisecond and retry.

However, meanwhile it has also turned out that libmpathpersist (which is
used by qemu-pr-helper) may need to perform more complex recovery
operations to get reservations back to expected state if a path failure
happened in the middle of a PR operation. In this case, the device is
suspended for a longer time compared to the case we originally expected.

This patch changes hdev_co_ioctl() to treat -EAGAIN separately so that
it doesn't result in an immediate failure if the device is suspended for
more than 1ms, and moves to incremental backoff to cover both quick and
slow cases without excessive delays.

Buglink: https://issues.redhat.com/browse/RHEL-121543
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20251128221440.89125-1-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2025-12-04 18:34:15 +01:00
Richard Henderson
1053bb627c vfio queue:
* Fix vfio-user issues reported by Coverity
 * Update vfio-user documentation
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmkwTlYACgkQUaNDx8/7
 7KH1zQ/9F0aJd70NcJnJ/RDzFf1bKPxzZ+EzIhlU2nhXPL9T5ewaYqf03+Rbir4J
 0xckidngEmRqcH/L/A5tD1hxuu14i5yOHmuAO3RC7K1pC/lWT4ifqMDihFByRuNb
 4LsQn4qEaZ8FGFQ8GszyjW4Dgeee3Xf+glt8BlP08ZFdJM7SHHFFGt75jWBMV2If
 gqYcDe/0iGKTI86If8UGfWLzqiW5LlEpsK/3NVHhDXgLEFxdF4km+XVyZoc0nzwt
 3ezuKBUTtt1MAtgqTbL7HRlwOK4ui0SN+s6dDAc15HcS9VczFprVYfxeR1k172oJ
 0ofSgjFjDQTGPZYSk1V2LZ+0uYsU8dn8MI3rlmBG44ABqNzQA7Tj+QCkAuaPbYA6
 iyTqQa2gui8pH7X7dj0MUXn8URBRHKYY/WuajTpvSsFsIRbXi13CXYhyYvR9+yoB
 PvTBjIsmVxFXdDg0yxZbhhRwHvRmlpgR78Aif5Jps7c6mppSL8i4e2PPmchVzTj2
 e/W8ASkvyDyeiBG5qhdsv2bagZGKEBab3PSmmIyq3sJ0OmtOj9L3mdZ5r66c+SiA
 QmtA5BIoj5K9LwOxTgEfBAzIQ8lMpMaBjS5jZbSGKklH343kDtSg8d3PGCym5SrN
 3cUkU/PzhZX0YA6ywloodsQKgCwE6xbOK3LAbHwv8wcKQyHLkf4=
 =9ERW
 -----END PGP SIGNATURE-----

Merge tag 'pull-vfio-20251203' of https://github.com/legoater/qemu into staging

vfio queue:

* Fix vfio-user issues reported by Coverity
* Update vfio-user documentation

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmkwTlYACgkQUaNDx8/7
# 7KH1zQ/9F0aJd70NcJnJ/RDzFf1bKPxzZ+EzIhlU2nhXPL9T5ewaYqf03+Rbir4J
# 0xckidngEmRqcH/L/A5tD1hxuu14i5yOHmuAO3RC7K1pC/lWT4ifqMDihFByRuNb
# 4LsQn4qEaZ8FGFQ8GszyjW4Dgeee3Xf+glt8BlP08ZFdJM7SHHFFGt75jWBMV2If
# gqYcDe/0iGKTI86If8UGfWLzqiW5LlEpsK/3NVHhDXgLEFxdF4km+XVyZoc0nzwt
# 3ezuKBUTtt1MAtgqTbL7HRlwOK4ui0SN+s6dDAc15HcS9VczFprVYfxeR1k172oJ
# 0ofSgjFjDQTGPZYSk1V2LZ+0uYsU8dn8MI3rlmBG44ABqNzQA7Tj+QCkAuaPbYA6
# iyTqQa2gui8pH7X7dj0MUXn8URBRHKYY/WuajTpvSsFsIRbXi13CXYhyYvR9+yoB
# PvTBjIsmVxFXdDg0yxZbhhRwHvRmlpgR78Aif5Jps7c6mppSL8i4e2PPmchVzTj2
# e/W8ASkvyDyeiBG5qhdsv2bagZGKEBab3PSmmIyq3sJ0OmtOj9L3mdZ5r66c+SiA
# QmtA5BIoj5K9LwOxTgEfBAzIQ8lMpMaBjS5jZbSGKklH343kDtSg8d3PGCym5SrN
# 3cUkU/PzhZX0YA6ywloodsQKgCwE6xbOK3LAbHwv8wcKQyHLkf4=
# =9ERW
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 03 Dec 2025 08:51:02 AM CST
# 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]

* tag 'pull-vfio-20251203' of https://github.com/legoater/qemu:
  vfio-user: recycle msg on failure
  vfio-user: simplify vfio_user_recv_one()
  vfio-user: refactor out header handling
  vfio-user: clarify partial message handling
  vfio-user: simplify vfio_user_process()
  docs/interop/vfio-user: update protocol specification

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-04 10:45:41 -06:00
John Levon
23c586abf2 vfio-user: recycle msg on failure
If we fail to read an incoming request, recycle the message.

Resolves: Coverity CID 1611807
Resolves: Coverity CID 1611808
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20251203100316.3604456-6-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-12-03 15:07:47 +01:00
John Levon
0df8baec95 vfio-user: simplify vfio_user_recv_one()
This function was unnecessarily difficult to understand due to the
separate handling of request and reply messages. Use common code for
both where we can.

Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20251203100316.3604456-5-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-12-03 15:07:47 +01:00
John Levon
7b884e2a27 vfio-user: refactor out header handling
Simplify vfio_user_recv_one() by moving the header handling out to a
helper function.

Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251203100316.3604456-4-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-12-03 15:07:47 +01:00
John Levon
356c7b1752 vfio-user: clarify partial message handling
Improve a comment for this.

Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20251203100316.3604456-3-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-12-03 15:07:47 +01:00
John Levon
a8731f691d vfio-user: simplify vfio_user_process()
It can figure out if it's a reply by itself, rather than passing that
information in.

Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20251203100316.3604456-2-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-12-03 15:07:47 +01:00
John Levon
1f3b34e403 docs/interop/vfio-user: update protocol specification
Refresh the protocol specification to the latest version implemented by
libvfio-user. All changes are backward compatible.

Note that QEMU client itself does not yet implement these extensions,
but as this is now the canonical specification, it needs to be kept up
to date.

Signed-off-by: John Levon <john.levon@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20251010102453.711072-1-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-12-03 15:07:47 +01:00
Richard Henderson
05f36f7c05 Update version for v10.2.0-rc2 release
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-02 20:09:51 -08:00
Richard Henderson
423ac96729 Error reporting patches for 2025-12-02
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmkunlkSHGFybWJydUBy
 ZWRoYXQuY29tAAoJEDhwtADrkYZTXQUP+QHhID4XE1DuYaGeE2WaLH6JBf4LuNGZ
 ReZjDtRR8imt2qwUJ9oxp2RQ1SCwnKFMKYsHnfA/DzCRw1tQNMeiwaWNFpGn/X5I
 m9Xrkh3Xr2BAK6NP+0LjrkfFSQ8ybj2tAe/MUPlpyt0Ig3OMwek6qbp8yEax4BKD
 UdKAjYn86CXfcthRa95NZ/aktcL+lYs00jRE/yKtL37cY4HvyzTVI+KP1KBPEtLR
 tcg42/nsbcv3UJrMQDovopP8XbuTKAX+ed9mIw6pEaQSZ8ktiaiX6Dc1IbfUnDPL
 ZHKSqqtr9TWvIST8NDuIglo4X+1grnHP/7742ZNANiGmHqM4s+I6nNfSR94HF9YR
 c69iu9jsbEBk4t6RellgrM+zPjOQi+EPeXyHghjO179KdjYvJFNOwI9lgiE6GZiV
 5eZX3BKYiylxkKAbKIsNQn71PCLdLhMjk0OB03+kX16Z9vrNm37cyR6L9mHlEjk8
 u+e+dv8bjDPqD467hSw8Cf1Z9wSugjzt4I6+5OnqPFPYONzBTrpESH7XtWwgZyKK
 Tcr2DB/S7JWgZz8EIUWo41frNdTZsjNwLHbODHtv/KkPA5vlCLkHbz/vPxUcrobo
 atMXFNx9NazKtrOOpfc9pioCEpDNXLlfEJ8jbE+pIAwHDvuedSaXjvTicIAwQ6qA
 Bojn8eZPwWP2
 =OrYZ
 -----END PGP SIGNATURE-----

Merge tag 'pull-error-2025-12-02' of https://repo.or.cz/qemu/armbru into staging

Error reporting patches for 2025-12-02

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmkunlkSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTXQUP+QHhID4XE1DuYaGeE2WaLH6JBf4LuNGZ
# ReZjDtRR8imt2qwUJ9oxp2RQ1SCwnKFMKYsHnfA/DzCRw1tQNMeiwaWNFpGn/X5I
# m9Xrkh3Xr2BAK6NP+0LjrkfFSQ8ybj2tAe/MUPlpyt0Ig3OMwek6qbp8yEax4BKD
# UdKAjYn86CXfcthRa95NZ/aktcL+lYs00jRE/yKtL37cY4HvyzTVI+KP1KBPEtLR
# tcg42/nsbcv3UJrMQDovopP8XbuTKAX+ed9mIw6pEaQSZ8ktiaiX6Dc1IbfUnDPL
# ZHKSqqtr9TWvIST8NDuIglo4X+1grnHP/7742ZNANiGmHqM4s+I6nNfSR94HF9YR
# c69iu9jsbEBk4t6RellgrM+zPjOQi+EPeXyHghjO179KdjYvJFNOwI9lgiE6GZiV
# 5eZX3BKYiylxkKAbKIsNQn71PCLdLhMjk0OB03+kX16Z9vrNm37cyR6L9mHlEjk8
# u+e+dv8bjDPqD467hSw8Cf1Z9wSugjzt4I6+5OnqPFPYONzBTrpESH7XtWwgZyKK
# Tcr2DB/S7JWgZz8EIUWo41frNdTZsjNwLHbODHtv/KkPA5vlCLkHbz/vPxUcrobo
# atMXFNx9NazKtrOOpfc9pioCEpDNXLlfEJ8jbE+pIAwHDvuedSaXjvTicIAwQ6qA
# Bojn8eZPwWP2
# =OrYZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 02 Dec 2025 12:07:53 AM PST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [unknown]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [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: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* tag 'pull-error-2025-12-02' of https://repo.or.cz/qemu/armbru:
  kvm: Fix kvm_vm_ioctl() and kvm_device_ioctl() return value
  migration: Fix double-free on error path

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-02 04:41:17 -08:00
Richard Henderson
13432ee4c6 Accelerators patches queue
- Fix HVF/x86 build
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkt+X0ACgkQ4+MsLN6t
 wN4YvhAApOrEtlWbMrUIeeHTc8bHMGPi62IEITR299NTtI9vTJLFMq0+tyvUBVLx
 QA2yX0sRmEnlVwIgCA6f4hTYEuoFrSkpOzK3Qojs1tO488m9GymWPMwnUcNEhH9a
 ny7csR01m5rS2Jb6dV3pY8oMddwrVyT5n9rzdi65a6Sq6RAYvMcl0mbYM163qMNY
 nPBj9PnRG3QFk0/YqBpQ9uhjMXw/s8wVYQ4eJI87rWB7QqBPeiFQTyAG4MicATQM
 06LYinS4ZGUSQoRUNr3oKa6dtvI11C+JUql2mUPnZfT1muebF6EbzeQ7tTE7Vds2
 /fqRO3dBlyePipbgkFH1/PpKoRKMv9GDVcOpjebtKIBlxH+II0ps7c2GMNbOFNuu
 HBHcJOAxKGLrcj5PembcGNJlSzzta8UJixlJ5JBXwgjd9qr8QaNeq2XbJ1gBpRiy
 qjZi4vbG5dW2cfcgjeRDKBw188Lh26QxkKjWiTaREXjW4AJttexvDuzXaSPCc2aI
 2fAKqclZNCCOfHymJSpAhgKMOlmXRmoTeZX2+mszRZJVt3zp2MR2pjn5ihR7L8wc
 fes7XjF/GngdbSryLDt3I/N8pNgxZZVQ1qWS/Qxi6m7D5xWPR7FBkDhk47+miNfr
 QulbRWGSC3AyE3Agy1Hfj0s6zi1tZ0D4lmU9VY/ucFWWxCSt1SQ=
 =QV0k
 -----END PGP SIGNATURE-----

Merge tag 'accel-20251201' of https://github.com/philmd/qemu into staging

Accelerators patches queue

- Fix HVF/x86 build

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkt+X0ACgkQ4+MsLN6t
# wN4YvhAApOrEtlWbMrUIeeHTc8bHMGPi62IEITR299NTtI9vTJLFMq0+tyvUBVLx
# QA2yX0sRmEnlVwIgCA6f4hTYEuoFrSkpOzK3Qojs1tO488m9GymWPMwnUcNEhH9a
# ny7csR01m5rS2Jb6dV3pY8oMddwrVyT5n9rzdi65a6Sq6RAYvMcl0mbYM163qMNY
# nPBj9PnRG3QFk0/YqBpQ9uhjMXw/s8wVYQ4eJI87rWB7QqBPeiFQTyAG4MicATQM
# 06LYinS4ZGUSQoRUNr3oKa6dtvI11C+JUql2mUPnZfT1muebF6EbzeQ7tTE7Vds2
# /fqRO3dBlyePipbgkFH1/PpKoRKMv9GDVcOpjebtKIBlxH+II0ps7c2GMNbOFNuu
# HBHcJOAxKGLrcj5PembcGNJlSzzta8UJixlJ5JBXwgjd9qr8QaNeq2XbJ1gBpRiy
# qjZi4vbG5dW2cfcgjeRDKBw188Lh26QxkKjWiTaREXjW4AJttexvDuzXaSPCc2aI
# 2fAKqclZNCCOfHymJSpAhgKMOlmXRmoTeZX2+mszRZJVt3zp2MR2pjn5ihR7L8wc
# fes7XjF/GngdbSryLDt3I/N8pNgxZZVQ1qWS/Qxi6m7D5xWPR7FBkDhk47+miNfr
# QulbRWGSC3AyE3Agy1Hfj0s6zi1tZ0D4lmU9VY/ucFWWxCSt1SQ=
# =QV0k
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Dec 2025 12:24:29 PM PST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.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: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'accel-20251201' of https://github.com/philmd/qemu:
  accel/hvf: Fix i386 HVF compilation failures

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-02 04:40:54 -08:00
Markus Armbruster
88be119fb1 kvm: Fix kvm_vm_ioctl() and kvm_device_ioctl() return value
These functions wrap ioctl().  When ioctl() fails, it sets @errno.
The wrappers then return that @errno negated.

Except they call accel_ioctl_end() between calling ioctl() and reading
@errno.  accel_ioctl_end() can clobber @errno, e.g. when a futex()
system call fails.  Seems unlikely, but it's a bug all the same.

Fix by retrieving @errno before calling accel_ioctl_end().

Fixes: a27dd2de68 (KVM: keep track of running ioctls)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251128152050.3417834-1-armbru@redhat.com>
2025-12-02 07:46:21 +01:00
Markus Armbruster
c1116b1d73 migration: Fix double-free on error path
Fixes: ffaa1b50a8 (migration: Use warn_reportf_err() where appropriate)
Resolves: Coverity CID 1643463
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20251125070554.2256181-1-armbru@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
2025-12-02 07:45:45 +01:00
Nguyen Dinh Phi
3bee93b9ab accel/hvf: Fix i386 HVF compilation failures
Recent changes introduced build errors in the i386 HVF backend:

 - ../accel/hvf/hvf-accel-ops.c:163:17: error: no member named 'guest_debug_enabled' in 'struct AccelCPUState'
   163 |     cpu->accel->guest_debug_enabled = false;

 - ../accel/hvf/hvf-accel-ops.c:151:51
   error: no member named 'unblock_ipi_mask' in 'struct AccelCPUState'

 - ../target/i386/hvf/hvf.c:736:5
   error: use of undeclared identifier 'rip'

 - ../target/i386/hvf/hvf.c:737:5
   error: use of undeclared identifier 'env'

This patch corrects the field usage and move identifier to correct
function ensuring successful compilation of the i386 HVF backend.

These issues were caused by:

Fixes: 2ad756383e (“accel/hvf: Restrict ARM-specific fields of AccelCPUState”)
Fixes: 2a21c92447 (“target/i386/hvf: Factor hvf_handle_vmexit() out”)

Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20251126094601.56403-1-phind.uet@gmail.com>
[PMD: Keep setting vcpu_dirty on AArch64]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Message-Id: <20251128085854.53539-1-phind.uet@gmail.com>
2025-12-01 21:21:16 +01:00
Richard Henderson
66ec38b6fa target-arm queue:
* fix assertion in translation of BRA
  * update soon-to-break URL in docs
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmktvZIZHHBldGVyLm1h
 eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3oXTD/9xAonxt5RnYxHZI1R5MjKV
 BbK+SuxgF6muimBU0J+bL/rEK6+J6FKupOxb/GgSB3Mxb9TQVw4GmKIvOyWrx4vF
 YvFFAngJOd4SPqk4HzAssODyxtl0VOr8pdtQlPlH0Irr0Wv6zv3/1YbwMFjq1LMG
 MQP8ZGsl+eOHlqF9xrDeHzpzwF+RzXBzCB88c+4pMluAWRz2eaotk8NorP+iDWuH
 ZX3SOOPc03xhdT3EZABHidrZxObevKfV7PMeKrtOgjwcXF9BfiW8bvn1U5jo7u7D
 WnxrMGqLjotLykIThRJyt4jf89XzkRSSwlgKHXPuohNsZCJdozNoiuKw07Woufsg
 2xYRDtXDGmOF2utek5p6ejOXT7zg+jbdvZ9kdTW3dpa0BGtV93WeAr7z7onOmaxL
 S3Ri6aT1PKwFK1wRNnbuoS/plrTfH4PG9HXLRImNUGg1DsCmqte9vblZyP7g3mQT
 BmXLnel7nwL9Q7XIzGUcHhv2R6EFOspZueUmF8NsOtJSgq5q1JV2itRNmfELBy+r
 NJKKozazl+1XttB3cCsOQjgRQfTA4H3BGip0U0iPPjd3rSX0hunyhdk+WBXiAJJJ
 pU2fcHLu0M2NFlgLYvWXwf7WgNQV5jqBZ7IxuU/ERjvfOTOJYsFAjCbVOq7eIqmR
 EJolrloUG74w68K44PUHvQ==
 =VFmC
 -----END PGP SIGNATURE-----

Merge tag 'pull-target-arm-20251201' of https://gitlab.com/pm215/qemu into staging

target-arm queue:
 * fix assertion in translation of BRA
 * update soon-to-break URL in docs

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmktvZIZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3oXTD/9xAonxt5RnYxHZI1R5MjKV
# BbK+SuxgF6muimBU0J+bL/rEK6+J6FKupOxb/GgSB3Mxb9TQVw4GmKIvOyWrx4vF
# YvFFAngJOd4SPqk4HzAssODyxtl0VOr8pdtQlPlH0Irr0Wv6zv3/1YbwMFjq1LMG
# MQP8ZGsl+eOHlqF9xrDeHzpzwF+RzXBzCB88c+4pMluAWRz2eaotk8NorP+iDWuH
# ZX3SOOPc03xhdT3EZABHidrZxObevKfV7PMeKrtOgjwcXF9BfiW8bvn1U5jo7u7D
# WnxrMGqLjotLykIThRJyt4jf89XzkRSSwlgKHXPuohNsZCJdozNoiuKw07Woufsg
# 2xYRDtXDGmOF2utek5p6ejOXT7zg+jbdvZ9kdTW3dpa0BGtV93WeAr7z7onOmaxL
# S3Ri6aT1PKwFK1wRNnbuoS/plrTfH4PG9HXLRImNUGg1DsCmqte9vblZyP7g3mQT
# BmXLnel7nwL9Q7XIzGUcHhv2R6EFOspZueUmF8NsOtJSgq5q1JV2itRNmfELBy+r
# NJKKozazl+1XttB3cCsOQjgRQfTA4H3BGip0U0iPPjd3rSX0hunyhdk+WBXiAJJJ
# pU2fcHLu0M2NFlgLYvWXwf7WgNQV5jqBZ7IxuU/ERjvfOTOJYsFAjCbVOq7eIqmR
# EJolrloUG74w68K44PUHvQ==
# =VFmC
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Dec 2025 08:08:50 AM PST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [unknown]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [unknown]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [unknown]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [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: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20251201' of https://gitlab.com/pm215/qemu:
  docs/devel: Update URL for make-pullreq script
  target/arm: Fix assert on BRA.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-01 12:08:52 -08:00
Peter Maydell
ebb625262c docs/devel: Update URL for make-pullreq script
In the submitting-a-pull-request docs, we have a link to the
make-pullreq script which might be useful for maintainers.  The
canonical git repo for this script has moved; update the link.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20251125164511.255550-1-peter.maydell@linaro.org
2025-12-01 09:39:46 +00:00
Harald van Dijk
7248dab3c9 target/arm: Fix assert on BRA.
trans_BRA does

    gen_a64_set_pc(s, dst);
    set_btype_for_br(s, a->rn);

gen_a64_set_pc does

    s->pc_save = -1;

set_btype_for_br (if aa64_bti is enabled and the register is not x16 or
x17) does

    gen_pc_plus_diff(s, pc, 0);

gen_pc_plus_diff does

    assert(s->pc_save != -1);

Hence, this assert is getting hit. We need to call set_btype_for_br
before gen_a64_set_pc, and there is nothing in set_btype_for_br that
depends on gen_a64_set_pc having already been called, so this commit
simply swaps the calls.

(The commit message for 64678fc45d says that set_brtype_for_br()
must be "moved after" get_a64_set_pc(), but this is a mistake in
the commit message -- the actual changes in that commit move
set_brtype_for_br() *before* get_a64_set_pc() and this is necessary
to avoid the assert.)

Cc: qemu-stable@nongnu.org
Fixes: 64678fc45d ("target/arm: Fix BTI versus CF_PCREL")
Signed-off-by: Harald van Dijk <hdijk@accesssoftek.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: d2265ebb-84bc-41b7-a2d7-05dc9a5a2055@accesssoftek.com
[PMM: added note about 64678fc45d to commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-12-01 09:36:40 +00:00
Richard Henderson
9ef49528b5 Misc HW patches
Few fixes in hw/; also including qtest and replay fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkmI9YACgkQ4+MsLN6t
 wN6sSg/9EsnXLpMCfW1HyvgI67Yxb397YCvAxacPqFA+Xm9q6xCo2jKcjBnVI61A
 4DkSsYC7OE2wdRzzziiWaXEfydGKHa7rXNGdunYSY52XLk2oElhSS0ykPsUWeFS+
 66+YzSgNgBKHIdDHSVRgoTPDOYW6LSLU+Zfbj40FfApnuRw8AFRB+qVQaXvCV8h/
 W6fI4B2ce/0Rv8o0AJDWnN3HP6rZZ+l+eyhj9ODPusAC+OU4nowiJBCoCJa8GwDY
 KiASI9+mA4jY2vcoCiXG4Bbg1VzOte2TKudZwTwvhqkmGh0S6VejqO/Pn6IKh3j0
 H3YrXMDn6h4GrJ3gd3YTseeuEhApYnUP76MWuPy+MjMwp605rMCh/voVkzRvBdmn
 xXzklO48hpk8cRD3W4kfvJIlrBZIrMSFG8Q4m6S9FXZkGUP9zm2bOCkRqMxfdEdI
 H1/J/sJ5iPOIwd87yElSV16i9BZyalcWZDYkQLKgtroq1uPaGxUR46mlnhMFKeBP
 68Xjh9ux6zOuFwb4FIqbEyyKTMVdGrkHuD267YHEKQo0X0frGjFfdRtrW3zJbMIw
 vAFsQl2oPAKJ7DpEHae/CeD10piQRb/nTav9UdscaXoIUJdFJ+nPfHNwUkKW30Gw
 SSmueD2qJcqwzVa36SRhYxwG5+EW2RsN1kL5wkHv3qhRaoEfKJ8=
 =hq47
 -----END PGP SIGNATURE-----

Merge tag 'hw-misc-20251125' of https://github.com/philmd/qemu into staging

Misc HW patches

Few fixes in hw/; also including qtest and replay fixes.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkmI9YACgkQ4+MsLN6t
# wN6sSg/9EsnXLpMCfW1HyvgI67Yxb397YCvAxacPqFA+Xm9q6xCo2jKcjBnVI61A
# 4DkSsYC7OE2wdRzzziiWaXEfydGKHa7rXNGdunYSY52XLk2oElhSS0ykPsUWeFS+
# 66+YzSgNgBKHIdDHSVRgoTPDOYW6LSLU+Zfbj40FfApnuRw8AFRB+qVQaXvCV8h/
# W6fI4B2ce/0Rv8o0AJDWnN3HP6rZZ+l+eyhj9ODPusAC+OU4nowiJBCoCJa8GwDY
# KiASI9+mA4jY2vcoCiXG4Bbg1VzOte2TKudZwTwvhqkmGh0S6VejqO/Pn6IKh3j0
# H3YrXMDn6h4GrJ3gd3YTseeuEhApYnUP76MWuPy+MjMwp605rMCh/voVkzRvBdmn
# xXzklO48hpk8cRD3W4kfvJIlrBZIrMSFG8Q4m6S9FXZkGUP9zm2bOCkRqMxfdEdI
# H1/J/sJ5iPOIwd87yElSV16i9BZyalcWZDYkQLKgtroq1uPaGxUR46mlnhMFKeBP
# 68Xjh9ux6zOuFwb4FIqbEyyKTMVdGrkHuD267YHEKQo0X0frGjFfdRtrW3zJbMIw
# vAFsQl2oPAKJ7DpEHae/CeD10piQRb/nTav9UdscaXoIUJdFJ+nPfHNwUkKW30Gw
# SSmueD2qJcqwzVa36SRhYxwG5+EW2RsN1kL5wkHv3qhRaoEfKJ8=
# =hq47
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 25 Nov 2025 01:47:02 PM PST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.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: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'hw-misc-20251125' of https://github.com/philmd/qemu:
  hw/aspeed/{xdma, rtc, sdhci}: Fix endianness to DEVICE_LITTLE_ENDIAN
  hw/core/machine: Provide a description for aux-ram-share property
  replay: Improve assert in replay_char_read_all_load()
  hw/virtio: Use error_setg_file_open() for a better error message
  hw/scsi: Use error_setg_file_open() for a better error message
  hw/usb: Convert to qemu_create() for a better error message
  docs/deprecated: Remove undeprecated SMP description
  hw/pci: Make msix_init take a uint32_t for nentries
  qtest: Allow and ignore blank lines in input

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-11-25 14:22:39 -08:00
Cédric Le Goater
57756aa01f hw/aspeed/{xdma, rtc, sdhci}: Fix endianness to DEVICE_LITTLE_ENDIAN
When the XDMA, RTC and SDHCI device models of the Aspeed SoCs were
first introduced, their MMIO regions inherited of a DEVICE_NATIVE_ENDIAN
endianness. It should be DEVICE_LITTLE_ENDIAN. Fix that.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251125142631.676689-1-clg@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:45:30 +01:00
Peter Xu
98ee8aa92e hw/core/machine: Provide a description for aux-ram-share property
It was forgotten when being introduced in commit 91792807d1 ("machine:
aux-ram-share option").

Cc: qemu-stable@nongnu.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20251124191408.783473-1-peterx@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:45:30 +01:00
Peter Maydell
78d66a25c5 replay: Improve assert in replay_char_read_all_load()
In replay_char_read_all_load() we get a buffer and size from the
replay log.  We know the size has to fit an int because of how we
write the log.  However the way we assert this is wrong: we cast the
size_t from replay_get_array() to an int and then check that it is
non-negative.  This misses cases where an over-large size is
truncated into a positive value by the cast.

Replace the assertion with checking that the size is in-range
before doing the cast.

Coverity complained about the possible overflow: CID 1643440.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251124173407.50124-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:45:30 +01:00
Markus Armbruster
77f4f14e08 hw/virtio: Use error_setg_file_open() for a better error message
The error message changes from

    vhost-vsock: failed to open vhost device: REASON

to

    Could not open '/dev/vhost-vsock': REASON

I think the exact file name is more useful to know than the file's
purpose.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251121121438.1249498-8-armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:41:52 +01:00
Markus Armbruster
6d85f1d449 hw/scsi: Use error_setg_file_open() for a better error message
The error message changes from

    vhost-scsi: open vhost char device failed: REASON

to

    Could not open '/dev/vhost-scsi': REASON

I think the exact file name is more useful to know than the file's
purpose.

We could put back the "vhost-scsi: " prefix with error_prepend().  Not
worth the bother.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251121121438.1249498-7-armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:41:49 +01:00
Markus Armbruster
622a0c9dee hw/usb: Convert to qemu_create() for a better error message
The error message changes from

    open FILENAME failed

to

    Could not create 'FILENAME': REASON

where REASON is the value of strerror(errno).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251121121438.1249498-3-armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:41:47 +01:00
Zhao Liu
a5da8dd90b docs/deprecated: Remove undeprecated SMP description
"Unsupported 'parameter=1' SMP configuration" was proposed to be
deprecated in the commit 54c4ea8f3a ("hw/core/machine-smp: Deprecate
unsupported "parameter=1" SMP configurations").

But the related code was reverted later in the commit 9d7950edb0
("hw/core: allow parameter=1 for SMP topology on any machine").

Thus, this SMP behavior is still valid and is not actually deprecated.

Remove outdated document descriptions.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20251121084416.1031466-1-zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:41:43 +01:00
Peter Maydell
ef44cc0a76 hw/pci: Make msix_init take a uint32_t for nentries
msix_init() and msix_init_exclusive_bar() take an "unsigned short"
argument for the number of MSI-X vectors to try to use.  This is big
enough for the maximum permitted number of vectors, which is 2048.
Unfortunately, we have several devices (most notably virtio) which
allow the user to specify the desired number of vectors, and which
use uint32_t properties for this.  If the user sets the property to a
value that is too big for a uint16_t, the value will be truncated
when it is passed to msix_init(), and msix_init() may then return
success if the truncated value is a valid one.

The resulting mismatch between the number of vectors the msix code
thinks the device has and the number of vectors the device itself
thinks it has can cause assertions, such as the one in issue 2631,
where "-device virtio-mouse-pci,vectors=19923041" is interpreted by
msix as "97 vectors" and by the virtio-pci layer as "19923041
vectors"; a guest attempt to access vector 97 thus passes the
virtio-pci bounds checking and hits an essertion in
msix_vector_use().

Avoid this by making msix_init() and its wrapper function
msix_init_exclusive_bar() take the number of vectors as a uint32_t.
The erroneous command line will now produce the warning

 qemu-system-i386: -device virtio-mouse-pci,vectors=19923041:
   warning: unable to init msix vectors to 19923041

and proceed without crashing.  (The virtio device warns and falls
back to not using MSIX, rather than complaining that the option is
not a valid value this is the same as the existing behaviour for
values that are beyond the MSI-X maximum possible value but fit into
a 16-bit integer, like 2049.)

To ensure this doesn't result in potential overflows in calculation
of the BAR size in msix_init_exclusive_bar(), we duplicate the
nentries error-check from msix_init() at the top of
msix_init_exclusive_bar(), so we know nentries is sane before we
start using it.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2631
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251107131044.1321637-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:41:40 +01:00
Peter Maydell
3de6afef49 qtest: Allow and ignore blank lines in input
Currently the code that reads the qtest protocol commands insists
that every input line has a command.  If it receives a line with
nothing but whitespace it will trip an assertion in
qtest_process_command().

This is a little awkward for the case where we are feeding qtest a
set of bug-reproduction commands via standard input or a file,
because it means you need to be careful not to leave a blank line at
the start or the end when cutting and pasting the command sequence
from a bug report.

Change the code to allow and ignore blank lines in the input.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20251106151959.1088095-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-25 22:41:37 +01:00
Richard Henderson
a8d023be62 Block layer patches
- Image creation: Honour pwrite_zeroes_alignment for zeroing first sector
 - block-backend: Fix race (causing a crash) when resuming queued requests
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmklvQMRHGt3b2xmQHJl
 ZGhhdC5jb20ACgkQfwmycsiPL9byFA//d9VtU3wLZpJRL2mnYH2qJME3WeqJaSB+
 FzkG32gkCb0JtH5yr427oJYKhZsKpNkz20E7z4+1ZT4ovcjo7mddJYW7DwaMjUmO
 G3UXWE33ayLNZFMDrsMRV5tfiQkSb7Y0ekYfwU7GjC3qhMhRIX9eCRBrCLD6jdUx
 mg2h0ML0smE9AV5AEuunwSoqp+rD+OpRQ6EBkkCVF5iMlIHeiewP/TQbJtKBtxdK
 AumiIcYgPbH7QFG8kDTmVCCGPDC0v2i1G6Owtptbt9RmWTEGp++Ngm8F+7u/kPMk
 weRhlVhnxwDxVxmHzvysh0m+n08oVJyA2vB4QJrti6ZmgDcJYulxFfQgPCKxjvGd
 6va02q0DYrCbO3YiViaAtnudEuqqaB1to57jeQq6tP9KrpH8uzAddrFWeb3TY4gN
 CvWr+p4V7bYvteNASJt/+VC5T3haR+U5eCRD5nOKPyXqCbMT+z6zZRuYxP2q1W6i
 VwQLIjuWIx+bXVRUrHkf9VNy1clB4ga+ZDbTGFrl0NOLDcn6u3Vcr4GQ7VvQ31Pj
 ulGA9F+DXjPRQpZC+WnCZsBSLwVBrNeYPyxsCSk2ORH930djgb7e1lxX5OawT7MT
 lNzbQ+N7PXCd5Yt0UyJ3uCF6gqlpvmUV7IZMbyoYHceoCnz8+McqvGORYfzkLwk9
 HUDS3UTI8Ks=
 =57x4
 -----END PGP SIGNATURE-----

Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging

Block layer patches

- Image creation: Honour pwrite_zeroes_alignment for zeroing first sector
- block-backend: Fix race (causing a crash) when resuming queued requests

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmklvQMRHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9byFA//d9VtU3wLZpJRL2mnYH2qJME3WeqJaSB+
# FzkG32gkCb0JtH5yr427oJYKhZsKpNkz20E7z4+1ZT4ovcjo7mddJYW7DwaMjUmO
# G3UXWE33ayLNZFMDrsMRV5tfiQkSb7Y0ekYfwU7GjC3qhMhRIX9eCRBrCLD6jdUx
# mg2h0ML0smE9AV5AEuunwSoqp+rD+OpRQ6EBkkCVF5iMlIHeiewP/TQbJtKBtxdK
# AumiIcYgPbH7QFG8kDTmVCCGPDC0v2i1G6Owtptbt9RmWTEGp++Ngm8F+7u/kPMk
# weRhlVhnxwDxVxmHzvysh0m+n08oVJyA2vB4QJrti6ZmgDcJYulxFfQgPCKxjvGd
# 6va02q0DYrCbO3YiViaAtnudEuqqaB1to57jeQq6tP9KrpH8uzAddrFWeb3TY4gN
# CvWr+p4V7bYvteNASJt/+VC5T3haR+U5eCRD5nOKPyXqCbMT+z6zZRuYxP2q1W6i
# VwQLIjuWIx+bXVRUrHkf9VNy1clB4ga+ZDbTGFrl0NOLDcn6u3Vcr4GQ7VvQ31Pj
# ulGA9F+DXjPRQpZC+WnCZsBSLwVBrNeYPyxsCSk2ORH930djgb7e1lxX5OawT7MT
# lNzbQ+N7PXCd5Yt0UyJ3uCF6gqlpvmUV7IZMbyoYHceoCnz8+McqvGORYfzkLwk9
# HUDS3UTI8Ks=
# =57x4
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 25 Nov 2025 06:28:19 AM PST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* tag 'for-upstream' of https://repo.or.cz/qemu/kevin:
  iotests: add Linux loop device image creation test
  block: use pwrite_zeroes_alignment when writing first sector
  file-posix: populate pwrite_zeroes_alignment
  block-backend: Fix race when resuming queued requests

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-11-25 10:25:16 -08:00
Richard Henderson
dac464b927 ui/chardev fixes for v10.2
-----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCgA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmkluXscHG1hcmNhbmRy
 ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5YHAEACTqxHta05VSpzwnHxv
 A8NOasN02V6KYrN6Cjtowy5JULPOWQANadG4H3CZIm1CQ6sZ0u5grA8ZOUHBQaSZ
 HLF+baugBqTUQYyQdGX2JBwrqD0PxF2uohzIdQI8yiaXJQ2c/rp9HXVZNv+Cd80F
 sajq8TsIvdBP/IDUMAud+MOMYGl4TvkkMd1Rdbq11PZaVBu5bbmMuVOeqaJeqFgP
 /8uVlvZaYMqep6WSRShhrnwPuernGqdJCesGV3eooaZ9pO0LC6yiEw/5mVyZ+u1S
 nO6DVOhvZv519RoMiBbwtkS8HjjXQaKbY0TQYu1p6vDcXnfSvRYmX0skrx7B0ZHR
 IMC6h8JVXe6q8FV7iXz6RnIGycPz318HCG1JC+Rvts4VtO9A4MSlItJiNSVFcdkA
 66PSV7MUd67XYzAODOxN4g5XTCC2EYR3t5wRh2VgkSc2Y3fVmWKsQtsu4PRkfspV
 4ciwuhqDG1UQeis7x0m8RD6bUefg5ZXdpHWOCQdX9VKcOHoV13EMOHURuONWCFEE
 xzf3TG6uLg4GvJBT2kcRhp1gOSgI4XZ1lpCoTUp7nuZPtMzuoxeNVkHP+D7isRF2
 RQDmKuyQc1SeDXfUU3KvakXPv8Aq1Mb7kGgjivfyGzAAlimKhDw5HxuCCsEjKfMi
 cliGeoytFgZJlZpCp9LINq2sAQ==
 =OZt5
 -----END PGP SIGNATURE-----

Merge tag 'fix-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging

ui/chardev fixes for v10.2

# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCgA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmkluXscHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5YHAEACTqxHta05VSpzwnHxv
# A8NOasN02V6KYrN6Cjtowy5JULPOWQANadG4H3CZIm1CQ6sZ0u5grA8ZOUHBQaSZ
# HLF+baugBqTUQYyQdGX2JBwrqD0PxF2uohzIdQI8yiaXJQ2c/rp9HXVZNv+Cd80F
# sajq8TsIvdBP/IDUMAud+MOMYGl4TvkkMd1Rdbq11PZaVBu5bbmMuVOeqaJeqFgP
# /8uVlvZaYMqep6WSRShhrnwPuernGqdJCesGV3eooaZ9pO0LC6yiEw/5mVyZ+u1S
# nO6DVOhvZv519RoMiBbwtkS8HjjXQaKbY0TQYu1p6vDcXnfSvRYmX0skrx7B0ZHR
# IMC6h8JVXe6q8FV7iXz6RnIGycPz318HCG1JC+Rvts4VtO9A4MSlItJiNSVFcdkA
# 66PSV7MUd67XYzAODOxN4g5XTCC2EYR3t5wRh2VgkSc2Y3fVmWKsQtsu4PRkfspV
# 4ciwuhqDG1UQeis7x0m8RD6bUefg5ZXdpHWOCQdX9VKcOHoV13EMOHURuONWCFEE
# xzf3TG6uLg4GvJBT2kcRhp1gOSgI4XZ1lpCoTUp7nuZPtMzuoxeNVkHP+D7isRF2
# RQDmKuyQc1SeDXfUU3KvakXPv8Aq1Mb7kGgjivfyGzAAlimKhDw5HxuCCsEjKfMi
# cliGeoytFgZJlZpCp9LINq2sAQ==
# =OZt5
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 25 Nov 2025 06:13:15 AM PST
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [unknown]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.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: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'fix-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  ui/vnc: Fix qemu abort when query vnc info
  chardev/char-pty: Do not ignore chr_write() failures
  chardev/char-file: fix failure path
  ui/vdagent: fix windows agent regression

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-11-25 07:44:34 -08:00