]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
13 days agoMerge tag 'pull-tcg-20251019' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Sun, 19 Oct 2025 18:29:13 +0000 (11:29 -0700)] 
Merge tag 'pull-tcg-20251019' of https://gitlab.com/rth7680/qemu into staging

tcg: Remove support for 32-bit mips/ppc hosts

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmj1LRUdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8+pAf/VBeBnMEuGlc+nrJS
# VEYSVsyWeKy8ezRphc502HYrzeiJ/h7L5wwHG2Yt41GbiQ9M+2H02hQAQTwsft4H
# vQ1iUM7rurY75gYzbBCgUDGqG8y0VRAyAafheMWiaKk/r6QMCmIX5yClZKH6Yzvg
# ZDwSx9FgaWbXwW11tG/0Cl5p9PtWAhGy3NecnNprMqJ1Hqv2zxT9U8v9yN1U6oiH
# FHlJmsfPqWQhU0jLZ78LHc802Iys8qF6DQJNYVQ7Xkbu24pTC9HoR3z7MqoI1hQF
# ELrH8fZmFiWbkx85paWFsSP/Y3Ff+lcG5hrv91KPoX2uB3ymNLJ0qYG0S8Cvt/VX
# JSeH9Q==
# =qyo5
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 19 Oct 2025 11:25:25 AM PDT
# 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-20251019' of https://gitlab.com/rth7680/qemu:
  tcg/ppc: Remove support for 32-bit hosts
  tcg/ppc: Remove dead cases from tcg_target_op_def
  buildsys: Remove support for 32-bit PPC hosts
  tcg/mips: Remove ALIAS_PADD, ALIAS_PADDI
  tcg/mips: Remove support for 32-bit hosts
  tcg/mips: Remove support for O32 and N32 ABIs
  kvm/mips: Remove support for 32-bit hosts
  buildsys: Remove support for 32-bit MIPS hosts
  gitlab: Stop cross-testing for 32-bit MIPS hosts

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
13 days agotcg/ppc: Remove support for 32-bit hosts
Philippe Mathieu-Daudé [Tue, 14 Oct 2025 17:38:57 +0000 (19:38 +0200)] 
tcg/ppc: Remove support for 32-bit hosts

32-bit host support is deprecated since commit 6d701c9bac1
("meson: Deprecate 32-bit host support"), released as v10.0.
The next release being v10.2, we can remove the TCG backend
for 32-bit PPC hosts.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251014173900.87497-2-philmd@linaro.org>

13 days agotcg/ppc: Remove dead cases from tcg_target_op_def
Richard Henderson [Wed, 15 Oct 2025 18:55:33 +0000 (11:55 -0700)] 
tcg/ppc: Remove dead cases from tcg_target_op_def

Missed some lines when converting to TCGOutOpQemuLdSt*.

Fixes: 86fe5c2597c ("tcg: Convert qemu_st{2} to TCGOutOpLdSt{2}")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 weeks agoMerge tag 'pull-hex-20251017' of https://github.com/quic/qemu into staging
Richard Henderson [Fri, 17 Oct 2025 21:04:47 +0000 (14:04 -0700)] 
Merge tag 'pull-hex-20251017' of https://github.com/quic/qemu into staging

Fixes for linux-user sigcontext save/restore, etc.

misc: avoid inconsistencies w/indent on macOS
fix hexagon linux-user sigcontext discrepancy, found by Alex @ Zig

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEPWaq5HRZSCTIjOD4GlSvuOVkbDIFAmjyq24ACgkQGlSvuOVk
# bDIF9g/9FEllcwJFFOmyb+fsS0NkLFGRccCvowgjYCw5SaxC0+JBq58tWVkukCcK
# s+8eQ6TUfrgbxJziCoMWbP8UddMhNz9haUFGZ4wA8yq6Cxxmib092vdLj9YdfBdL
# TpMoXB1goWbPQ3EW2EyXr+Hsrlr/sb/hIrtSCvs2Xy1kRjc4xoAbHprgCz3C6oz4
# aiLJJy2uxWVDVEggWg7kSb2ZVmu/NrfReyv49kjEsuXiyHeQDBEDNYdRN5B6A9/F
# iznCSgTFBcDaV4UPaem6yEDuXCLucovmfLyvR+P6K/JtpOfX8nzWvk88j0WFeEmU
# kRZIpfR9un2GrndVeuxuoMGAZcha/LpajMr20OTfrKhJDPKp/kL5S3VqmBmZMsQx
# PjoBYFzBvg2FiMCQS1wQR4LGQ28/awz4ZnyeML02FRzDjmcFbZ0z5y4q1A9NnQEJ
# CZNnTjpUCdAVxymTnXCXVf/aS1T5v/iPWCu0BiebIlGP6/Eya364u60c0n/ABd1W
# bY3K1d2LZTYyi9dlT151pIOZ04S0k4E4g3jAyL578PfEpoJ7bXOmF8PL5DAAz1b8
# JRZjZLNXQlvNmcxTRs7wUzJlZ8AaudEZv5c+EnUcgLPcrBSMwvYdoXV7nyj+PKL1
# 3SwpRsgQimz7XtXAEUGmsSKUEIefF/yk/4laXHaGth3rMUDDi5U=
# =+ULY
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 17 Oct 2025 01:47:42 PM PDT
# gpg:                using RSA key 3D66AAE474594824C88CE0F81A54AFB8E5646C32
# gpg: Good signature from "Brian Cain (QUIC) <quic_bcain@quicinc.com>" [unknown]
# gpg:                 aka "Brian Cain <bcain@kernel.org>" [unknown]
# gpg:                 aka "Brian Cain (QuIC) <bcain@quicinc.com>" [unknown]
# gpg:                 aka "Brian Cain (CAF) <bcain@codeaurora.org>" [unknown]
# gpg:                 aka "bcain" [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: 6350 20F9 67A7 7164 79EF  49E0 175C 464E 541B 6D47
#      Subkey fingerprint: 3D66 AAE4 7459 4824 C88C  E0F8 1A54 AFB8 E564 6C32

* tag 'pull-hex-20251017' of https://github.com/quic/qemu:
  target/hexagon: Only indent on linux
  target/hexagon: Replace `prepare` script with meson target
  target/hexagon: s/pkt_has_store/pkt_has_scalar_store
  target/hexagon: handle .new values
  tests/tcg/hexagon: Add cs{0,1} coverage
  linux-user/hexagon: Use an array for GPRs
  linux-user/hexagon: use abi_ulong
  linux-user/hexagon: Fix sigcontext

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 weeks agotarget/hexagon: Only indent on linux
Anton Johansson [Wed, 2 Apr 2025 11:42:59 +0000 (13:42 +0200)] 
target/hexagon: Only indent on linux

indent on macOS, installed via homebrew, doesn't support -linux. Only
run indent on linux hosts.

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agotarget/hexagon: Replace `prepare` script with meson target
Anton Johansson [Wed, 2 Apr 2025 11:42:58 +0000 (13:42 +0200)] 
target/hexagon: Replace `prepare` script with meson target

