]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
5 months agoconfigure: unconditionally install "tooling" group
John Snow [Wed, 18 Feb 2026 21:34:10 +0000 (16:34 -0500)] 
configure: unconditionally install "tooling" group

Alongside meson, always ensure our in-tree tooling group and its
out-of-tree dependency, qemu.qmp, is always installed.

As a result, several "check-venv" invocations can be removed from
various testing scripts.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20260218213416.674483-16-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agomeson, mkvenv: add qemu.git/python/qemu package to pythondeps.toml
John Snow [Wed, 18 Feb 2026 21:34:09 +0000 (16:34 -0500)] 
meson, mkvenv: add qemu.git/python/qemu package to pythondeps.toml

Add the local python package group into pythondeps.toml for the tooling
group. This makes qemu.qmp, qemu.machine and qemu.utils packages
unconditionally available for tests and scripts.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20260218213416.674483-15-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agomeson, mkvenv: make functional tests depend on functests group
John Snow [Wed, 18 Feb 2026 21:34:08 +0000 (16:34 -0500)] 
meson, mkvenv: make functional tests depend on functests group

Note that only the thorough group requires the extra testing
dependencies; the quick group will run with just the "tooling" group,
which we intend to install by default at configure time in a forthcoming
commit.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20260218213416.674483-14-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agopython: add vendored qemu.qmp package
John Snow [Wed, 29 Oct 2025 18:22:06 +0000 (14:22 -0400)] 
python: add vendored qemu.qmp package

In anticipation of deleting the python/qemu/qmp source from the tree,
add a vendored version of the qemu.qmp package to ensure that "make
check" can be run in isolated build environments, offline.

Acked-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-13-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agoMerge tag 'pull-fpu-20260224' of https://gitlab.com/rth7680/qemu into staging
Peter Maydell [Tue, 24 Feb 2026 11:33:01 +0000 (11:33 +0000)] 
Merge tag 'pull-fpu-20260224' of https://gitlab.com/rth7680/qemu into staging

- Reformat NaN classification to share code
- Fix pseudo-NaN handling in FPATAN/FYL2XP1/FYL2X helpers
- Add conversion routines for OCP FP8 and FP4 formats

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmmdOnYdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9RJwgAj4rs0Pj9rOMnrmGN
# 5EPq2p+Wvjeup59W8WeBJGUS6J8rC05i5fBtcThoRNEGf+w/+8ef8ZlERyv07FIJ
# O7RcLDeXWYotH7GMM/1EEi5FHJ4qmYkKjwX3ys6vxblYGa1gPtwUVyrySExqzWqe
# T59+ljzYGHka7hXEXx/0yL+ypJv3lidpdPk/a0Ylqi37zwLEuv/FycdlCNSnxNTj
# bR+GleqcxigkP7G1Mks5V9MpWWGd2tWloO1EwDieng6bMGom0c+4xNyZ5HCqt+Au
# cuGEZRgrfGcA6QpHKs9srVAwDkj4QWSky8ffjPSNbGvNLoGA+7gWE6VFmqlb0yib
# vd+Tqw==
# =Wpw9
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 24 05:43:18 2026 GMT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-fpu-20260224' of https://gitlab.com/rth7680/qemu:
  fpu: Add conversion routines for OCP FP4 E2M1
  fpu: Add conversion routines for OCP FP8 E4M3
  fpu: Add conversion routines for OCP FP8 E5M2
  fpu: Add saturate parameter to parts_uncanon
  fpu: Add overflow_raises_invalid to FloatFmt
  fpu: Introduce FloatFmtExpMaxKind
  target/i386: Fix pseudo-NaN handling in FPATAN/FYL2XP1/FYL2X helpers
  fpu/softfloat: Refactor floatx80 format NaN classification to share code
  fpu/softfloat: Refactor IEEE format NaN classification to share code

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 months agoMerge tag 'pr-plugins-20260223' of https://gitlab.com/pbo-linaro/qemu into staging
Peter Maydell [Tue, 24 Feb 2026 11:32:49 +0000 (11:32 +0000)] 
Merge tag 'pr-plugins-20260223' of https://gitlab.com/pbo-linaro/qemu into staging

Changes:
- [PATCH] contrib/plugins/uftrace_symbols.py: filter out some addr2line (Pierrick Bouvier <pierrick.bouvier@linaro.org>)
Link: https://lore.kernel.org/qemu-devel/20260218172356.938236-1-pierrick.bouvier@linaro.org
# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEZrmU7KFPfy5auggff5BUDQoc0A8FAmmc//EACgkQf5BUDQoc
# 0A9SqAv/SXvI9t8NQAauRATFlcz7GQRAyrFdCMztNSPnP62w+J/PXD5NbAQX72Mo
# 3YBTjhU8nFXXUJGHoQMkH00Cp3/YyTaZut75jGctMn4FtrBAxn1ZVgMRdOQP7SzH
# foPDj/nhw/QccfyKhVKFDX45E7q5osg3whXmBAbdaA0ZJRXAFpT3/wAICPnfNrxW
# 7REApWH74KboB1D58Nz79DiiKaFMjHYi4tyDh8EmrMzW73i4y0IdTNyzWKjLWJc/
# R6VJlKQr051YVzJw3rVXgfHJdyFjeALxS/s5UAa4tX/P9pHISDfpvVuK+ePVTKW1
# i/U4ZQlf57QaWvzzbAst72WXaWgUrWfMox5svb95XxhX4VCrTWo0//0/IpG1tl3u
# wFNckTCV9iu089KDX3pm9aX+TXbgSnwzxPut9/Ea3mBifODaAo+9NszaoDR2ZTv4
# 0be4+l9jSaQL7VmpZFoMbUx5uaP7Z6pX1yuiTOzwgv7WsQuY0d18Wod2pyctEXtR
# BIe6szz6
# =+SgD
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 24 01:33:37 2026 GMT
# gpg:                using RSA key 66B994ECA14F7F2E5ABA081F7F90540D0A1CD00F
# gpg: Good signature from "Pierrick Bouvier <pierrick.bouvier@linaro.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 66B9 94EC A14F 7F2E 5ABA  081F 7F90 540D 0A1C D00F

* tag 'pr-plugins-20260223' of https://gitlab.com/pbo-linaro/qemu:
  contrib/plugins/uftrace_symbols.py: filter out some addr2line error messages

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 months agoMerge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging
Peter Maydell [Tue, 24 Feb 2026 11:32:35 +0000 (11:32 +0000)] 
Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging

Pull request

