]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
4 months agochar: qemu_chr_write_log() use qemu_write_full()
Vladimir Sementsov-Ogievskiy [Sun, 1 Feb 2026 17:36:29 +0000 (20:36 +0300)] 
char: qemu_chr_write_log() use qemu_write_full()

logfd is blocking, so we don't need to care about EAGAIN.
Let's simply use qemu_write_full().

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260201173633.413934-2-vsementsov@yandex-team.ru>

4 months agochardev/char: qemu_char_open(): add return value
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:46:04 +0000 (17:46 +0300)] 
chardev/char: qemu_char_open(): add return value

Accordingly with recommendations in include/qapi/error.h accompany
errp by boolean return value and get rid of error propagation.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-11-vsementsov@yandex-team.ru>

4 months agochardev: rework filename handling
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:46:03 +0000 (17:46 +0300)] 
chardev: rework filename handling

Instead of checking, did backend set the filename state or not, let's
be stateless: filename is needed rarely, so, let's just have a generic
function (with optional implementation by backends) to get it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
[ Marc-André - fix leak in ivshmem-pci.c ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-10-vsementsov@yandex-team.ru>

4 months agochardev: introduce .chr_get_pty_name() handler
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:46:02 +0000 (17:46 +0300)] 
chardev: introduce .chr_get_pty_name() handler

Currently we do two wrong things:

1. Abuse s->filename to get pty_name from it

2. Violate layering with help of CHARDEV_IS_PTY()

Let's get rid of both, and introduce correct way to get pty name in
generic code, if available.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-9-vsementsov@yandex-team.ru>

4 months agochardev/char-pty: store pty_name into PtyChardev state
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:46:01 +0000 (17:46 +0300)] 
chardev/char-pty: store pty_name into PtyChardev state

We'll use it in following commit.

Note the bonus: stop use blind strcpy().

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-8-vsementsov@yandex-team.ru>

4 months agochardev: .chr_open(): add boolean return value
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:46:00 +0000 (17:46 +0300)] 
chardev: .chr_open(): add boolean return value

Add boolean return value to follow common recommendations for functions
with errrp in include/qapi/error.h

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-7-vsementsov@yandex-team.ru>

4 months agochardev: .chr_open(): drop be_opened parameter
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:45:59 +0000 (17:45 +0300)] 
chardev: .chr_open(): drop be_opened parameter

The logic around the parameter is rather tricky. Let's instead
explicitly send CHR_EVENT_OPENED in all backends where needed.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
[ Marc-André - add CHR_EVENT_OPENED in udp_chr_open() ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-6-vsementsov@yandex-team.ru>

4 months agochardev: consistent naming for ChardevClass handlers implementations
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:45:58 +0000 (17:45 +0300)] 
chardev: consistent naming for ChardevClass handlers implementations

Most handlers implementations has name like {unit_name}_{handler_name},
which is usual and well-recognized pattern. Convert the rest (especially
with useless qemu_ prefixes and misleading qmp_ prefixes) to the common
pattern.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-5-vsementsov@yandex-team.ru>

4 months agochardev: ChardevClass: consistent naming for handlers
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:45:57 +0000 (17:45 +0300)] 
chardev: ChardevClass: consistent naming for handlers

Most handlers have name prefixed with "chr_". That's a good practice
which helps to grep them. Convert the rest: .parse, .open,
get/set_msgfds.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-4-vsementsov@yandex-team.ru>

4 months agoui/spice: drop SPICE_HAS_ATTACHED_WORKER macro
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:45:56 +0000 (17:45 +0300)] 
ui/spice: drop SPICE_HAS_ATTACHED_WORKER macro

Since previous commit it is always 1. Let's just drop it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-3-vsementsov@yandex-team.ru>

4 months agoui/spice: Require spice-server >= 0.15.0
Vladimir Sementsov-Ogievskiy [Thu, 15 Jan 2026 14:45:55 +0000 (17:45 +0300)] 
ui/spice: Require spice-server >= 0.15.0

For major distributions we have now:

    Debian 13: 0.15.2
    Ubuntu 22.04: 0.15.0
    RHEL-9/CentOS Stream 9: SPICE is removed
    Fedora 42: 0.15.1
    OpenSUSE Leap 15.4: 0.15.0

Time to update the dependancy in QEMU and drop almost all
SPICE_SERVER_VERSION checks.

Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260115144606.233252-2-vsementsov@yandex-team.ru>

4 months agochar-udp: Fix initial backend open status
Eric K [Mon, 8 Dec 2025 22:58:49 +0000 (16:58 -0600)] 
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>

4 months agotarget/hexagon: Remove unused is_finite()
Marco Liebel [Mon, 26 Jan 2026 22:34:34 +0000 (16:34 -0600)] 
target/hexagon: Remove unused is_finite()

is_finite() is defined but never called anywhere in the codebase.

Signed-off-by: Marco Liebel <marco.liebel@oss.qualcomm.com>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 months agotarget/hexagon: Remove unused EXT_IDX enum
Marco Liebel [Mon, 26 Jan 2026 22:34:33 +0000 (16:34 -0600)] 
target/hexagon: Remove unused EXT_IDX enum

The EXT_IDX_noext, EXT_IDX_mmvec, and XX_LAST_EXT_IDX enum
constants are defined but never referenced anywhere in the
codebase.

Signed-off-by: Marco Liebel <marco.liebel@oss.qualcomm.com>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 months agotarget/hexagon: Widen MemLog::width to 32 bits
Anton Johansson [Mon, 9 Feb 2026 14:42:49 +0000 (15:42 +0100)] 
target/hexagon: Widen MemLog::width to 32 bits

MemLog::width is a uint8_t value mapped to a TCGv (32 bit), the only
reason this currently works is because MemLog::width is padded to 32
bits.  Widen the field to uint32_t and fix the size of the TCGv
operations as well.  Use uint32_t when referencing and passing around
the field, as valid values are asserted in commit_store().

Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
--
Changes in v3:
- Added reviewed-by
Changes in v2:
- Removed truncation to uint8_t, valid values of 1,2,4,8 are checked in
  commit_store() already.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 months agotarget/hexagon: Detect register write conflicts
Brian Cain [Wed, 11 Feb 2026 22:19:53 +0000 (14:19 -0800)] 
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>
4 months agotests/tcg/hexagon: Handle SIGILL internally in invalid-slots test
Brian Cain [Wed, 11 Feb 2026 22:19:52 +0000 (14:19 -0800)] 
tests/tcg/hexagon: Handle SIGILL internally in invalid-slots test

Rewrite invalid-slots.c to catch and verify SIGILL using a sigaction
handler that modifies the ucontext, matching the pattern used by
invalid-encoding.c.

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 months agotarget/hexagon: Return decode failure for invalid non-duplex encodings
Brian Cain [Wed, 11 Feb 2026 22:19:51 +0000 (14:19 -0800)] 
target/hexagon: Return decode failure for invalid non-duplex encodings

When a non-duplex encoding (parse_bits != 0) fails both decode_normal()
and decode_hvx(), the decoder hit an unreachable.  Instead, handle
the decode failure and raise an exception.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 months agotarget/hexagon: Fix invalid duplex decoding
Brian Cain [Wed, 11 Feb 2026 22:19:50 +0000 (14:19 -0800)] 
target/hexagon: Fix invalid duplex decoding