The purpose of the prepare script is to invoke `cpp` to preprocess input
to idef-parser by expanding a few select macros.  On macOS `cpp`
expands into `clang ... -traditional-cpp` which breaks macro
concatenation.  Replace `cpp` with `${compiler} -E`
and replace the script with a meson custom_target.

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agotarget/hexagon: s/pkt_has_store/pkt_has_scalar_store
Brian Cain [Mon, 7 Apr 2025 19:27:04 +0000 (12:27 -0700)] 
target/hexagon: s/pkt_has_store/pkt_has_scalar_store

To remove any confusion with HVX or other potential store instructions,
we'll qualify this context var with "scalar".

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agotarget/hexagon: handle .new values
Brian Cain [Mon, 7 Apr 2025 19:27:01 +0000 (12:27 -0700)] 
target/hexagon: handle .new values

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agotests/tcg/hexagon: Add cs{0,1} coverage
Brian Cain [Wed, 8 Oct 2025 01:04:53 +0000 (20:04 -0500)] 
tests/tcg/hexagon: Add cs{0,1} coverage

Cover cs0,1 register corruption in the signal_context test case.

lc0, sa0 registers previously omitted from the clobbers list
are now captured.

Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agolinux-user/hexagon: Use an array for GPRs
Brian Cain [Wed, 8 Oct 2025 23:06:42 +0000 (18:06 -0500)] 
linux-user/hexagon: Use an array for GPRs

Link: https://lore.kernel.org/qemu-devel/023e01dc389c$faf84320$f0e8c960$@gmail.com/
Suggested-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agolinux-user/hexagon: use abi_ulong
Brian Cain [Wed, 8 Oct 2025 22:22:34 +0000 (17:22 -0500)] 
linux-user/hexagon: use abi_ulong

Change the user_regs_struct to use abi_ulong instead of
target_ulong.

Link: https://lore.kernel.org/qemu-devel/7bf3d8c5-df07-4cbd-ba62-4c7246a5f96b@linaro.org/
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agolinux-user/hexagon: Fix sigcontext
Brian Cain [Wed, 8 Oct 2025 00:22:32 +0000 (19:22 -0500)] 
linux-user/hexagon: Fix sigcontext

In order to correspond with the kernel, we've now (1) moved the
preds[] to the right offset and combined the representation as a single
ulong "p3_0", (2), added the cs{0,1} registers, (3) added a pad for 48
words, (4) added the user regs structure to an 8-byte aligned
target_sigcontext structure.

Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2 weeks agobuildsys: Remove support for 32-bit PPC hosts
Philippe Mathieu-Daudé [Tue, 14 Oct 2025 17:38:59 +0000 (19:38 +0200)] 
buildsys: Remove support for 32-bit PPC hosts

Stop detecting 32-bit PPC host as supported.
See previous commit for rationale.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[rth: Retain _ARCH_PPC64 check in udiv_qrnnd]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251014173900.87497-4-philmd@linaro.org>

2 weeks agotcg/mips: Remove ALIAS_PADD, ALIAS_PADDI
Richard Henderson [Wed, 15 Oct 2025 18:43:55 +0000 (11:43 -0700)] 
tcg/mips: Remove ALIAS_PADD, ALIAS_PADDI

These aliases existed to simplify code for O32 and N32.
Now that the 64-bit abi is the only one supported, we
can use the DADD* instructions directly.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 weeks agotcg/mips: Remove support for 32-bit hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:08 +0000 (21:52 +0200)] 
tcg/mips: Remove support for 32-bit hosts

32-bit host support is deprecated since commit 6d701c9bac1
("meson: Deprecate 32-bit host support"), released as v10.0.
The next release being v10.2, we can remove the TCG backend
for 32-bit MIPS hosts.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-6-philmd@linaro.org>

2 weeks agotcg/mips: Remove support for O32 and N32 ABIs
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:07 +0000 (21:52 +0200)] 
tcg/mips: Remove support for O32 and N32 ABIs

See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-5-philmd@linaro.org>

2 weeks agokvm/mips: Remove support for 32-bit hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:09 +0000 (21:52 +0200)] 
kvm/mips: Remove support for 32-bit hosts

See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-7-philmd@linaro.org>

2 weeks agobuildsys: Remove support for 32-bit MIPS hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:10 +0000 (21:52 +0200)] 
buildsys: Remove support for 32-bit MIPS hosts

Stop detecting 32-bit MIPS host as supported, update the
deprecation document. See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-8-philmd@linaro.org>

2 weeks agogitlab: Stop cross-testing for 32-bit MIPS hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:05 +0000 (21:52 +0200)] 
gitlab: Stop cross-testing for 32-bit MIPS hosts

32-bit host support is deprecated since commit 6d701c9bac1
("meson: Deprecate 32-bit host support"). Next commits will
remove support for 32-bit MIPS hosts. Stop cross-building
QEMU on our CI.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-3-philmd@linaro.org>

2 weeks agoMerge tag 'pull-request-2025-10-16' of https://gitlab.com/thuth/qemu into staging
Richard Henderson [Thu, 16 Oct 2025 19:27:12 +0000 (12:27 -0700)] 
Merge tag 'pull-request-2025-10-16' of https://gitlab.com/thuth/qemu into staging

* Improve cache handling for the msys2 CI and the functional asset cache
* Clean ups for some minor issues in functional tests
* Don't ignore errors of address_space_rw in s390x MMU code

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmjxHGwRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbUSDw//dSoNzE+qqJ2EWIfzHN/N7iDRf4OWQY6X
# 12S7zfcBt0W7RESf6JGy0h3cwDcyUxhB7UtC9rvT8cYPFhun+7T07H72/Se+95+a
# d3Yih1HHfYKYN6Zl3DAzUfSUvLBorYI76Ab5yeTs5nCg3ewK6IWPvMA9pS+4P2Pj
# iLY+ycflsGd36tHrJbR/G0cda5p6jaxDzpLh/d+D7hh3XoeS+PZv2xeknsDvJlOs
# ykIrrB+XJ8x81NxAFdA3PSeEh7VU5IzVv+t9hSJiBdi98/dAzwfQdH6bTekA8JL0
# pzfT4A5cwoIEHg5yCqsAllG6+sa6RaVzt6tDeRw4UKFeUP33zFXCoVurUygR1TP7
# Bs7E4E4HbXDgSWvd/UFNtE+4MdYicwP/1qBootnJXc4/v8cFEZBVdOlnsLXDmg1S
# qPr4ITAQDE3LEq4vXITKLmUIZehLG2K6N32XalnK9XrQD6Flcvr1BwDepFAP9Gku
# zmQMkeES1F2MhGMtxPwAxWIMfqsRtaPNWGqH4tSlnBYslwqPWwz+XLDGKlUsPpV/
# kXV/TKkeE/bb0DO7WoLFaw3Q5F+Mdj6C0B2cevKVGCurH4wGLRLaIhzGl8J6ZSDH
# Lve4Fc3BvMMO3CFYezaRQcEls+w4cXkOtSTZNwame1Wk7cUiqq+ElmFttYSl4FSC
# WKyZHtapq1U=
# =Ml5x
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 16 Oct 2025 09:25:16 AM PDT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [unknown]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [unknown]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2025-10-16' of https://gitlab.com/thuth/qemu:
  target/s390x/mmu_helper: Do not ignore address_space_rw() errors
  target/s390x/mmu_helper: Simplify s390_cpu_virt_mem_rw() logic
  tests/functional: ensure GDB client is stopped on error
  tests/functional: remove use of getLogger in reverse debuging
  tests/functional/alpha: Remove superfluous fetch() line from the clipper test
  tests: Evict stale files in the functional download cache after a while
  tests/functional: Set current time stamp of assets when using them
  gitlab: purge msys pacman cache
  tests/functional/aarch64: Drop some sbsaref_alpine tests
  python/qemu: Replace some remaining "avocados" with "functional tests"

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 weeks agoMerge tag 'single-binary-20251016' of https://github.com/philmd/qemu into staging
Richard Henderson [Thu, 16 Oct 2025 19:26:50 +0000 (12:26 -0700)] 
Merge tag 'single-binary-20251016' of https://github.com/philmd/qemu into staging