Jens Axboe's fixes for fdmon-io_uring.

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmmcYhEACgkQnKSrs4Gr
# c8i4BAgAgI7UlEbQs0iLV0N4qUJ7pc8p/bgRNP9/TkjFYtFIcmRZtNeRvlkIVdgD
# F2QAMJAP0KzP3T2mo3a9f5kcvKIqLFsOpwKmMiUa98aA4dDhkT6TNOqLjgKmaXmR
# muEv7TKjBPzZqNBWDyEMIcnIzxSGjnbATN1BdvEy+7awJJDqaYZEkxTT6u+Vv/2l
# MlaYwnNbfye7nFM/xCBt/wH07XLZMC3pezHQxJGq7CGGTG0JFFeXIhm0HrTjlAt/
# EBVf41zsAtYqBj9egl5Y570NXkTirBbY+Niv/rqtavknC/tAxN+PQTBoobHm2Wna
# yU7+L+lidtIcdwhbzeZar0KdoDhsEQ==
# =zdFX
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Feb 23 14:20:01 2026 GMT
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* tag 'block-pull-request' of https://gitlab.com/stefanha/qemu:
  fdmon-io_uring: check CQ ring directly in gsource_check
  aio-posix: notify main loop when SQEs are queued

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 months agofpu: Add conversion routines for OCP FP4 E2M1
Max Chou [Thu, 5 Feb 2026 11:10:46 +0000 (21:10 +1000)] 
fpu: Add conversion routines for OCP FP4 E2M1

Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
[rth: Update for exp_max_kind]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 months agofpu: Add conversion routines for OCP FP8 E4M3
Max Chou [Thu, 5 Feb 2026 10:45:25 +0000 (20:45 +1000)] 
fpu: Add conversion routines for OCP FP8 E4M3

Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
[rth: Split out of a larger patch; adjust overflow detection.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 months agofpu: Add conversion routines for OCP FP8 E5M2
Max Chou [Thu, 5 Feb 2026 07:35:56 +0000 (17:35 +1000)] 
fpu: Add conversion routines for OCP FP8 E5M2

Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
[rth: Split out of a larger patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 months agofpu: Add saturate parameter to parts_uncanon
Max Chou [Thu, 5 Feb 2026 06:29:28 +0000 (16:29 +1000)] 
fpu: Add saturate parameter to parts_uncanon

The OCP FP8 conversion operations have a parameter to control
saturate vs overflow.  Add a parameter, currently always false.

Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
[rth: Split out of a larger patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 months agofpu: Add overflow_raises_invalid to FloatFmt
Max Chou [Thu, 5 Feb 2026 05:37:37 +0000 (15:37 +1000)] 
fpu: Add overflow_raises_invalid to FloatFmt

ARM Alt HP raises different exceptions on overflow than is
standard for IEEE when saturating a value.  Add a flag to
control this effect.

Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
[rth: Split out of a larger patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 months agofpu: Introduce FloatFmtExpMaxKind
Richard Henderson [Thu, 5 Feb 2026 05:21:59 +0000 (15:21 +1000)] 
fpu: Introduce FloatFmtExpMaxKind

Generalize arm_althp to indicate how exp==max should
be handled for the format.  Reorganize canonicalize
and uncanon_normal to use a switch statement, allowing
more cases to be added trivially.

Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 months agotarget/i386: Fix pseudo-NaN handling in FPATAN/FYL2XP1/FYL2X helpers
Max Chou [Wed, 4 Feb 2026 05:17:40 +0000 (13:17 +0800)] 
target/i386: Fix pseudo-NaN handling in FPATAN/FYL2XP1/FYL2X helpers

According to Intel's x87 FPU specification (Table 8-10, Vol. 1), arithmetic
operations on operands in unsupported formats (including pseudo-NaNs) must
return the QNaN floating-point indefinite value.

The helper functions for FPATAN, FYL2XP1, and FYL2X incorrectly check for
signaling NaN before checking for invalid encodings. This causes pseudo-NaNs
to be treated as valid signaling NaNs and silenced, rather than being
rejected as unsupported formats.

Reorder the checks to test floatx80_invalid_encoding before
floatx80_is_signaling_nan, matching the correct behavior already
implemented in helper_fscale.

Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260204051756.667397-5-max.chou@sifive.com>

5 months agofpu/softfloat: Refactor floatx80 format NaN classification to share code
Max Chou [Wed, 4 Feb 2026 05:17:39 +0000 (13:17 +0800)] 
fpu/softfloat: Refactor floatx80 format NaN classification to share code

The floatx80_is_[quiet|signaling]_nan functions contain duplicated
logic that should be shared.
This commit introduces floatx80_nan_is_snan helper function that
determine if a NaN is signaling and change the return type of
floatx80_is_[signaling|quiet]_nan to bool.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260204051756.667397-4-max.chou@sifive.com>

5 months agofpu/softfloat: Refactor IEEE format NaN classification to share code
Max Chou [Wed, 4 Feb 2026 05:17:38 +0000 (13:17 +0800)] 
fpu/softfloat: Refactor IEEE format NaN classification to share code

The floatN_is_[quiet|signaling]_nan functions for following formats
(float16, bfloat16, float32, float64, float128) contain duplicated
logic that should be shared.
This commit introduces
[float16|bfloat16|float32|float64|float128]_nan_is_snan that determine
if a NaN is signaling.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260204051756.667397-3-max.chou@sifive.com>

5 months agocontrib/plugins/uftrace_symbols.py: filter out some addr2line error messages
Pierrick Bouvier [Wed, 18 Feb 2026 17:23:56 +0000 (09:23 -0800)] 
contrib/plugins/uftrace_symbols.py: filter out some addr2line error messages

This was found when tracing Hafnium and SLOF binaries, and it's probably
related to a bug in toolchain used. It's safe to ignore those entries,
and related symbols will still be present in output, whether they can be
found or not.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260218172356.938236-1-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
5 months agotests/lcitool: add python3 wheel and setuptools deps for qemu
John Snow [Wed, 18 Feb 2026 21:34:06 +0000 (16:34 -0500)] 
tests/lcitool: add python3 wheel and setuptools deps for qemu

Installing local dependencies while offline, without PyPI access,
requires the python3-setuptools and python3-wheel packages. Most
distributions have these available anyway for one reason or another, but
not all of them.

If you are asking yourself "Wait, aren't these packages guaranteed via
installation of pip, via the ensurepip module, which mkvenv takes
immense pains to provide for us?" - Well... since Python 3.13, "pip"
does not actually come with "setuptools" or "wheel" anymore, and so if
we want to build and install a python package, we actually need these
available in the host environment.

(Note that you don't need these packages just to install a pre-built
package, you only need them to *build* a package. With cutting edge
setuptools and pip, all locally installed packages, even in editable
mode, must be "built" first before being installed. Thus, these
dependencies are being added specifically to facilitate installing
qemu.git/python/qemu to the configure-time venv.)

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-12-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agotests/lcitool: update lcitool to latest version
John Snow [Wed, 18 Feb 2026 21:34:05 +0000 (16:34 -0500)] 
tests/lcitool: update lcitool to latest version

Update to latest lcitool master and refresh tests. Fedora is upgraded to
Fedora 43 and Alpine from 3.21 to 3.23 as a result.

This is being done in this series primarily to ensure that MacOS
installs python-setuptools, which is now separate from the core python
package, and which is needed for this series to work correctly.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-11-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agotests: use "run" script to execute device-crash-test
John Snow [Wed, 18 Feb 2026 21:34:04 +0000 (16:34 -0500)] 
tests: use "run" script to execute device-crash-test

Instead of invoking python from the configure venv manually, instruct
developers to use the "run" script instead. Change the test invocation
to be a good example going forward.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-10-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agoiotests: tolerate being run outside of pyvenv
John Snow [Wed, 18 Feb 2026 21:34:03 +0000 (16:34 -0500)] 
iotests: tolerate being run outside of pyvenv

Modify the iotests environment preparation so that it can detect when it
is being run outside of the configure-time virtual environment and give
a warning to the user, suggesting the use of the meson run script
instead.

As a bonus, since the test executor itself does not actually rely on
anything in the configure-time venv in and of itself, it is possible to
just modify the python executable it uses for launching tests to be the
correct, configured venv that has access to qemu.qmp and other test
dependencies.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-9-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agotests: Use configured python to run GitLab iotests
John Snow [Wed, 18 Feb 2026 21:34:02 +0000 (16:34 -0500)] 
tests: Use configured python to run GitLab iotests

use the configured python (and the pyvenv) to run iotests instead of the
system default python3 interpreter. Use the new "run" script in the
build directory to execute the command inside the meson developer
environment, templated in qemu.git/run.in.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-8-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agomeson, mkvenv: add functests custom target
John Snow [Wed, 18 Feb 2026 21:34:01 +0000 (16:34 -0500)] 
meson, mkvenv: add functests custom target

add the "pyvenv_functests_group" target to meson. This target will
invoke mkvenv.py to install the associated dependency group to the
build/pyvenv directory.

A "pyvenv_tooling_group" is not included here as it is the plan to
always install this group by default, so it will not need an on-demand
trigger.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-7-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agopython/mkvenv: add mechanism to install local package(s)
John Snow [Wed, 18 Feb 2026 21:34:00 +0000 (16:34 -0500)] 
python/mkvenv: add mechanism to install local package(s)

Currently, we "implicitly" install the local 'qemu' python package for
'make check-venv' with some logic inside tests/Makefile.include. I would
like to make this installation explicit in pythondeps.toml instead.

This patch adds a path constraint that can be used in lieu of version
constraints to specify that a package should be installed from the
source tree instead of from PyPI or vendored packages. This is done to
allow us to install the python packages hosted inside of the tree while
also processing dependencies; i.e. so that our "qemu" package can
specify that it needs "qemu.qmp", which soon will not be included in
qemu.git.

This also has the benefit of being able to specify in a declarative
configuration file that our pyvenv environment *will* have our local
python packages installed and available without any PYTHONPATH hacks,
which should simplify iotests, device-crash-test and functional tests
without needing to manage local inclusion paths in environment
variables.

On the downsides, installing packages through mkvenv/ensuregroup means
that there are extra steps we need to take in order to install a local
package *offline*; namely we must disable build isolation (so we have
access to setuptools) and we must also include python3-wheel in QEMU's
build dependencies in order for "make check" to run successfully when in
an offline, isolated environment. These extra dependencies are handled
in a forthcoming commit; for now, nothing is utilizing this new pathway.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-6-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agopython/mkvenv: add 'tooling' and 'functests' dependency groups
John Snow [Wed, 18 Feb 2026 21:33:59 +0000 (16:33 -0500)] 
python/mkvenv: add 'tooling' and 'functests' dependency groups

'tooling' contains depedencies required to run various tools (like
qmp-shell) as well as dependencies required to run "make check", and as
such, we promise that these dependencies can be sourced from the user's
distribution repository or from vendored packages so that "make check"
can be executed offline in an isolated build environment.

In contrast, pygdbmi is only needed for functional tests and not tests
in general; we do not make the same offline/isolated guarantees for
functional tests, and this dependency group is allowed to fetch
dependencies from PyPI at runtime.

For the time being, amend the "check-venv" target to install both
dependency groups, to avoid a duplicate dependency between them. By the
end of this series, however, "check-venv" will be eliminated in favor of
always installing "tooling" at configure time and allowing "functests"
to be installed on-demand as needed by meson/ninja.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20260218213416.674483-5-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agopython/mkvenv: bump 'qemu.qmp' dependency for testdeps
John Snow [Wed, 18 Feb 2026 21:33:58 +0000 (16:33 -0500)] 
python/mkvenv: bump 'qemu.qmp' dependency for testdeps

First up, use the newest v0.0.5 instead of the older v0.0.3.

Secondly, the use of a period in the key name does not behave as
expected when installing and checking for dependencies, so quote this
string instead.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-4-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agopython/mkvenv: create timestamp file for each group "ensured"
John Snow [Wed, 18 Feb 2026 21:33:57 +0000 (16:33 -0500)] 
python/mkvenv: create timestamp file for each group "ensured"

Each group ensured by the mkvenv script will create an empty timestamp
file named {groupname}.group which can be used to conditionally trigger
dependency installation from various scripts and build machinery.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-3-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
5 months agoMerge tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging
Peter Maydell [Mon, 23 Feb 2026 14:03:50 +0000 (14:03 +0000)] 
Merge tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging

audio cleanups

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmmcWLAACgkQ2ujhCXWW
# nOUeIRAAlNCHKCBTTH+LmclTBfwI6UhkH7nsMdzQChnRpFqwUrB9HW9GXscXManq
# ZPzZ8A+atwH361CHNLcAkK4BR7JhXh4lhyDxUL9O4ZS8LCeatFkMefnU5NS0hhXg
# /CpUpni7mtXW9mJ2lzk3rrn/iI6akyATFvKpOEXqRAIZGFqDieWpxSO08hWkkRJl
# Csd6PZjk8Jo+k3C4V4M2MJGA6Y2GHiYanX5glJTvUSUkawZXjgZ9wul0gKvH3MLS
# Twk5/nGo7ghpSxvs6NRlqSfTfydMZaM6ps4erIGZk5tU6AofIv+6oiquL6JTd6ra
# rrQM6/+iesUx1Av/yBDmFNY4A6HajLDnOYb6NnCF1bH/9ddDBDJX+V55ntfChvQf
# ylw9L1LwboB29uyWokOGUegnMSozSblJ8GSgGs4CH5dLyoCHVFESf4UrZCH0M++Q
# vysJ+zKKzK3tP+x5IXY45IAbgJvuCJirgHwKnaNWVEiEUdCHuGA4MmnH2nVfjjDu
# ZtwTVuijjVtIxRFVBtUtBc/sFt9R3OI1LzPhH8Cj+qZzeegnO0YQExeKnTitBMTp
# pOS9R5NWykSTTAQHS1LPm+tPDp1KXf81hcCLX34Ve3rLjWpKRg/B/ZpUFqGF5beW
# 6uO6g7O1JH5/34eaYPOBf8H/Gz031lvbz1yWwDw7ekR2B9H2BV8=
# =lGb0
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Feb 23 13:40:00 2026 GMT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu: (85 commits)
  audio: fix leak of audio capture name
  audio: remove AudioMixengBackendClass.name
  audio: remove AUD_log/ldebug
  audio: replace remaining dolog() and AUD_log
  audio: rework audio_bug()
  audio: rework invalid audsettings error
  tests/audio: add an invalid settings test
  audio: replace DEBUG_AUDIO with trace
  audio: replace DEBUG_OUT with traces
  audio: replace DEBUG_CAPTURE with traces
  audio: rework DEBUG_POLL
  audio: replace ldebug with trace events
  audio: replace int endianness with bool big_endian in audsettings
  audio/mixeng: replace redundant pcm_info fields with AudioFormat
  audio/wav: replace custom logging with error_report
  audio/spice: remove unused AUDIO_CAP macro
  audio/sndio: replace custom logging with error_report
  audio/sdl: replace custom logging with error_report
  audio/pw: replace custom logging with error_report
  audio/pa: replace custom logging with report & trace
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 months agofdmon-io_uring: check CQ ring directly in gsource_check
Jens Axboe [Fri, 13 Feb 2026 14:26:37 +0000 (07:26 -0700)] 
fdmon-io_uring: check CQ ring directly in gsource_check

gsource_check() only looks at the ppoll revents for the io_uring fd,
but CQEs can be posted during gsource_prepare()'s io_uring_submit()
call via kernel task_work processing on syscall exit. These completions
are already sitting in the CQ ring but the ring fd may not be signaled
yet, causing gsource_check() to return false.

Add a fallback io_uring_cq_ready() check so completions that arrive
during submission are dispatched immediately rather than waiting for
the next ppoll() cycle.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Message-ID: <20260213143225.161043-3-axboe@kernel.dk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
5 months agoaio-posix: notify main loop when SQEs are queued
Jens Axboe [Wed, 18 Feb 2026 20:09:58 +0000 (15:09 -0500)] 
aio-posix: notify main loop when SQEs are queued

When a vCPU thread handles MMIO (holding BQL), aio_co_enter() runs the
block I/O coroutine inline on the vCPU thread because
qemu_get_current_aio_context() returns the main AioContext when BQL is
held. The coroutine calls luring_co_submit() which queues an SQE via
fdmon_io_uring_add_sqe(), but the actual io_uring_submit() only happens
in gsource_prepare() on the main loop thread.

Since the coroutine ran inline (not via aio_co_schedule()), no BH is
scheduled and aio_notify() is never called. The main loop remains asleep
in ppoll() with up to a 499ms timeout, leaving the SQE unsubmitted until
the next timer fires.

Fix this by calling aio_notify() after queuing the SQE. This wakes the
main loop via the eventfd so it can run gsource_prepare() and submit the
pending SQE promptly.

This is a generic fix that benefits all devices using aio=io_uring.
Without it, AHCI/SATA devices see MUCH worse I/O latency since they use
MMIO (not ioeventfd like virtio) and have no other mechanism to wake the
main loop after queuing block I/O.

This is usually a bit hard to detect, as it also relies on the ppoll
loop not waking up for other activity, and micro benchmarks tend not to
see it because they don't have any real processing time. With a
synthetic test case that has a few usleep() to simulate processing of
read data, it's very noticeable. The below example reads 128MB with
O_DIRECT in 128KB chunks in batches of 16, and has a 1ms delay before
each batch submit, and a 1ms delay after processing each completion.
Running it on /dev/sda yields:

time sudo ./iotest /dev/sda

________________________________________________________
Executed in   25.76 secs   fish           external
   usr time    6.19 millis  783.00 micros    5.41 millis
   sys time   12.43 millis  642.00 micros   11.79 millis

while on a virtio-blk or NVMe device we get:

time sudo ./iotest /dev/vdb

________________________________________________________
Executed in    1.25 secs      fish           external
   usr time    1.40 millis    0.30 millis    1.10 millis
   sys time   17.61 millis    1.43 millis   16.18 millis

time sudo ./iotest /dev/nvme0n1

________________________________________________________
Executed in    1.26 secs      fish           external
   usr time    6.11 millis    0.52 millis    5.59 millis
   sys time   13.94 millis    1.50 millis   12.43 millis

where the latter are consistent. If we run the same test but keep the
socket for the ssh connection active by having activity there, then
the sda test looks as follows:

time sudo ./iotest /dev/sda

________________________________________________________
Executed in    1.23 secs      fish           external
   usr time    2.70 millis   39.00 micros    2.66 millis
   sys time    4.97 millis  977.00 micros    3.99 millis

as now the ppoll loop is woken all the time anyway.

After this fix, on an idle system:

time sudo ./iotest /dev/sda

________________________________________________________
Executed in    1.30 secs      fish           external
   usr time    2.14 millis    0.14 millis    2.00 millis
   sys time   16.93 millis    1.16 millis   15.76 millis

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Message-Id: <07d701b9-3039-4f9b-99a2-abeae51146a5@kernel.dk>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
[Generalize the comment since this applies to all vCPU thread activity,
not just coroutines, as suggested by Kevin Wolf <kwolf@redhat.com>.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
5 months agoaudio: fix leak of audio capture name
Marc-André Lureau [Tue, 3 Feb 2026 06:55:02 +0000 (10:55 +0400)] 
audio: fix leak of audio capture name

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: remove AudioMixengBackendClass.name
Marc-André Lureau [Thu, 22 Jan 2026 08:26:35 +0000 (12:26 +0400)] 
audio: remove AudioMixengBackendClass.name

Simply use the class name instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
5 months agoaudio: remove AUD_log/ldebug
Marc-André Lureau [Wed, 21 Jan 2026 13:44:39 +0000 (17:44 +0400)] 
audio: remove AUD_log/ldebug

audio/ is now converted to use QEMU standard trace & error reporting.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: replace remaining dolog() and AUD_log
Marc-André Lureau [Thu, 22 Jan 2026 07:49:14 +0000 (11:49 +0400)] 
audio: replace remaining dolog() and AUD_log

Use warn_report/error_report and trace instead.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: rework audio_bug()
Marc-André Lureau [Wed, 21 Jan 2026 12:07:11 +0000 (16:07 +0400)] 
audio: rework audio_bug()

audio_bug() is a bit unconventional, it is meant to be used as a
condition expression, passing the actual condition as second argument
(and __func__ as first argument).

If the condition is true, it uses AUD_log() to print to stderr, and has
some dubious recommendations printed only once.

This change:
- clears the control flow, and make the condition directly visible in
  the 'if' statement.
- uses standard QEMU error_report()
- audio_bug() now captures __func__
- remove the "Save all your work and restart..." once hint

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: rework invalid audsettings error
Marc-André Lureau [Wed, 21 Jan 2026 21:51:40 +0000 (01:51 +0400)] 
audio: rework invalid audsettings error

Currently, when given invalid settings, QEMU will print to stderr:

A bug was just triggered in audio_mixeng_backend_open_out
Save all your work and restart without audio
I am sorry
Context:
audio: frequency=44100 nchannels=0 fmt=S16 endianness=little

Now it will use error_report() and simply report:
audio: Invalid audio settings: frequency=44100 nchannels=0 fmt=s16 endian=little

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agotests/audio: add an invalid settings test
Marc-André Lureau [Wed, 21 Jan 2026 14:17:47 +0000 (18:17 +0400)] 
tests/audio: add an invalid settings test

As we are going to change the related code next.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: replace DEBUG_AUDIO with trace
Marc-André Lureau [Wed, 21 Jan 2026 11:59:58 +0000 (15:59 +0400)] 
audio: replace DEBUG_AUDIO with trace

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: replace DEBUG_OUT with traces
Marc-André Lureau [Wed, 21 Jan 2026 11:53:14 +0000 (15:53 +0400)] 
audio: replace DEBUG_OUT with traces

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: replace DEBUG_CAPTURE with traces
Marc-André Lureau [Wed, 21 Jan 2026 11:29:42 +0000 (15:29 +0400)] 
audio: replace DEBUG_CAPTURE with traces

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: rework DEBUG_POLL
Marc-André Lureau [Wed, 21 Jan 2026 07:55:53 +0000 (11:55 +0400)] 
audio: rework DEBUG_POLL

Use more correct GTimer, specific for each backend, with a trace event.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: replace ldebug with trace events
Marc-André Lureau [Tue, 20 Jan 2026 19:50:16 +0000 (23:50 +0400)] 
audio: replace ldebug with trace events

Replace the ldebug macro calls with proper trace events:
- audio_get_avail: traces available samples in capture stream
- audio_open_out/audio_open_in: traces stream open parameters

This provides structured tracing that can be enabled at runtime
without requiring debug builds.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: replace int endianness with bool big_endian in audsettings
Marc-André Lureau [Tue, 20 Jan 2026 19:43:47 +0000 (23:43 +0400)] 
audio: replace int endianness with bool big_endian in audsettings

The endianness field used an int to represent a boolean concept, with
0 meaning little-endian and 1 meaning big-endian. This required runtime
validation to reject invalid values and made the code less readable.

Replace with a bool big_endian field that is self-documenting and
type-safe. The compiler now enforces valid values, eliminating the
need for the validation check in audio_validate_settings().

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/mixeng: replace redundant pcm_info fields with AudioFormat
Marc-André Lureau [Tue, 20 Jan 2026 19:23:14 +0000 (23:23 +0400)] 
audio/mixeng: replace redundant pcm_info fields with AudioFormat

The audio_pcm_info structure stored three fields (bits, is_signed,
is_float) that were always derived from the AudioFormat enum. This
redundancy meant the same information was represented twice, with no
type-level guarantee that they stayed in sync.

Replace these fields with a single AudioFormat field, and add helper
functions to extract the derived properties when needed:
- audio_format_bits()
- audio_format_is_signed()
- audio_format_is_float()

This improves type safety by making AudioFormat the single source of
truth, eliminating the possibility of inconsistent state between the
format enum and its derived boolean/integer representations.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
5 months agoaudio/wav: replace custom logging with error_report
Marc-André Lureau [Tue, 20 Jan 2026 16:18:54 +0000 (20:18 +0400)] 
audio/wav: replace custom logging with error_report

Replace the custom audio logging infrastructure (dolog macro) with
standard QEMU error reporting (error_report).

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/spice: remove unused AUDIO_CAP macro
Marc-André Lureau [Tue, 20 Jan 2026 16:16:14 +0000 (20:16 +0400)] 
audio/spice: remove unused AUDIO_CAP macro

The AUDIO_CAP macro is no longer used.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/sndio: replace custom logging with error_report
Marc-André Lureau [Tue, 20 Jan 2026 16:14:43 +0000 (20:14 +0400)] 
audio/sndio: replace custom logging with error_report

Replace the custom audio logging infrastructure (dolog macro) with
standard QEMU error reporting (error_report).

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/sdl: replace custom logging with error_report
Marc-André Lureau [Tue, 20 Jan 2026 16:13:19 +0000 (20:13 +0400)] 
audio/sdl: replace custom logging with error_report

Replace the custom audio logging infrastructure (dolog macro and
AUD_log/AUD_vlog) with standard QEMU error reporting (error_report,
error_printf, error_vprintf).

Note that we also dropped the abort() call in DEBUG_AUDIO, as it is not
usually compiled with, doesn't help much, and can easily be added back
when doing development as needed.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/pw: replace custom logging with error_report
Marc-André Lureau [Tue, 20 Jan 2026 16:02:33 +0000 (20:02 +0400)] 
audio/pw: replace custom logging with error_report

Replace the custom audio logging infrastructure (dolog macro) with
standard QEMU error reporting (error_report).

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/pa: replace custom logging with report & trace
Marc-André Lureau [Tue, 20 Jan 2026 15:32:32 +0000 (19:32 +0400)] 
audio/pa: replace custom logging with report & trace

Replace the custom audio logging infrastructure with standard QEMU
error reporting and tracing.

qpa_conn_init() is called during audio_pa_realize() and already reports
an error through Error *.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/oss: replace custom logging with report & trace
Marc-André Lureau [Tue, 20 Jan 2026 15:32:32 +0000 (19:32 +0400)] 
audio/oss: replace custom logging with report & trace

Replace the custom audio logging infrastructure with standard QEMU
error reporting and tracing.

Note the patch drops DEBUG_MISMATCH condition, and now always trace
actual audio parameters.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/noaudio: remove unused AUDIO_CAP macro
Marc-André Lureau [Tue, 20 Jan 2026 14:37:06 +0000 (18:37 +0400)] 
audio/noaudio: remove unused AUDIO_CAP macro

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/jack: replace custom logging with report & trace
Marc-André Lureau [Tue, 20 Jan 2026 15:14:40 +0000 (19:14 +0400)] 
audio/jack: replace custom logging with report & trace

Replace the custom audio logging infrastructure with standard QEMU
error reporting and tracing.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/dsound: replace custom logging with error_report & trace
Marc-André Lureau [Tue, 20 Jan 2026 14:43:00 +0000 (18:43 +0400)] 
audio/dsound: replace custom logging with error_report & trace

The DirectSound audio backend uses its own logging infrastructure
(AUD_log, AUD_vlog, dolog) and the AUDIO_CAP macro. This approach is
inconsistent with the rest of QEMU and makes the output harder to
filter and configure.

Replace the custom logging with standard QEMU error reporting.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/dbus: remove unused AUDIO_CAP macro
Marc-André Lureau [Tue, 20 Jan 2026 14:37:06 +0000 (18:37 +0400)] 
audio/dbus: remove unused AUDIO_CAP macro

The DBus audio backend already uses error_report() for error logging.
Remove the unused AUDIO_CAP macro which was left over from the old
logging infrastructure.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/coreaudio: replace custom logging with error_report
Marc-André Lureau [Tue, 20 Jan 2026 14:24:11 +0000 (18:24 +0400)] 
audio/coreaudio: replace custom logging with error_report

The CoreAudio backend uses its own logging infrastructure (AUD_log,
AUD_vlog, dolog) and the AUDIO_CAP macro. This approach is inconsistent
with the rest of QEMU and makes the output harder to filter and
configure.

Replace the custom logging with standard QEMU error reporting:
- Use error_report() / error_printf() for errors
- Use warn_report() for non-fatal warnings (buffer frame size
  adjustments)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
5 months agoaudio/alsa: replace custom logging with error_report and trace events
Marc-André Lureau [Tue, 20 Jan 2026 13:40:15 +0000 (17:40 +0400)] 
audio/alsa: replace custom logging with error_report and trace events

The ALSA audio backend uses its own logging infrastructure (AUD_log,
AUD_vlog, dolog, ldebug) and a custom alsa_dump_info() debug helper.
This approach is inconsistent with the rest of QEMU and makes the
output harder to filter and configure.

Replace the custom logging with standard QEMU error reporting:
- Use error_report() / error_printf() for errors
- Use warn_report() for non-fatal warnings (invalid formats,
  rejected parameters, unexpected states)
- Convert ldebug() calls and alsa_dump_info() to trace events

Remove DEBUG_ALSA and AUDIO_CAP macros which are no longer needed.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: constify some add_capture() arguments
Marc-André Lureau [Tue, 20 Jan 2026 12:28:57 +0000 (16:28 +0400)] 
audio: constify some add_capture() arguments

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: move pcm_ops into AudioMixengBackendClass
Marc-André Lureau [Fri, 16 Jan 2026 21:05:29 +0000 (01:05 +0400)] 
audio: move pcm_ops into AudioMixengBackendClass

Remove the separate audio_pcm_ops structure and move its function
pointers directly into AudioMixengBackendClass. This is a cleaner
QOM-style design where the PCM operations are part of the class
vtable rather than a separate indirection through hw->pcm_ops.

The HWVoiceOut and HWVoiceIn structures no longer need to store
a pcm_ops pointer, as the operations are now accessed through
the class with AUDIO_MIXENG_BACKEND_GET_CLASS().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
5 months agoaudio: remove audio_driver
Marc-André Lureau [Fri, 16 Jan 2026 20:09:30 +0000 (00:09 +0400)] 
audio: remove audio_driver

Move all fields from audio_driver directly into AudioMixengBackendClass,
eliminating an unnecessary extra struct. Drivers now set class
fields directly in class_init instead of creating a static audio_driver
instance.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
5 months agoaudio: remove audio_driver init/fini/next
Marc-André Lureau [Fri, 16 Jan 2026 15:32:14 +0000 (19:32 +0400)] 
audio: remove audio_driver init/fini/next

They are no longer used after conversion to QOM.

Also removing the drv_opaque from a few of the pcm_ops methods.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
5 months agoaudio/dsound: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 15:30:57 +0000 (19:30 +0400)] 
audio/dsound: convert to QOM lifecycle methods

Migrate the DirectSound audio backend from the legacy driver init/fini
callbacks to proper QOM realize and finalize methods.

The dsound struct fields are now embedded directly in the AudioDsound
QOM object instead of being allocated separately as drv_opaque. This
allows accessing the backend state through proper QOM type casting
with AUDIO_DSOUND() rather than casting drv_opaque pointers.

The DirectSound and DirectSoundCapture COM objects are now managed
through the QOM lifecycle, with initialization in realize and cleanup
in finalize.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/coreaudio: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 15:02:38 +0000 (19:02 +0400)] 
audio/coreaudio: convert to QOM lifecycle methods

Remove the legacy driver init/fini callbacks from the CoreAudio backend.

Both coreaudio_audio_init() and coreaudio_audio_fini() were no-ops that
performed no real initialization or cleanup work. Access to the
Audiodev is now through hw->s->dev instead of the drv_opaque pointer.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
5 months agoaudio/sndio: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 15:00:44 +0000 (19:00 +0400)] 
audio/sndio: convert to QOM lifecycle methods

Remove the legacy driver init/fini callbacks from the sndio audio backend.

Both sndio_audio_init() and sndio_audio_fini() were no-ops that
performed no real initialization or cleanup work. Access to the
Audiodev is now through hw->s->dev instead of the drv_opaque pointer.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/jack: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 14:58:47 +0000 (18:58 +0400)] 
audio/jack: convert to QOM lifecycle methods

Remove the legacy driver init/fini callbacks from the JACK audio backend.

Both qjack_init() and qjack_fini() were no-ops that performed no real
initialization or cleanup work. Access to the Audiodev is now through
hw->s->dev instead of the drv_opaque pointer.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/pw: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 14:44:06 +0000 (18:44 +0400)] 
audio/pw: convert to QOM lifecycle methods