When decoding a duplex instruction, if the slot0 sub-instruction fails
to decode after slot1 succeeds, QEMU was leaving the packet in a
partially-decoded state. This allowed invalid duplex encodings (where
one sub-instruction doesn't match any valid pattern) to be executed
incorrectly.

Fix by resetting the decoder state when slot0 fails, returning an empty
instruction that triggers an exception.

Add gen_exception_decode_fail() for raising exceptions when decode fails
before ctx->next_PC is initialized. This keeps gen_exception_end_tb()
semantics unchanged (it continues to use ctx->next_PC for the exception
PC after successful decode).

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3291
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 months agocontrib/plugins/uftrace: add riscv64 support
Pierrick Bouvier [Tue, 10 Feb 2026 20:13:44 +0000 (12:13 -0800)] 
contrib/plugins/uftrace: add riscv64 support

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260210201344.1403613-5-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
4 months agodocs/about/emulation/uftrace: add info about automatic tracing
Pierrick Bouvier [Tue, 10 Feb 2026 20:13:43 +0000 (12:13 -0800)] 
docs/about/emulation/uftrace: add info about automatic tracing

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260210201344.1403613-4-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
4 months agocontrib/plugins/uftrace: add ops for walking frame pointers chain
Pierrick Bouvier [Tue, 10 Feb 2026 20:13:42 +0000 (12:13 -0800)] 
contrib/plugins/uftrace: add ops for walking frame pointers chain

x86_64 and aarch64 use same stack layout. However, other architectures
might use different offset for return address and next frame pointer.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260210201344.1403613-3-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
4 months agocontrib/plugins/uftrace: fix infinite stack unwind detection
Pierrick Bouvier [Tue, 10 Feb 2026 20:13:41 +0000 (12:13 -0800)] 
contrib/plugins/uftrace: fix infinite stack unwind detection

So far, we were detecting infinite stacks but not stopping unwinding
since break only exited inner loop.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260210201344.1403613-2-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
4 months agotests/functional/aarch64/test_aspeed_ast2700fc: Use AST2700 A2 SDK image for FC tests
Jamin Lin [Wed, 11 Feb 2026 02:15:40 +0000 (02:15 +0000)] 
tests/functional/aarch64/test_aspeed_ast2700fc: Use AST2700 A2 SDK image for FC tests

Update AST2700 FC functional tests to use the AST2700 A2 SDK v11.00 image.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-12-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/arm/aspeed_ast27x0-fc: Increase BMC DRAM size to 2GB for AST2700 A2
Jamin Lin [Wed, 11 Feb 2026 02:15:39 +0000 (02:15 +0000)] 
hw/arm/aspeed_ast27x0-fc: Increase BMC DRAM size to 2GB for AST2700 A2

The AST2700 A1 EVB is equipped with 1GB of DRAM, while the AST2700 A2
EVB increases the DRAM size to 2GB.

The ast2700fc machine is updated to support the AST2700 A2. Increase
the BMC DRAM size to 2GB to match the hardware configuration of
AST2700 A2.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-11-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/arm/aspeed_ast27x0-fc: Switch AST2700 FC machine to A2 SoC
Jamin Lin [Wed, 11 Feb 2026 02:15:38 +0000 (02:15 +0000)] 
hw/arm/aspeed_ast27x0-fc: Switch AST2700 FC machine to A2 SoC

Update the AST2700 FC machine to use the AST2700 A2 SoC model instead of
the A1-specific variant.

This change removes A1-specific naming and definitions from the FC
machine and aligns it with the newer AST2700 A2 silicon.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-10-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agotests/functional/aarch64/test_aspeed_ast2700a2: Add AST2700 A2 EVB functional tests
Jamin Lin [Wed, 11 Feb 2026 02:15:37 +0000 (02:15 +0000)] 
tests/functional/aarch64/test_aspeed_ast2700a2: Add AST2700 A2 EVB functional tests

Add functional coverage for the AST2700 A2 EVB machine by introducing
test cases that boot and validate an OpenBMC SDK v11.00 image on
"ast2700a2-evb".

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-9-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agotests/functional/aarch64/test_aspeed_ast2700: Rename AST2700 A1 test to reduce test...
Jamin Lin [Wed, 11 Feb 2026 02:15:35 +0000 (02:15 +0000)] 
tests/functional/aarch64/test_aspeed_ast2700: Rename AST2700 A1 test to reduce test runtime

Adding additional test cases to test_aspeed_ast2700.py makes the test
suite significantly larger and increases the overall test runtime.

To keep testing efficient and better scoped, rename the existing test
to test_aspeed_ast2700a1.py and dedicate it to AST2700 A1 specific tests.

A new test_aspeed_ast2700.py will be introduced later to always cover
the latest revision of the AST2700 SoC.

No functional change.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agotests/qtest/ast2700-hace-test: Use ast2700-evb alias for AST2700 HACE tests
Jamin Lin [Wed, 11 Feb 2026 02:15:34 +0000 (02:15 +0000)] 
tests/qtest/ast2700-hace-test: Use ast2700-evb alias for AST2700 HACE tests

Update AST2700 HACE qtests to use the "ast2700-evb" machine alias
instead of a specific silicon revision.

The AST2700 A1 and A2 revisions are compatible for the HACE model, so
the tests do not depend on a particular EVB revision. Using the
"ast2700-evb" alias ensures the tests always run the latest
supported AST2700 silicon revision.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/arm/aspeed_ast27x0_evb: Move ast2700-evb alias to AST2700 A2 EVB
Jamin Lin [Wed, 11 Feb 2026 02:15:33 +0000 (02:15 +0000)] 
hw/arm/aspeed_ast27x0_evb: Move ast2700-evb alias to AST2700 A2 EVB

Make AST2700 A2 EVB the default ast2700-evb machine.

The "ast2700-evb" machine alias is moved from the AST2700 A1 EVB
to the AST2700 A2 EVB, making A2 the default evaluation board
for AST2700.

This ensures that users selecting "ast2700-evb" will run on the
latest AST2700 silicon revision. The AST2700 A1 EVB machine
remains available explicitly as "ast2700a1-evb".

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/arm/aspeed_ast27x0_evb: Add AST2700 A2 EVB machine
Jamin Lin [Wed, 11 Feb 2026 02:15:32 +0000 (02:15 +0000)] 
hw/arm/aspeed_ast27x0_evb: Add AST2700 A2 EVB machine

Add a new AST2700 A2 EVB machine to model the newer A2 silicon.

The ast2700a2-evb machine is largely identical to ast2700a1-evb.
The only difference is the default DRAM size, which is increased
to 2 GB.

This change adds a dedicated ast2700a2-evb machine by copying the
existing ast2700a1-evb configuration and updating the DRAM size
accordingly.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/arm/aspeed_ast27x0: Add AST2700 A2 SoC support
Jamin Lin [Wed, 11 Feb 2026 02:15:31 +0000 (02:15 +0000)] 
hw/arm/aspeed_ast27x0: Add AST2700 A2 SoC support

AST2700 A2 is functionally identical to AST2700 A1.
There are no changes to the IRQ layout, memory map, or peripheral
configuration. The only difference is the silicon revision.

This commit introduces a dedicated AST2700 A2 SoC type by reusing
the existing AST2700 A1 implementation and setting the A2 silicon
revision accordingly.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/misc/aspeed_scu: Add AST2700 A2 silicon revisions
Jamin Lin [Wed, 11 Feb 2026 02:15:30 +0000 (02:15 +0000)] 
hw/misc/aspeed_scu: Add AST2700 A2 silicon revisions

Add silicon revision definitions for AST2700 A2, and include
them in the list of supported Aspeed silicon revisions.

This allows newer AST27x0 A2 silicon to be correctly identified via
the SCU silicon revision register.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/misc/aspeed_scu: Remove unused SoC silicon revision definitions
Jamin Lin [Wed, 11 Feb 2026 02:15:29 +0000 (02:15 +0000)] 
hw/misc/aspeed_scu: Remove unused SoC silicon revision definitions

Several legacy Aspeed SoC silicon revision definitions are no longer
used by any machine models or runtime logic.

Remove unused silicon revision macros and corresponding entries from
the silicon revision table to reduce dead code and improve
maintainability.

No functional change intended.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211021527.119674-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agotests/functional/arm/aspeed_ast2600: Enhance OTP test with functional validation
Kane Chen [Wed, 11 Feb 2026 05:23:28 +0000 (05:23 +0000)] 
tests/functional/arm/aspeed_ast2600: Enhance OTP test with functional validation

Improve the OTP test script by adding functional verification of OTP
strap registers. The test now validates that OTP modifications made
in U-Boot persist through the Linux boot process and survive a
subsequent reboot.

Key changes:
- Added interactive console commands for U-Boot and Linux.
- Implemented verification for OTP register 0x30 across reboots.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260211052326.430475-2-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/i2c/aspeed_i2c: Increase I2C device register size to 0xA0
Jamin Lin [Tue, 10 Feb 2026 02:43:33 +0000 (02:43 +0000)] 
hw/i2c/aspeed_i2c: Increase I2C device register size to 0xA0

According to the AST2700 A1 datasheet, the register space for each I2C
device instance has been expanded from 0x80 bytes to 0xA0 bytes.

Update the AST2700 I2C controller configuration to reflect the new
register layout by increasing the per-device register size to 0xA0
and adjusting the register gap size accordingly.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Fixes: 4f53de2f103d6dfb5ad0498995d91a9694f40dd2 ("hw/arm/aspeed_ast27x0: Remove ast2700-a0 SOC")
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260210024331.3984696-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agohw/i2c/aspeed_i2c: Fix out-of-bounds read in I2C MMIO handlers
Jamin Lin [Tue, 10 Feb 2026 02:43:32 +0000 (02:43 +0000)] 
hw/i2c/aspeed_i2c: Fix out-of-bounds read in I2C MMIO handlers

The ASPEED I2C controller exposes a per-bus MMIO window of 0x80 bytes on
AST2600/AST1030/AST2700, but the backing regs[] array was sized for only
28 dwords (0x70 bytes). This allows guest reads in the range [0x70..0x7f]
to index past the end of regs[].

Fix this by:
- Sizing ASPEED_I2C_NEW_NUM_REG to match the 0x80-byte window
  (0x80 >> 2 = 32 dwords).
- Avoiding an unconditional pre-read from regs[] in the legacy/new read
  handlers. Initialize the return value to -1 and only read regs[] for
  offsets that are explicitly handled/valid, leaving invalid offsets to
  return -1 with a guest error log.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3290
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260210024331.3984696-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agotests/functional: Add SDK tests with Linux 5.15
Cédric Le Goater [Mon, 9 Feb 2026 06:50:44 +0000 (07:50 +0100)] 
tests/functional: Add SDK tests with Linux 5.15

Add functional tests for AST2500 and AST2600 machines using the
OpenBMC SDK v11.00 with Linux kernel 5.15. These tests complement the
existing SDK tests and verify that QEMU correctly boots older kernel
versions on these platforms.

Link: https://lore.kernel.org/qemu-devel/20260209065044.239378-3-clg@redhat.com
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agotests/functional: Split Aspeed ARM tests into separate files
Cédric Le Goater [Mon, 9 Feb 2026 06:50:43 +0000 (07:50 +0100)] 
tests/functional: Split Aspeed ARM tests into separate files

Reorganize the monolithic Aspeed functional test files into separate
files based on firmware type (Buildroot vs SDK) and specific test
scenarios. This allows the test suite to run tests in parallel more
effectively and makes it easier to identify and run specific test
scenarios independently.

Link: https://lore.kernel.org/qemu-devel/20260209065044.239378-2-clg@redhat.com
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 months agoMerge tag 'pull-block-jobs-2026-02-12' of https://gitlab.com/vsementsov/qemu into...
Peter Maydell [Thu, 12 Feb 2026 14:35:18 +0000 (14:35 +0000)] 
Merge tag 'pull-block-jobs-2026-02-12' of https://gitlab.com/vsementsov/qemu into staging

block: mirror: fix zero bitmap handling

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEi5wmzbL9FHyIDoahVh8kwfGfefsFAmmNlVcACgkQVh8kwfGf
# eftwBA/8CzB05/OX8vOONCHYPeZI7i2vjw+3yeAm6iIqD5ICDlrmCl6lJP8TpVfa
# DHLAJVfi8DxIeLL72hORlFNEVNSt5qWYI3s+oJajnbX47gf0UNjqDG/NHeIWBDQU
# B+fBEWtRwvqVHjajfRqYwWx4goFSVRjICYbdQRY5R/1Gmw9DnvGsGj+XkAcoQ23a
# Azoqd8HGnRQbhXmvXi9hJDMlrZW0Yuoi6/Jygo3P4ks9c6BundZZFP87OEAbzzH7
# KNbtaWSjH4N8N39wRIF6qxJ5keaPDCY6hkzvXcbit+d6zoifg5sN4JCRcVJ1R8Se
# w2FIksUl0U2pjQ8/pQbZihH480Mhk2cENh8sSQAyYXc6LtCubR6FngFlf3d0Y9ho
# ky3YVnopm+v2++yJEJmqCKRa4Z3WQszO4eXejoheSiMa48FUs1Vh5QcPU7y/EBJf
# NuA5mN9PRs8eMSJ7HEtufY97LoGeJSQYtfhs9xxsdKmETtHgG7cro1Jl0CDDZToX
# cQdpP/sf/XZBb27/KX+x3GuOWp8MYZ78WsrjFQE1WO1ZG1Mn3Bx4WqwNIJG1W6OT
# ZyYt81OESTN1xBbeWnYUsuxIXzH6uGb3guJ6bTRubhlSMemBlun3u+UyyZqs0Dfj
# hnY1kigl9JRNEQ+SOzAqxBukj0wF5pHJYL/3urM0gmu3V6ypeXA=
# =uqha
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Feb 12 08:54:47 2026 GMT
# gpg:                using RSA key 8B9C26CDB2FD147C880E86A1561F24C1F19F79FB
# gpg: Good signature from "Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>" [unknown]
# gpg:                 aka "Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.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: 8B9C 26CD B2FD 147C 880E  86A1 561F 24C1 F19F 79FB

* tag 'pull-block-jobs-2026-02-12' of https://gitlab.com/vsementsov/qemu:
  iotests: test active mirror with unaligned, small write zeroes op
  block/mirror: check range when setting zero bitmap for sync write

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoMerge tag 'pr-docs-20260211' of https://gitlab.com/pbo-linaro/qemu into staging
Peter Maydell [Thu, 12 Feb 2026 14:35:05 +0000 (14:35 +0000)] 
Merge tag 'pr-docs-20260211' of https://gitlab.com/pbo-linaro/qemu into staging

Changes:
- docs/devel: s/most/most recent/ ``probe_target_compiler`` call (Alex Bennée <alex.bennee@linaro.org>)
- docs/devel: fix bash-ism warning for configure (Alex Bennée <alex.bennee@linaro.org>)

# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEZrmU7KFPfy5auggff5BUDQoc0A8FAmmMuc8ACgkQf5BUDQoc
# 0A+p3AwAiMDjbx0oX9To6LhQhTxoLNtvqh7UxrnezA4G+JWwViKz7c7OslJS1Vnb
# PNpwy13ja9tZc9vdx8Yt7D526IM6NPaUa1bvR6NonxL6sQhBjG9TaoQU8vqJBTPe
# WDAFvfX6CMuR+IDXl5ZWguFlg2rFRQ/p/hFsZqHpObf5sIzBXIMQunERRab8tOiG
# 1SLpoliTv5G+/oEtfihT2WNAJy3+VdWn/mn2X1mnjnDia4ousPAhEs+qwhSAISbA
# 1IXtTnbws7hHF8UmTPopMwlh/SRL3kVvA1QwvW/lO1oR0oG7lKxTvgGKCUdDptEW
# EV7X6VwOrRXuH+F/VxIgE4/FLCxUeew1Mh2luaCX8+7oxtkVz4Vu1USwVxf2ECP5
# ZxNtqIB+XUsfGxtKBHlUUuur/EhRDOj/twmE41GuWZjAnCSPqrEwBqZbB4Xk05TM
# iuubgxCdRwYhwkZpiT130bA6M01gO4jcRE60A35MaNor/tUS1aINI3SPAzmIrf3+
# St9fk1jz
# =Dzwx
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Feb 11 17:18:07 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-docs-20260211' of https://gitlab.com/pbo-linaro/qemu:
  docs/devel: fix bash-ism warning for configure
  docs/devel: s/most/most recent/ ``probe_target_compiler`` call

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoMerge tag 'pr-plugins_llvm_dlltool-20260210' of https://gitlab.com/pbo-linaro/qemu...
Peter Maydell [Thu, 12 Feb 2026 14:34:48 +0000 (14:34 +0000)] 
Merge tag 'pr-plugins_llvm_dlltool-20260210' of https://gitlab.com/pbo-linaro/qemu into staging

plugins: fix cross-build using LLVM for Windows targets (Mohamed Mediouni <mohamed@unpredictable.fr>)

# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEZrmU7KFPfy5auggff5BUDQoc0A8FAmmLtlAACgkQf5BUDQoc
# 0A/Ljwv/Taze++KA6wxXQ1IFVqNHjiXxYl/IcPRvAEHGSm9AaBihpUWbCCxliiLg
# M4XtOJU6FVYQhYwe/HbazrWzgOQaA8+7NOhu4+NQydAWvHauDTulBXSgcsmO1mlS
# xOTNBhDJkg/jqw5O0AaBjE4U6tJ69+M5h9/zErhIwJYJqj1bC1hPNMPPs9iwB+b4
# z+WIR5wSBr16LW1M+c0vV8xCSSSE4U5cvQAZnwQv5Fl+VPMmwE2lEoBHBO7P+KBn
# /lcUtdMvB7yneNWQGCiOVBzLft2o95atY4Cfv0ON/EowehEwhfSG9T5DF3gCK95B
# qd0MHEyNkq3RXxvK7IimrBN2CSiS+4DCxttN/+8PuPFQZXk//1amg9EgK+s0OL1V
# RJfWE0PbocWhrEj/d6WPGY5xiTzA43kAgbsMvWjBLYQyrwZR0plBtSQUE6fkC45F
# SpqYQCn1BLCYnJ/L0OVpIzDFtwBGl7Rw0LB+i+Fji7OHAiI2g0hAysAi9pjhlHwi
# LxNOGjNY
# =uxQA
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 10 22:50:56 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_llvm_dlltool-20260210' of https://gitlab.com/pbo-linaro/qemu:
  plugins: fix cross-build using LLVM for Windows targets

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoMerge tag 'pull-request-2026-02-12v2' of https://gitlab.com/thuth/qemu into staging
Peter Maydell [Thu, 12 Feb 2026 11:52:31 +0000 (11:52 +0000)] 
Merge tag 'pull-request-2026-02-12v2' of https://gitlab.com/thuth/qemu into staging

* Updates to MAINTAINERS file
* Fix CI (broken pkg_resources in python, revert RCU change to fix alpha test)
* Fix endianness issue in PCI code on s390x
* Implement DIVIDE TO INTEGER instruction for s390x TCG emulation
* Bitesized documentation updates (run-tcg-tests target and fd-bootchk property)

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmmNu6ERHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbU+9Q//WVNddXAhre9g40SMvUULwFsoXIHtXASq
# 0WcL+GiZEenuON8YYvKVEUobNPEHtwm6GRKUwAeqCXQPXGEHamY3htMK5/HY9h2D
# dFG6XJr/0JozAFp381lhUt/Gu1b56uljqF3CzSf/AvidmFoxOH2Pi+IHcyzZZTkI
# DvsXbbIHim6dsMzxLpGBSDGj4+Jdz9t9HJF59Q7XO41EMgFKJzqBUDuVzL1ZZzg8
# rcV1yfrEJ1RmdK9+ZCweLTn1SnCjn1yywigzQUvMlguw2Tl9IWPFNmuhfs9u8KOv
# LEqteHnxJyslFZpBXTN5vxwM9FghWnACvGAKDln38N3kI56PbKRe6De6dZYh9Ihb
# ea3Uiaji2z8TI1xRHnWqGuT9gz9aRo1bMM6pCaX5rfxZ05xHmoP0qA1Ul20pr4I0
# +YPyhKG45JmrGkV+HKnQtq1k+8Xnl8Xon9gIgKM/f2r9fQ4wXjU0lIGWCxhSl9UV
# MntuoZtYeDs4S5WFnW2bhVYDIKsf+mbfoSBUYmAYAVqjbuqSX5tAsGPfYJ2l9+sR
# rwG0iuJcW/kYpkyNFV9xKKuhX7qh17N4TUgU7KkvIoVkRP++2quzwXuHOniDOiJ5
# Gl68R96GRSleWUusL1tKexVmOuQcZGST/SzGLol/L1Ob3iXawjfy0Y2C+rYsfOO7
# 5XX4X7alVew=
# =oaJh
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Feb 12 11:38:09 2026 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# 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-02-12v2' of https://gitlab.com/thuth/qemu:
  python: drop uses of pkg_resources
  hw/i386/pc.c: add description for fd-bootchk option
  tests/Makefile.include: add run-tcg-tests-TARGET to check-help
  tests/tcg/s390x: Test DIVIDE TO INTEGER
  target/s390x: Implement DIVIDE TO INTEGER
  fpu: Restrict parts_round_to_int_normal to target precision
  target/s390x: Extract s390_get_bfp_rounding_mode()
  target/s390x: Dump Floating-Point-Control Register
  Revert "rcu: Unify force quiescent state"
  s390x/pci: Fix endianness for zPCI BAR values.
  virtio-ccw: virtio_ccw_set_guest_notifier(): fix failure path
  tests/.../reverse_debugging: Remove unsatisfiable condition
  MAINTAINERS: Replace backup for s390 PCI
  MAINTAINERS: Switch to my NVIDIA email

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agopython: drop uses of pkg_resources
John Snow [Wed, 11 Feb 2026 19:58:04 +0000 (14:58 -0500)] 
python: drop uses of pkg_resources

pkg_resources has been fully dropped from modern pip/setuptools
distributions and we should phase out its use. This patch is enough to,
by itself, repair most GitLab CI tests upstream; with the exception of
tox tests which are still making use of avocado - which will be dropped
in a separate series to restore functionality there.

Signed-off-by: John Snow <jsnow@redhat.com>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20260211195804.135144-3-jsnow@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agohw/i386/pc.c: add description for fd-bootchk option
Choon Keong [Wed, 11 Feb 2026 16:29:09 +0000 (16:29 +0000)] 
hw/i386/pc.c: add description for fd-bootchk option

The 'fd-bootchk' option for pc and q35 machines currently lacks of
description in the help output. This makes it difficult for users
to understand the purpose of the command.

This commit solve this issue by adding description using
object_class_property_set_description() in hw/i386/pc.c,
adding the the description message for the option 'fd-bootchk'.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Thomas Huth <thuth@redhat.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3193
Signed-off-by: Choon Keong <ckeong.teo17@gmail.com>
Message-ID: <20260211162909.6550-1-ckeong.teo17@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agotests/Makefile.include: add run-tcg-tests-TARGET to check-help
Choon Keong [Fri, 6 Feb 2026 17:00:59 +0000 (17:00 +0000)] 
tests/Makefile.include: add run-tcg-tests-TARGET to check-help

User can execute TCG tests for a specific TARGET using the command:
$ make run-tcg-tests-TARGET-softmmu

However, this command is not showing in 'make check-help'
documentation, making it hard for new contributors to
discover.

This commit help to resolve this by adding the description
for the command, to the "check-tcg" section, as suggested
by Thomas, in tests/Makefile.include.

Additionally, reformat the alignment to accommodate
the length of the new command, ensuring the
consistency of the output.

Suggested-by: Thomas Huth <thuth@redhat.com>
Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/228
Signed-off-by: ck <ckeong.teo17@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260206170059.4913-1-ckeong.teo17@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agotests/tcg/s390x: Test DIVIDE TO INTEGER
Ilya Leoshkevich [Tue, 10 Feb 2026 21:39:04 +0000 (22:39 +0100)] 
tests/tcg/s390x: Test DIVIDE TO INTEGER

Add a test to prevent regressions. Data is generated using a
libFuzzer-based fuzzer and hopefully covers all the important corner
cases.

Acked-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20260210214044.1174699-6-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agotarget/s390x: Implement DIVIDE TO INTEGER
Ilya Leoshkevich [Tue, 10 Feb 2026 21:39:03 +0000 (22:39 +0100)] 
target/s390x: Implement DIVIDE TO INTEGER

DIVIDE TO INTEGER computes floating point remainder and is used by
LuaJIT, so add it to QEMU.

Put the main logic into fpu/, because it is way more convenient to
operate on FloatParts than to convert floats back-and-forth.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20260210214044.1174699-5-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agofpu: Restrict parts_round_to_int_normal to target precision
Ilya Leoshkevich [Tue, 10 Feb 2026 21:39:02 +0000 (22:39 +0100)] 
fpu: Restrict parts_round_to_int_normal to target precision

Currently parts_round_to_int_normal() assumes that its input has just
been unpacked and therefore doesn't expect non-zero fraction bits past
target precision.

The upcoming DIVIDE TO INTEGER use cases needs it to support
calculations on intermediate values that utilize all fraction bits,
while at the same time restricting the result's precision to frac_size.

Delete the "All integral" check, because even though really large
values are always integer, their low fraction bits still need to be
truncated. For the same reason, make sure rnd_mask covers at least
fraction bits past target precision.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260210214044.1174699-4-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agoiotests: test active mirror with unaligned, small write zeroes op
Fiona Ebner [Tue, 20 Jan 2026 11:38:57 +0000 (12:38 +0100)] 
iotests: test active mirror with unaligned, small write zeroes op

This tests the scenario fixed by "block/mirror: check range
when setting zero bitmap for sync write" [0].

[0] https://lore.kernel.org/qemu-devel/20260112152544.261923-1-f.ebner@proxmox.com/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20260120113859.251743-1-f.ebner@proxmox.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
4 months agoblock/mirror: check range when setting zero bitmap for sync write
Fiona Ebner [Mon, 12 Jan 2026 15:23:51 +0000 (16:23 +0100)] 
block/mirror: check range when setting zero bitmap for sync write

Some Proxmox users reported an occasional assertion failure [0][1] in
busy VMs when using drive mirror with active mode. In particular, the
failure may occur for zero writes shorter than the job granularity:

> #0  0x00007b421154b507 in abort ()
> #1  0x00007b421154b420 in ?? ()
> #2  0x0000641c582e061f in bitmap_set (map=0x7b4204014e00, start=14, nr=-1)
> #3  0x0000641c58062824 in do_sync_target_write (job=0x641c7e73d1e0,
>       method=MIRROR_METHOD_ZERO, offset=852480, bytes=4096, qiov=0x0, flags=0)
> #4  0x0000641c58062250 in bdrv_mirror_top_do_write (bs=0x641c7e62e1f0,
        method=MIRROR_METHOD_ZERO, copy_to_target=true, offset=852480,
        bytes=4096, qiov=0x0, flags=0)