Various patches related to single binary work:

- Remove some VMSTATE_UINTTL() uses
- Replace target_ulong by vaddr / hwaddr / uint[32,64]_t
- Expand TCGv to TCGv_i32 for 32-bit targets
- Remove some unnecessary checks on TARGET_LONG_BITS
- Replace few HOST_BIG_ENDIAN preprocessor #ifdef by compile-time if() check
- Expand MO_TE to either MO_BE or MO_LE

Also:

- Remove legacy cpu_physical_memory_*() calls
- Fix HPPA FMPYADD opcode
- Unify Clément Mathieu--Drif email addresses

# -----BEGIN PGP SIGNATURE-----
#
# iQIyBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmjxCqIACgkQ4+MsLN6t
# wN5WLw/4yIeURXeqHkcys8bF6ysBFUlPvqJqz7+hmHEkQUI8NoOrcORCp82qxWVI
# FvVOPXhkNbEEh2qp7a2bDWDB0hs3xtX2NcR7d1Vh1cXfXHKwidJiXuhRvdsNKiFf
# SmZbXU/Hf212zANPqvPhrz+xR6IDeE5N1gcf6EI0C4peEp0UKwRPtalOnCApK5zo
# hZsp6Kmdbt8hd/jnlufPyeCClXCQaCxi4Ptv9F4+Ti1TcHv0xAP0xYkIBHeO8Z5r
# hxDk96IjJh6YxsH+bmjCdTsJtUiFbkvbkEP6jDkXCeQf9Q58sW8AG4wxVqcoVuHL
# QVT4BvUBSUFwArcgCCJNqjcsv5ZAtdZCXqHGcIQsz+Tr+I/VJ/LEKGtP7IoZNhcL
# 5aHpftT5ZUUgxd/rEkNe9wlJQIeX2w/RCAYWDcxz2ZG3CTv5FBzzwYG/r/akDhkm
# NrhBA99amKEKiS7oVuA9cd2tMbtQJiXxElOekgsTnU758RRzCT8WdYImoBeaGGMf
# Ahk/yaRxmWXR4rvucCNOhUGZkJICmrAvV9snypxiCD1tSuxXsuPY7pgSETkSTPFA
# xB3YFgz2ksw2zv/+Le1JBPjDixfN3CVouP5gR8XX8z9K6y7v87+bnZI0CCeayLao
# mRgeCHD1E0WBDsVV9yi9TnbzDF6SfNZP9XYcSHomrNt9qY0xcQ==
# =M9X9
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 16 Oct 2025 08:09:22 AM PDT
# 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 'single-binary-20251016' of https://github.com/philmd/qemu: (79 commits)
  mailmap: Unify Clément Mathieu--Drif emails
  linux-user/microblaze: Fix little-endianness binary
  target/xtensa: Remove target_ulong use in xtensa_get_tb_cpu_state()
  target/xtensa: Remove target_ulong use in xtensa_tr_translate_insn()
  target/xtensa: Replace legacy cpu_physical_memory_[un]map() calls
  target/tricore: Expand TCGv type for 32-bit target
  target/tricore: Un-inline various helpers
  target/tricore: Pass DisasContext as first argument
  target/tricore: Expand TCG helpers for 32-bit target
  target/tricore: Inline tcg_gen_ld32u_tl()
  target/tricore: Declare registers as TCGv_i32
  target/tricore: Replace target_ulong -> uint32_t in op_helper.c
  target/tricore: Remove unnecessary cast to target_ulong
  target/tricore: Remove target_ulong use in gen_addi_d()
  target/tricore: Remove target_ulong use in translate_insn() handler
  target/tricore: Replace target_ulong -> vaddr with tlb_fill() callees
  target/tricore: Remove target_ulong use in gen_goto_tb()
  target/sparc: Reduce inclusions of 'exec/cpu-common.h'
  target/sh4: Remove target_ulong use in gen_goto_tb()
  target/sh4: Use vaddr type for TLB virtual addresses
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 weeks agotarget/s390x/mmu_helper: Do not ignore address_space_rw() errors
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 14:14:09 +0000 (16:14 +0200)] 
target/s390x/mmu_helper: Do not ignore address_space_rw() errors

If a address_space_rw() call ever fails, break the loop and
return the PGM_ADDRESSING error (after triggering an access
exception).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251008141410.99865-3-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 weeks agotarget/s390x/mmu_helper: Simplify s390_cpu_virt_mem_rw() logic
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 14:14:08 +0000 (16:14 +0200)] 
target/s390x/mmu_helper: Simplify s390_cpu_virt_mem_rw() logic

In order to simplify the next commit, move the
trigger_access_exception() call after the address_space_rw()
calls. No logical change intended.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251008141410.99865-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 weeks agotests/functional: ensure GDB client is stopped on error
Daniel P. Berrangé [Tue, 14 Oct 2025 14:00:47 +0000 (15:00 +0100)] 
tests/functional: ensure GDB client is stopped on error

If the reverse_debugging_run method fails, the GDB client will not
be closed resulting in python complaining about resource leaks.
Hoisting the GDB client creation into the caller allows this to
be cleaned up easily. While doing this, also move the VM shutdown
call to match.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20251014140047.385347-3-berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 weeks agotests/functional: remove use of getLogger in reverse debuging
Daniel P. Berrangé [Tue, 14 Oct 2025 14:00:46 +0000 (15:00 +0100)] 
tests/functional: remove use of getLogger in reverse debuging

This fixes the gap left by

  commit 8a44d8c2ac0921c8064fbfd00ef28e3a2588918e
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Fri Sep 12 19:22:00 2025 +0100

    tests/functional: use self.log for all logging

ensuring that log message from the reverse debugging test actually
make it into the logfile on disk.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20251014140047.385347-2-berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 weeks agotests/functional/alpha: Remove superfluous fetch() line from the clipper test
Thomas Huth [Fri, 10 Oct 2025 14:45:25 +0000 (16:45 +0200)] 
tests/functional/alpha: Remove superfluous fetch() line from the clipper test

