Commit Graph

12218 Commits

Author SHA1 Message Date
Daniel P. Berrangé
163cd0ae11 io: separate freeing of tasks from marking them as complete
The original design of QIOTask was intended to simplify lifecycle
management by automatically freeing it when the task was marked as
complete. This overlooked the fact that when a QIOTask is used in
combination with a GSource, there may be times when the source
callback is never invoked. This is typically when a GSource is
released before any I/O event arrives. In such cases it is not
desirable to mark a QIOTask as complete, but it still needs to be
freed. To satisfy this, the task must be released manually.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2026-03-03 10:22:46 +00:00
Peter Maydell
3fb456e9a0 Merge tag 'pull-request-2026-03-02' of https://gitlab.com/thuth/qemu into staging
* Remove qemu-system-microblazeel (qemu-system-microblaze can be used instead)
* Improve detection of the docker/podman binary
* Prevent a null pointer dereference during zpci hot unplug

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmmlgwQACgkQLtnXdP5w
# LbW4jw//VMx6pHEu5L3Rzr3FZdgMJUhJ3UQKoV5PAImHz96QjIZi3kR311/D7Xjr
# nPf9VVgVZUEKzwyCfv7V06M9S79Jbw2cJesEIcu5LqbvGxKcevXVPMdVPpDG7P7T
# zuNW7eyIMpHYHRnMnxRNY/Hl8S1P9spEWJeQpNxfe9AKoWh2i4vEC8KLMAf59DAw
# MX0CZjonMeCBSWBqRqP0zOeUqiq9n49Lz1LQnCZb1R2TF+RGmwfe6+NaBeEZ9BSg
# FWGVIIq09OFxvtUuuut5X47DOrxk69q0RmiLy+wyrpH3VMxWM41n3oensoaNm0Xj
# dg0Eq1GzQwnLalaVgdqriGnymQWtvKXmlXHsIAwedLscOO6F5L+T12WZUSUjDZ92
# SGGKyi2TSkgEZO1naLxi+J0dMWSO51wOOln9GAgFHkT/PuF/12r0sVweXXiovucr
# 4CWKP8VGU5MVpGlZ9flLwXiq8uS1GOsMQbBj/eoVOxEuFnL0crX9dME8vlpoGYAg
# THmuLKOxtcVtC9BxBZQkMFj6IKdRYEfFnNuCl2gk33Ksdb9QYCyL54XSZ9vtvhhG
# +5ajjl+w+O8HgnQKdWSQy1PYrvQ6EXtY0ZOf0q0yPfz4oq4Ib81oLhfvK0AywM17
# DALYymGpGgOgGYIkKQKcn3id7OnaIiRe7ai4GeJ9AbFVgxR4l+w=
# =Sdy4
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar  2 12:31:00 2026 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [undefined]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2026-03-02' of https://gitlab.com/thuth/qemu:
  gitlab: ensure docker output is always displayed in CI
  tests/docker: allow display of docker output
  tests/docker: add support for podman remote access
  tests/docker: improve handling of docker probes
  Remove the qemu-system-microblazeel target from the build
  gitlab-ci: Remove the microblazeel target from the CI jobs
  tests/qtest: Remove the microblazeel target from the qtests
  tests/functional: Remove the microblazeel test
  tests/functional: Make sure test case .py files are executable
  s390x/pci: prevent null pointer dereference during zpci hot unplug

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-02 14:01:46 +00:00
Peter Maydell
333aaa55f0 Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* target/alpha: Fix for record/replay issue
* accel/nitro: New Nitro Enclaves accelerator
* generic + kvm: add support for rebuilding VMs on reset
* audio requirements cleanup
* vmmouse: Fix hypercall clobbers
* rust: use checked_div to make clippy happy
* kvm: Don't clear pending #SMI in kvm_get_vcpu_events
* target/i386/emulate: rework MMU code, many fixes
* target/i386/whpx: replace winhvemulation with target/i386/emulate
* target/i386/whpx: x2apic support
* target/i386/whpx: vapic support
* kvm: support for the "ignore guest PAT" quirk
* target/i386: add ITS_NO bit for the arch-capabilities MSR
* target/i386: add MBEC bit for nested VMX

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmmkVTUUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOa8Qf+J16s57unw/DiM4Mw7wvnLGA86OSu
# bJwlHBgmgz3uT8LwPpg2F3+yTDzTGErm5Ex7JHYJqdLdhVuU0cC3d3/TndUovWZf
# lMwQi2QJNKECtOIIz3rqbqvuSoy577Q7qN7CIN4vR8JKFvToPnwABVfkl+VKedCT
# Tu/f3SiazXnNH8FejtXsyjDHMwJfMwhYg5HyAHeqxtrqMCnQ/pc46ZQoM4CJr8P+
# jDZu85RDlLVXkA0RtwkJ6QfvxSU3wUjEeDBz9ThGLk00PFCr1LAXj/oz+0Ayz3qu
# LkVpLLBxt0hfMCZPlYF0+17m1CJv7/micHVZEgblawpq/xXXk1iE8avGQQ==
# =mEuN
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun Mar  1 15:03:17 2026 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (102 commits)
  target/i386: emulate: fix scas
  whpx: i386: expose HV_X64_MSR_APIC_FREQUENCY when kernel-irqchip=off
  whpx: i386: enable PMU
  target/i386: emulate: more 64-bit register handling
  whpx: i386: warn on unsupported MSR access instead of failing silently
  whpx: i386: enable synthetic processor features
  whpx: i386: enable all supported host features
  whpx: i386: move whpx_vcpu_kick_out_of_hlt() invocation to interrupt raise time
  target/i386: introduce ClearwaterForest-v3 to expose ITS_NO
  target/i386: introduce SierraForest-v5 to expose ITS_NO
  target/i386: introduce GraniteRapids-v5 to expose ITS_NO
  target/i386: introduce SapphireRapids-v6 to expose ITS_NO
  target/i386: Add MSR_IA32_ARCH_CAPABILITIES ITS_NO
  target/i386: Add VMX_SECONDARY_EXEC_MODE_BASED_EPT_EXEC
  Reapply "rcu: Unify force quiescent state"
  target/alpha: Reset CPU
  hw: i386: vapic: enable on WHPX with user-mode irqchip
  whpx: x86: kick out of HLT manually when using the kernel-irqchip
  whpx: x86: remove inaccurate comment
  KVM: i386: Default disable ignore guest PAT quirk
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-02 09:13:34 +00:00
Daniel P. Berrangé
2d3d5ae1ad tests/docker: allow display of docker output
The --quiet command is used with docker unless V=1 is passed to make,
and as a result stdout from docker is never visible by default, making
it hard to diagnose failures building / running containers.

