]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
6 months agohw/misc: Introduce iommu-testdev for bare-metal IOMMU testing
Tao Tang [Thu, 25 Sep 2025 15:35:49 +0000 (23:35 +0800)] 
hw/misc: Introduce iommu-testdev for bare-metal IOMMU testing

Add a minimal PCI test device designed to exercise IOMMU translation
(such as ARM SMMUv3) without requiring guest firmware or OS. The device
provides MMIO registers to configure and trigger DMA operations with
controllable attributes (security state, address space), enabling
deterministic IOMMU testing.

Key features:
- Bare-metal IOMMU testing via simple MMIO interface
- Configurable DMA attributes for security states and address spaces
- Write-then-read verification pattern with automatic result checking

The device performs a deterministic DMA test pattern: write a known
value (0x12345678) to a configured GVA, read it back, and verify data
integrity. Results are reported through a dedicated result register,
eliminating the need for complex interrupt handling or driver
infrastructure in tests.

This is purely a test device and not intended for production use or
machine realism. It complements existing test infrastructure like
pci-testdev but focuses specifically on IOMMU translation path
validation.

Signed-off-by: Tao Tang <tangtao1634@phytium.com.cn>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20260119161112.3841386-4-tangtao1634@phytium.com.cn>
[PMD: Add SPDX-License-Identifier: GPL-2.0-or-later tag]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6 months agohw/arm/smmuv3-common: Define STE/CD fields via registerfields
Tao Tang [Sun, 21 Dec 2025 04:46:12 +0000 (12:46 +0800)] 
hw/arm/smmuv3-common: Define STE/CD fields via registerfields

Switch STE/CD bitfield definitions and accessors to the
'registerfields.h' REG/FIELD API.

Signed-off-by: Tao Tang <tangtao1634@phytium.com.cn>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-ID: <20260119161112.3841386-3-tangtao1634@phytium.com.cn>
[PMD: Updated STE::CTXPTR_HI, STE::S2TTB_HI and CD:TTBx_HI lengths]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6 months agohw/arm/smmuv3: Extract common definitions to smmuv3-common.h
Tao Tang [Sun, 21 Dec 2025 03:25:01 +0000 (11:25 +0800)] 
hw/arm/smmuv3: Extract common definitions to smmuv3-common.h

Move register definitions, command enums, and Stream Table Entry (STE) /
Context Descriptor (CD) structure definitions from the internal header
hw/arm/smmuv3-internal.h to a new common header
include/hw/arm/smmuv3-common.h.

This allows other components, such as generic SMMUv3 tests or test devices,
to utilize these definitions without including the specific SMMUv3 device
internal state.

Signed-off-by: Tao Tang <tangtao1634@phytium.com.cn>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-ID: <20260119161112.3841386-2-tangtao1634@phytium.com.cn>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6 months agobsd-user/syscall_defs.h: define STAT_TIME_T_EXT only for 32 bits
Pierrick Bouvier [Mon, 19 Jan 2026 07:57:38 +0000 (23:57 -0800)] 
bsd-user/syscall_defs.h: define STAT_TIME_T_EXT only for 32 bits

Commit 369c1ba2b changed the wrong conditional "#if defined(__i386__)" to
"#if defined(TARGET_I386)".
However, TARGET_I386 is defined for target x86_64 also.

This commit fixes it by identifying correctly 32 bits target.

Found with:
$ ./build/qemu-x86_64 \
  -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 \
  -plugin ./build/tests/tcg/plugins/libinsn \
  -d plugin \
  ./build/qemu-system-x86_64 --version
ld-elf.so.1: /lib/libz.so.6: invalid file format
cpu 0 insns: 59746
total insns: 59746

Fixes: 369c1ba2b ("Fix __i386__ test for TARGET_HAS_STAT_TIME_T_EXT")
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agolinux-user/aarch64/target_fcntl.h: add missing TARGET_O_LARGEFILE definition
Pierrick Bouvier [Tue, 13 Jan 2026 19:40:29 +0000 (11:40 -0800)] 
linux-user/aarch64/target_fcntl.h: add missing TARGET_O_LARGEFILE definition

This caused a failure with program using openat2, where O_LARGEFILE was
replaced by O_NOFOLLOW.
This issue is only visible when QEMU is compiled with musl libc, where
O_LARGEFILE is different from 0 (vs glibc).

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3262
Cc: qemu-stable@nongnu.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agoconfigure: add ppc target back to container tests
Florian Hofhammer [Mon, 19 Jan 2026 10:25:30 +0000 (11:25 +0100)] 
configure: add ppc target back to container tests

Commit 2ff8c9a298 removed support for 32-bit PPC hosts from the build
system. Unfortunately, the patch also removed the 32-bit PPC target for
containerized tests, which leads to an error when trying to run tests,
e.g., with "make check-tcg":
"make[1]: *** No rule to make target 'docker-image-debian-ppc-cross',
needed by 'build-tcg-tests-ppc-linux-user'.  Stop."

This patch adds the PPC target back for containerized tests.

Fixes: 2ff8c9a2984b ("buildsys: Remove support for 32-bit PPC hosts")
Signed-off-by: Florian Hofhammer <florian.hofhammer@fhofhammer.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
[Mjt: specify commit subject in Fixes tag)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agoMAINTAINERS: Add docs/system/i386/ to the general x86 architecture section
Thomas Huth [Fri, 16 Jan 2026 10:11:39 +0000 (11:11 +0100)] 
MAINTAINERS: Add docs/system/i386/ to the general x86 architecture section

We've got a section for generic x86 architecture support in our
MAINTAINERS file - this should cover the docs/system/i386/ folder, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agotests/qemu-iotests: Use "gsed" for expressions that require GNU sed
Thomas Huth [Tue, 13 Jan 2026 14:14:15 +0000 (15:14 +0100)] 
tests/qemu-iotests: Use "gsed" for expressions that require GNU sed