The kernel asset is retrieved automatically via the uncompress()
line below the fetch(), so the fetch() is simply not necessary here.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251010144525.842462-1-thuth@redhat.com>

2 weeks agotests: Evict stale files in the functional download cache after a while
Thomas Huth [Tue, 14 Oct 2025 08:34:24 +0000 (10:34 +0200)] 
tests: Evict stale files in the functional download cache after a while

The download cache of the functional tests is currently only growing.
But sometimes tests get removed or changed to use different assets,
thus we should clean up the stale old assets after a while when they
are not in use anymore. So add a script that looks at the time stamps
of the assets and removes them if they haven't been touched for more
than half of a year. Since there might also be some assets around that
have been added to the cache before we added the time stamp files,
assume a default time stamp that is close to the creation date of this
patch, so that we don't delete these files too early (so we still have
all assets around in case we have to bisect an issue in the recent past
of QEMU).

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251014083424.103202-3-thuth@redhat.com>

2 weeks agotests/functional: Set current time stamp of assets when using them
Thomas Huth [Tue, 14 Oct 2025 08:34:23 +0000 (10:34 +0200)] 
tests/functional: Set current time stamp of assets when using them

We are going to remove obsolete assets from the cache, so keep
the time stamps of the assets that we use up-to-date to have a way
to detect stale assets later.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251014083424.103202-2-thuth@redhat.com>

2 weeks agogitlab: purge msys pacman cache
Daniel P. Berrangé [Fri, 10 Oct 2025 16:05:45 +0000 (17:05 +0100)] 
gitlab: purge msys pacman cache

For the Windows msys2 CI job we install many packages using pacman
and use the GitLab cache to preserve the pacman cache across CI
runs. While metadata still needs downloading, this avoids pacman
re-downloading packages from msys2 if they have not changed.

The problem is that pacman never automatically purges anything
from its package cache. Thus the GitLab cache is growing without
bound and packing/unpacking the cache is consuming an increasing
amount of time in the CI job.

If we run 'pacman -Sc' /after/ installing our desired package set,
it will purge any cached downloaded packages that are not matching
any installed package.

This will (currently) cap the pacman download cache at approx
256 MB.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20251010160545.144760-1-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 weeks agotests/functional/aarch64: Drop some sbsaref_alpine tests
Thomas Huth [Mon, 6 Oct 2025 16:18:50 +0000 (18:18 +0200)] 
tests/functional/aarch64: Drop some sbsaref_alpine tests

test_sbsaref_alpine is one of the longest running test in our testsuite,
because it does a full Linux boot a couple of times, for various different
CPU configurations. That's quite a lot of testing each time, for a rather
small additional test coverage. Thus let's drop some of the tests that don't
provide much in addition to the other ones.

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251006161850.181998-1-thuth@redhat.com>

2 weeks agopython/qemu: Replace some remaining "avocados" with "functional tests"
Thomas Huth [Wed, 8 Oct 2025 13:19:36 +0000 (15:19 +0200)] 
python/qemu: Replace some remaining "avocados" with "functional tests"

The avocado tests have been replaced by the new functional tests,
so also update this in the README.rst files in the python directory
accordingly.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251008131936.71160-1-thuth@redhat.com>

2 weeks agomailmap: Unify Clément Mathieu--Drif emails
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 10:38:19 +0000 (12:38 +0200)] 
mailmap: Unify Clément Mathieu--Drif emails

Do not let git-shortlog make distinction between:

 . Clément Mathieu--Drif
 . Clement Mathieu--Drif
 . CLEMENT MATHIEU--DRIF

as this is the same person.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20251009070512.8736-3-philmd@linaro.org>

2 weeks agolinux-user/microblaze: Fix little-endianness binary
Philippe Mathieu-Daudé [Mon, 6 Oct 2025 15:36:31 +0000 (17:36 +0200)] 
linux-user/microblaze: Fix little-endianness binary

MicroBlaze CPU model has a "little-endian" property, pointing to
the @endi internal field. Commit c36ec3a9655 ("hw/microblaze:
Explicit CPU endianness") took care of having all MicroBlaze
boards with an explicit default endianness, so later commit
415aae543ed ("target/microblaze: Consider endianness while
translating code") could infer the endianness at runtime from
the @endi field, and not a compile time via the TARGET_BIG_ENDIAN
definition. Doing so, we forgot to make the endianness explicit
on user emulation, so there all CPUs are started with the default
"little-endian=off" value, leading to breaking support for little
endian binaries:

  $ readelf -h ./hello-world-mbel
  ELF Header:
    Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
    Class:                             ELF32
    Data:                              2's complement, little endian

  $ qemu-microblazeel ./hello-world-mbel
  qemu: uncaught target signal 11 (Segmentation fault) - core dumped
  Segmentation fault (core dumped)

Fix by restoring the previous behavior of starting with the
builtin endianness of the binary:

  $ qemu-microblazeel ./hello-world-mbel
  Hello World

Cc: qemu-stable@nongnu.org
Fixes: 415aae543ed ("target/microblaze: Consider endianness while translating code")
Reported-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Message-Id: <20251006173350.17455-1-philmd@linaro.org>

2 weeks agotarget/xtensa: Remove target_ulong use in xtensa_get_tb_cpu_state()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:26:50 +0000 (06:26 +0200)] 
target/xtensa: Remove target_ulong use in xtensa_get_tb_cpu_state()

Since commit bb5de52524c ("target: Widen pc/cs_base in
cpu_get_tb_cpu_state"), cpu_get_tb_cpu_state() expects
a uint64_t type for cs_base.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008051529.86378-3-philmd@linaro.org>

2 weeks agotarget/xtensa: Remove target_ulong use in xtensa_tr_translate_insn()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:28:10 +0000 (06:28 +0200)] 
target/xtensa: Remove target_ulong use in xtensa_tr_translate_insn()

Since commit 85c19af63e7 ("include/exec: Use vaddr in DisasContextBase
for virtual addresses") the DisasContextBase::pc_first field is a
vaddr type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008051529.86378-2-philmd@linaro.org>

2 weeks agotarget/xtensa: Replace legacy cpu_physical_memory_[un]map() calls
Philippe Mathieu-Daudé [Wed, 1 Oct 2025 10:08:31 +0000 (12:08 +0200)] 
target/xtensa: Replace legacy cpu_physical_memory_[un]map() calls

Commit b7ecba0f6f6 ("docs/devel/loads-stores.rst: Document our
various load and store APIs") mentioned cpu_physical_memory_*()
methods are legacy, the replacement being address_space_*().

Replace the *_map() / *_unmap() methods in the SIMCALL helper,
using the vCPU default address space. No behavioral change expected.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20251002145742.75624-6-philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2 weeks agotarget/tricore: Expand TCGv type for 32-bit target
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:59:37 +0000 (05:59 +0200)] 
target/tricore: Expand TCGv type for 32-bit target

The TriCore target is only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/tricore-*
  configs/targets/tricore-softmmu.mak:2:TARGET_LONG_BITS=32

Replace:

  TCGv -> TCGv_i32
  tcg_temp_new -> tcg_temp_new_i32

This is a mechanical replacement, adapting style to pass
the checkpatch.pl script.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-13-philmd@linaro.org>

2 weeks agotarget/tricore: Un-inline various helpers
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 04:15:47 +0000 (06:15 +0200)] 
target/tricore: Un-inline various helpers

Rely on the linker to optimize at linking time.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-12-philmd@linaro.org>

2 weeks agotarget/tricore: Pass DisasContext as first argument
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 04:01:38 +0000 (06:01 +0200)] 
target/tricore: Pass DisasContext as first argument