> #5  0x0000641c58061f31 in bdrv_mirror_top_pwrite_zeroes (bs=0x641c7e62e1f0,
        offset=852480, bytes=4096, flags=0)

The range for the dirty bitmap described by dirty_bitmap_offset and
dirty_bitmap_end is narrower than the original range and in fact,
dirty_bitmap_end might be smaller than dirty_bitmap_offset. There
already is a check for 'dirty_bitmap_offset < dirty_bitmap_end' before
resetting the dirty bitmap. Add such a check for setting the zero
bitmap too, which uses the same narrower range.

[0]: https://forum.proxmox.com/threads/177981/
[1]: https://bugzilla.proxmox.com/show_bug.cgi?id=7222

Cc: qemu-stable@nongnu.org
Fixes: 7e277545b9 ("mirror: Skip writing zeroes when target is already zero")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20260112152544.261923-1-f.ebner@proxmox.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
4 months agotarget/s390x: Extract s390_get_bfp_rounding_mode()
Ilya Leoshkevich [Tue, 10 Feb 2026 21:39:01 +0000 (22:39 +0100)] 
target/s390x: Extract s390_get_bfp_rounding_mode()

For DIVIDE TO INTEGER it will be helpful to pass final-quotient
rounding mode around explicitly rather than setting it in fpu_status
implicitly. To facilitate this, extract a function for converting the
mask to the rounding mode.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20260210214044.1174699-3-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agotarget/s390x: Dump Floating-Point-Control Register
Ilya Leoshkevich [Tue, 10 Feb 2026 21:39:00 +0000 (22:39 +0100)] 
target/s390x: Dump Floating-Point-Control Register