Meanwhile passing V=1 is undesirable as that makes the entire build
system verbose.

Introduce a $(DOCKER_V) make variable which is initialized from $(V)

It is thus possible to display docker output without also enabling
make verbose output.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260210163556.713841-4-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2026-03-02 09:48:10 +01:00
Daniel P. Berrangé
c5ecd377a0 tests/docker: add support for podman remote access
When a developer's environment is already within a podman container it
is not possible to use 'podman' again to create containers. It will
usually result in wierd errors such as:

  Error: fatal error, invalid internal status, unable to create a new pause process: cannot re-exec process to join the existing user namespace. Try running "podman system migrate" and if that doesn't work reboot to recover

Podman offers the ability to talk to a daemon outside the container,
however, which could be leveraged by QEMU.

This can be used by invoking "podman --remote", or equivalently the
separate "podman-remote" binary:

  https://github.com/containers/podman/blob/main/docs/tutorials/remote_client.md

The current 'podman version' check is insufficient to detect the
inability to launch containers, so it is replaced with the stronger
'podman info' check.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260210163556.713841-3-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2026-03-02 09:48:10 +01:00
Daniel P. Berrangé
fbf4fa1091 tests/docker: improve handling of docker probes
The docker.py script has logic to guess the container command and
detects one of

  * docker
  * sudo -n docker
  * podman

but the "docker.py probe" command then throws away the detected argv
and prints a slightly different argv based solely on the detected
argv[0]. The result is that 'probe' will print

  * docker
  * sudo docker
  * podman

which means that if sudo was detected & the result of 'probe' were
used directly, it would end up prompting for password interaction
every time.

The 'configure' script, however, runs 'probe' and then throws away
the printed argv again, reporting only 'podman' or 'docker', which
is used to set the $(RUNC) variable for tests/docker/Makefile.include
which is in turn used to pass --engine to docker.py. So the docker.py
command will re-detect the need for 'sudo -n' and use it correctly

The problem with this is that some commands in Makefile.include do
not call docker.py at all, they invoke $(RUNC) directly. Since
configure threw away the 'sudo' command prefix Makefile.in won't
be adding either 'sudo' or 'sudo -n', it'll just run plain 'docker'
which is wrong.

This commit sanitizes things so that the 'docker.py probe' prints
out the exact detected ARGV, and configure fully preserves this
ARGV when setting $(RUNC). Since "$(RUNC)" is no longer just a bare
engine name, however, we must now also set the $(CONTAINER_ENGINE)
variable for Makefile.include so it can pass something sane to
the --engine arg for docker.py

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20260210163556.713841-2-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2026-03-02 09:48:10 +01:00
Thomas Huth
b63b340430 tests/qtest: Remove the microblazeel target from the qtests
The "petalogix-ml605" boot-serial-test can be run with the
"microblaze" target. The remaining tests can simply be dropped
now that we are going to remove the "microblazeel" target.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260226084608.11251-3-thuth@redhat.com>
2026-03-02 08:28:24 +01:00
Thomas Huth
0e2c5647d9 tests/functional: Remove the microblazeel test
We are going to remove the microblazeel target, so the test is not
required anymore. The little endian mode is tested already via the
"microblaze" target, so we don't lose any test coverage here.

While we're at it, simplify the "microblaze" target test now (in the
file tests/functional/microblaze/test_s3adsp1800.py) since we don't
need the separate super-class here anymore.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260226084608.11251-2-thuth@redhat.com>
2026-03-02 08:28:24 +01:00
Ani Sinha
da4ba40695 tests/functional/x86_64: add functional test to exercise vm fd change on reset
A new functional test is added that exercises the code changes related to
closing of the old KVM VM file descriptor and opening a new one upon VM reset.
This normally happens when confidential guests are reset but for
non-confidential guests, we use a special machine specific debug/test parameter
'x-change-vmfd-on-reset' to enable this behavior.
Only specific code changes related to re-initialisation of SEV-ES, SEV-SNP and
TDX platforms are not exercised in this test as they require hardware that
supports running confidential guests.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Link: https://lore.kernel.org/r/20260225035000.385950-34-anisinha@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-02-27 14:48:04 +01:00
Alexander Graf
0e7f6f6359 hw/nitro: Add nitro machine
Add a machine model to spawn a Nitro Enclave. Unlike the existing -M
nitro-enclave, this machine model works exclusively with the -accel
nitro accelerator to drive real Nitro Enclave creation. It supports
memory allocation, number of CPU selection, both x86_64 as well as
aarch64, implements the Enclave heartbeat logic and debug serial
console.