Migrate the PipeWire audio backend from the legacy driver init/fini
callbacks to proper QOM realize and finalize methods.

The pwaudio struct fields are now embedded directly in the AudioPw
QOM object instead of being allocated separately as drv_opaque. This
allows accessing the backend state through proper QOM type casting
with AUDIO_PW() rather than casting drv_opaque pointers.

The PipeWire thread loop and context are now managed through the QOM
lifecycle, with initialization in realize and cleanup in finalize.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/sdl: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 14:28:27 +0000 (18:28 +0400)] 
audio/sdl: convert to QOM lifecycle methods

Migrate the SDL audio backend from the legacy driver init/fini
callbacks to proper QOM realize and finalize methods.

The sdl_audio_init() function is replaced with audio_sdl_realize(),
which initializes the SDL audio subsystem before delegating to the
parent class realize method. The sdl_audio_fini() is replaced with
audio_sdl_finalize() to properly clean up the SDL audio subsystem.

Access to the Audiodev is now through hw->s->dev instead of the
drv_opaque pointer.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/pa: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 14:22:09 +0000 (18:22 +0400)] 
audio/pa: convert to QOM lifecycle methods

Migrate the PulseAudio backend from the legacy driver init/fini
callbacks to proper QOM realize and finalize methods.

The paaudio struct fields are now embedded directly in the AudioPa
QOM object instead of being allocated separately as drv_opaque. This
allows accessing the backend state through proper QOM type casting
with AUDIO_PA() rather than casting drv_opaque pointers.