Knowing the value of this register is very useful for debugging
floating-point code.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20260210214044.1174699-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agoRevert "rcu: Unify force quiescent state"
Thomas Huth [Mon, 9 Feb 2026 12:03:36 +0000 (13:03 +0100)] 
Revert "rcu: Unify force quiescent state"

This reverts commit 55d98e3edeeb17dd8445db27605d2b34f4c3ba85.

The commit introduced a regression in the replay functional test
on alpha (tests/functional/alpha/test_replay.py), that causes CI
failures regularly. Thus revert this change until someone has
figured out what is going wrong here.

Buglink: https://gitlab.com/qemu-project/qemu/-/issues/3197
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260209120336.41454-1-thuth@redhat.com>

4 months agodocs/devel: fix bash-ism warning for configure
Alex Bennée [Wed, 14 Jan 2026 10:15:25 +0000 (10:15 +0000)] 
docs/devel: fix bash-ism warning for configure

Hopefully this makes the meaning clearer.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260114101525.4039244-1-alex.bennee@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
4 months agodocs/devel: s/most/most recent/ ``probe_target_compiler`` call
Alex Bennée [Wed, 14 Jan 2026 10:25:22 +0000 (10:25 +0000)] 
docs/devel: s/most/most recent/ ``probe_target_compiler`` call

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260114102522.4044591-1-alex.bennee@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
4 months agoMerge tag 'pull-tpm-2026-02-10-1' of https://github.com/stefanberger/qemu-tpm into...
Peter Maydell [Wed, 11 Feb 2026 15:12:50 +0000 (15:12 +0000)] 
Merge tag 'pull-tpm-2026-02-10-1' of https://github.com/stefanberger/qemu-tpm into staging

Merge tpm 2026/02/10 v1

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEuBi5yt+QicLVzsZrda1lgCoLQhEFAmmLUPwACgkQda1lgCoL
# QhH6Dwf/b2CqCmWwt4otJIYteKdhOGOuurL9jo2YWthJKj6hr3SuefRnflSweQTD
# 2Mij2tdfu089gWC7qmvLNeqCBKT0L9q80sV6YPD4RJBrybcVBQRYeO7aDM2HhYjq
# Q5AjHnToIdKgwr8rniccH0dOnGyCTMbe3jmamT8hr32Cev8Lu2++Hkxu0FEj/6Ur
# +yGIu0yNn5Es+IOX1Kd01n3LZb0TLpDRGglWScWZxh4jc99CHhzRNFn4IQfSqbAE
# A5rqN5bWY0p855h/+XNNdOiocx/hlrzyl47FWatzFJTaxvGka3N4WYVtrd6U0g1w
# ByP8ajaONqiQgo1tsV+52yWz7jj+vg==
# =quEE
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 10 15:38:36 2026 GMT
# gpg:                using RSA key B818B9CADF9089C2D5CEC66B75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.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: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211

* tag 'pull-tpm-2026-02-10-1' of https://github.com/stefanberger/qemu-tpm:
  tpm_emulator: tpm_emulator_set_state_blobs(): move to boolean return
  tpm_emulator: drop direct use of errno variable
  tpm_emulator: print error on error-ignore path

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoMerge tag 'pull-target-arm-20260210' of https://gitlab.com/pm215/qemu into staging
Peter Maydell [Wed, 11 Feb 2026 15:12:42 +0000 (15:12 +0000)] 
Merge tag 'pull-target-arm-20260210' of https://gitlab.com/pm215/qemu into staging

target-arm queue:
 * Add whpx accelerator support for the virt board
 * Implement FEAT_E2H0
 * Implement WFE, SEV and SEVONPEND for Cortex-M

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmmLN9kZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3jlTD/9RlOP4M+qJQ67v5/vzJkOC
# tml5W+iUINIuPrJyZn3+AtLZoyS5GHH+lkBLwuRkdIpx9LjEApfr/4/T45quRqj1
# T0ziJXPQpSC6+3eVyJcfAg4ROtQSZq1+JUGQdCGocxyrwHxTKKI3LHyQezLhe56G
# +U/z1cI+DZPuYIdzz3LneIrNopsxEdmlWLlcR3e9HaSp15rcYrYwjOn08eTTk8HV
# e5pCu/1kq8LHlf8lwqwDwHL9odfW9W5570hPcuFZcjy1cUzzOJty3AW644Jlj4aw
# MEnyvvqCXKPSgOQ9N+W9TT2veU60h7aWov3N5S+HmYix3ZsFgbI8w/9SdDjeJlkH
# RFb/apdK8xcEktbsGaToEZOp1Wz1vxOMoGVCGayfYZ4byBhTAjOp5YLH2+26JDze
# I7o4q2PYENNP4r0ayOIbPcayBzlkp53VROZKILyQfQfwfChnoaFlkBeqVvF/PUxt
# CNsei6qDY2jsArhUieZ8CkHbOSlCeg22+7HjNTjp6b1h4lr3p4/tnFobJAYJrtRB
# 5v6EGaWnejEvsbcKV0aZhtVITygcny7tENZUkKlKoPeNr4k0R6dyFNKDcShLhv75
# 42ms95D7T/j4weJt6G3E9t1kqFCMl3KM8qwMT7nDJ1xiSVOw329sMtCcazAssDQ/
# 5ecCq9cGSaGUROwlnoUDpQ==
# =pzkY
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 10 13:51:21 2026 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20260210' of https://gitlab.com/pm215/qemu: (26 commits)
  target/arm: implement FEAT_E2H0
  target/arm: Implement WFE, SEV and SEVONPEND for Cortex-M
  target/arm: Remove entry for "any" from cpu32 arm_tcg_cpus[] list
  hw/arm/virt: Rename arm_virt_compat into arm_virt_compat_defaults
  whpx: arm64: add partition-wide reset on the reboot path
  whpx: enable arm64 builds
  target/arm: whpx: instantiate GIC early
  whpx: arm64: implement -cpu host
  hw/arm, accel/hvf, whpx: unify get_physical_address_range between WHPX and HVF
  whpx: arm64: clamp down IPA size
  target/arm: cpu: mark WHPX as supporting PSCI 1.3
  whpx: change memory management logic
  whpx: add arm64 support
  hw, target, accel: whpx: change apic_in_platform to kernel_irqchip
  whpx: common: add WHPX_INTERCEPT_DEBUG_TRAPS define
  whpx: ifdef out winhvemulation on non-x86_64
  whpx: reshuffle common code
  whpx: Move around files before introducing AArch64 support
  docs: arm: update virt machine model description
  qtest: hw/arm: virt: add new test case for GICv3 + GICv2m
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agos390x/pci: Fix endianness for zPCI BAR values.
Jaehoon Kim [Fri, 6 Feb 2026 16:46:02 +0000 (10:46 -0600)] 
s390x/pci: Fix endianness for zPCI BAR values.

During zPCI scan, BAR configuration data retrieved via CLP Query was
misinterpreted due to an endianness mismatch between QEMU and the guest
kernel.

The guest kernel's clp_store_query_pci_fn() expects BAR values in
little-endian format and converts them with le32_to_cpu(). However, QEMU
was incorrectly sending them in big-endian format, not following the
architecture specification. This caused incorrect bit-swapping in the
kernel, leading zpci_setup_bus_resources() to perform registration checks
against invalid flags, making the process ineffective.

Observation values for zPCI device (NVMe passthrough):
LPAR from real CLP:
[    0.865595] Resource: PCI Bus 0000:00 -> zdev->bar[0].val: 0x4
[    0.865597]  start: 0x4000000000000000
[    0.865598]  end:   0x4000000000003fff
[    0.865600]  flags: 0x100200

QEMU before fix (wrong):
[    0.601083] Resource: PCI Bus 0001:00 -> zdev->bar[0].val: 0x4000000
[    0.601085]  start: 0x4003000000000000
[    0.601086]  end:   0x4003000000003fff
[    0.601087]  flags: 0x200

QEMU after fix (correct):
[    0.601116] Resource: PCI Bus 0001:00 -> zdev->bar[0].val: 0x4
[    0.601117]  start: 0x4003000000000000
[    0.601118]  end:   0x4003000000003fff
[    0.601119]  flags: 0x100200

Signed-off-by: Jaehoon Kim <jhkim@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Message-ID: <20260206164645.1845366-1-jhkim@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agoplugins: fix cross-build using LLVM for Windows targets
Mohamed Mediouni [Tue, 10 Feb 2026 04:07:22 +0000 (05:07 +0100)] 
plugins: fix cross-build using LLVM for Windows targets

llvm-dlltool assumes that it's by default targeting the host architecture
it's running on. That assumption doesn't hold true when cross-compiling.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260210040722.11375-1-mohamed@unpredictable.fr
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
4 months agotpm_emulator: tpm_emulator_set_state_blobs(): move to boolean return
Vladimir Sementsov-Ogievskiy [Tue, 3 Feb 2026 15:58:43 +0000 (18:58 +0300)] 
tpm_emulator: tpm_emulator_set_state_blobs(): move to boolean return

The returned error is only used to check for success, so no reason
to use specific errno values.

Also, this is the only function with -errno contract in the file,
so converting it simplifies the whole file from three types of
contract (0/-1, 0/-errno, true/false) to only two (0/-1, true/false).

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
4 months agotpm_emulator: drop direct use of errno variable
Vladimir Sementsov-Ogievskiy [Tue, 3 Feb 2026 15:58:42 +0000 (18:58 +0300)] 
tpm_emulator: drop direct use of errno variable

The code tends to include errno into error messages after
tpm_util_test_tpmdev() and tpm_emulator_ctrlcmd() calls.

Both has error paths, where errno is not set, examples:

tpm_emulator_ctrlcmd()
  qemu_chr_fe_write_all()
    qemu_chr_write()
      replay_char_write_event_load()
        ...
        *res = replay_get_dword();
        ...

tpm_util_test_tpmdev()
  tpm_util_test()
    tpm_util_request()
      ...
      if (n != requestlen) {
          return -EFAULT;
      }
      ...

Both doesn't document that they set errno.

Let's drop these explicit usage of errno. If we need this information,
it should be added to errp deeper in the stack.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
4 months agotpm_emulator: print error on error-ignore path
Vladimir Sementsov-Ogievskiy [Tue, 3 Feb 2026 15:58:41 +0000 (18:58 +0300)] 
tpm_emulator: print error on error-ignore path

Commit 3469a56fa3dc985 introduced errp passthrough for many
errors in the file. But in this specific case in
tpm_emulator_get_buffer_size(), it simply used errp=NULL, so we lose
printed error. Let's bring it back

Note also, that 3469a56fa3dc985 was fixing another commit,
42e556fa3f7a "backends/tpm: Propagate vTPM error on migration failure"
and didn't mention it.

Fixes: 3469a56fa3dc985 "tmp_emulator: improve and fix use of errp"
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
4 months agotarget/arm: implement FEAT_E2H0
Alex Bennée [Thu, 5 Feb 2026 21:02:31 +0000 (21:02 +0000)] 
target/arm: implement FEAT_E2H0

FEAT_E2H0 is a formalisation of the existing behaviour of HCR_EL2.E2H
being programmable to switch between EL2 host mode and the
"traditional" nVHE EL2 mode. This implies at some point we might want
to model CPUs without FEAT_E2H0 which will always have EL2 host mode
enabled.