Unify style, always pass DisasContext as the first argument.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-11-philmd@linaro.org>

2 weeks agotarget/tricore: Expand TCG helpers for 32-bit target
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:29:17 +0000 (05:29 +0200)] 
target/tricore: Expand TCG helpers for 32-bit target

The TriCore target is only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/tricore-*
  configs/targets/tricore-softmmu.mak:2:TARGET_LONG_BITS=32

Therefore tcg_FOO_tl() always expands to tcg_FOO_i32().

This is a mechanical replacement.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-10-philmd@linaro.org>

2 weeks agotarget/tricore: Inline tcg_gen_ld32u_tl()
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:27:59 +0000 (05:27 +0200)] 
target/tricore: Inline tcg_gen_ld32u_tl()

The TriCore target is only built as 32-bit, so tcg_gen_ld32u_tl()
expands to tcg_gen_ld_i32(). Use the latter to simplify the next
commit mechanical change.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-9-philmd@linaro.org>

2 weeks agotarget/tricore: Declare registers as TCGv_i32
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:26:56 +0000 (05:26 +0200)] 
target/tricore: Declare registers as TCGv_i32

CPUTriCoreState register are declared as uint32_t since the
target introduction in commit 48e06fe0ed8 ("target-tricore:
Add target stubs and qom-cpu").

Mechanical replacement of:

  TCGv -> TCGv_i32
  tcg_temp_new -> tcg_temp_new_i32

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-8-philmd@linaro.org>

2 weeks agotarget/tricore: Replace target_ulong -> uint32_t in op_helper.c
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:55:41 +0000 (05:55 +0200)] 
target/tricore: Replace target_ulong -> uint32_t in op_helper.c

The TriCore target is only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/tricore-*
  configs/targets/tricore-softmmu.mak:2:TARGET_LONG_BITS=32

Therefore target_ulong type always expands to uint32_t.

This is a mechanical replacement.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-7-philmd@linaro.org>

2 weeks agotarget/tricore: Remove unnecessary cast to target_ulong
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:48:50 +0000 (05:48 +0200)] 
target/tricore: Remove unnecessary cast to target_ulong

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-6-philmd@linaro.org>

2 weeks agotarget/tricore: Remove target_ulong use in gen_addi_d()
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:47:05 +0000 (05:47 +0200)] 
target/tricore: Remove target_ulong use in gen_addi_d()

Callers pass either int32_t or int16_t.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-5-philmd@linaro.org>

2 weeks agotarget/tricore: Remove target_ulong use in translate_insn() handler
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:44:01 +0000 (05:44 +0200)] 
target/tricore: Remove target_ulong use in translate_insn() handler

Since commit 85c19af63e7 ("include/exec: Use vaddr in DisasContextBase
for virtual addresses") the DisasContextBase::pc_first field is a
vaddr type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-4-philmd@linaro.org>

2 weeks agotarget/tricore: Replace target_ulong -> vaddr with tlb_fill() callees
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:23:57 +0000 (05:23 +0200)] 
target/tricore: Replace target_ulong -> vaddr with tlb_fill() callees

tlb_fill() provides a vaddr type since commit 68d6eee73c
("target/tricore: Convert to CPUClass::tlb_fill").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-3-philmd@linaro.org>

2 weeks agotarget/tricore: Remove target_ulong use in gen_goto_tb()
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:19:33 +0000 (05:19 +0200)] 
target/tricore: Remove target_ulong use in gen_goto_tb()

translator_use_goto_tb() expects a vaddr type since commit
b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in
translator_*()").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-2-philmd@linaro.org>

2 weeks agotarget/sparc: Reduce inclusions of 'exec/cpu-common.h'
Philippe Mathieu-Daudé [Wed, 1 Oct 2025 14:13:32 +0000 (16:13 +0200)] 
target/sparc: Reduce inclusions of 'exec/cpu-common.h'

Only 2 files require declarations from "exec/cpu-common.h".
Include it there once, instead than polluting all files
including "cpu.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20251002145742.75624-7-philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2 weeks agotarget/sh4: Remove target_ulong use in gen_goto_tb()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:22:58 +0000 (08:22 +0200)] 
target/sh4: Remove target_ulong use in gen_goto_tb()

translator_use_goto_tb() expects a vaddr type since commit
b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in
translator_*()").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008064814.90520-7-philmd@linaro.org>

2 weeks agotarget/sh4: Use vaddr type for TLB virtual addresses
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:30:09 +0000 (08:30 +0200)] 
target/sh4: Use vaddr type for TLB virtual addresses

tlb_flush_page() expects a vaddr type since commit 732d548732e
("accel: Replace target_ulong in tlb_*()").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008064814.90520-6-philmd@linaro.org>

2 weeks agotarget/sh4: Remove target_ulong uses in superh_cpu_get_phys_page_debug
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:32:47 +0000 (08:32 +0200)] 
target/sh4: Remove target_ulong uses in superh_cpu_get_phys_page_debug

The CPUClass::get_phys_page_debug() handler takes a 'vaddr' address
type since commit 00b941e581b ("cpu: Turn cpu_get_phys_page_debug()
into a CPUClass hook").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008064814.90520-5-philmd@linaro.org>

2 weeks agotarget/sh4: Use hwaddr type for hardware addresses
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:28:13 +0000 (08:28 +0200)] 
target/sh4: Use hwaddr type for hardware addresses

The CPUClass::get_phys_page_debug() handler returns a 'hwaddr' type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008064814.90520-4-philmd@linaro.org>

2 weeks agotarget/sh4: Remove target_ulong use in cpu_sh4_is_cached()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:24:13 +0000 (08:24 +0200)] 
target/sh4: Remove target_ulong use in cpu_sh4_is_cached()

Since commit 852d481faf7 ("SH: Improve movca.l/ocbi emulation")
helper_movcal() pass a uint32_t type to cpu_sh4_is_cached().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008064814.90520-3-philmd@linaro.org>

2 weeks agotarget/sh4: Convert CPUSH4State::sr register to uint32_t type
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:34:14 +0000 (08:34 +0200)] 
target/sh4: Convert CPUSH4State::sr register to uint32_t type

Since its introduction in commit fdf9b3e831e the %SR register
is a uint32_t type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008064814.90520-2-philmd@linaro.org>

2 weeks agotarget/s390x: Replace HOST_BIG_ENDIAN #ifdef with if() check
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 12:46:49 +0000 (14:46 +0200)] 
target/s390x: Replace HOST_BIG_ENDIAN #ifdef with if() check