The PulseAudio connection is now managed through the QOM lifecycle,
with the connection reference acquired in realize and released in
finalize.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/oss: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 07:55:09 +0000 (11:55 +0400)] 
audio/oss: convert to QOM lifecycle methods

Migrate the OSS audio backend from the legacy driver init/fini
callbacks to proper QOM realize method.

The oss_audio_init() function is replaced with audio_oss_realize(),
which performs the same device accessibility check before delegating
to the parent class realize method. The empty oss_audio_fini() is
removed.

Access to the Audiodev is now through hw->s->dev instead of the
drv_opaque pointer.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/alsa: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 07:52:31 +0000 (11:52 +0400)] 
audio/alsa: convert to QOM lifecycle methods

Migrate the ALSA audio backend from the legacy driver init/fini
callbacks to proper QOM realize method.

The alsa_audio_init() function is replaced with audio_alsa_realize(),
which performs the same ALSA option initialization before delegating
to the parent class realize method. The empty alsa_audio_fini() is
removed.

The Audiodev pointer stored in ALSAVoiceOut and ALSAVoiceIn is removed
as it can now be accessed through hw->s->dev.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/noaudio: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 07:49:05 +0000 (11:49 +0400)] 
audio/noaudio: convert to QOM lifecycle methods

Remove the legacy driver init/fini callbacks from the null audio backend.