There are two values to represent no E2H0 systems of which 0b1110 will
make HCR_EL2.NV1 RES0 for FEAT_NV systems. For FEAT_NV2 the NV1 bit is
always valid.

Message-ID: <20260130181648.628364-1-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Message-id: 20260205210231.888199-1-alex.bennee@linaro.org

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agotarget/arm: Implement WFE, SEV and SEVONPEND for Cortex-M
Ashish Anand [Mon, 9 Feb 2026 05:19:31 +0000 (10:49 +0530)] 
target/arm: Implement WFE, SEV and SEVONPEND for Cortex-M

Currently, QEMU implements the 'Wait For Event' (WFE) instruction as a
simple yield. This causes high host CPU usage because guest
RTOS idle loops effectively become busy-wait loops.

To improve efficiency, this patch transitions WFE to use the architectural
'Halt' state (EXCP_HLT) for M-profile CPUs. This allows the host thread
to sleep when the guest is idle.

To support this transition, we implement the full architectural behavior
required for WFE, specifically the 'Event Register', 'SEVONPEND' logic,
and 'R_BPBR' exception handling requirements defined in the ARM
Architecture Reference Manual.

This patch enables resource-efficient idle emulation for Cortex-M.

Signed-off-by: Ashish Anand <ashish.a6@samsung.com>
Message-id: 20260209051931.122531-1-ashish.a6@samsung.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agotarget/arm: Remove entry for "any" from cpu32 arm_tcg_cpus[] list
Philippe Mathieu-Daudé [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
target/arm: Remove entry for "any" from cpu32 arm_tcg_cpus[] list

Since commit a0032cc5427 ("target/arm: Make 'any' CPU just an alias
for 'max'") the 'any' CPU QOM type is never used, because we change
"any" to "max" before creating the object.  The array entry means we
have an unnecessary type in the system, and the only user-visible
effect is that "any" is listed in the "-cpu help" output for
qemu-arm.  (System emulation already doesn't include this array
entry.)

Since qemu-aarch64 already doesn't include "any" in its "-cpu help"
output, we can reasonably drop it for qemu-arm also; remove the
not-very-useful array entry.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-id: 20260202153618.78675-2-philmd@linaro.org
[PMM: update commit message to note effect on help output.]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agohw/arm/virt: Rename arm_virt_compat into arm_virt_compat_defaults
Eric Auger [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
hw/arm/virt: Rename arm_virt_compat into arm_virt_compat_defaults

Renaming arm_virt_compat into arm_virt_compat_defaults
makes more obvious that those compats apply to all machine
types by default, if not overriden for specific ones. This also
matches the terminology used for pc-q35.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Sebastian Ott <sebott@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: arm64: add partition-wide reset on the reboot path
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: arm64: add partition-wide reset on the reboot path

This resets non-architectural state to allow for reboots to succeed.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: enable arm64 builds
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: enable arm64 builds

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agotarget/arm: whpx: instantiate GIC early
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
target/arm: whpx: instantiate GIC early

While figuring out a better spot for it, put it in whpx_accel_init.

Needs to be done before WHvSetupPartition.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: arm64: implement -cpu host
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: arm64: implement -cpu host

Logic to fetch MIDR_EL1 for cpu 0 adapted from:
https://github.com/FEX-Emu/FEX/blob/e6de17e72ef03aa88ba14fa0ec13163061608c74/Source/Windows/Common/CPUFeatures.cpp#L62

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agohw/arm, accel/hvf, whpx: unify get_physical_address_range between WHPX and HVF
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
hw/arm, accel/hvf, whpx: unify get_physical_address_range between WHPX and HVF

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: arm64: clamp down IPA size
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: arm64: clamp down IPA size

Code taken from HVF and adapted for WHPX use. Note that WHPX doesn't
have a default vs maximum IPA distinction.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agotarget/arm: cpu: mark WHPX as supporting PSCI 1.3
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
target/arm: cpu: mark WHPX as supporting PSCI 1.3

Hyper-V supports PSCI 1.3, and that implementation is exposed through
WHPX.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: change memory management logic
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: change memory management logic

This allows edk2 to work on Arm, although u-boot is still not functional.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: add arm64 support
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: add arm64 support

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agohw, target, accel: whpx: change apic_in_platform to kernel_irqchip
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
hw, target, accel: whpx: change apic_in_platform to kernel_irqchip

Change terminology to match the KVM one, as APIC is x86-specific.

And move out whpx_irqchip_in_kernel() to make it usable from common
code even when not compiling with WHPX support.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: common: add WHPX_INTERCEPT_DEBUG_TRAPS define
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: common: add WHPX_INTERCEPT_DEBUG_TRAPS define

As of why: WHPX on arm64 doesn't have debug trap support as of today.

Keep the exception bitmap interface for now - despite that being entirely unavailable on arm64 too.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: ifdef out winhvemulation on non-x86_64
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: ifdef out winhvemulation on non-x86_64

winhvemulation is x86_64 only.

In the future, we might want to get rid of winhvemulation usage
entirely.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: reshuffle common code
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: reshuffle common code

Some code can be shared between x86_64 and arm64 WHPX. Do so as much as reasonable.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agowhpx: Move around files before introducing AArch64 support
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
whpx: Move around files before introducing AArch64 support

Switch to a design where we can share whpx code between x86 and AArch64 when it makes sense to do so.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agodocs: arm: update virt machine model description
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)] 
docs: arm: update virt machine model description

Update the documentation to match current QEMU.

Remove the mention of pre-2.7 machine models as those aren't provided
anymore.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoqtest: hw/arm: virt: add new test case for GICv3 + GICv2m
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:48 +0000 (11:34 +0000)] 
qtest: hw/arm: virt: add new test case for GICv3 + GICv2m

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoqtest: hw/arm: virt: add ACPI tables for new GICv3 + GICv2m test case
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:48 +0000 (11:34 +0000)] 
qtest: hw/arm: virt: add ACPI tables for new GICv3 + GICv2m test case

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agotests: data: update AArch64 ACPI tables
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:48 +0000 (11:34 +0000)] 
tests: data: update AArch64 ACPI tables

After the previous commit introducing GICv3 + GICv2m configurations,
update the AArch64 ACPI tables for the GICv2 case.

Changes to the ACPI tables:

tests/data/acpi/aarch64/virt/IORT.dsl:

@@ -11,68 +11,49 @@
  */

 [000h 0000 004h]                   Signature : "IORT"    [IO Remapping Table]
-[004h 0004 004h]                Table Length : 00000080
+[004h 0004 004h]                Table Length : 00000054
 [008h 0008 001h]                    Revision : 05
-[009h 0009 001h]                    Checksum : B1
+[009h 0009 001h]                    Checksum : 3C
 [00Ah 0010 006h]                      Oem ID : "BOCHS "
 [010h 0016 008h]                Oem Table ID : "BXPC    "
 [018h 0024 004h]                Oem Revision : 00000001
 [01Ch 0028 004h]             Asl Compiler ID : "BXPC"
 [020h 0032 004h]       Asl Compiler Revision : 00000001

-[024h 0036 004h]                  Node Count : 00000002
+[024h 0036 004h]                  Node Count : 00000001
 [028h 0040 004h]                 Node Offset : 00000030
 [02Ch 0044 004h]                    Reserved : 00000000

-[030h 0048 001h]                        Type : 00
-[031h 0049 002h]                      Length : 0018
-[033h 0051 001h]                    Revision : 01
+[030h 0048 001h]                        Type : 02
+[031h 0049 002h]                      Length : 0024
+[033h 0051 001h]                    Revision : 03
 [034h 0052 004h]                  Identifier : 00000000
 [038h 0056 004h]               Mapping Count : 00000000
-[03Ch 0060 004h]              Mapping Offset : 00000000
+[03Ch 0060 004h]              Mapping Offset : 00000024

-[040h 0064 004h]                    ItsCount : 00000001
-[044h 0068 004h]                 Identifiers : 00000000
-
-[048h 0072 001h]                        Type : 02
-[049h 0073 002h]                      Length : 0038
-[04Bh 0075 001h]                    Revision : 03
-[04Ch 0076 004h]                  Identifier : 00000001
-[050h 0080 004h]               Mapping Count : 00000001
-[054h 0084 004h]              Mapping Offset : 00000024
-
-[058h 0088 008h]           Memory Properties : [IORT Memory Access Properties]
-[058h 0088 004h]             Cache Coherency : 00000001
-[05Ch 0092 001h]       Hints (decoded below) : 00
+[040h 0064 008h]           Memory Properties : [IORT Memory Access Properties]
+[040h 0064 004h]             Cache Coherency : 00000001
+[044h 0068 001h]       Hints (decoded below) : 00
                                    Transient : 0
                               Write Allocate : 0
                                Read Allocate : 0
                                     Override : 0
-[05Dh 0093 002h]                    Reserved : 0000
-[05Fh 0095 001h] Memory Flags (decoded below) : 03
+[045h 0069 002h]                    Reserved : 0000
+[047h 0071 001h] Memory Flags (decoded below) : 03
                                    Coherency : 1
                             Device Attribute : 1
                Ensured Coherency of Accesses : 0
-[060h 0096 004h]               ATS Attribute : 00000000
-[064h 0100 004h]          PCI Segment Number : 00000000
-[068h 0104 001h]           Memory Size Limit : 40
-[069h 0105 002h]          PASID Capabilities : 0000
-[06Bh 0107 001h]                    Reserved : 00
+[048h 0072 004h]               ATS Attribute : 00000000
+[04Ch 0076 004h]          PCI Segment Number : 00000000
+[050h 0080 001h]           Memory Size Limit : 40
+[051h 0081 002h]          PASID Capabilities : 0000
+[053h 0083 001h]                    Reserved : 00