A bunch of tests are currently failing e.g. on FreeBSD like this:

 082   fail       [13:38:58] [13:38:59]   0.5s                 output
  mismatch (see .../build/tests/qemu-iotests/scratch/qcow2-file-082/082.out.bad)
 --- .../src/tests/qemu-iotests/082.out
 +++ .../build/tests/qemu-iotests/scratch/qcow2-file-082/082.out.bad
 @@ -17,7 +17,7 @@
  cluster_size: 4096
  Format specific information:
      compat: 1.1
 -    compression type: COMPRESSION_TYPE
 +    compression type: zlib
      lazy refcounts: true
      refcount bits: 16
      corrupt: false

This happens because the sed statements require GNU sed. Let's use
gsed in these spots to get it fixed.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agoconfigure: Set $PYTHON in the configuration of the optionroms
Thomas Huth [Wed, 14 Jan 2026 08:33:06 +0000 (09:33 +0100)] 
configure: Set $PYTHON in the configuration of the optionroms

pc-bios/optionrom/Makefile uses $(PYTHON) for running a Python script,
but this variable is never initialized here. So the script gets run
via its shebang line - which fails if the "python3" binary is not
available on the system. To fix this, write the PYTHON configuration
to the config.mak file of the optionroms.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agotests: fix comment declaring runtime in rv64 interruptedmemory test
Julian Ganz [Sat, 27 Dec 2025 08:53:46 +0000 (09:53 +0100)] 
tests: fix comment declaring runtime in rv64 interruptedmemory test

The test attempts to trigger a regression for arount 30s. However, a
comment just before the computation of the target wall clock time falsly
declares the run time to be around 60s.

This was the case already when we introduced the test in

    5241645c47a9987f4fcc65bab303a444966b7942
    (tests: add test with interrupted memory accesses on rv64)

Signed-off-by: Julian Ganz <neither@nut.email>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agoqemu-options.hx: use KiB, MiB, GiB for power-of-2 units
Michael Tokarev [Thu, 18 Dec 2025 07:28:11 +0000 (10:28 +0300)] 
qemu-options.hx: use KiB, MiB, GiB for power-of-2 units

Use MiB &Co instead of MB &Co when the talk is about
power-of-two-based sizes, in qemu-options.hx.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3222
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6 months agogdbstub: unlink the unix socket before bind()
Michael Tokarev [Thu, 25 Dec 2025 06:18:40 +0000 (09:18 +0300)] 
gdbstub: unlink the unix socket before bind()

This is another variant of doing what v9.2.0-1561-gfccb744f41c6
"gdbstub: Try unlinking the unix socket before binding" did, but
that commit introduced dependency on qemu-sockets.c which is
more problematic for statically-linked qemu-user binaries.

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agoRevert "gdbstub: Try unlinking the unix socket before binding"
Michael Tokarev [Thu, 25 Dec 2025 06:14:42 +0000 (09:14 +0300)] 
Revert "gdbstub: Try unlinking the unix socket before binding"

This reverts commit fccb744f41c69fec6fd92225fe907c6e69de5d44.

This commit introduced dependency of linux-user on qemu-sockets.c.
The latter includes handling of various socket types, while gdbstub
only needs unix sockets.  Including different kinds of sockets
makes it more problematic to build linux-user statically.

The original issue - the need to unlink unix socket before binding -
will be addressed in the next change.

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
6 months agoMerge tag 'pull-tcg-20260119' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Sun, 18 Jan 2026 22:04:31 +0000 (09:04 +1100)] 
Merge tag 'pull-tcg-20260119' of https://gitlab.com/rth7680/qemu into staging

Remove support for 32-bit hosts.

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmltWH8dHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/ERwgAjYEp0OOEGoHQG0Tj
# MWymeQXRgtslspQtkhlIC5IiC8vWOeJVXVvb+sWV4fckkv/v4BK2R903IuHrRiYu
# MeJSDMI6tCWDRzP2U2jbeFlxQ0BGAQUjpi7oRkJEZv9qgWxodek6o+2HLM0iqcDM
# 7NciQwWwlMpkizx45qD+rpulvictLWjYczSpQPrkXEvqVT7dut20MKP/06FvqGsa
# E+1WoZAq0UfkT8xbqcLXgX5QyVPFpC0ZIcHBzXiUip6G4rY5rVnBeuiYCKojl2CI
# M0l9UEwG1KP9aaP6Lx2lg0qnXKT6ITukoPIzlEUDoNorGDwdXklYjd/ChmknQv3K
# fG0zWg==
# =LRWj
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 19 Jan 2026 09:02:39 AM AEDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]

* tag 'pull-tcg-20260119' of https://gitlab.com/rth7680/qemu: (54 commits)
  include/qemu/atomic: Drop aligned_{u}int64_t
  meson: Remove CONFIG_ATOMIC64
  include/qemu/atomic: Drop qatomic_{read,set}_[iu]64
  util: Remove stats64
  block: Drop use of Stat64
  migration: Drop use of Stat64
  target/s390x: Simplify atomicity check in do_csst
  target/s390x: Drop CONFIG_ATOMIC64 tests
  target/m68k: Drop CONFIG_ATOMIC64 tests
  target/hppa: Drop CONFIG_ATOMIC64 test
  target/arm: Drop CONFIG_ATOMIC64 tests
  linux-user/hppa: Drop CONFIG_ATOMIC64 test
  linux-user/arm: Drop CONFIG_ATOMIC64 test
  accel/tcg: Drop CONFIG_ATOMIC64 test from translator.c
  accel/tcg: Drop CONFIG_ATOMIC64 checks from ldst_atomicicy.c.inc
  tcg: Unconditionally define atomic64 helpers
  accel/tcg/runtime: Remove helper_nonatomic_cmpxchgo
  accel/tcg/runtime: Remove 64-bit shift helpers
  target/riscv: Drop TCG_TARGET_REG_BITS test
  target/i386/tcg: Drop TCG_TARGET_REG_BITS test
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoinclude/qemu/atomic: Drop aligned_{u}int64_t
Richard Henderson [Thu, 8 Jan 2026 03:15:01 +0000 (14:15 +1100)] 
include/qemu/atomic: Drop aligned_{u}int64_t