Both no_audio_init() and no_audio_fini() were no-ops that performed
no real initialization or cleanup work.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/wav: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 07:48:33 +0000 (11:48 +0400)] 
audio/wav: convert to QOM lifecycle methods

Remove the legacy driver init/fini callbacks from the WAV audio backend.

The wav_audio_init() just returned the Audiodev pointer and
wav_audio_fini() only logged a debug message. Access to the Audiodev
is now through hw->s->dev instead of the drv_opaque pointer.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/spice: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 07:47:48 +0000 (11:47 +0400)] 
audio/spice: convert to QOM lifecycle methods

Migrate the SPICE audio backend from the legacy driver init/fini
callbacks to proper QOM realize method.

The spice_audio_init() function is replaced with spice_audio_realize(),
which validates that SPICE is enabled before delegating to the parent
class realize method. The empty spice_audio_fini() is removed as no
cleanup is needed.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio/dbus: convert to QOM lifecycle methods
Marc-André Lureau [Fri, 16 Jan 2026 07:39:15 +0000 (11:39 +0400)] 
audio/dbus: convert to QOM lifecycle methods

Migrate the D-Bus audio backend from the legacy driver init/fini
callbacks to proper QOM realize and finalize methods.

The DBusAudio struct fields are now embedded directly in the AudioDbus
QOM object instead of being allocated separately as drv_opaque. This
allows accessing the backend state through proper QOM type casting
with AUDIO_DBUS() rather than casting drv_opaque pointers.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: make audio_driver init() & fini() optional
Marc-André Lureau [Fri, 16 Jan 2026 07:36:48 +0000 (11:36 +0400)] 
audio: make audio_driver init() & fini() optional