Replace preprocessor-time #ifdef with a compile-time check
to ensure all code paths are built and tested. This reduces
build-time configuration complexity and simplifies code
maintainability.

No functional change intended.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20251010134226.72221-15-philmd@linaro.org>

2 weeks agotarget/rx: Un-inline various helpers
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:56:54 +0000 (21:56 +0200)] 
target/rx: Un-inline various helpers

Rely on the linker to optimize at linking time.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009200012.33650-1-philmd@linaro.org>

2 weeks agotarget/rx: Expand TCG register definitions for 32-bit target
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:57:11 +0000 (16:57 +0200)] 
target/rx: Expand TCG register definitions for 32-bit target

The RX target is only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/rx-*
  configs/targets/rx-softmmu.mak:5:TARGET_LONG_BITS=32

Therefore target_ulong always expands to uint32_t.

Replace and adapt the API uses mechanically:

  TCGv -> TCGv_i32
  tcg_temp_new -> tcg_temp_new_i32

There is no functional change.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-9-philmd@linaro.org>

2 weeks agotarget/rx: Replace MO_TE -> MO_LE
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:55:50 +0000 (16:55 +0200)] 
target/rx: Replace MO_TE -> MO_LE

We only build the RX targets using little endianness order:

  $ git grep TARGET_BIG_ENDIAN configs/targets/rx-*
  $

Therefore the MO_TE definition always expands to MO_LE.
Use the latter to simplify.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-8-philmd@linaro.org>

2 weeks agotarget/rx: Factor mo_endian() helper out
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:55:33 +0000 (16:55 +0200)] 
target/rx: Factor mo_endian() helper out

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-7-philmd@linaro.org>

2 weeks agotarget/rx: Propagate DisasContext to gen_ld[u]() and gen_st()
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:55:19 +0000 (16:55 +0200)] 
target/rx: Propagate DisasContext to gen_ld[u]() and gen_st()

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-6-philmd@linaro.org>

2 weeks agotarget/rx: Propagate DisasContext to push() / pop()
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:53:50 +0000 (16:53 +0200)] 
target/rx: Propagate DisasContext to push() / pop()

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-5-philmd@linaro.org>

2 weeks agotarget/rx: Propagate DisasContext to generated helpers
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:52:39 +0000 (16:52 +0200)] 
target/rx: Propagate DisasContext to generated helpers

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-4-philmd@linaro.org>

2 weeks agotarget/rx: Use MemOp type in gen_ld[u]() and gen_st()
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:54:35 +0000 (16:54 +0200)] 
target/rx: Use MemOp type in gen_ld[u]() and gen_st()

The @size argument is of MemOp type. All callers respect that.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-3-philmd@linaro.org>

2 weeks agotarget/rx: Replace target_ulong -> vaddr for translator API uses
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 14:58:54 +0000 (16:58 +0200)] 
target/rx: Replace target_ulong -> vaddr for translator API uses

Since commit b1c09220b4c ("accel/tcg: Replace target_ulong with
vaddr in translator_*()") the API takes vaddr argument, not
target_ulong. Update the 2 callers.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009151607.26278-2-philmd@linaro.org>

2 weeks agotarget/riscv: Replace HOST_BIG_ENDIAN #ifdef with if() check
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 12:46:36 +0000 (14:46 +0200)] 
target/riscv: Replace HOST_BIG_ENDIAN #ifdef with if() check

Replace preprocessor-time #ifdef with a compile-time check
to ensure all code paths are built and tested. This reduces
build-time configuration complexity and simplifies code
maintainability.

No functional change intended.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20251010134226.72221-14-philmd@linaro.org>

2 weeks agotarget/riscv: Use 32 bits for misa extensions
Anton Johansson [Wed, 1 Oct 2025 07:32:34 +0000 (09:32 +0200)] 
target/riscv: Use 32 bits for misa extensions

uint32_t is already in use in most places storing misa extensions such
as CPUArchState::misa_exts, RISCVCPUProfile::misa_exts,
RISCVImpliedExtsRule::implied_misa_exts.  Additionally. the field is
already migrated as uint32_t.

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20251001073306.28573-2-anjo@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2 weeks agotarget/riscv/monitor: Replace legacy cpu_physical_memory_read() call
Philippe Mathieu-Daudé [Thu, 2 Oct 2025 03:09:23 +0000 (05:09 +0200)] 
target/riscv/monitor: Replace legacy cpu_physical_memory_read() call

Commit b7ecba0f6f6 ("docs/devel/loads-stores.rst: Document our
various load and store APIs") mentioned cpu_physical_memory_*()
methods are legacy, the replacement being address_space_*().

Propagate the address space to walk_pte(), then replace the
cpu_physical_memory_read() by address_space_read(). Since the
monitor command are run with a vCPU context, use its default
address space. As with the previous implementation, ignore
whether the memory read succeeded or failed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20251002145742.75624-5-philmd@linaro.org>

2 weeks agotarget/riscv/kvm: Replace legacy cpu_physical_memory_read/write() calls
Philippe Mathieu-Daudé [Wed, 1 Oct 2025 08:53:07 +0000 (10:53 +0200)] 
target/riscv/kvm: Replace legacy cpu_physical_memory_read/write() calls

Commit b7ecba0f6f6 ("docs/devel/loads-stores.rst: Document our
various load and store APIs") mentioned cpu_physical_memory_*()
methods are legacy, the replacement being address_space_*().

Since the SBI DBCN is handled within a vCPU context, use its
default address space. Replace using the address space API.
As with the previous implementation, ignore whether the memory
accesses succeeded or failed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20251002145742.75624-4-philmd@linaro.org>

2 weeks agotarget/openrisc: Replace target_ulong -> uint32_t
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 07:59:05 +0000 (09:59 +0200)] 
target/openrisc: Replace target_ulong -> uint32_t

The OpenRISC targets are only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/or1k-*
  configs/targets/or1k-linux-user.mak:5:TARGET_LONG_BITS=32
  configs/targets/or1k-softmmu.mak:5:TARGET_LONG_BITS=32

Therefore target_ulong always expands to uint32_t. Replace and
adapt the API uses mechanically:

  target_ulong -> uint32_t
  target_long -> int32_t
  tl -> i32
  TCGv -> TCGv_i32
  tcg_temp_new -> tcg_temp_new_i32
  tcg_global_mem_new -> tcg_global_mem_new_i32
  VMSTATE_UINTTL -> VMSTATE_UINT32

There is no functional change (the migration stream is not modified).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-14-philmd@linaro.org>

2 weeks agotarget/openrisc: Inline tcg_gen_trunc_i64_tl()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 07:32:05 +0000 (09:32 +0200)] 
target/openrisc: Inline tcg_gen_trunc_i64_tl()

The OpenRISC targets are only built as 32-bit, so tcg_gen_trunc_i64_tl
expands to tcg_gen_extrl_i64_i32(). Use the latter to simplify the
next commit mechanical change.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-13-philmd@linaro.org>

2 weeks agotarget/openrisc: Replace MO_TE -> MO_BE
Philippe Mathieu-Daudé [Wed, 12 Mar 2025 09:27:08 +0000 (10:27 +0100)] 
target/openrisc: Replace MO_TE -> MO_BE