To use it, create an EIF file and run

  $ qemu-system-x86_64 -accel nitro,debug-mode=on -M nitro -nographic \
                       -kernel test.eif

or

  $ qemu-system-aarch64 -accel nitro,debug-mode=on -M nitro -nographic \
                        -kernel test.eif

Signed-off-by: Alexander Graf <graf@amazon.com>

Link: https://lore.kernel.org/r/20260225220807.33092-9-graf@amazon.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-02-27 14:22:07 +01:00
Alex Bennée
49105fa010 tests/functional: add Arm VBSA uefi conformance test
The VBSA test is a subset of the wider Arm architecture compliance
suites (ACS) which validate machines meet particular minimum set of
requirements. The VBSA is for virtual machines so it makes sense we
should check the -M virt machine is compliant.

Fortunately there are prebuilt binaries published via github so all we
need to do is build an EFI partition and place things in the right
place.

There are some additional Linux based tests which are left for later.

Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260226185303.1920021-8-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:54:17 +00:00
Alex Bennée
1a1787ab6b tests/vm: build openbsd from lcitool data
For now only use the minimal decadency set until all the OpenBSD
mappings can be divined.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260226185303.1920021-7-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:13:53 +00:00
Alex Bennée
74a813a265 tests/vm: fix interactive boot
For reasons still not clear to me passing the single dashed
-interactive would confuse the argument parsing enough we tried to
pass "nterative" as a string to the launch command causing failure and
head scratching.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260226185303.1920021-6-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:11:26 +00:00
Alex Bennée
9bef09c906 tests/vm: remove unused import
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260226185303.1920021-5-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:11:24 +00:00
Alex Bennée
506e6b6f5a tests/vm: bump OpenBSD to the current 7.8 release
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260226185303.1920021-4-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:09:52 +00:00
Alex Bennée
af4b64eb94 tests/docker: migrate legacy-test-cross compilers to trixie
The bugs have evidently been fixed in the latest release so we can
migrate the laggards into how all-test-cross container and remove the
legacy hacks. They are also packaged for the main architectures so we
don't need to jump through the amd64 hoops.

Suggested-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260226185303.1920021-3-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:09:25 +00:00
John Snow
e2d4646a02 tests/docker: upgrade most non-lcitool debian tests to debian 13
Debian 11 was EOL in 2024, and Debian 12 will be EOL this June. This
patch moves all but one of our tests, debian-legacy-test-cross, onto
Debian 13.

This patch does the bare minimum to upgrade these tests and doesn't make
any attempt at optimization or cleanup that may or may not be possible
with this upgrade.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[AJB: tweak summary line]
Message-ID: <20260226185303.1920021-2-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:09:25 +00:00
Peter Maydell
7757ab56ab tests/functional: Make sure test case .py files are executable
The top-level test python scripts in tests/functional are supposed to
be marked executable; "make check-functional" doesn't care about
this, but it allows them to be run as standalone executables to
exercise a single test, as docs/devel/testing/functional.rst
describes.

A couple of files have got into the tree without the executable
bit set: fix them.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20260212151258.1750268-1-peter.maydell@linaro.org
2026-02-26 11:27:18 +00:00
John Snow
b08e111b1e scripts: nudge users to use 'run' script for scripts that import qemu.qmp
Now that qmp has to be installed and isn't local, we can no longer offer
a simple forwarder for these scripts (nor path hacks) and hope that it
works. Encourage users to use the 'run' script to use these scripts
instead.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20260218213416.674483-18-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
2026-02-24 13:11:29 -05:00
John Snow
5abfe61b40 tests: replace check-venv with vm-venv target
With the qemu.qmp and qemu.machine dependencies now installed by default
at configure time and additional dependencies required by functional
testing installed on demand, we do not need the explicit "check-venv" target.

...However, to facilitate running VM tests without running configure, we
move some of the former logic into tests/vm/Makefile.include to create a
new venv (vm-venv) on-demand when running VM tests from the source tree.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260218213416.674483-17-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
2026-02-24 13:11:29 -05:00
John Snow
b5a21249cb 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>
2026-02-24 13:11:29 -05:00
John Snow
047fa5b4d7 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>
2026-02-23 13:24:42 -05:00
John Snow
4510ff3a43 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>
2026-02-23 13:24:42 -05:00
John Snow
0e0bf74cdd 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>
2026-02-23 13:24:42 -05:00
John Snow
5b798e6da6 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>
2026-02-23 13:24:42 -05:00
Marc-André Lureau
ac8d4cf5f5 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>
2026-02-23 14:38:22 +01:00
Marc-André Lureau
eebba32fe5 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>
2026-02-23 14:38:22 +01:00
Marc-André Lureau
74bb6fb293 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>
2026-02-23 14:38:22 +01:00
Marc-André Lureau
c70d79776b 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>
2026-02-23 14:38:20 +01:00
Marc-André Lureau
61e95a0c60 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>
2026-02-23 14:33:09 +01:00
Marc-André Lureau
5ca6c931a7 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>
2026-02-23 14:28:57 +01:00
Marc-André Lureau
1618bea984 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>
2026-02-23 14:28:57 +01:00
Marc-André Lureau
3220b38a8d 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>
2026-02-23 14:28:57 +01:00
Jonathan Cameron
26cd3f8d96 tests/acpi/cxl: Update CEDT.cxl to allow BI in CFWMS
With the addition of back invalidate support in the CXL emulation relax
the restriction on the CXL Fixed Memory Window Structures so all
advertised ranges continue to support being used with all features that
QEMU emulates.