The next patches are going to remove usage of the driver callbacks in
favor of QOM realize/finalize.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: split AudioMixengBackend code in audio-mixeng-be.c
Marc-André Lureau [Mon, 10 Nov 2025 11:02:08 +0000 (15:02 +0400)] 
audio: split AudioMixengBackend code in audio-mixeng-be.c

Allow to build the audio/ base classes without the
resampling/mixing/queuing code.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio-be: add some state trace for debugging
Marc-André Lureau [Mon, 1 Dec 2025 09:42:07 +0000 (13:42 +0400)] 
audio-be: add some state trace for debugging

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio-be: add common pre-conditions
Marc-André Lureau [Wed, 19 Nov 2025 07:43:40 +0000 (11:43 +0400)] 
audio-be: add common pre-conditions

assert() on valid values, and handle acceptable NULL arguments
gracefully.

Note audio_driver_write() and audio_driver_read() used to return
size (with a "XXX: Consider options") when sw was NULL. Imho, it is more
correct to not pretend to have read/written anything by default in the
AudioBackend base abstract class.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: AUD_ -> audio_be_
Marc-André Lureau [Mon, 10 Nov 2025 10:43:43 +0000 (14:43 +0400)] 
audio: AUD_ -> audio_be_

Use the associate AudioBackend prefix for readability.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: split AudioBackend
Marc-André Lureau [Mon, 10 Nov 2025 10:25:54 +0000 (14:25 +0400)] 
audio: split AudioBackend