We only build the OpenRISC targets using big endianness order:

  $ git grep TARGET_BIG_ENDIAN configs/targets/or1k-*
  configs/targets/or1k-linux-user.mak:2:TARGET_BIG_ENDIAN=y
  configs/targets/or1k-softmmu.mak:2:TARGET_BIG_ENDIAN=y

Therefore the MO_TE definition always expands to MO_BE. Use the
latter to simplify.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-12-philmd@linaro.org>

2 weeks agotarget/openrisc: Introduce mo_endian() helper
Philippe Mathieu-Daudé [Wed, 12 Mar 2025 09:25:49 +0000 (10:25 +0100)] 
target/openrisc: Introduce mo_endian() helper

mo_endian() returns the target endianness.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-11-philmd@linaro.org>

2 weeks agotarget/openrisc: Conceal MO_TE within do_store()
Philippe Mathieu-Daudé [Wed, 12 Mar 2025 09:23:46 +0000 (10:23 +0100)] 
target/openrisc: Conceal MO_TE within do_store()

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-10-philmd@linaro.org>

2 weeks agotarget/openrisc: Conceal MO_TE within do_load()
Philippe Mathieu-Daudé [Wed, 12 Mar 2025 09:23:46 +0000 (10:23 +0100)] 
target/openrisc: Conceal MO_TE within do_load()

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-9-philmd@linaro.org>

2 weeks agotarget/openrisc: Explode MO_TExx -> MO_TE | MO_xx
Philippe Mathieu-Daudé [Wed, 12 Mar 2025 09:19:50 +0000 (10:19 +0100)] 
target/openrisc: Explode MO_TExx -> MO_TE | MO_xx

Extract the implicit MO_TE definition in order to replace
it in the next commit.

Mechanical change using:

  $ for n in UW UL UQ UO SW SL SQ; do \
      sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \
           $(git grep -l MO_TE$n target/openrisc); \
    done

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-8-philmd@linaro.org>

2 weeks agotarget/openrisc: Remove 'TARGET_LONG_BITS != 32' dead code
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 08:11:59 +0000 (10:11 +0200)] 
target/openrisc: Remove 'TARGET_LONG_BITS != 32' dead code

The OpenRISC targets are only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/or1k-*
  configs/targets/or1k-linux-user.mak:5:TARGET_LONG_BITS=32
  configs/targets/or1k-softmmu.mak:5:TARGET_LONG_BITS=32

Remove the dead code guarded within TARGET_LONG_BITS != 32.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-7-philmd@linaro.org>

2 weeks agotarget/openrisc: Use vaddr type for $pc jumps
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 07:06:52 +0000 (09:06 +0200)] 
target/openrisc: Use vaddr type for $pc jumps

translator_use_goto_tb() expects a vaddr type since commit
b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in
translator_*()").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-6-philmd@linaro.org>

2 weeks agotarget/openrisc: Remove target_ulong use in raise_mmu_exception()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 07:06:25 +0000 (09:06 +0200)] 
target/openrisc: Remove target_ulong use in raise_mmu_exception()

TCGCPUOps::tlb_fill() handler provides a vaddr type (since commit
7510454e3e7 "cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook").

Do not inline get_phys_nommu(), rely on the linker to optimize at
linking time.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-5-philmd@linaro.org>

2 weeks agotarget/openrisc: Remove unused cpu_openrisc_map_address_*() handlers
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 07:06:05 +0000 (09:06 +0200)] 
target/openrisc: Remove unused cpu_openrisc_map_address_*() handlers

Commit 23d45ebdb19 ("target/openrisc: Remove indirect
function calls for mmu") removed the last uses of both
cpu_openrisc_map_address_code() and
cpu_openrisc_map_address_data() helpers.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-4-philmd@linaro.org>

2 weeks agotarget/openrisc: Do not use target_ulong for @mr in MTSPR helper
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 07:14:15 +0000 (09:14 +0200)] 
target/openrisc: Do not use target_ulong for @mr in MTSPR helper

OpenRISCTLBEntry::@mr field is a uint32_t type since its
introduction in commit 726fe045720 ("target-or32: Add MMU support").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-3-philmd@linaro.org>

2 weeks agotarget/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32()
Philippe Mathieu-Daudé [Thu, 25 Sep 2025 00:46:47 +0000 (02:46 +0200)] 
target/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32()

Both OpenRISCTLBEntry fields are of uint32_t type. Use the
appropriate VMSTATE_UINT32() macro.

There is no functional change (the migration stream is not
modified), because the OpenRISC targets are only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/or1k-*
  configs/targets/or1k-linux-user.mak:5:TARGET_LONG_BITS=32
  configs/targets/or1k-softmmu.mak:5:TARGET_LONG_BITS=32

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-2-philmd@linaro.org>

2 weeks agotarget/microblaze: Convert CPUMBState::res_addr field to uint32_t type
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:58:51 +0000 (06:58 +0200)] 
target/microblaze: Convert CPUMBState::res_addr field to uint32_t type

CPUMBState::@res_addr field is used as u32 since commit
cfeea807e5a ("target-microblaze: Tighten up TCGv_i32 vs
TCGv type usage"). Convert it as such, bumping the migration
version. Use the RES_ADDR_NONE definition when appropriate.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251015180115.97493-8-philmd@linaro.org>

2 weeks agotarget/microblaze: Have do_load/store() take a TCGv_i32 address argument
Philippe Mathieu-Daudé [Wed, 15 Oct 2025 17:34:49 +0000 (19:34 +0200)] 
target/microblaze: Have do_load/store() take a TCGv_i32 address argument

All callers of do_load() and do_store() pass a TCGv_i32 address
type, have both functions take a TCGv_i32.

Suggested-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251015180115.97493-7-philmd@linaro.org>

2 weeks agotarget/microblaze: Have compute_ldst_addr_type[ab] return TCGv_i32
Philippe Mathieu-Daudé [Wed, 15 Oct 2025 17:33:39 +0000 (19:33 +0200)] 
target/microblaze: Have compute_ldst_addr_type[ab] return TCGv_i32

Both compute_ldst_addr_typea() and compute_ldst_addr_typeb()
bodies use a TCGv_i32, so return the same type.

Suggested-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251015180115.97493-6-philmd@linaro.org>

2 weeks agotarget/microblaze: Remove target_ulong use in helper_stackprot()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:56:49 +0000 (06:56 +0200)] 
target/microblaze: Remove target_ulong use in helper_stackprot()

Since commit 36a9529e60e ("target/microblaze: Simplify
compute_ldst_addr_type{a,b}"), helper_stackprot() takes
a TCGv_i32 argument.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251015180115.97493-5-philmd@linaro.org>

2 weeks agotarget/microblaze: Remove target_ulong use in gen_goto_tb()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:42:24 +0000 (06:42 +0200)] 
target/microblaze: Remove target_ulong use in gen_goto_tb()

translator_use_goto_tb() expects a vaddr type since commit
b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in
translator_*()").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251015180115.97493-4-philmd@linaro.org>