[064h 0100 001h]               Subtable Type : 01 [CXL Fixed Memory Window Structure]
[065h 0101 001h]                    Reserved : 00
[066h 0102 002h]                      Length : 0028
[068h 0104 004h]                    Reserved : 00000000
[06Ch 0108 008h]         Window base address : 0000000110000000
[074h 0116 008h]                 Window size : 0000000100000000
[07Ch 0124 001h]          Interleave Members : 00
[07Dh 0125 001h]       Interleave Arithmetic : 00
[07Eh 0126 002h]                    Reserved : 0000
[080h 0128 004h]                 Granularity : 00000005
[084h 0132 002h]                Restrictions : 002F # Changed from 000F
[086h 0134 002h]                       QtgId : 0000
[088h 0136 004h]                First Target : 0000000C

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260204170936.43959-6-Jonathan.Cameron@huawei.com>
2026-02-20 13:04:45 -05:00
Jonathan Cameron
de6eb44095 tests/bios-tables-test: Excluded CEDT.cxl for BI restriction relaxation.
The next patch will relax restrictions on the fixed memory window
to allow use with back invalidate capable devices.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260204170936.43959-4-Jonathan.Cameron@huawei.com>
2026-02-20 13:04:45 -05:00
Mohamed Mediouni
4d0830ea34 tests/data/acpi: disassemble-aml: rename and change interpreter line
/usr/bin/bash isn't guaranteed to be present. Switch
to /usr/bin/env bash.

Specifically, on Darwin/macOS:

$ which bash
/opt/homebrew/bin/bash

Rename disassemle to disassemble in the same commit (typo fix).

Adapt the correponding message in rebuild-expected-aml.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260210041248.14701-1-mohamed@unpredictable.fr>
2026-02-20 13:04:44 -05:00
Yodel Eldar
051364b36b tests/functional/x86_64: Add vhost-user-bridge test
Introduce a functional test of vhost-user-bridge and enter it into
MAINTAINERS under the vhost section.

The test runs vhost-user-bridge as a subprocess, then launches a guest
with four backends: a unix domain socket for vhost-user, a UDP socket, a
user-mode net, and a hubport to hub the UDP and user backends; only the
vhost-user backend is exposed, the rest are deviceless. This
configuration mimics the testing setup described in the initial commit
of vhost-user-bridge in 3595e2eb0a.

The test creates a scratch file containing a hardcoded UUID on the host
and exposes it to the the guest via the tftp parameter of the user
netdev. After the guest invokes tftp to request the file, the test
verifies the transfer by hashsum.

Similarly, the test creates a file with another hardcoded UUID in the
guest. A call to check_http_download() serves the file to the host via
http, whereupon a check of the file hashsum occurs on the host.

Lastly, add the test to the thorough tests suite in meson.build.

Suggested-by: Cédric Le Goater <clg@redhat.com>
Suggested-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260129133049.119829-3-yodel.eldar@yodel.dev>
2026-02-20 13:04:44 -05:00
Yodel Eldar
42d2c1cc9e tests/vhost-user-bridge: Move to contrib/vhost-user-bridge/
After the introduction of vhost-user-bridge and libvhost-user, we
formed the convention of placing vhost-user daemons in eponymous subdirs
of contrib/. Follow this convention.

Create a contrib/vhost-user-bridge/ directory and move vhost-user-bridge
into it. Extract its build target definition from tests/meson.build into
the new directory, and include its subdir in the root-level meson.build.

Add a section about it in the "vhost-user daemons in contrib" document.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260129133049.119829-2-yodel.eldar@yodel.dev>
2026-02-20 13:04:44 -05:00
Peter Maydell
314f2d7fe6 Merge tag 'qtest-20260217-pull-request' of https://gitlab.com/farosas/qemu into staging
QTest pull request

- RISCV IOMMU test

# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmmUlLMQHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnW3eEACAR/RJWKbxQM2O0M4QS5BKtryaI5y7CMb5
# VwovTOVwzs1WsV3eve5Q6y6vcGIjgp7Q53I5l9pvzLB4IcXG+RG5l9lP8AcEctvn
# KyY6dPD8FmXLmhYOrnyXDNkfS72g9ELfsccm8prJi3Xeo7yXVJf7e+sPE3YVPBPa
# 8YfIlgkVWDy2OfrM7kd4SaCoNevs2jMlhqdzXxg6KZNBx51wX2knDYGSenWFyL//
# 0YgRGnMSprLJgWHrddU4dQe+knpOZWHPqZuq9eSoAVO+k6i0+znwEoCqQNRssYhI
# Hgu5/A/NdAbOQiktEKGjjgMX8XDo5fq4BklLaGeziGwjgsflK9M1VSttgJUHgCOr
# aR216kclzi+dDxqNNS7hWack0OjhnHYErDcbAyYdTkm5kCE1h6Co2t0rZIVZZBW6
# sGiF1rMLjJvSC34v29hJCEmbDcW1w2fEAb14ntrbov+XKhsgwtE74H7sj81hLJzQ
# rfIqwn3cjTtGfMXuc0fK4vqSjmPfkZse4/b68fJAaduV9A7bof1HId+k82tMO69v
# ZtLhWsk8dSJmRNDM1gzeOPB2TDunX+i54AJboa7G0DMpPA8VGxvoVygdhC9GSfu0
# rXpPkywjcvX6sUIkoUi7KGAREjH+vH8pUbVVisbLI9kt3ovaj60R8S+dySQCEhBl
# ZKmy8EAeEg==
# =jkva
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 17 16:17:55 2026 GMT
# gpg:                using RSA key AA1B48B0A22326A5A4C364CFC798DC741BEC319D
# gpg:                issuer "farosas@suse.de"
# gpg: Good signature from "Fabiano Rosas <farosas@suse.de>" [unknown]
# gpg:                 aka "Fabiano Almeida Rosas <fabiano.rosas@suse.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: AA1B 48B0 A223 26A5 A4C3  64CF C798 DC74 1BEC 319D