Code clean-up, to allow building bare abstract class separately.

The original file is MIT-licensed.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: make AudioBackend truly abstract
Marc-André Lureau [Thu, 15 Jan 2026 20:48:19 +0000 (00:48 +0400)] 
audio: make AudioBackend truly abstract

Add virtual methods to be implemented by concrete classes, like
AudioMixengBackendClass.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: make all the backend-specific APIs take the be
Marc-André Lureau [Tue, 4 Nov 2025 15:38:31 +0000 (19:38 +0400)] 
audio: make all the backend-specific APIs take the be

This will allow to dispatch to different implementations next.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoreplay: remove dependency on audio/
Marc-André Lureau [Mon, 3 Nov 2025 12:22:33 +0000 (16:22 +0400)] 
replay: remove dependency on audio/

The replay infrastructure shouldn't depend on internals of audio/.
(st_sample is an internal implementation detail and could be different)

Let audio drive the audio samples recording/replaying.

Notice also we don't need to save & restore the internal ring "wpos",
all replay should care about is the number of samples and the samples.

Bump the replay version.

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: make create_pdos() private
Marc-André Lureau [Tue, 28 Oct 2025 12:31:57 +0000 (16:31 +0400)] 
audio: make create_pdos() private

Clean up.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: make list type declaration private
Marc-André Lureau [Tue, 28 Oct 2025 11:47:36 +0000 (15:47 +0400)] 
audio: make list type declaration private