As we no longer support i386 as a host architecture,
this abstraction is no longer required.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomeson: Remove CONFIG_ATOMIC64
Richard Henderson [Thu, 8 Jan 2026 02:53:50 +0000 (13:53 +1100)] 
meson: Remove CONFIG_ATOMIC64

This config is no longer used.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoinclude/qemu/atomic: Drop qatomic_{read,set}_[iu]64
Richard Henderson [Thu, 8 Jan 2026 02:33:58 +0000 (13:33 +1100)] 
include/qemu/atomic: Drop qatomic_{read,set}_[iu]64

Replace all uses with the normal qatomic_{read,set}.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoutil: Remove stats64
Richard Henderson [Thu, 8 Jan 2026 01:56:37 +0000 (12:56 +1100)] 
util: Remove stats64

This API is no longer used.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoblock: Drop use of Stat64
Richard Henderson [Thu, 8 Jan 2026 01:53:21 +0000 (12:53 +1100)] 
block: Drop use of Stat64

The Stat64 structure is an aid for 32-bit hosts, and
is no longer required.  Use plain 64-bit types.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomigration: Drop use of Stat64
Richard Henderson [Thu, 8 Jan 2026 01:49:49 +0000 (12:49 +1100)] 
migration: Drop use of Stat64

The Stat64 structure is an aid for 32-bit hosts, and
is no longer required.  Use plain 64-bit types.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotarget/s390x: Simplify atomicity check in do_csst
Richard Henderson [Tue, 13 Jan 2026 00:46:51 +0000 (11:46 +1100)] 
target/s390x: Simplify atomicity check in do_csst

We should have used MO_{32,64} from the start, rather than
raw integer constants.  However, now that the CONFIG_ATOMIC64
test has been removed, we can remove the 'max' variable and
simplify the two blocks.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotarget/s390x: Drop CONFIG_ATOMIC64 tests
Richard Henderson [Thu, 8 Jan 2026 00:52:01 +0000 (11:52 +1100)] 
target/s390x: Drop CONFIG_ATOMIC64 tests

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotarget/m68k: Drop CONFIG_ATOMIC64 tests
Richard Henderson [Thu, 8 Jan 2026 00:50:36 +0000 (11:50 +1100)] 
target/m68k: Drop CONFIG_ATOMIC64 tests

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotarget/hppa: Drop CONFIG_ATOMIC64 test
Richard Henderson [Thu, 8 Jan 2026 00:44:58 +0000 (11:44 +1100)] 
target/hppa: Drop CONFIG_ATOMIC64 test

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotarget/arm: Drop CONFIG_ATOMIC64 tests
Richard Henderson [Thu, 8 Jan 2026 00:43:28 +0000 (11:43 +1100)] 
target/arm: Drop CONFIG_ATOMIC64 tests

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agolinux-user/hppa: Drop CONFIG_ATOMIC64 test
Richard Henderson [Thu, 8 Jan 2026 00:38:21 +0000 (11:38 +1100)] 
linux-user/hppa: Drop CONFIG_ATOMIC64 test

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agolinux-user/arm: Drop CONFIG_ATOMIC64 test
Richard Henderson [Thu, 8 Jan 2026 00:37:16 +0000 (11:37 +1100)] 
linux-user/arm: Drop CONFIG_ATOMIC64 test

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoaccel/tcg: Drop CONFIG_ATOMIC64 test from translator.c
Richard Henderson [Thu, 8 Jan 2026 00:27:14 +0000 (11:27 +1100)] 
accel/tcg: Drop CONFIG_ATOMIC64 test from translator.c

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoaccel/tcg: Drop CONFIG_ATOMIC64 checks from ldst_atomicicy.c.inc
Richard Henderson [Thu, 8 Jan 2026 00:23:09 +0000 (11:23 +1100)] 
accel/tcg: Drop CONFIG_ATOMIC64 checks from ldst_atomicicy.c.inc

CONFIG_ATOMIC64 is a configuration knob for 32-bit hosts.

This allows removal of functions like load_atomic8_or_exit
and simplification of load_atom_extract_al8_or_exit to
load_atom_extract_al8.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Unconditionally define atomic64 helpers
Richard Henderson [Wed, 7 Jan 2026 20:59:28 +0000 (07:59 +1100)] 
tcg: Unconditionally define atomic64 helpers

CONFIG_ATOMIC64 is a configuration knob for 32-bit hosts.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoaccel/tcg/runtime: Remove helper_nonatomic_cmpxchgo
Richard Henderson [Wed, 7 Jan 2026 20:38:27 +0000 (07:38 +1100)] 
accel/tcg/runtime: Remove helper_nonatomic_cmpxchgo

This were only required for some 32-bit hosts.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoaccel/tcg/runtime: Remove 64-bit shift helpers
Richard Henderson [Wed, 7 Jan 2026 03:36:38 +0000 (14:36 +1100)] 
accel/tcg/runtime: Remove 64-bit shift helpers