2 weeks agotarget/microblaze: Remove target_ulong uses in get_phys_page_attrs_debug
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:36:32 +0000 (06:36 +0200)] 
target/microblaze: Remove target_ulong uses in get_phys_page_attrs_debug

The CPUClass::get_phys_page_debug() handler takes a 'vaddr' address
and return a 'hwaddr' type since commit 00b941e581b ("cpu: Turn
cpu_get_phys_page_debug() into a CPUClass hook").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251015180115.97493-3-philmd@linaro.org>

2 weeks agotarget/microblaze: Remove target_ulong use in cpu_handle_mmu_fault()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:35:19 +0000 (06:35 +0200)] 
target/microblaze: Remove target_ulong use in cpu_handle_mmu_fault()

cpu_handle_mmu_fault() -- renamed in commit f429d607c71 -- expects
a vaddr type for its address argument since commit 7510454e3e7
("cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251015180115.97493-2-philmd@linaro.org>

2 weeks agotarget/m68k: Remove pointless @cpu_halted TCGv
Philippe Mathieu-Daudé [Tue, 26 Aug 2025 04:42:05 +0000 (06:42 +0200)] 
target/m68k: Remove pointless @cpu_halted TCGv

Avoid registering a TCGv to write the generic CPUState::halted
field. Access it directly via @env in both STOP / HALT opcodes.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250925012454.60602-1-philmd@linaro.org>

2 weeks agotarget/m68k: Remove unused @cpu_exception_index TCGv
Philippe Mathieu-Daudé [Tue, 26 Aug 2025 04:43:19 +0000 (06:43 +0200)] 
target/m68k: Remove unused @cpu_exception_index TCGv

When moving the @exception_index from each target ArchCPU
to the global CPUState in commit 27103424c40 ("cpu: Move
exception_index field from CPU_COMMON to CPUState"), the
@cpu_exception_index TCGv has been created for m68k target.

For years, no code ever used this register. Simply remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250924171308.53036-1-philmd@linaro.org>

2 weeks agotarget/loongarch: Do not use target_ulong type for LDDIR level
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:15:13 +0000 (08:15 +0200)] 
target/loongarch: Do not use target_ulong type for LDDIR level

The LDDIR level page table is a 5-bit immediate. Using the
uint32_t type for it is sufficient. Avoid the target_ulong type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20251009201947.34643-5-philmd@linaro.org>

2 weeks agotarget/loongarch: Remove target_ulong use in gdb_write_register handler
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:15:23 +0000 (08:15 +0200)] 
target/loongarch: Remove target_ulong use in gdb_write_register handler

ldq_le_p() returns a uint64_t type, big enough to also hold
ldl_le_p() return value. If we were building for a 32-bit
LoongArch target, ldq_le_p() would not fit in target_ulong.
Better stick to plain uint64_t.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20251009201947.34643-4-philmd@linaro.org>

2 weeks agotarget/loongarch: Remove target_ulong use in gen_goto_tb()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 06:14:50 +0000 (08:14 +0200)] 
target/loongarch: Remove target_ulong use in gen_goto_tb()

translator_use_goto_tb() expects a vaddr type since commit
b1c09220b4c ("accel/tcg: Replace target_ulong with vaddr in
translator*()").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20251009201947.34643-3-philmd@linaro.org>

2 weeks agotarget/loongarch: Replace VMSTATE_UINTTL() -> VMSTATE_UINT64()
Philippe Mathieu-Daudé [Thu, 25 Sep 2025 00:39:45 +0000 (02:39 +0200)] 
target/loongarch: Replace VMSTATE_UINTTL() -> VMSTATE_UINT64()

All LoongArchCPU::pc and LoongArchCPU::gpr[] fields are of
uint64_t type. Use the appropriate VMSTATE_UINT64() macro.

There is no functional change (the migration stream is not
modified), because the LoongArch targets are only built as 64-bit:

  $ git grep TARGET_LONG_BITS configs/targets/loongarch64*
  configs/targets/loongarch64-linux-user.mak:7:TARGET_LONG_BITS=64
  configs/targets/loongarch64-softmmu.mak:7:TARGET_LONG_BITS=64

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20250925004327.58764-1-philmd@linaro.org>

2 weeks agotarget/hppa: correct size bit parity for fmpyadd
Gabriel Brookman [Thu, 9 Oct 2025 20:51:11 +0000 (16:51 -0400)] 
target/hppa: correct size bit parity for fmpyadd

For the fmpyadd instruction on the hppa architecture, there is a bit
used to specify whether the instruction is operating on a 32 bit or
64 bit floating point register. For most instructions, such a bit is 0
when operating on the smaller register and 1 when operating on the
larger register. However, according to page 6-57 of the PA-RISC 1.1
Architecture and Instruction Set Reference Manual, this convention is
reversed for the fmpyadd instruction specifically, meaning the bit is
1 for operations on 32 bit registers and 0 for 64 bit registers. See
also page 6-18 (fig. 6-8) and 6-19 (table 6-16), where the f field
for FMPYADD and FMPYSUB is documented. Previously, QEMU decoded this
operation as operating on the other size of register, leading to bugs
when translating the fmpyadd instruction. This patch fixes that issue.

Reported-by: Andreas Hüttel <andreas.huettel@ur.de>
Signed-off-by: Gabriel Brookman <brookmangabriel@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3096
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Helge Deller <deller@gmx.de>
Message-ID: <20251009-hppa-correct-fmpyadd-size-bit-decoding-v1-1-f63bb6c3290c@gmail.com>
[PMD: Add documentation refs mentioned by Andreas K. Huettel]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2 weeks agotarget/hppa: Replace MO_TE -> MO_BE
Philippe Mathieu-Daudé [Mon, 17 Mar 2025 13:31:49 +0000 (14:31 +0100)] 
target/hppa: Replace MO_TE -> MO_BE

We only build the PA-RISC targets using big endianness order:

  $ git grep TARGET_BIG_ENDIAN configs/targets/hppa-*
  configs/targets/hppa-linux-user.mak:5:TARGET_BIG_ENDIAN=y
  configs/targets/hppa-softmmu.mak:2:TARGET_BIG_ENDIAN=y

Therefore the MO_TE definition always expands to MO_BE. Use the
latter to simplify.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009101040.18378-10-philmd@linaro.org>

2 weeks agotarget/hppa: Introduce mo_endian() helper
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 09:45:27 +0000 (11:45 +0200)] 
target/hppa: Introduce mo_endian() helper

mo_endian() returns the target endianness.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009101040.18378-9-philmd@linaro.org>

2 weeks agotarget/hppa: Conceal MO_TE within do_store_32/64()
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 09:30:04 +0000 (11:30 +0200)] 
target/hppa: Conceal MO_TE within do_store_32/64()

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009101040.18378-8-philmd@linaro.org>

2 weeks agotarget/hppa: Conceal MO_TE within do_store()
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 09:28:14 +0000 (11:28 +0200)] 
target/hppa: Conceal MO_TE within do_store()

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251009101040.18378-7-philmd@linaro.org>