No need to share in a common header.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: keep a strong reference on the backend
Marc-André Lureau [Mon, 20 Oct 2025 10:05:48 +0000 (14:05 +0400)] 
audio: keep a strong reference on the backend

Since we are going to convert audio_driver-based backends, we need to
properly handle reference counting to allow for a different order of
class finalization (for example, pulse class before base driver class).

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: replace type_init() with DEFINE_TYPES
Marc-André Lureau [Wed, 4 Feb 2026 14:19:02 +0000 (18:19 +0400)] 
audio: replace type_init() with DEFINE_TYPES

Use the convenience macro to register types.

Note that jack backend was using the type registration to initialize
some globals. Use a ctor function instead.

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agomodule: remove audio module support
Marc-André Lureau [Fri, 17 Oct 2025 19:15:54 +0000 (23:15 +0400)] 
module: remove audio module support

It relies on dynamic object loading support instead.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: drop audio driver registration
Marc-André Lureau [Fri, 17 Oct 2025 14:34:43 +0000 (18:34 +0400)] 
audio: drop audio driver registration

module_object_class_by_name() handles loading the module providing the
requested object.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
5 months agoaudio: lookup "audio-" object types, and realize them
Marc-André Lureau [Fri, 17 Oct 2025 13:34:27 +0000 (17:34 +0400)] 
audio: lookup "audio-" object types, and realize them

Now "audio_driver" is a detail implementation of AudioMixengBackend and
not required to implement an AudioBackend.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: remove set_dbus_server from audio_driver
Marc-André Lureau [Thu, 15 Jan 2026 20:42:54 +0000 (00:42 +0400)] 
audio: remove set_dbus_server from audio_driver

Use the QOM class vtable only instead.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: add QOM module-objects for each backend
Marc-André Lureau [Fri, 17 Oct 2025 12:35:32 +0000 (16:35 +0400)] 
audio: add QOM module-objects for each backend

This will allow to use QOM and the dynamic object module loading.

The changes are done systematically, introducing an empty instance
structure that will later be filled by state with further refactoring.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
5 months agoaudio: move object creation to audio_driver_init()
Marc-André Lureau [Thu, 15 Jan 2026 20:38:39 +0000 (00:38 +0400)] 
audio: move object creation to audio_driver_init()

As we will allow other kind of AudioBackend objects to be instantiated,
move the object allocation to a audio_driver_init() and rename it
audio_be_new().

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: simplify audio_init()
Marc-André Lureau [Thu, 15 Jan 2026 20:37:10 +0000 (00:37 +0400)] 
audio: simplify audio_init()

Factorize looking up the driver in audio_driver_init()

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: use DEFINE_TYPES
Marc-André Lureau [Wed, 4 Feb 2026 13:38:54 +0000 (17:38 +0400)] 
audio: use DEFINE_TYPES

It's the "modern" way of registring the object TypeInfo.

Suggested-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: introduce AudioMixengBackend
Marc-André Lureau [Wed, 22 Oct 2025 12:25:34 +0000 (16:25 +0400)] 
audio: introduce AudioMixengBackend

Introduce a sub-class for current "audio_driver" based implementations.
Future AudioBackend implementations can do without it.

Next cleanup will actually remove "audio_driver" struct altogether and
make the subclass proper QOM objects.

Public APIs still rely on backend being an AudioMixeng. They will
assert() if not. This will be addressed later to allow other backends.

Note that the initial naming proposed for this object was AudioDriver,
however the semantics for "driver" is already overloaded and leads to
confusion, in particular with the QAPI AudiodevDriver. The defining
characteristic is of using QEMU's software mixing engine, so
AudioMixengBackend.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoaudio: constify audsettings argument
Marc-André Lureau [Mon, 19 Jan 2026 12:37:13 +0000 (16:37 +0400)] 
audio: constify audsettings argument

It shouldn't be modified by the audio functions.

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agotests: start manual audio backend test
Marc-André Lureau [Mon, 19 Jan 2026 09:42:19 +0000 (13:42 +0400)] 
tests: start manual audio backend test

Start a simple test program that will exercise the QEMU audio APIs.

It is meant to run manually for now, as it accesses the sound system and
produces sound by default, and also runs for a few seconds. We may want
to make it silent or use the "none" (noaudio) backend by default though,
so it can run as part of the automated test suite.

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoutil: add some extra stubs for qemu modules initialization
Marc-André Lureau [Fri, 6 Feb 2026 12:43:52 +0000 (16:43 +0400)] 
util: add some extra stubs for qemu modules initialization

Avoid extra ifdef-ery when optionally supporting modules, as done in
audio-test (and vl.c).

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5 months agoscripts/modinfo: add --skip-missing-deps
Marc-André Lureau [Tue, 20 Jan 2026 07:42:55 +0000 (11:42 +0400)] 
scripts/modinfo: add --skip-missing-deps

Add --skip-missing-deps flag that prints warnings for missing
dependencies but continues without exiting with error code 1.

Acked-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>