These were only required for some 32-bit hosts.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotarget/riscv: Drop TCG_TARGET_REG_BITS test
Richard Henderson [Wed, 7 Jan 2026 03:30:25 +0000 (14:30 +1100)] 
target/riscv: Drop TCG_TARGET_REG_BITS test

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotarget/i386/tcg: Drop TCG_TARGET_REG_BITS test
Richard Henderson [Wed, 7 Jan 2026 03:26:19 +0000 (14:26 +1100)] 
target/i386/tcg: Drop TCG_TARGET_REG_BITS test

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoinclude/tcg: Drop TCG_TARGET_REG_BITS tests
Richard Henderson [Wed, 7 Jan 2026 00:01:02 +0000 (11:01 +1100)] 
include/tcg: Drop TCG_TARGET_REG_BITS tests

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Drop TCG_TARGET_REG_BITS test in tcg-has.h
Richard Henderson [Wed, 7 Jan 2026 02:56:29 +0000 (13:56 +1100)] 
tcg: Drop TCG_TARGET_REG_BITS test in tcg-has.h

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Drop TCG_TARGET_REG_BITS tests in tcg-internal.h
Richard Henderson [Wed, 7 Jan 2026 02:53:26 +0000 (13:53 +1100)] 
tcg: Drop TCG_TARGET_REG_BITS tests in tcg-internal.h

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Drop TCG_TARGET_REG_BITS tests in tcg.c
Richard Henderson [Wed, 7 Jan 2026 02:48:48 +0000 (13:48 +1100)] 
tcg: Drop TCG_TARGET_REG_BITS tests in tcg.c

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Drop TCG_TARGET_REG_BITS tests in tcg-op-ldst.c
Richard Henderson [Wed, 7 Jan 2026 02:38:47 +0000 (13:38 +1100)] 
tcg: Drop TCG_TARGET_REG_BITS tests in tcg-op-ldst.c

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Drop TCG_TARGET_REG_BITS tests in tcg-op-gvec.c
Richard Henderson [Wed, 7 Jan 2026 02:30:33 +0000 (13:30 +1100)] 
tcg: Drop TCG_TARGET_REG_BITS tests in tcg-op-gvec.c

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Drop TCG_TARGET_REG_BITS tests in tcg-op.c
Richard Henderson [Wed, 7 Jan 2026 02:17:42 +0000 (13:17 +1100)] 
tcg: Drop TCG_TARGET_REG_BITS tests in tcg-op.c

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Drop TCG_TARGET_REG_BITS test in region.c
Richard Henderson [Wed, 7 Jan 2026 00:46:55 +0000 (11:46 +1100)] 
tcg: Drop TCG_TARGET_REG_BITS test in region.c

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg/tci: Remove glue TCG_TARGET_REG_BITS renames
Richard Henderson [Wed, 7 Jan 2026 03:00:19 +0000 (14:00 +1100)] 
tcg/tci: Remove glue TCG_TARGET_REG_BITS renames

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg/tci: Drop TCG_TARGET_REG_BITS tests
Richard Henderson [Wed, 7 Jan 2026 01:52:50 +0000 (12:52 +1100)] 
tcg/tci: Drop TCG_TARGET_REG_BITS tests

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Remove INDEX_op_dup2_vec
Richard Henderson [Wed, 7 Jan 2026 01:40:43 +0000 (12:40 +1100)] 
tcg: Remove INDEX_op_dup2_vec

This opcode was exclusively for 32-bit hosts.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Remove INDEX_op_setcond2_i32
Richard Henderson [Wed, 7 Jan 2026 01:30:31 +0000 (12:30 +1100)] 
tcg: Remove INDEX_op_setcond2_i32

This opcode was exclusively for 32-bit hosts.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Remove INDEX_op_brcond2_i32
Richard Henderson [Wed, 7 Jan 2026 01:15:24 +0000 (12:15 +1100)] 
tcg: Remove INDEX_op_brcond2_i32

This opcode was exclusively for 32-bit hosts.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months ago*: Drop TCG_TARGET_REG_BITS test for prefer_i64
Richard Henderson [Wed, 7 Jan 2026 00:17:36 +0000 (11:17 +1100)] 
*: Drop TCG_TARGET_REG_BITS test for prefer_i64

Mechanically via sed -i.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Replace TCG_TARGET_REG_BITS / 8
Richard Henderson [Fri, 19 Dec 2025 04:30:39 +0000 (15:30 +1100)] 
tcg: Replace TCG_TARGET_REG_BITS / 8

Use sizeof(tcg_target_long) instead of division.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg: Make TCG_TARGET_REG_BITS common
Richard Henderson [Fri, 19 Dec 2025 04:23:02 +0000 (15:23 +1100)] 
tcg: Make TCG_TARGET_REG_BITS common

Since we only support 64-bit hosts, there's no real need
to parameterize TCG_TARGET_REG_BITS.  It seems worth holding
on to the identifier though, for documentation purposes.