* tag 'qtest-20260217-pull-request' of https://gitlab.com/farosas/qemu:
  tests/qtest: Add RISC-V IOMMU bare-metal test
  tests/qtest/libqos: Add RISC-V IOMMU helper library

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-02-17 16:46:05 +00:00
Peter Maydell
fd5ecd187b tests/qtest/migration/tls-tests.c: Don't use tls_psk end hook for no_tls tests
If you run the TLS tests under a clang undefined-behaviour sanitizer build
it will fall over like this:

../../tests/unit/crypto-tls-psk-helpers.c:53:12: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/unistd.h:858:48: note: nonnull attribute specified here
    #0 0x62bd810762ee in test_tls_psk_cleanup /home/pm215/qemu/build/clang/../../tests/unit/crypto-tls-psk-helpers.c:53:5
    #1 0x62bd81073f89 in migrate_hook_end_tls_psk /home/pm215/qemu/build/clang/../../tests/qtest/migration/tls-tests.c:101:5
    #2 0x62bd81062ef0 in test_precopy_common /home/pm215/qemu/build/clang/../../tests/qtest/migration/framework.c:947:9

This happens because test_precopy_tcp_no_tls() uses a custom start_hook
that only sets a couple of parameters, but reuses the tsk_psk end_hook.
However, the end_hook runs cleanup that assumes that the data was set
up by migrate_hook_start_tls_psk_common(). In particular, it will
unconditionally call test_tls_psk_cleanup(data->pskfile), and
test_tls_psk_cleanup() will unconditionally unlink() the filename it
is passed, which is undefined behaviour if you pass it a NULL pointer.