-[06Ch 0108 004h]                  Input base : 00000000
-[070h 0112 004h]                    ID Count : 0000FFFF
-[074h 0116 004h]                 Output Base : 00000000
-[078h 0120 004h]            Output Reference : 00000030
-[07Ch 0124 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
+Raw Table Data: Length 84 (0x54)

-Raw Table Data: Length 128 (0x80)
-
-    0000: 49 4F 52 54 80 00 00 00 05 B1 42 4F 43 48 53 20  // IORT......BOCHS
+    0000: 49 4F 52 54 54 00 00 00 05 3C 42 4F 43 48 53 20  // IORTT....<BOCHS
     0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
-    0020: 01 00 00 00 02 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
-    0030: 00 18 00 01 00 00 00 00 00 00 00 00 00 00 00 00  // ................
-    0040: 01 00 00 00 00 00 00 00 02 38 00 03 01 00 00 00  // .........8......
-    0050: 01 00 00 00 24 00 00 00 01 00 00 00 00 00 00 03  // ....$...........
-    0060: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00  // ........@.......
-    0070: FF FF 00 00 00 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
+    0020: 01 00 00 00 01 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
+    0030: 02 24 00 03 00 00 00 00 00 00 00 00 24 00 00 00  // .$..........$...
+    0040: 01 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  // ................
+    0050: 40 00 00 00                                      // @...

tests/data/acpi/aarch64/virt/IORT.smmuv3-dev.dsl:

@@ -11,164 +11,120 @@
  */

 [000h 0000 004h]                   Signature : "IORT"    [IO Remapping Table]
-[004h 0004 004h]                Table Length : 0000016C
+[004h 0004 004h]                Table Length : 00000104
 [008h 0008 001h]                    Revision : 05
-[009h 0009 001h]                    Checksum : C8
+[009h 0009 001h]                    Checksum : 49
 [00Ah 0010 006h]                      Oem ID : "BOCHS "
 [010h 0016 008h]                Oem Table ID : "BXPC    "
 [018h 0024 004h]                Oem Revision : 00000001
 [01Ch 0028 004h]             Asl Compiler ID : "BXPC"
 [020h 0032 004h]       Asl Compiler Revision : 00000001

-[024h 0036 004h]                  Node Count : 00000004
+[024h 0036 004h]                  Node Count : 00000003
 [028h 0040 004h]                 Node Offset : 00000030
 [02Ch 0044 004h]                    Reserved : 00000000

-[030h 0048 001h]                        Type : 00
-[031h 0049 002h]                      Length : 0018
-[033h 0051 001h]                    Revision : 01
+[030h 0048 001h]                        Type : 04
+[031h 0049 002h]                      Length : 0044
+[033h 0051 001h]                    Revision : 04
 [034h 0052 004h]                  Identifier : 00000000
 [038h 0056 004h]               Mapping Count : 00000000
 [03Ch 0060 004h]              Mapping Offset : 00000000

-[040h 0064 004h]                    ItsCount : 00000001
-[044h 0068 004h]                 Identifiers : 00000000
-
-[048h 0072 001h]                        Type : 04
-[049h 0073 002h]                      Length : 0058
-[04Bh 0075 001h]                    Revision : 04
-[04Ch 0076 004h]                  Identifier : 00000001
-[050h 0080 004h]               Mapping Count : 00000001
-[054h 0084 004h]              Mapping Offset : 00000044
-
-[058h 0088 008h]                Base Address : 000000000C000000
-[060h 0096 004h]       Flags (decoded below) : 00000001
+[040h 0064 008h]                Base Address : 000000000C000000
+[048h 0072 004h]       Flags (decoded below) : 00000001
                              COHACC Override : 1
                                HTTU Override : 0
                       Proximity Domain Valid : 0
                               DeviceID Valid : 0
-[064h 0100 004h]                    Reserved : 00000000
-[068h 0104 008h]               VATOS Address : 0000000000000000
-[070h 0112 004h]                       Model : 00000000
-[074h 0116 004h]                  Event GSIV : 00000090
-[078h 0120 004h]                    PRI GSIV : 00000091
-[07Ch 0124 004h]                   GERR GSIV : 00000093
-[080h 0128 004h]                   Sync GSIV : 00000092
-[084h 0132 004h]            Proximity Domain : 00000000
-[088h 0136 004h]     Device ID Mapping Index : 00000000
+[04Ch 0076 004h]                    Reserved : 00000000
+[050h 0080 008h]               VATOS Address : 0000000000000000
+[058h 0088 004h]                       Model : 00000000
+[05Ch 0092 004h]                  Event GSIV : 00000090
+[060h 0096 004h]                    PRI GSIV : 00000091
+[064h 0100 004h]                   GERR GSIV : 00000093
+[068h 0104 004h]                   Sync GSIV : 00000092
+[06Ch 0108 004h]            Proximity Domain : 00000000
+[070h 0112 004h]     Device ID Mapping Index : 00000000

-[08Ch 0140 004h]                  Input base : 00000000
-[090h 0144 004h]                    ID Count : 0000FFFF
-[094h 0148 004h]                 Output Base : 00000000
-[098h 0152 004h]            Output Reference : 00000030
-[09Ch 0156 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
+[074h 0116 001h]                        Type : 04
+[075h 0117 002h]                      Length : 0044
+[077h 0119 001h]                    Revision : 04
+[078h 0120 004h]                  Identifier : 00000001
+[07Ch 0124 004h]               Mapping Count : 00000000
+[080h 0128 004h]              Mapping Offset : 00000000

-[0A0h 0160 001h]                        Type : 04
-[0A1h 0161 002h]                      Length : 0058
-[0A3h 0163 001h]                    Revision : 04
-[0A4h 0164 004h]                  Identifier : 00000002
-[0A8h 0168 004h]               Mapping Count : 00000001
-[0ACh 0172 004h]              Mapping Offset : 00000044
-
-[0B0h 0176 008h]                Base Address : 000000000C020000
-[0B8h 0184 004h]       Flags (decoded below) : 00000001
+[084h 0132 008h]                Base Address : 000000000C020000
+[08Ch 0140 004h]       Flags (decoded below) : 00000001
                              COHACC Override : 1
                                HTTU Override : 0
                       Proximity Domain Valid : 0
                               DeviceID Valid : 0
-[0BCh 0188 004h]                    Reserved : 00000000
-[0C0h 0192 008h]               VATOS Address : 0000000000000000
-[0C8h 0200 004h]                       Model : 00000000
-[0CCh 0204 004h]                  Event GSIV : 00000094
-[0D0h 0208 004h]                    PRI GSIV : 00000095
-[0D4h 0212 004h]                   GERR GSIV : 00000097
-[0D8h 0216 004h]                   Sync GSIV : 00000096
-[0DCh 0220 004h]            Proximity Domain : 00000000
-[0E0h 0224 004h]     Device ID Mapping Index : 00000000
+[090h 0144 004h]                    Reserved : 00000000
+[094h 0148 008h]               VATOS Address : 0000000000000000
+[09Ch 0156 004h]                       Model : 00000000
+[0A0h 0160 004h]                  Event GSIV : 00000094
+[0A4h 0164 004h]                    PRI GSIV : 00000095
+[0A8h 0168 004h]                   GERR GSIV : 00000097
+[0ACh 0172 004h]                   Sync GSIV : 00000096
+[0B0h 0176 004h]            Proximity Domain : 00000000
+[0B4h 0180 004h]     Device ID Mapping Index : 00000000

-[0E4h 0228 004h]                  Input base : 00000000
-[0E8h 0232 004h]                    ID Count : 0000FFFF
-[0ECh 0236 004h]                 Output Base : 00000000
-[0F0h 0240 004h]            Output Reference : 00000030
-[0F4h 0244 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
+[0B8h 0184 001h]                        Type : 02
+[0B9h 0185 002h]                      Length : 004C
+[0BBh 0187 001h]                    Revision : 03
+[0BCh 0188 004h]                  Identifier : 00000002
+[0C0h 0192 004h]               Mapping Count : 00000002
+[0C4h 0196 004h]              Mapping Offset : 00000024

-[0F8h 0248 001h]                        Type : 02
-[0F9h 0249 002h]                      Length : 0074
-[0FBh 0251 001h]                    Revision : 03
-[0FCh 0252 004h]                  Identifier : 00000003
-[100h 0256 004h]               Mapping Count : 00000004
-[104h 0260 004h]              Mapping Offset : 00000024
-
-[108h 0264 008h]           Memory Properties : [IORT Memory Access Properties]
-[108h 0264 004h]             Cache Coherency : 00000001
-[10Ch 0268 001h]       Hints (decoded below) : 00
+[0C8h 0200 008h]           Memory Properties : [IORT Memory Access Properties]
+[0C8h 0200 004h]             Cache Coherency : 00000001
+[0CCh 0204 001h]       Hints (decoded below) : 00
                                    Transient : 0
                               Write Allocate : 0
                                Read Allocate : 0
                                     Override : 0
-[10Dh 0269 002h]                    Reserved : 0000
-[10Fh 0271 001h] Memory Flags (decoded below) : 03
+[0CDh 0205 002h]                    Reserved : 0000
+[0CFh 0207 001h] Memory Flags (decoded below) : 03
                                    Coherency : 1
                             Device Attribute : 1
                Ensured Coherency of Accesses : 0
-[110h 0272 004h]               ATS Attribute : 00000000
-[114h 0276 004h]          PCI Segment Number : 00000000
-[118h 0280 001h]           Memory Size Limit : 40
-[119h 0281 002h]          PASID Capabilities : 0000
-[11Bh 0283 001h]                    Reserved : 00
+[0D0h 0208 004h]               ATS Attribute : 00000000
+[0D4h 0212 004h]          PCI Segment Number : 00000000
+[0D8h 0216 001h]           Memory Size Limit : 40
+[0D9h 0217 002h]          PASID Capabilities : 0000
+[0DBh 0219 001h]                    Reserved : 00

-[11Ch 0284 004h]                  Input base : 00000000
-[120h 0288 004h]                    ID Count : 000001FF
-[124h 0292 004h]                 Output Base : 00000000
-[128h 0296 004h]            Output Reference : 00000048
-[12Ch 0300 004h]       Flags (decoded below) : 00000000
+[0DCh 0220 004h]                  Input base : 00000000
+[0E0h 0224 004h]                    ID Count : 000001FF
+[0E4h 0228 004h]                 Output Base : 00000000
+[0E8h 0232 004h]            Output Reference : 00000030
+[0ECh 0236 004h]       Flags (decoded below) : 00000000
                               Single Mapping : 0

-[130h 0304 004h]                  Input base : 00001000
-[134h 0308 004h]                    ID Count : 000000FF
-[138h 0312 004h]                 Output Base : 00001000
-[13Ch 0316 004h]            Output Reference : 000000A0
-[140h 0320 004h]       Flags (decoded below) : 00000000
+[0F0h 0240 004h]                  Input base : 00001000
+[0F4h 0244 004h]                    ID Count : 000000FF
+[0F8h 0248 004h]                 Output Base : 00001000
+[0FCh 0252 004h]            Output Reference : 00000074
+[100h 0256 004h]       Flags (decoded below) : 00000000
                               Single Mapping : 0

-[144h 0324 004h]                  Input base : 00000200
-[148h 0328 004h]                    ID Count : 00000DFF
-[14Ch 0332 004h]                 Output Base : 00000200
-[150h 0336 004h]            Output Reference : 00000030
-[154h 0340 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
+Raw Table Data: Length 260 (0x104)

-[158h 0344 004h]                  Input base : 00001100
-[15Ch 0348 004h]                    ID Count : 0000EEFF
-[160h 0352 004h]                 Output Base : 00001100
-[164h 0356 004h]            Output Reference : 00000030
-[168h 0360 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
-
-Raw Table Data: Length 364 (0x16C)
-
-    0000: 49 4F 52 54 6C 01 00 00 05 C8 42 4F 43 48 53 20  // IORTl.....BOCHS
+    0000: 49 4F 52 54 04 01 00 00 05 49 42 4F 43 48 53 20  // IORT.....IBOCHS
     0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
-    0020: 01 00 00 00 04 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
-    0030: 00 18 00 01 00 00 00 00 00 00 00 00 00 00 00 00  // ................
-    0040: 01 00 00 00 00 00 00 00 04 58 00 04 01 00 00 00  // .........X......
-    0050: 01 00 00 00 44 00 00 00 00 00 00 0C 00 00 00 00  // ....D...........
-    0060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
-    0070: 00 00 00 00 90 00 00 00 91 00 00 00 93 00 00 00  // ................
-    0080: 92 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
-    0090: FF FF 00 00 00 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
-    00A0: 04 58 00 04 02 00 00 00 01 00 00 00 44 00 00 00  // .X..........D...
-    00B0: 00 00 02 0C 00 00 00 00 01 00 00 00 00 00 00 00  // ................
-    00C0: 00 00 00 00 00 00 00 00 00 00 00 00 94 00 00 00  // ................
-    00D0: 95 00 00 00 97 00 00 00 96 00 00 00 00 00 00 00  // ................
-    00E0: 00 00 00 00 00 00 00 00 FF FF 00 00 00 00 00 00  // ................
-    00F0: 30 00 00 00 00 00 00 00 02 74 00 03 03 00 00 00  // 0........t......
-    0100: 04 00 00 00 24 00 00 00 01 00 00 00 00 00 00 03  // ....$...........
-    0110: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00  // ........@.......
-    0120: FF 01 00 00 00 00 00 00 48 00 00 00 00 00 00 00  // ........H.......
-    0130: 00 10 00 00 FF 00 00 00 00 10 00 00 A0 00 00 00  // ................
-    0140: 00 00 00 00 00 02 00 00 FF 0D 00 00 00 02 00 00  // ................
-    0150: 30 00 00 00 00 00 00 00 00 11 00 00 FF EE 00 00  // 0...............
-    0160: 00 11 00 00 30 00 00 00 00 00 00 00              // ....0.......
+    0020: 01 00 00 00 03 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
+    0030: 04 44 00 04 00 00 00 00 00 00 00 00 00 00 00 00  // .D..............
+    0040: 00 00 00 0C 00 00 00 00 01 00 00 00 00 00 00 00  // ................
+    0050: 00 00 00 00 00 00 00 00 00 00 00 00 90 00 00 00  // ................
+    0060: 91 00 00 00 93 00 00 00 92 00 00 00 00 00 00 00  // ................
+    0070: 00 00 00 00 04 44 00 04 01 00 00 00 00 00 00 00  // .....D..........
+    0080: 00 00 00 00 00 00 02 0C 00 00 00 00 01 00 00 00  // ................
+    0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
+    00A0: 94 00 00 00 95 00 00 00 97 00 00 00 96 00 00 00  // ................
+    00B0: 00 00 00 00 00 00 00 00 02 4C 00 03 02 00 00 00  // .........L......
+    00C0: 02 00 00 00 24 00 00 00 01 00 00 00 00 00 00 03  // ....$...........
+    00D0: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00  // ........@.......
+    00E0: FF 01 00 00 00 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
+    00F0: 00 10 00 00 FF 00 00 00 00 10 00 00 74 00 00 00  // ............t...
+    0100: 00 00 00 00                                      // ....

tests/data/acpi/aarch64/virt/IORT.smmuv3-legacy.dsl:

@@ -11,129 +11,92 @@
  */

 [000h 0000 004h]                   Signature : "IORT"    [IO Remapping Table]
-[004h 0004 004h]                Table Length : 00000114
+[004h 0004 004h]                Table Length : 000000C0
 [008h 0008 001h]                    Revision : 05
-[009h 0009 001h]                    Checksum : 4A
+[009h 0009 001h]                    Checksum : 1C
 [00Ah 0010 006h]                      Oem ID : "BOCHS "
 [010h 0016 008h]                Oem Table ID : "BXPC    "
 [018h 0024 004h]                Oem Revision : 00000001
 [01Ch 0028 004h]             Asl Compiler ID : "BXPC"
 [020h 0032 004h]       Asl Compiler Revision : 00000001

-[024h 0036 004h]                  Node Count : 00000003
+[024h 0036 004h]                  Node Count : 00000002
 [028h 0040 004h]                 Node Offset : 00000030
 [02Ch 0044 004h]                    Reserved : 00000000

-[030h 0048 001h]                        Type : 00
-[031h 0049 002h]                      Length : 0018
-[033h 0051 001h]                    Revision : 01
+[030h 0048 001h]                        Type : 04
+[031h 0049 002h]                      Length : 0044
+[033h 0051 001h]                    Revision : 04
 [034h 0052 004h]                  Identifier : 00000000
 [038h 0056 004h]               Mapping Count : 00000000
 [03Ch 0060 004h]              Mapping Offset : 00000000

-[040h 0064 004h]                    ItsCount : 00000001
-[044h 0068 004h]                 Identifiers : 00000000
-
-[048h 0072 001h]                        Type : 04
-[049h 0073 002h]                      Length : 0058
-[04Bh 0075 001h]                    Revision : 04
-[04Ch 0076 004h]                  Identifier : 00000001
-[050h 0080 004h]               Mapping Count : 00000001
-[054h 0084 004h]              Mapping Offset : 00000044
-
-[058h 0088 008h]                Base Address : 0000000009050000
-[060h 0096 004h]       Flags (decoded below) : 00000001
+[040h 0064 008h]                Base Address : 0000000009050000
+[048h 0072 004h]       Flags (decoded below) : 00000001
                              COHACC Override : 1
                                HTTU Override : 0
                       Proximity Domain Valid : 0
                               DeviceID Valid : 0
-[064h 0100 004h]                    Reserved : 00000000
-[068h 0104 008h]               VATOS Address : 0000000000000000
-[070h 0112 004h]                       Model : 00000000
-[074h 0116 004h]                  Event GSIV : 0000006A
-[078h 0120 004h]                    PRI GSIV : 0000006B
-[07Ch 0124 004h]                   GERR GSIV : 0000006D
-[080h 0128 004h]                   Sync GSIV : 0000006C
-[084h 0132 004h]            Proximity Domain : 00000000
-[088h 0136 004h]     Device ID Mapping Index : 00000000
+[04Ch 0076 004h]                    Reserved : 00000000
+[050h 0080 008h]               VATOS Address : 0000000000000000
+[058h 0088 004h]                       Model : 00000000
+[05Ch 0092 004h]                  Event GSIV : 0000006A
+[060h 0096 004h]                    PRI GSIV : 0000006B
+[064h 0100 004h]                   GERR GSIV : 0000006D
+[068h 0104 004h]                   Sync GSIV : 0000006C
+[06Ch 0108 004h]            Proximity Domain : 00000000
+[070h 0112 004h]     Device ID Mapping Index : 00000000

-[08Ch 0140 004h]                  Input base : 00000000
-[090h 0144 004h]                    ID Count : 0000FFFF
-[094h 0148 004h]                 Output Base : 00000000
-[098h 0152 004h]            Output Reference : 00000030
-[09Ch 0156 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
+[074h 0116 001h]                        Type : 02
+[075h 0117 002h]                      Length : 004C
+[077h 0119 001h]                    Revision : 03
+[078h 0120 004h]                  Identifier : 00000001
+[07Ch 0124 004h]               Mapping Count : 00000002
+[080h 0128 004h]              Mapping Offset : 00000024

-[0A0h 0160 001h]                        Type : 02
-[0A1h 0161 002h]                      Length : 0074
-[0A3h 0163 001h]                    Revision : 03
-[0A4h 0164 004h]                  Identifier : 00000002
-[0A8h 0168 004h]               Mapping Count : 00000004
-[0ACh 0172 004h]              Mapping Offset : 00000024
-
-[0B0h 0176 008h]           Memory Properties : [IORT Memory Access Properties]
-[0B0h 0176 004h]             Cache Coherency : 00000001
-[0B4h 0180 001h]       Hints (decoded below) : 00
+[084h 0132 008h]           Memory Properties : [IORT Memory Access Properties]
+[084h 0132 004h]             Cache Coherency : 00000001
+[088h 0136 001h]       Hints (decoded below) : 00
                                    Transient : 0
                               Write Allocate : 0
                                Read Allocate : 0
                                     Override : 0
-[0B5h 0181 002h]                    Reserved : 0000
-[0B7h 0183 001h] Memory Flags (decoded below) : 03
+[089h 0137 002h]                    Reserved : 0000
+[08Bh 0139 001h] Memory Flags (decoded below) : 03
                                    Coherency : 1
                             Device Attribute : 1
                Ensured Coherency of Accesses : 0
-[0B8h 0184 004h]               ATS Attribute : 00000000
-[0BCh 0188 004h]          PCI Segment Number : 00000000
-[0C0h 0192 001h]           Memory Size Limit : 40
-[0C1h 0193 002h]          PASID Capabilities : 0000
-[0C3h 0195 001h]                    Reserved : 00
+[08Ch 0140 004h]               ATS Attribute : 00000000
+[090h 0144 004h]          PCI Segment Number : 00000000
+[094h 0148 001h]           Memory Size Limit : 40
+[095h 0149 002h]          PASID Capabilities : 0000
+[097h 0151 001h]                    Reserved : 00

-[0C4h 0196 004h]                  Input base : 00000000
-[0C8h 0200 004h]                    ID Count : 000001FF
-[0CCh 0204 004h]                 Output Base : 00000000
-[0D0h 0208 004h]            Output Reference : 00000048
-[0D4h 0212 004h]       Flags (decoded below) : 00000000
+[098h 0152 004h]                  Input base : 00000000
+[09Ch 0156 004h]                    ID Count : 000001FF
+[0A0h 0160 004h]                 Output Base : 00000000
+[0A4h 0164 004h]            Output Reference : 00000030
+[0A8h 0168 004h]       Flags (decoded below) : 00000000
                               Single Mapping : 0

-[0D8h 0216 004h]                  Input base : 00001000
-[0DCh 0220 004h]                    ID Count : 000000FF
-[0E0h 0224 004h]                 Output Base : 00001000
-[0E4h 0228 004h]            Output Reference : 00000048
-[0E8h 0232 004h]       Flags (decoded below) : 00000000
+[0ACh 0172 004h]                  Input base : 00001000
+[0B0h 0176 004h]                    ID Count : 000000FF
+[0B4h 0180 004h]                 Output Base : 00001000
+[0B8h 0184 004h]            Output Reference : 00000030
+[0BCh 0188 004h]       Flags (decoded below) : 00000000
                               Single Mapping : 0

-[0ECh 0236 004h]                  Input base : 00000200
-[0F0h 0240 004h]                    ID Count : 00000DFF
-[0F4h 0244 004h]                 Output Base : 00000200
-[0F8h 0248 004h]            Output Reference : 00000030
-[0FCh 0252 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
+Raw Table Data: Length 192 (0xC0)

-[100h 0256 004h]                  Input base : 00001100
-[104h 0260 004h]                    ID Count : 0000EEFF
-[108h 0264 004h]                 Output Base : 00001100
-[10Ch 0268 004h]            Output Reference : 00000030
-[110h 0272 004h]       Flags (decoded below) : 00000000
-                              Single Mapping : 0
-
-Raw Table Data: Length 276 (0x114)
-
-    0000: 49 4F 52 54 14 01 00 00 05 4A 42 4F 43 48 53 20  // IORT.....JBOCHS
+    0000: 49 4F 52 54 C0 00 00 00 05 1C 42 4F 43 48 53 20  // IORT......BOCHS
     0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
-    0020: 01 00 00 00 03 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
-    0030: 00 18 00 01 00 00 00 00 00 00 00 00 00 00 00 00  // ................
-    0040: 01 00 00 00 00 00 00 00 04 58 00 04 01 00 00 00  // .........X......
-    0050: 01 00 00 00 44 00 00 00 00 00 05 09 00 00 00 00  // ....D...........
-    0060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
-    0070: 00 00 00 00 6A 00 00 00 6B 00 00 00 6D 00 00 00  // ....j...k...m...
-    0080: 6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // l...............
-    0090: FF FF 00 00 00 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
-    00A0: 02 74 00 03 02 00 00 00 04 00 00 00 24 00 00 00  // .t..........$...
-    00B0: 01 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  // ................
-    00C0: 40 00 00 00 00 00 00 00 FF 01 00 00 00 00 00 00  // @...............
-    00D0: 48 00 00 00 00 00 00 00 00 10 00 00 FF 00 00 00  // H...............
-    00E0: 00 10 00 00 48 00 00 00 00 00 00 00 00 02 00 00  // ....H...........
-    00F0: FF 0D 00 00 00 02 00 00 30 00 00 00 00 00 00 00  // ........0.......
-    0100: 00 11 00 00 FF EE 00 00 00 11 00 00 30 00 00 00  // ............0...
-    0110: 00 00 00 00                                      // ....
+    0020: 01 00 00 00 02 00 00 00 30 00 00 00 00 00 00 00  // ........0.......
+    0030: 04 44 00 04 00 00 00 00 00 00 00 00 00 00 00 00  // .D..............
+    0040: 00 00 05 09 00 00 00 00 01 00 00 00 00 00 00 00  // ................
+    0050: 00 00 00 00 00 00 00 00 00 00 00 00 6A 00 00 00  // ............j...
+    0060: 6B 00 00 00 6D 00 00 00 6C 00 00 00 00 00 00 00  // k...m...l.......
+    0070: 00 00 00 00 02 4C 00 03 01 00 00 00 02 00 00 00  // .....L..........
+    0080: 24 00 00 00 01 00 00 00 00 00 00 03 00 00 00 00  // $...............
+    0090: 00 00 00 00 40 00 00 00 00 00 00 00 FF 01 00 00  // ....@...........
+    00A0: 00 00 00 00 30 00 00 00 00 00 00 00 00 10 00 00  // ....0...........
+    00B0: FF 00 00 00 00 10 00 00 30 00 00 00 00 00 00 00  // ........0.......

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agohw: arm: virt: rework MSI-X configuration
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:48 +0000 (11:34 +0000)] 
hw: arm: virt: rework MSI-X configuration

Introduce a -M msi= argument to be able to control MSI-X support independently
from ITS, as part of supporting GICv3 + GICv2m platforms.

Remove vms->its as it's no longer needed after that change.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoqtest: hw/arm: virt: skip ACPI test for IORT with GICv2
Mohamed Mediouni [Tue, 10 Feb 2026 11:34:48 +0000 (11:34 +0000)] 
qtest: hw/arm: virt: skip ACPI test for IORT with GICv2

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoaccel/system: Introduce hwaccel_enabled() helper
Philippe Mathieu-Daudé [Tue, 10 Feb 2026 11:34:48 +0000 (11:34 +0000)] 
accel/system: Introduce hwaccel_enabled() helper

hwaccel_enabled() return whether any hardware accelerator
is enabled.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agotarget/arm/kvm: add constants for new PSCI versions
Sebastian Ott [Tue, 10 Feb 2026 11:34:48 +0000 (11:34 +0000)] 
target/arm/kvm: add constants for new PSCI versions

Add constants for PSCI version 1_2 and 1_3.

Signed-off-by: Sebastian Ott <sebott@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agovirtio-ccw: virtio_ccw_set_guest_notifier(): fix failure path
Vladimir Sementsov-Ogievskiy [Mon, 19 Jan 2026 18:52:11 +0000 (21:52 +0300)] 
virtio-ccw: virtio_ccw_set_guest_notifier(): fix failure path

We leak notifier initialization on that failure path. Let's
cleanup it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260119185228.203296-8-vsementsov@yandex-team.ru>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agotests/.../reverse_debugging: Remove unsatisfiable condition
Yodel Eldar [Tue, 3 Feb 2026 18:21:53 +0000 (12:21 -0600)] 
tests/.../reverse_debugging: Remove unsatisfiable condition

get_qemu_img() already skips the test if qemu-img is not found and does
not return None. Eliminate the check for None on its result, and the
unreachable skipTest() gated by it.

Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260203182153.75276-1-yodel.eldar@yodel.dev>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agoMAINTAINERS: Replace backup for s390 PCI
Eric Farman [Mon, 2 Feb 2026 14:47:02 +0000 (15:47 +0100)] 
MAINTAINERS: Replace backup for s390 PCI

Farhan has been doing a masterful job coming on in the
s390 PCI space, and my own attention has been lacking.
Let's make MAINTAINERS reflect reality.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Farhan Ali <alifm@linux.ibm.com>
Acked-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Acked-by: Matthew Rosato <mjrosato@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: Alex Williamson <alex@shazbot.org>
Message-ID: <20260202144702.1783102-1-farman@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agoMAINTAINERS: Switch to my NVIDIA email
Raphael Norwitz [Wed, 4 Feb 2026 19:49:23 +0000 (14:49 -0500)] 
MAINTAINERS: Switch to my NVIDIA email

Signed-off-by: Raphael Norwitz <rnorwitz@nvidia.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260204194923.17704-1-rnorwitz@nvidia.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
4 months agoMerge tag 'pull-loongarch-20260210' of https://github.com/gaosong715/qemu into staging
Peter Maydell [Tue, 10 Feb 2026 09:12:38 +0000 (09:12 +0000)] 
Merge tag 'pull-loongarch-20260210' of https://github.com/gaosong715/qemu into staging

pull-loongarch-2026-02-10

# -----BEGIN PGP SIGNATURE-----
#
# iLMEAAEKAB0WIQTKRzxE1qCcGJoZP81FK5aFKyaCFgUCaYqcuAAKCRBFK5aFKyaC
# FkgeA/9G0mHfS7GOrna5V3mUkTmCZt0vDRyhoUvQYhq5xOxiw6xTwUHSnUGhrW1X
# Rl5I7TcRiv/Bl6pmDB3c0lZ4+V70MQBufxpwURA3XzKT1C2RSjVHEr7p2WzRiXPF
# 0Zgam8cG2xugT3Al9gdsrba1br/OLXtJHj1+n/L6tgAI8V2Beg==
# =WO9M
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 10 02:49:28 2026 GMT
# gpg:                using RSA key CA473C44D6A09C189A193FCD452B96852B268216
# gpg: Good signature from "Song Gao <gaosong@loongson.cn>" [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: CA47 3C44 D6A0 9C18 9A19  3FCD 452B 9685 2B26 8216

* tag 'pull-loongarch-20260210' of https://github.com/gaosong715/qemu:
  target/loongarch: Add LA v1.1 instructions to max cpu
  target/loongarch: Add sc.q instructions
  target/loongarch: Add llacq/screl instructions
  target/loongarch: Add estimated reciprocal instructions
  target/loongarch: Add amcas[_db].{b/h/w/d}
  target/loongarch: Add am{swap/add}[_db].{b/h}
  target/loongarch: Require atomics to be aligned

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agoMerge tag 'single-binary-20260206' of https://github.com/philmd/qemu into staging
Peter Maydell [Tue, 10 Feb 2026 09:11:16 +0000 (09:11 +0000)] 
Merge tag 'single-binary-20260206' of https://github.com/philmd/qemu into staging

Various patches related to single binary effort:

- Reduce RISC-V Boston tests
- Prohibit target_ulong / TARGET_PAGE_SIZE uses on s390x target
- Build target/arm/arm-qmp-cmds once
- Forbid legacy native endianness & ld/st_phys APIs on SPARC targets
- Forbid legacy ld/st_phys APIs on x86 targets
- Rename OpenRISC -> or1k
- Avoid QAPI parsing in target_arch()

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmmKO5wACgkQ4+MsLN6t
# wN5EchAAxWVK1eWW5cO7R3+PxWFFzAMcyTzVUftNIyMLZQcXg5C6P2MSt8gsU8KC
# oOwl9S85u5dYh/PlAJtQYC+wtNUxawaJk26vUm3k+uOY2XgqCLtFKts+id15F3Hb
# RueLTEM095jbFgl5OzDwFVRAXP/z727vRsSN2ULXdphHpSVnrROGLz++Uqn7wAmd
# S9u8q35VVRkHl5TRQBDCYNddvGkW6PY0lSdDPhPMYFDH0Pln1Ao3fEn1zfa1c2gP
# HQ1d4MdHi8XX041o2TPFZf74tEs0EeSaxBtfyFEMByOs2kVe8oiX5oaM37vbejLa
# WAfwkG1imw9LcMo0VyjMGgQMb0tkdCVJWzp47eEAEhxSHBsfX5w7+jG0pBng3BBJ
# 6BrcfzVcWeqScUJPdXbM+mY+uBW09JHsTH37aM1NCsRlJI3gys2TfY/oIyVb7aqM
# C17DPKwxv+LVC5BI8LPAkh/nM2/sh5jtC+DjqaAFfAlo3JPLIUOcEIpFikiGbbzU
# MFH1k6YRAee3e7fW1Sw26R17Sf+VTYO9EhYiyWdyAIaBPZ5r7V/fVZWNNrBvh3Zd
# +ETHyRr/mwxbPx3fiNRg880jsP6mVhpLqykRJN1ttW0eQPaA96aqLmDrez/NFF4D
# NisJI8nlJNSEnF84cKgpV74mbIM5lmwMQi684rnI/Ty31X1hLxU=
# =dY6o
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Feb  9 19:55:08 2026 GMT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'single-binary-20260206' of https://github.com/philmd/qemu: (30 commits)
  target-info: Statically initialize target_arch
  meson: Add TARGET_ARCH to config_target_data
  qapi: Add hexagon to SysEmuTarget
  hw/or1k: Rename or1k-sim.c from openrisc_sim.c
  docs/system/or1k: Rename from openrisc
  tests/tcg/or1k: Rename from openrisc
  hw/or1k: Rename from openrisc
  include/hw/or1k: Rename from openrisc
  target/or1k: Rename from openrisc
  configs/targets: Restrict the legacy ldst_phys() API on x86 targets
  hw/intc/ioapic: Replace legacy st_phys() -> address_space_st()
  hw/intc: Mark x86-specific [IO]APIC peripherals as little-endian
  target/i386: Use explicit little-endian LD/ST API
  configs/targets: Restrict legacy ldst_phys() API on 32-bit SPARC target
  target/sparc: Replace legacy st_phys() -> address_space_st()
  configs/targets: Forbid SPARC to use legacy native endianness APIs
  target/sparc: Replace MO_TE -> MO_BE
  target/sparc: Remove dubious swapping in LD_code() helper
  target/arm/arm-qmp-cmds.c: make compilation unit common
  target/s390x: Expand tcg_global_mem_new() -> tcg_global_mem_new_i64()
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agotarget/loongarch: Add LA v1.1 instructions to max cpu
Jiajie Chen [Wed, 19 Nov 2025 12:30:58 +0000 (20:30 +0800)] 
target/loongarch: Add LA v1.1 instructions to max cpu

Add LA v1.1 new instructinos to max cpu by enabling new features in
CPUCFG2.

Signed-off-by: Jiajie Chen <c@jia.je>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
4 months agotarget/loongarch: Add sc.q instructions
Jiajie Chen [Wed, 19 Nov 2025 12:30:57 +0000 (20:30 +0800)] 
target/loongarch: Add sc.q instructions

Add the sc.q instruction in LoongArch v1.1, guarded by CPUCFG2.SCQ. It
is implemented by reading 128bit data (llval + llval_high) in ll.d when
aligned to 16B boundary, and cmpxchg 128bit in sc.q. If ld.d
matches the higher part of the 128bit, its data is taken from
llval_high.

Expected assembly sequence:

ll.d lo, base, 0
ld.d hi, base, 8
sc.q lo, hi, base

Signed-off-by: Jiajie Chen <c@jia.je>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
4 months agotarget/loongarch: Add llacq/screl instructions
Jiajie Chen [Wed, 19 Nov 2025 12:30:56 +0000 (20:30 +0800)] 
target/loongarch: Add llacq/screl instructions

Add the following instructions in LoongArch v1.1:

- llacq.w
- screl.w
- llacq.d
- screl.d

They are guarded by CPUCFG2.LLACQ_SCREL.

Signed-off-by: Jiajie Chen <c@jia.je>
Co-developed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
4 months agotarget/loongarch: Add estimated reciprocal instructions
Jiajie Chen [Wed, 19 Nov 2025 12:30:55 +0000 (20:30 +0800)] 
target/loongarch: Add estimated reciprocal instructions

Add the following new instructions in LoongArch v1.1:

- frecipe.s
- frecipe.d
- frsqrte.s
- frsqrte.d
- vfrecipe.s
- vfrecipe.d
- vfrsqrte.s
- vfrsqrte.d
- xvfrecipe.s
- xvfrecipe.d
- xvfrsqrte.s
- xvfrsqrte.d

They are guarded by CPUCFG2.FRECIPE. Altought the instructions allow
implementation to improve performance by reducing precision, we use the
existing softfloat implementation.

Signed-off-by: Jiajie Chen <c@jia.je>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
4 months agotarget/loongarch: Add amcas[_db].{b/h/w/d}
Jiajie Chen [Wed, 19 Nov 2025 12:24:48 +0000 (20:24 +0800)] 
target/loongarch: Add amcas[_db].{b/h/w/d}

The new instructions are introduced in LoongArch v1.1:

- amcas.b
- amcas.h
- amcas.w
- amcas.d
- amcas_db.b
- amcas_db.h
- amcas_db.w
- amcas_db.d

The new instructions are gated by CPUCFG2.LAMCAS.

Signed-off-by: Jiajie Chen <c@jia.je>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>