Move one tcg/*/tcg-target-reg-bits.h to tcg/target-reg-bits.h
and remove the others.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomeson: Remove cpu == riscv32 tests
Richard Henderson [Fri, 19 Dec 2025 02:00:42 +0000 (13:00 +1100)] 
meson: Remove cpu == riscv32 tests

The 32-bit riscv host is no longer supported.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomeson: Drop host_arch rename for riscv64
Richard Henderson [Fri, 19 Dec 2025 01:22:28 +0000 (01:22 +0000)] 
meson: Drop host_arch rename for riscv64

This requires renaming several directories:
tcg/riscv, linux-user/include/host/riscv, and
common-user/host/riscv.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomeson: Drop host_arch rename for mips64
Richard Henderson [Fri, 19 Dec 2025 00:29:14 +0000 (11:29 +1100)] 
meson: Drop host_arch rename for mips64

This requires renaming several directories:
tcg/mips, linux-user/include/host/mips, and
common-user/host/mips.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg/ppc64: Rename from ppc
Richard Henderson [Thu, 18 Dec 2025 21:59:03 +0000 (08:59 +1100)] 
tcg/ppc64: Rename from ppc

Emphasize that we're generating 64-bit code.
Drop the explicit rename from meson's cpu.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg/x86_64: Rename from i386
Richard Henderson [Thu, 18 Dec 2025 21:57:21 +0000 (08:57 +1100)] 
tcg/x86_64: Rename from i386

Emphasize that we're generating 64-bit code.
Drop the explicit rename from meson's cpu.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotcg/i386: Remove TCG_TARGET_REG_BITS tests
Richard Henderson [Thu, 18 Dec 2025 20:59:11 +0000 (07:59 +1100)] 
tcg/i386: Remove TCG_TARGET_REG_BITS tests

We now only support 64-bit code generation.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months ago*: Remove ppc host support
Richard Henderson [Thu, 18 Dec 2025 22:02:28 +0000 (09:02 +1100)] 
*: Remove ppc host support

Move the files from host/include/ppc to host/include/ppc64,
replacing the stub headers that redirected to ppc.

Remove linux-user/include/host/ppc.
Remove common-user/host/ppc.
Remove cpu == ppc tests from meson.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomeson: Remove cpu == x86 tests
Richard Henderson [Thu, 18 Dec 2025 03:33:16 +0000 (14:33 +1100)] 
meson: Remove cpu == x86 tests

The 32-bit x86 host is no longer supported.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agohost/include/x86_64/bufferiszero: Remove no SSE2 fallback
Richard Henderson [Thu, 18 Dec 2025 03:27:30 +0000 (14:27 +1100)] 
host/include/x86_64/bufferiszero: Remove no SSE2 fallback

Since x86_64 always has SSE2, we can remove the fallback
that was present for i686.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months ago*: Remove i386 host support
Richard Henderson [Thu, 18 Dec 2025 03:25:19 +0000 (14:25 +1100)] 
*: Remove i386 host support

Move the files from host/include/i386 to host/include/x86_64,
replacing the stub headers that redirected to i386.

Remove linux-user/include/host/i386.
Remove common-user/host/i386.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months ago*: Remove __i386__ tests
Richard Henderson [Thu, 18 Dec 2025 03:21:44 +0000 (14:21 +1100)] 
*: Remove __i386__ tests

Remove instances of __i386__, except from tests and imported headers.

Drop a block containing sanity check and fprintf error message for
i386-on-i386 or x86_64-on-x86_64 emulation.  If we really want
something like this, we would do it via some form of compile-time check.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agobsd-user: Fix __i386__ test for TARGET_HAS_STAT_TIME_T_EXT
Richard Henderson [Thu, 18 Dec 2025 03:21:04 +0000 (14:21 +1100)] 
bsd-user: Fix __i386__ test for TARGET_HAS_STAT_TIME_T_EXT

The target test is TARGET_I386, not __i386__.

Cc: Kyle Evans <kevans@freebsd.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months ago*: Remove arm host support
Richard Henderson [Thu, 18 Dec 2025 02:28:29 +0000 (13:28 +1100)] 
*: Remove arm host support

Remove tcg/arm.
Remove instances of __arm__, except from tests and imported headers.
Remove arm from supported_cpus.
Remove linux-user/include/host/arm.
Remove common-user/host/arm.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomeson: Drop cpu == wasm32 tests
Richard Henderson [Thu, 15 Jan 2026 22:44:37 +0000 (09:44 +1100)] 
meson: Drop cpu == wasm32 tests

The 32-bit wasm32 host is no longer supported.

Reviewed-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agomeson: Reject 32-bit hosts
Richard Henderson [Wed, 17 Dec 2025 22:56:27 +0000 (09:56 +1100)] 
meson: Reject 32-bit hosts

32-bit hosts have been deprecated since 10.0.
As the first step, disable any such at configuration time.
Further patches will remove the dead code.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agogitlab: Remove 32-bit host testing
Richard Henderson [Wed, 17 Dec 2025 22:58:33 +0000 (09:58 +1100)] 
gitlab: Remove 32-bit host testing

These deprecated builds will be disabled.
Remove testing of armhf and i686.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotests/docker/dockerfiles: Drop wasm32 from emsdk-wasm-cross.docker
Richard Henderson [Thu, 15 Jan 2026 08:34:00 +0000 (19:34 +1100)] 
tests/docker/dockerfiles: Drop wasm32 from emsdk-wasm-cross.docker

We will no longer build wasm32, so drop the docker config.
Streamline the dockerfile to hardcode TARGET_CPU as wasm64.

Reviewed-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agogitlab-ci: Drop build-wasm32-32bit
Richard Henderson [Thu, 15 Jan 2026 08:25:39 +0000 (19:25 +1100)] 
gitlab-ci: Drop build-wasm32-32bit

Drop the wasm32 build and container jobs.

Reviewed-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agoMerge tag 'accel-20260116' of https://github.com/philmd/qemu into staging
Richard Henderson [Fri, 16 Jan 2026 11:26:36 +0000 (22:26 +1100)] 
Merge tag 'accel-20260116' of https://github.com/philmd/qemu into staging

Accelerators patches queue

- Enable 64bit WebAssembly guests (TCI)
- Fix migration on HVF
- Remove a signal race with WFI on HVF (Aarch64)
- Correct HVF guest timer frequency (Aarch64)
- Fix NVMM build (x86)

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmlqHhcACgkQ4+MsLN6t
# wN7NEA//cZvw4AdTKgUxenEQL2r+Y8KVT+Wm+F7WqznTm9dqGgb+YHgmDoPA9b6y
# qxenzIwVA1R2ZkgAs7m99z9k9YcZLXHdoKelWYqxoWZd1DFVQJ7by5iRoQbvdtRJ
# LSxQXkdcXCGBIWQ080k0WJP5e7Sw/1+LdSm3jn2naRTD1JF3jn4LwUZMFQSwuhH0
# 0uXFrb207AlFz4itNnZXIjcvugMi6hIKNhHX8ol0JLSlfkS0lVR4y1X21J11ipg3
# VYucsUfA9fzfqcTDkPxGuEAV5mivaP1wy8kHRh5p8vgq7dbLivdIpjYIZynzb1LF
# 10WaeJaYHHYeWqLSKcZPUd66eKc2ZOeGn+zcE8oM8Zsm2NQUJ+rIkWw7/O978PfS
# RsXmIYTkM8gXfx7gUtW95/JmX5FH4xsvrwRjv1FdOPwYNe3kMtc1xslq9dkqsXMG
# P79n+NVXRr62ph93lSjLdLgqFW6eEXo0nVO4maD+9pBolK9S8TIrzLxRwXyHY/lx
# FD9nRHP/U1QjrrwpCcFT3PmTfJ/CsMlP0biUG9+uf6XKkxlOIyNoMSDdTC5xjUTx
# iCC71XluRIBKAIpwIN9QHtTTrKvm2wMFlTHpQxMD/kldc+0whHBtfU/24vemCCMQ
# dpnJxr0lVng942YHhT/n2Y6CZbzURF022I89p7EJ6d/1Els0j/c=
# =khzj
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 16 Jan 2026 10:16:39 PM AEDT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'accel-20260116' of https://github.com/philmd/qemu: (30 commits)
  tests/functional: Require TCG to run reverse debugging tests
  target/i386/nvmm: Include missing ramlist.h header
  accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
  hmp-commands-info.hx: Move definition of "info accel"
  target/arm: Only allow disabling NEON when using TCG
  target/arm/hvf: Really set Generic Timer counter frequency
  target/arm: Create GTimers *after* features finalized / accel realized
  accel/hvf: Add hvf_arch_cpu_realize() stubs
  accel: Introduce AccelOpsClass::cpu_target_realize() hook
  accel/hvf: Have PSCI CPU_SUSPEND halt the vCPU
  accel/hvf: Implement WFI without using pselect()
  accel/hvf: Skip WFI if CPU has work to do
  target/arm/hvf: Implement dirty page tracking
  accel/hvf: Remove mac_slots
  accel/hvf: Drop hvf_slot and hvf_find_overlap_slot
  accel/hvf: Simplify hvf_set_phys_mem
  accel/hvf: Move hvf_log_sync to hvf_log_clear
  accel/hvf: Simplify hvf_log_*
  target/i386/hvf: Use address_space_translate in ept_emulation_fault
  target/i386/hvf: Use hvf_unprotect_dirty_range
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 months agotests/functional: Require TCG to run reverse debugging tests
Philippe Mathieu-Daudé [Wed, 14 Jan 2026 21:21:13 +0000 (22:21 +0100)] 
tests/functional: Require TCG to run reverse debugging tests

Record/replay is specific to TCG. Require it to avoid failure
when using a HVF-only build on Darwin:

  qemu-system-aarch64: -icount shift=7,rr=record,rrfile=/scratch/replay.bin,rrsnapshot=init: cannot configure icount, TCG support not available

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20260115161029.24116-1-philmd@linaro.org>

7 months agotarget/i386/nvmm: Include missing ramlist.h header
Thomas Huth [Wed, 14 Jan 2026 08:38:12 +0000 (09:38 +0100)] 
target/i386/nvmm: Include missing ramlist.h header

Compiling on NetBSD currently fails with:

 ../src/target/i386/nvmm/nvmm-all.c:1136:22: error: unknown type name 'RAMBlockNotifier'
  1136 | nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size,
       |                      ^~~~~~~~~~~~~~~~
 ../src/target/i386/nvmm/nvmm-all.c:1152:15: error: variable 'nvmm_ram_notifier' has initializer but incomplete type
  1152 | static struct RAMBlockNotifier nvmm_ram_notifier = {
       |               ^~~~~~~~~~~~~~~~
 ../src/target/i386/nvmm/nvmm-all.c:1153:6: error: 'struct RAMBlockNotifier' has no member named 'ram_block_added'
  1153 |     .ram_block_added = nvmm_ram_block_added
       |      ^~~~~~~~~~~~~~~
 ../src/target/i386/nvmm/nvmm-all.c:1153:24: error: 'nvmm_ram_block_added' undeclared here (not in a function)
  1153 |     .ram_block_added = nvmm_ram_block_added
       |                        ^~~~~~~~~~~~~~~~~~~~

Include the right header to get this fixed.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20260114083812.18496-1-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7 months agoaccel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Philippe Mathieu-Daudé [Tue, 13 Jan 2026 20:34:20 +0000 (21:34 +0100)] 
accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()

Fix typo to avoid the following build failure:

  target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
  target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member named 'vcpu_dirty'
    988 |     qcpu->vcpu_dirty = true;
        |         ^~

Cc: qemu-stable@nongnu.org
Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic CPUState::vcpu_dirty field")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260113203924.81560-1-philmd@linaro.org>

7 months agohmp-commands-info.hx: Move definition of "info accel"
Markus Armbruster [Thu, 8 Jan 2026 08:32:49 +0000 (09:32 +0100)] 
hmp-commands-info.hx: Move definition of "info accel"

Commit c10eb740108 (accel/system: Add 'info accel' on human monitor)
inserted "info accel" in the middle of "info sync-profile".  Move it
behind "info sync-profile".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260116005050.376616-2-dave@treblig.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7 months agotarget/arm: Only allow disabling NEON when using TCG
Philippe Mathieu-Daudé [Wed, 25 Jun 2025 21:54:17 +0000 (23:54 +0200)] 
target/arm: Only allow disabling NEON when using TCG

Only allow disabling NEON when using TCG.

This avoids confusing user experience:

  $ qemu-system-aarch64 -M virt -accel hvf \
                        -cpu host,neon=off,vfp=off,vfp-d32=off
  qemu-system-aarch64: AArch64 CPUs must have both VFP and Neon or neither

  $ qemu-system-aarch64 -M virt -accel hvf \
                        -cpu host,neon=off,vfp=off,vfp-d32=off
  qemu-system-aarch64: ARM CPUs must have both VFP-D32 and Neon or neither

  $ qemu-system-aarch64 -M virt -accel hvf \
                        -cpu host,neon=off,vfp=off,vfp-d32=off
  qemu-system-aarch64: can't apply global host-arm-cpu.vfp-d32=off: Property 'host-arm-cpu.vfp-d32' not found

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-20-philmd@linaro.org>

7 months agotarget/arm/hvf: Really set Generic Timer counter frequency
Philippe Mathieu-Daudé [Wed, 18 Jun 2025 06:06:13 +0000 (08:06 +0200)] 
target/arm/hvf: Really set Generic Timer counter frequency

Setting ARMCPU::gt_cntfrq_hz in hvf_arch_init_vcpu() is
not correct because the timers have already be initialized
with the default frequency.

Set it earlier in the AccelOpsClass::cpu_target_realize()
handler instead, and assert the value is correct when
reaching hvf_arch_init_vcpu().

Fixes: a1477da3dde ("hvf: Add Apple Silicon support")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20251103101034.59039-19-philmd@linaro.org>

7 months agotarget/arm: Create GTimers *after* features finalized / accel realized
Philippe Mathieu-Daudé [Wed, 18 Jun 2025 08:55:42 +0000 (10:55 +0200)] 
target/arm: Create GTimers *after* features finalized / accel realized

Call generic (including accelerator) cpu_realize() handlers
*before* setting @gt_cntfrq_hz default

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20251103101034.59039-18-philmd@linaro.org>

7 months agoaccel/hvf: Add hvf_arch_cpu_realize() stubs
Philippe Mathieu-Daudé [Wed, 18 Jun 2025 13:53:16 +0000 (15:53 +0200)] 
accel/hvf: Add hvf_arch_cpu_realize() stubs

Implement HVF AccelOpsClass::cpu_target_realize() hook as
empty stubs. Target implementations will come separately.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-17-philmd@linaro.org>

7 months agoaccel: Introduce AccelOpsClass::cpu_target_realize() hook
Philippe Mathieu-Daudé [Wed, 18 Jun 2025 06:05:47 +0000 (08:05 +0200)] 
accel: Introduce AccelOpsClass::cpu_target_realize() hook

Allow accelerators to set vCPU properties before its realization.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20251103101034.59039-16-philmd@linaro.org>

7 months agoaccel/hvf: Have PSCI CPU_SUSPEND halt the vCPU
Philippe Mathieu-Daudé [Fri, 3 Oct 2025 14:19:24 +0000 (16:19 +0200)] 
accel/hvf: Have PSCI CPU_SUSPEND halt the vCPU

Return EXCP_HLT to the main loop.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-15-philmd@linaro.org>

7 months agoaccel/hvf: Implement WFI without using pselect()
Philippe Mathieu-Daudé [Fri, 3 Oct 2025 14:15:27 +0000 (16:15 +0200)] 
accel/hvf: Implement WFI without using pselect()

Return to the main loop where we'll be waken again.
This avoid a tricky race with signals introduced in
commit 219c101fa7f ("Add HVF WFI handler").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-14-philmd@linaro.org>

7 months agoaccel/hvf: Skip WFI if CPU has work to do
Philippe Mathieu-Daudé [Fri, 3 Oct 2025 14:14:51 +0000 (16:14 +0200)] 
accel/hvf: Skip WFI if CPU has work to do

Avoid sleeping vCPU thread for any pending work, not just IRQs.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-13-philmd@linaro.org>

7 months agotarget/arm/hvf: Implement dirty page tracking
Richard Henderson [Sat, 27 Sep 2025 02:13:06 +0000 (19:13 -0700)] 
target/arm/hvf: Implement dirty page tracking

Notice writes to pages which are being monitored.  Mark the page dirty,
re-enable writes, and retry the instruction without emulation.

Assert the fault is not from a stage1 page table walk.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-12-philmd@linaro.org>

7 months agoaccel/hvf: Remove mac_slots
Richard Henderson [Sat, 27 Sep 2025 00:21:32 +0000 (17:21 -0700)] 
accel/hvf: Remove mac_slots

This data structure is no longer used.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-11-philmd@linaro.org>

7 months agoaccel/hvf: Drop hvf_slot and hvf_find_overlap_slot
Richard Henderson [Sat, 27 Sep 2025 00:20:30 +0000 (17:20 -0700)] 
accel/hvf: Drop hvf_slot and hvf_find_overlap_slot

These are now unused.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-10-philmd@linaro.org>

7 months agoaccel/hvf: Simplify hvf_set_phys_mem
Richard Henderson [Sat, 27 Sep 2025 00:17:38 +0000 (17:17 -0700)] 
accel/hvf: Simplify hvf_set_phys_mem

All of the complicated parts of updating the address space
are handled by address_space_update_topology_pass.
Do not create or use hvf_slot structures.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-9-philmd@linaro.org>

7 months agoaccel/hvf: Move hvf_log_sync to hvf_log_clear
Richard Henderson [Fri, 26 Sep 2025 23:48:24 +0000 (16:48 -0700)] 
accel/hvf: Move hvf_log_sync to hvf_log_clear

Right idea, wrong hook.  log_sync is called before using
dirty bit data (which for hvf is already up-to-date),
whereas log_clear is called before cleaning the range.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-8-philmd@linaro.org>

7 months agoaccel/hvf: Simplify hvf_log_*
Richard Henderson [Fri, 26 Sep 2025 23:37:26 +0000 (16:37 -0700)] 
accel/hvf: Simplify hvf_log_*

Rely on the AddressSpace and MemoryRegion structures
rather than hvf_slot.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-7-philmd@linaro.org>

7 months agotarget/i386/hvf: Use address_space_translate in ept_emulation_fault
Richard Henderson [Fri, 26 Sep 2025 23:34:02 +0000 (16:34 -0700)] 
target/i386/hvf: Use address_space_translate in ept_emulation_fault

The hvf_slot structure is a poor replacement for properly
looking up a memory region in the address space.
Use memory_region_get_dirty_log_mask instead of HVF_SLOT_LOG.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20251103101034.59039-6-philmd@linaro.org>

7 months agopc-bios: Update vbootrom image to commit 1c8e9510b22c
Jamin Lin [Fri, 16 Jan 2026 05:47:22 +0000 (13:47 +0800)] 
pc-bios: Update vbootrom image to commit 1c8e9510b22c

Full changelog since last update (183c9ff8056b) :

Joe Komlodi (1):
    npcm8xx: Fix u-boot copy size

Jamin Lin (3):
    ast27x0: refactor FIT boot loader into fmc_image.c for future Caliptra Manifest support
    ast27x0: Add Caliptra Manifest boot support and MCU runtime loader framework
    ast27x0: Fix compilation issues on Ubuntu 22.04

Compiled with gcc version 13.3.0

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
7 months agotarget/i386/hvf: Use hvf_unprotect_dirty_range
Richard Henderson [Fri, 26 Sep 2025 22:21:53 +0000 (15:21 -0700)] 
target/i386/hvf: Use hvf_unprotect_dirty_range

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-5-philmd@linaro.org>

7 months agoaccel/hvf: Enforce host alignment in hv_vm_protect()
Philippe Mathieu-Daudé [Mon, 29 Sep 2025 08:31:00 +0000 (10:31 +0200)] 
accel/hvf: Enforce host alignment in hv_vm_protect()

hv_vm_protect() arguments must be aligned to host page.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20260112103034.65310-4-philmd@linaro.org>

7 months agotarget/i386/hvf: Use host page alignment in ept_emulation_fault()
Philippe Mathieu-Daudé [Tue, 28 Oct 2025 04:31:11 +0000 (05:31 +0100)] 
target/i386/hvf: Use host page alignment in ept_emulation_fault()

While on x86 the host page size is fixed to 4KB, it is
better to call qemu_real_host_page_size() for consistency.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20251103101034.59039-3-philmd@linaro.org>

7 months agoaccel/hvf: Create hvf_protect_clean_range, hvf_unprotect_dirty_range
Richard Henderson [Fri, 26 Sep 2025 22:19:16 +0000 (15:19 -0700)] 
accel/hvf: Create hvf_protect_clean_range, hvf_unprotect_dirty_range

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20251103101034.59039-2-philmd@linaro.org>

7 months agogitlab-ci: Add build tests for wasm64
Kohei Tokunaga [Mon, 4 Aug 2025 12:57:17 +0000 (21:57 +0900)] 
gitlab-ci: Add build tests for wasm64

The wasm builds are tested for 3 targets: wasm32, wasm64(-sMEMORY64=1) and
wasm64(-sMEMORY64=2). The CI builds the containers using the same Dockerfile
(emsdk-wasm-cross.docker) with different build args.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <ee30d4956a485fd46b4735028486d3fb7b22fe60.1768308374.git.ktokunaga.mail@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7 months agodockerfiles: Add support for wasm64 to the wasm Dockerfile
Kohei Tokunaga [Mon, 4 Aug 2025 12:57:16 +0000 (21:57 +0900)] 
dockerfiles: Add support for wasm64 to the wasm Dockerfile

This commit fixes Dockerfile of the wasm build to support both of wasm32 and
wasm64 build. Dockerfile takes the following build argument and use it for
building dependencies.

- TARGET_CPU: target wasm arch (wasm32 or wasm64)

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <3f21342f50e0412a32143fe21ecc0d8db95b3f37.1768308374.git.ktokunaga.mail@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7 months agoconfigure: Enable to propagate -sMEMORY64 flag to Emscripten
Kohei Tokunaga [Mon, 4 Aug 2025 12:57:15 +0000 (21:57 +0900)] 
configure: Enable to propagate -sMEMORY64 flag to Emscripten

Currently there are some engines that don't support wasm64 (e.g. unsupported
on Safari[1]). To mitigate this issue, the configure script allows the user
to use Emscripten's compatibility feature, "-sMEMORY64=2" flag[2].

Emscripten's "-sMEMORY64=2" flag still enables 64bit pointers in C code. But
this flag lowers the output binary into wasm32, with limiting the maximum
memory size to 4GB. So QEMU can run on wasm32 engines.

[1] https://webassembly.org/features/
[2] https://emscripten.org/docs/tools_reference/settings_reference.html#memory64

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <a2f068c7884a629fe3e4b297368d70b0956ab048.1768308374.git.ktokunaga.mail@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7 months agomeson: Add wasm64 support to the --cpu flag
Kohei Tokunaga [Mon, 4 Aug 2025 12:57:14 +0000 (21:57 +0900)] 
meson: Add wasm64 support to the --cpu flag

wasm64 target enables 64bit pointers using Emscripten's -sMEMORY64=1
flag[1]. This enables QEMU to run 64bit guests.

Although the configure script uses "uname -m" as the fallback value when
"cpu" is empty, this can't be used for Emscripten which targets to Wasm.
So, in wasm build, this commit fixes configure to require --cpu flag to be
explicitly specified by the user.

[1] https://emscripten.org/docs/tools_reference/settings_reference.html#memory64

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <91f16f0e9ae6b36fbf0c2caac510dcf855120400.1768308374.git.ktokunaga.mail@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7 months agotests/qtest/migration: Add MigrationTestEnv::has_hvf field
Philippe Mathieu-Daudé [Tue, 28 Jan 2025 11:37:40 +0000 (12:37 +0100)] 
tests/qtest/migration: Add MigrationTestEnv::has_hvf field

Allow tests to tune their parameters when running on HVF.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250128135429.8500-6-philmd@linaro.org>

7 months agotests/qtest/migration: Make 'has_dirty_ring' generic
Philippe Mathieu-Daudé [Tue, 28 Jan 2025 11:29:05 +0000 (12:29 +0100)] 
tests/qtest/migration: Make 'has_dirty_ring' generic

Keep accelerator knowledge limited within MigrationTestEnv,
expose a generic %has_dirty_ring value, only checking for
KVM when initializing it in migration_get_env().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20250128135429.8500-3-philmd@linaro.org>

7 months agomigration/dirtyrate: Do not unlock cpu_list lock twice
Philippe Mathieu-Daudé [Mon, 27 Jan 2025 13:32:19 +0000 (14:32 +0100)] 
migration/dirtyrate: Do not unlock cpu_list lock twice

&qemu_cpu_list_lock is locked within the WITH_QEMU_LOCK_GUARD()
context, then unlocked. No need to manually unlock it.

Fixes: 370ed600296 ("cpu: expose qemu_cpu_list_lock for lock-guard use")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250128135429.8500-2-philmd@linaro.org>