Instead of creating a TestMigrateTLSPSKData struct which we never set
any fields in and requiring the migrate_hook_end_tls_psk() hook to
cope with that, don't allocate the struct in the start_hook. Then
there is nothing we need to clean up, and we can set the end_hook
to NULL (which the test framework will interpret as "don't call
any end_hook").

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260212114747.1103466-1-peter.maydell@linaro.org
[no need to copy stable]
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2026-02-17 10:06:03 -03:00
Chao Liu
a8f98ffd7b tests/qtest: Add RISC-V IOMMU bare-metal test
Add a qtest suite for the RISC-V IOMMU PCI device on the virt machine.
The test exercises bare, S-stage, G-stage, and nested translation paths
using iommu-testdev and the qos-riscv-iommu helpers.

The test validates:
- Device context (DC) configuration
- SV39 page table walks for S-stage translation
- SV39x4 page table walks for G-stage translation
- Nested translation combining both stages
- FCTL register constraints

This provides regression coverage for the RISC-V IOMMU implementation
without requiring a full guest OS boot.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Tao Tang <tangtao1634@phytium.com.cn>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/35f046c8d21aa6d5f9a531258762e01be198d8cf.1770127918.git.chao.liu.zevorn@gmail.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2026-02-17 09:37:40 -03:00
Chao Liu
9d8ffbfc1d tests/qtest/libqos: Add RISC-V IOMMU helper library
Introduce a libqos helper module for RISC-V IOMMU testing with
iommu-testdev. The helper provides routines to:

- Build device contexts (DC) and 3-level page tables for SV39/SV39x4
- Program command queue (CQ), fault queue (FQ), and DDTP registers
  following the RISC-V IOMMU specification
- Execute DMA translations and verify results

The current implementation supports SV39 for S-stage and SV39x4 for
G-stage translation. Support for SV48/SV48x4/SV57/SV57x4 can be added
in future patches.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Tao Tang <tangtao1634@phytium.com.cn>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/a2edf8c44f0bce26dccb91a7d13edb58be50c1a3.1770127918.git.chao.liu.zevorn@gmail.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2026-02-17 09:37:40 -03:00
Peter Maydell
ece408818d Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* hw/i386: Remove deprecated PC 2.6 and 2.7 machines
* i386/cpu: Fix incorrect initializer in Diamond Rapids definition
* qom: Clean up property release
* target/i386/kvm: set KVM_PMU_CAP_DISABLE if "-pmu" is configured
* target/i386/kvm: reset AMD and perfmon-v2 PMU registers during VM reset
* mshv: Cleanup
* target/i386: convert SEV-ES termination requests to guest panic events

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmmO+kYUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroPwIQf/XL4HXB7bYQH7LtTgsjmmxPpEqGuM
# 2QWvv1HurGf4pBCkBB7iFdzngSbJSzvtIM4D2KRuXVc99Ml8Do4kKGwDdtVfaM+I
# x+nsJfnSGA7tuNVQUUDEM1XWrnk3+O9oQxlk3elBWy8IBIjHFY1rv3FBdO9WkDpu
# AlaMITrX4R7u5gadCrxvAprbngNGlK220HZ+nxdxvf6mWkYMPqy1xtNzHIioG61V
# A94tdv/OZnUoQMd98c/yUvfST4/Gx6FeoEYfmyXGrnLM+Tc9es/xpN/mCYLdP3wA
# MDS170D2Z0zoZScLcpMfeqSn5cDYBMOSHBzqFpw2/FNVTO3td2qlSMLjzw==
# =AqB6
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Feb 13 10:17:42 2026 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (41 commits)
  target/i386/mshv: remove unused optimization of gva=>gpa translation
  accel/mshv: Remove remap overlapping mappings code
  tests: add /qdev/free-properties test
  qdev: make release_tpm() idempotent
  qdev: make release_drive() idempotent
  qdev: make release_string() idempotent
  qdev: Free property array on release
  target/i386/kvm: support perfmon-v2 for reset
  target/i386/kvm: reset AMD PMU registers during VM reset
  target/i386/kvm: rename architectural PMU variables
  target/i386/kvm: extract unrelated code out of kvm_x86_build_cpuid()
  target/i386/kvm: set KVM_PMU_CAP_DISABLE if "-pmu" is configured
  i386/cpu: Fix incorrect initializer in Diamond Rapids definition
  hw/char/virtio-serial: Do not expose the 'emergency-write' property
  hw/virtio/virtio-pci: Remove VirtIOPCIProxy::ignore_backend_features field
  hw/i386/intel_iommu: Remove IntelIOMMUState::buggy_eim field
  hw/core/machine: Remove hw_compat_2_7[] array
  hw/audio/pcspk: Remove PCSpkState::migrate field
  target/i386/cpu: Remove CPUX86State::full_cpuid_auto_level field
  hw/i386/pc: Remove pc_compat_2_7[] array
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-02-13 10:30:08 +00:00
Peter Maydell
4dd433550d Merge tag 'char-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging
chardev patches

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmmO8tUACgkQ2ujhCXWW
# nOW1sg//bqvhuJeHHQoDzNM5qgPTwLoqKYOt5xx2MZkH5oRoG0L6RfjNKqs8DPVc
# rnWFNr6YYHP+AjtYSoOFZZZugQyYDggE6Defkb52ScMNgQF0MSYXfZz6gEllgbzw
# +xvSsS1MztwpfkcUGaV5GL6PatuhkmioX0v083w0AbyHhuCF5zjKPaW6tNb9iwdz
# A3pnPkZSdGQ876R53vRY0OhEDFD7aT/jiVPiN6rzjxaz7CL5nAGy3PQtXWnJptCd
# YPgl5CIKe0NsTBD+h4rq7GtU8z2dNGW+wocXuyBvBDxkfVgjWEi0yJ9C1tY3focG
# cZxuaC8GLpbowdNqBUdJzjOdj7GIn8pG/ASPrjYjA3igFspdr8vRfEiS01KnBNi7
# 9Jzg6A4uHJI25ydPEAGRjbWjPYuElrEoLO2WUG3NWlb2sAoj+WEhQyD6C9+Mp0KY
# 9aDAClzOLylqZLe4vLrMjR9MGHE7nAilvwFTVeD3CBEySmBvDgygzMzuDXq8D5NB
# nsZslPy+WXJAydTvCfB8eS3NGZWUz2MQmHsdLGBheSLnLoAKoC4p9BFx09XgMLAw
# hV0n0/0v9XtOLwvGILy7ejxt0sZXHFI3avy1df8gMSeP2VpX7DXnd745fZJQt3xB
# ppwYRg9MHHuIb1KoVvfck34WHJ6bhSHROEe2I/fdVFhCXg2eyms=
# =CYVg
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Feb 13 09:45:57 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 'char-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  baum: Add copy/paste bindings
  chardev: add logtimestamp option
  error-report: make real_time_iso8601() public
  char: qemu_chr_write_log() use qemu_write_full()
  chardev/char: qemu_char_open(): add return value
  chardev: rework filename handling
  chardev: introduce .chr_get_pty_name() handler
  chardev/char-pty: store pty_name into PtyChardev state
  chardev: .chr_open(): add boolean return value
  chardev: .chr_open(): drop be_opened parameter
  chardev: consistent naming for ChardevClass handlers implementations
  chardev: ChardevClass: consistent naming for handlers
  ui/spice: drop SPICE_HAS_ATTACHED_WORKER macro
  ui/spice: Require spice-server >= 0.15.0
  char-udp: Fix initial backend open status

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-02-13 10:29:55 +00:00
Marc-André Lureau
69345f948a tests: add /qdev/free-properties test
Add a simple qdev test to check that allocated properties get freed with
the object. This test exhibited array leaks before the fixes.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Link: https://lore.kernel.org/r/20250429140306.190384-6-marcandre.lureau@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://lore.kernel.org/r/20260108230311.584141-6-csomani@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-02-13 11:16:52 +01:00
Peter Maydell
4202b432a6 Merge tag 'pull-hex-20260212' of https://github.com/quic/qemu into staging
Fix how qemu-hexagon handles invalid encodings; cleanup

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEPWaq5HRZSCTIjOD4GlSvuOVkbDIFAmmOkl8ACgkQGlSvuOVk
# bDJCTw/5AaixqoZzsCgLkLAy2zRMQdgqGZrppRAy3kYzm0kAvuCk/q+cdUa26pfS
# gvEHsgUoUqOQvS0n5er2QlU68qlYgzLH8VaRKvcsrxWnUKZORulm3nevuAJORNYR
# 40dDjvKG+eLPdc9cTxJGOZ/ydXMYszSGhdvhDKtKClA7vFt2cu+Q0FBH2FEhfdI1
# pu5113gOsixvL6AhP7SuqjXMHBMIR21mBDH4E+jxc8QzicbUx/sMhKArJw+8WXTp
# rz/KKZnxsD+2M2PZmuXqenW8Wc1WkFwUw3UoMu/jWeyzGYXehAo+ioeAJxV7PbPR
# KqF65/9ue2X74PgjnbH6xLRizz4wMsbzzyUHExWQGBVTDY767xHr+G3lCBLxXYwd
# tsqueLmVMHjTnFRjZtoVFNG+x2eqpMy9lmLe1sNVN1rmEhjts6oJHWoy9xqqqrwu
# RXeySg6M/qk9Ro8O7Hv2+FhFkt8hKOQxKukaSqpQ3VdAxhdrauh/Wog3RrLl04TH
# l38j8F0m+brOfTsTnnMCEQpVvvUnAyPye1Mb66CIyBzPr5akRgXh2v7Ls9W3kvnz
# R2CnNnXiHq71fwnRaGDZUBUwhOizJOdGEm65raXY332XkO13tKOdeZQI1XPxKwqF
# IsWhlAIyNuhfnKInICXFbaIPv9dBIkxHUYyOs9WMruEfpQ5ObLk=
# =lr3R
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Feb 13 02:54:23 2026 GMT
# gpg:                using RSA key 3D66AAE474594824C88CE0F81A54AFB8E5646C32
# gpg: Good signature from "Brian Cain (OSS Qualcomm) <brian.cain@oss.qualcomm.com>" [unknown]
# gpg:                 aka "Brian Cain <bcain@kernel.org>" [full]
# gpg:                 aka "Brian Cain (QuIC) <bcain@quicinc.com>" [full]
# gpg:                 aka "Brian Cain (CAF) <bcain@codeaurora.org>" [full]
# gpg:                 aka "bcain" [full]
# gpg:                 aka "Brian Cain (QUIC) <quic_bcain@quicinc.com>" [unknown]
# Primary key fingerprint: 6350 20F9 67A7 7164 79EF  49E0 175C 464E 541B 6D47
#      Subkey fingerprint: 3D66 AAE4 7459 4824 C88C  E0F8 1A54 AFB8 E564 6C32

* tag 'pull-hex-20260212' of https://github.com/quic/qemu:
  target/hexagon: Remove unused is_finite()
  target/hexagon: Remove unused EXT_IDX enum
  target/hexagon: Widen MemLog::width to 32 bits
  target/hexagon: Detect register write conflicts
  tests/tcg/hexagon: Handle SIGILL internally in invalid-slots test
  target/hexagon: Return decode failure for invalid non-duplex encodings
  target/hexagon: Fix invalid duplex decoding

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-02-13 09:33:57 +00:00
Peter Maydell
91eb10be2e Merge tag 'pull-aspeed-20260212' of https://github.com/legoater/qemu into staging
aspeed-next queue:

* Adds support for the AST2700 A2 SoC, including a new machine and
  a functional test
* Enhances AST2600 OTP functional test
* Restructures Aspeed ARM tests into separate files for better
  parallelism.
* Includes new SDK tests with Linux 5.15.
* Fixes Aspeed I2C models

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmmOSFgACgkQUaNDx8/7
# 7KEq0RAAyhY6FCrwU3hyeA0WPCWAIhoXjqVkuPIqbLEKpazuRK2A0XeN1QH38VUu
# rotcWx5O/eTqwDXm4uTPcHGjiFjL9YRkj3opBE33pfbnMWllezUrK6Soa3q4A9uk
# FnV2YN0sucaueUdXaKe4dJr12uxUWWTQ53Lr+yt0wmXJsjvBsUWaXBTJj+aGPWuS
# u46yxJFxKUK/3GkA8nnEOm91EEQYkETX5LeWZm8aqN/BHuvJNqWuhx19rj1kaa1K
# VXgv3lvvfTpKCpqz2BwFa03ZL4PNCRlS+fN1A9idcnh4yQzngw07jc/9r3Kx/8PS
# zYFgko7EU6Ja4WojToFU4yZK5NZN6BfCd6HAjIBN86EsysDWcNS9DXmqvPnMaPGl
# l+580YsGFO2F7sd8iSPAYT1Tl17jOLVMNIW4khNVOTUnJKIJWlfyA2u4J/1iYKcF
# UiASnvmtryNru9TahlCfTK1SLsFywKN3q6lgVFMba9GX2fzrtZCCDHrQYqHWnnGj
# IzpiUAX/GU8ST1p3RjA0hR2TdBHcA6QByOFhJYQoSmHw5gcuuVxXKNl+y1y9zj07
# YPJFm2V/29m/XcpV0NkAhpX+Gcg9ASrMEQplis2v0nvzSMd/Lcr7YNJLtX9/zkth
# wP8dRnSqisWrUDEUSYap8rxPdguRlUv/tAoxcJVlryN2fB8sOOc=
# =78p2
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Feb 12 21:38:32 2026 GMT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [full]
# gpg:                 aka "Cédric Le Goater <clg@kaod.org>" [full]
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* tag 'pull-aspeed-20260212' of https://github.com/legoater/qemu:
  tests/functional/aarch64/test_aspeed_ast2700fc: Use AST2700 A2 SDK image for FC tests
  hw/arm/aspeed_ast27x0-fc: Increase BMC DRAM size to 2GB for AST2700 A2
  hw/arm/aspeed_ast27x0-fc: Switch AST2700 FC machine to A2 SoC
  tests/functional/aarch64/test_aspeed_ast2700a2: Add AST2700 A2 EVB functional tests
  tests/functional/aarch64/test_aspeed_ast2700: Rename AST2700 A1 test to reduce test runtime
  tests/qtest/ast2700-hace-test: Use ast2700-evb alias for AST2700 HACE tests
  hw/arm/aspeed_ast27x0_evb: Move ast2700-evb alias to AST2700 A2 EVB
  hw/arm/aspeed_ast27x0_evb: Add AST2700 A2 EVB machine
  hw/arm/aspeed_ast27x0: Add AST2700 A2 SoC support
  hw/misc/aspeed_scu: Add AST2700 A2 silicon revisions
  hw/misc/aspeed_scu: Remove unused SoC silicon revision definitions
  tests/functional/arm/aspeed_ast2600: Enhance OTP test with functional validation
  hw/i2c/aspeed_i2c: Increase I2C device register size to 0xA0
  hw/i2c/aspeed_i2c: Fix out-of-bounds read in I2C MMIO handlers
  tests/functional: Add SDK tests with Linux 5.15
  tests/functional: Split Aspeed ARM tests into separate files

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-02-13 09:33:35 +00:00
Peter Maydell
05167ea35a Merge tag 'ipmi-add-fake-lan-config' of https://github.com/cminyard/qemu into staging
Add a fake LAN config operation for testing

Just add the commands, the proper data that can be set, and some tests.

Submitter ran migration test.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEE/Q1c5nzg9ZpmiCaGYfOMkJGb/4EFAmmODfcACgkQYfOMkJGb
# /4EGEg/+NAygBBmU3gyBwrbSwS6Zch1Csq9M8sBGexEmbi/T9ICHI8Sfb3aX7JSr
# 3hZS/pPXn9Bb1vNQ5fQ2KCfDY0CjXtNBiSOvttgtYHiYu+Dz7+0WicusGKUoUywp
# jYwzsFaa8Nf//rhNGdXLXOOhNtMHD5ia3awhg5lPBgFTTrfGiKaz9CzTQCaFZtub
# Tt4nWjN+qBXPTBOsLTEZiIJ7qh9LhM56qT6e85wLwLjNSPgmctCTR+j1gg4nWSq2
# SOUQ6KeIY+DGk4G21i2HnHpjZK9BrUoISBElrSUECxRMokOAgPapMzAFZvErDI5n
# SiIuLjJqsOsPqjw60zrGhM81lawqJxSViQtVdHZ2vM4XABMOUs5msgE7doJMPGIH
# Hmnchv7WGZuWIwAsvF1T3fTyLvGES/8pv6UMKLjscdEIO7JMveUAvQHjUN1j06Ny
# p1VEB2EgkPz6YnvxZ2WN693SuWGhAuixRmjBHABwp+l43QvCYen+XMEnaBzcAnKl
# qrNMrU44OXDqofUrb5zaqj5o5Lmv8vjApGa3ouhKmYCinluboEEvPtP8szGVGat3
# k6cRPtz6FkngM1jtAUBCxH2pb0Rol3gFqfkoZRjqO3hyOl8q1ky5nSWcZqiJ5DPE
# fPIZW22ZF3yJPdVtSzwaiJ8klk9z3hgOoFlyZQkojaGuSeu2UOE=
# =QbzC
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Feb 12 17:29:27 2026 GMT
# gpg:                using RSA key FD0D5CE67CE0F59A6688268661F38C90919BFF81
# gpg: Good signature from "Corey Minyard <cminyard@mvista.com>" [unknown]
# gpg:                 aka "Corey Minyard <minyard@acm.org>" [unknown]
# gpg:                 aka "Corey Minyard <corey@minyard.net>" [unknown]
# gpg:                 aka "Corey Minyard <minyard@mvista.com>" [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: FD0D 5CE6 7CE0 F59A 6688  2686 61F3 8C90 919B FF81

* tag 'ipmi-add-fake-lan-config' of https://github.com/cminyard/qemu:
  hw/ipmi/ipmi_bmc_sim: Support setting fake LAN channel config
  hw/ipmi/ipmi_bmc_sim: Support getting fake LAN channel config

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-02-13 09:33:24 +00:00
Eric K
45a6256830 char-udp: Fix initial backend open status
This patch removes the `*be_opened = false` override for the UDP chardev
backend. Since UDP is connectionless it never sends a `CHR_EVENT_OPENED`
so it is never marked open. This causes some frontends (e.g. virtio-serial)
to never perform any operations on the socket.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2993
Signed-off-by: Eric K <erickra@cs.utexas.edu>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20251208225849.705554-1-erickra@cs.utexas.edu>
2026-02-13 10:00:01 +01:00
Brian Cain
20df4ef1c9 target/hexagon: Detect register write conflicts
A conflict exists when any GPR is written by multiple instructions and
at least one write is unconditional.  This catches (1) two unconditional
writes to the same GPR and (2) an unconditional write combined with a
predicated write.

Add HEX_CAUSE_REG_WRITE_CONFLICT and map it to SIGILL.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2696
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2026-02-12 18:38:23 -08:00