134660 Commits
Author SHA1 Message Date
Richard Henderson 594bf10d18 Merge tag 'pull-11.2-gdbstub-kvm-231026-1' of https://gitlab.com/stsquad/qemu into staging
testing updates (tcg, gdbstub):

  - make sure we have TCG to run test_acpi_bits
  - fix overflow in linux-sigrtminmax
  - make .dir-locals aware of PYTHONPATH
  - detect gdb in top-level meson
  - fetch kernel assets with symbols for x86, aarch64 and s390 tuxruns
  - use arrays in gdb run-test to make quoting less messy
  - add support for --symbols and --kargs to gdbstub run-test.py
  - restore old kvm gdb test script with a few fixes
  - add tuxrun_kvm_gdb tests for x86,aarch64 and s390

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmrbjRYACgkQ+9DbCVqe
# KkTtGwf/eDJawSsUD6rDYuNEegv5buJVlE5Vkh8EUUSbrr56xstPlclLXZQbXZKN
# gGxw7RGpoZZMUN/RGRbV001E6HhsUhWjkSDFGOH21MkQUj9OPVlroPhFPo+m0Xvb
# ppXSRvK09tXlM7YKFS8GWOT5sYzsHl/b5nbI2UONlLDmLl0futFlVeTMQ/qptR7t
# EKzsi86O6iEb69TuFlypZnIf++NsXYhcgSf/3pWGzLDBcstM+PDqHQn5Y+TTZUS3
# S56sCr6ihLNPRZl3ynkQvFArln3lO8I/K6RlOssRtUZ9QKV0oQ2aZDvMIqBytxBe
# sfBhrL/KrLgL8Uw4S8sQELXR8we+Bg==
# =u32E
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 23 Oct 2026 06:36:38 PM CEST
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.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: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-11.2-gdbstub-kvm-231026-1' of https://gitlab.com/stsquad/qemu:
  tests/functional: add tuxrun kvm gdb test for s390x
  tests/functional: update s390x tuxrun images
  tests/functional: split s390x tuxrun into tcg and kvm run
  tests/functional: add tuxrun kvm gdb test for arm64
  tests/functional: update arm64 tuxrun images
  tests/functional: split aarch64 tuxrun into tcg and kvm run
  tests/functional: add tuxrun kvm gdb test for x86_64
  tests/functional: teach tuxrun about launching gdb tests
  tests/guest-debug: add --symbols option to run-test
  tests/guest-debug: add --kargs option to run-test
  tests/guest-debug: convert cmd to an qemu_cmd array
  tests/guest-debug: convert gdb_cmd to an array
  tests/functional: update x86_64 tuxrun images
  tests/functional: split x86_64 tuxrun into tcg and kvm run
  tests/functional: allow tuxrun tests to be passed "accel"
  meson: move gdb detection into the top level build file
  .dir-locals: include QEMU code in PYTHONPATH
  tests/tcg: fix buffer overflow in multiarch/linux/linux-sigrtminmax
  tests/functional: test_acpi_bits requires TCG

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2026-10-24 16:08:38 +02:00
Samuel Thibault 4c0fe2b6a9 baum: send device identity and cell count on protocol off/on
The hardware devices do identify themselves when the driver turns the
protocol off and on again. NVDA expects to get it.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2026-10-24 15:15:24 +02:00
Hongyan Xu c994a5d091 chardev/baum: unregister the brlapi fd handler on finalize
baum_chr_open() registers baum->brlapi_fd with the main loop through a
raw qemu_set_fd_handler() call.  The chardev base class does not know
about this handler, and char_braille_finalize() only closes the brlapi
connection and frees the handle; it never removes the fd handler.

When the chardev is removed at runtime (QMP chardev-remove /
object_unparent), BaumChardev is finalized and freed while the main loop
still holds an fd handler whose opaque points to the freed object.  The
next time brlapi_fd becomes readable (or the connection drops) the loop
calls baum_chr_read() with a dangling opaque, dereferencing freed
memory -> host use-after-free.

Unregister the handler in char_braille_finalize() before tearing the
connection down, using the same descriptor that baum_chr_open()
registered, and NULL the handle afterwards as a belt-and-braces guard.
Only do so while baum->brlapi is valid: baum_chr_open() sets
baum->brlapi_fd from brlapi__openConnection(), which is
BRLAPI_INVALID_FILE_DESCRIPTOR on failure, and that error path already
g_free()s the handle and returns before any handler is installed.

Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-ID: <20260904033055.413-1-getshell@seu.edu.cn>
2026-10-24 15:15:20 +02:00
Richard Henderson 44b31dc161 Merge tag 'qemu-sparc-20261023' of https://github.com/mcayland/qemu into staging
qemu-sparc queue

# -----BEGIN PGP SIGNATURE-----
#
# iQFSBAABCgA8FiEEzGIauY6CIA2RXMnEW8LFb64PMh8FAmrbtYAeHG1hcmsuY2F2
# ZS1heWxhbmRAaWxhbmRlLmNvLnVrAAoJEFvCxW+uDzIf0JoH/3aWW42DgR5RIOaU
# 0vHkSh1HaHbzJyF0blDnwt4Cvr7uqzy+mtE17j68mjKnP+RFlLDBz6+P5ZgYc/lq
# 6WwDyBe6HN9EYmguz/Av/HRvDuSLf0nkuH2fcUL2UGdJAkM1ndESfimiMQ48WiLO
# HNRYQstNYd2RdRqg5NGMusnaK2M73mg6NikoqmVIr6q+ljsU0I/t7VBGmJmKoBDK
# S7s9eqapA+gs+Wg55BK4eOVLtKtwjeZp4Kd9TPSvWKjHGblPiVSYiHgDy3SgC2pH
# nAqE3ZXR+rYFFPohfBSDWiK1YT8+dTkBpXf1l0Z23aajTEnVphCI5kslOsU3ANej
# kw7jed0=
# =y2Lx
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 23 Oct 2026 09:29:04 PM CEST
# gpg:                using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F
# gpg:                issuer "mark.cave-ayland@ilande.co.uk"
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" [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: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* tag 'qemu-sparc-20261023' of https://github.com/mcayland/qemu:
  target/sparc: Add the SHA instructions
  target/sparc: Add the CRC32C instruction
  target/sparc: Add the AES key expansion instructions
  target/sparc: Add the eight AES round instructions
  target/sparc: Return CFR when crypto feature is enabled
  target/sparc: Add crypto feature

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2026-10-24 14:39:38 +02:00
Richard Henderson 500e7b75f9 Merge tag 'qom-qdev-20261023' of https://gitlab.com/mcayland-ntx/qemu into staging
qom-qdev queue

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQT1gm3ws3USUB3fevcsojbiRimx9AUCatt1NgAKCRAsojbiRimx
# 9IG+AQCxutZkiIqrq2CfNk7dyDBAs13IqzI1JMl6TOdibvniBQEA+8Z2aqWGttZ1
# EzrltmiDf0FeCvLCW3eN4g+q1NWjpgE=
# =o5GE
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 23 Oct 2026 04:54:46 PM CEST
# gpg:                using EDDSA key F5826DF0B37512501DDF7AF72CA236E24629B1F4
# gpg: Good signature from "Mark Cave-Ayland (Nutanix) <mark.caveayland@nutanix.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: F582 6DF0 B375 1250 1DDF  7AF7 2CA2 36E2 4629 B1F4

* tag 'qom-qdev-20261023' of https://gitlab.com/mcayland-ntx/qemu: (28 commits)
  i8259_common.c: add missing 0x prefixes to "info pic" output
  i8259_common.c: remove static irq_count and irq_level variables
  i8259.c: switch isa_pic from I8259State to I8259PICState
  i8259: move InterruptStatsProviderClass get_statistics() from i8259 to PIC
  i8259_common.c: remove unused i8259_init_chip() function
  xen/xen-hvm.c: introduce TYPE_XEN_I8259_PIC device
  xen-hvm.c: rename xen_interrupt_controller_init() to xen_i8259_init()
  kvm/i8259.c: introduce TYPE_KVM_I8259_PIC device
  i8259.c: properly cascade secondary i8259 from primary i8259
  i8259.c: introduce TYPE_I8259_PIC device
  isa-bus.c: introduce isa_realize() function
  kvm/i8259.c: convert to use DEFINE_TYPES() macro
  i8259.c: convert to use DEFINE_TYPES() macro
  i8259_common.c: convert to use DEFINE_TYPES() macro
  kvm/i8259.c: use kvm_i8259 prefix for functions
  i8259.c: use i8259 prefix for functions
  i8259_common.c: use i8259/i8259_common prefix for functions
  i8259_common.c: always use cs for I8259CommonState variables
  kvm/i8259.c: always use cs for I8259CommonState variables
  kvm/i8259.c: introduce TYPE_KVM_I8259 device
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2026-10-24 14:39:10 +02:00
Richard Henderson 108c6dff22 Merge tag 'target-misc-20261024' of https://github.com/philmd/qemu into staging
Misc target patches queue

- Make TCG halt-to-exec transition explicit and remove cpu_exec_halt()
- Various conversions to translate_for_debug()
- Add common CPUClass::exception_name() handler
- multi-target: prefix helpers with target prefix
- Remove target_long_bits() from GDB register reads
- MAINTAINERS updates

# -----BEGIN PGP SIGNATURE-----
#
# iQJPBAABCAA5FiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmrcf1sbFIAAAAAABAAO
# bWFudTIsMi41KzEuMTIsMCwzAAoJEOPjLCzercDeRS4QAJVD/i+tYZJ+b2OPsVuL
# 5rU3R7pyAQ0O+H/kXAE5T4cB3FxG6bTcczbbb4LTlVEZF/H3GKm8OgBg6syyvygq
# wLAbNuQyZsCTG5DfeLruwADt2IsCg3BGC92Gz8eo+dkEg/8YHOThaMqj9wwK3Pre
# vYotjM/XcKB/+IiMgtO931JAAofJ3NwHeTsgS02U1Noh97OkxcJYEKv8Q6exYgdk
# 7vqRIdavZUlwxUUqRFsEBoFECDx0mO8mi3ehKEHZzbSOPkhWZDmz6ooKUt1Cc/DA
# rhgXG/lW0Pbu+tP9nO3Ah1ib2AB7NEtRoatAMhXbByhybTxZ3mGrCh7gfEJnmysq
# COSE1Aq8CUyup5TmLFPN7jqumb3jw6j/aktiXaGopeMiJn3Q6P//XXlwCJ5R+VWN
# rJVUkG9jw6vsvePFf0uIALIRYzUz1gZnK1iMHGE6UpYilln9OKNwyP8/+qW3pOep
# yofR+2gpnVCxA0+6lZnO+rkhukGi+AM6fV4wjvE56jC027SP5yxaTcDqd2MG6avJ
# MZ8yE0Xso7PlenYpBzPlV873zGoYKudOIBfZDSvMBzKcjwtCFpLIKBtOslB3iJgS
# bOtW2wAlmvvP6vgf442KJLWqCjrm0SrtOoZ8TeOLXXs0a7scBCHIw8OLpMsxcNNk
# yuo+mIVum48DUkC94J0u6Cvi
# =LbEJ
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 24 Oct 2026 11:50:19 AM CEST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown]
# gpg: Signature notation: manu=2,2.5+1.12,0,3
# 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 'target-misc-20261024' of https://github.com/philmd/qemu: (81 commits)
  MAINTAINERS: cover riscv GDB XML files
  MAINTAINERS: cover x86 GDB XML files
  MAINTAINERS: cover m68k GDB XML files
  target/mips: Convert to translate_for_debug
  target/m68k: Convert to translate_for_debug
  target/loongarch: Convert to translate_for_debug
  target/hppa: Convert to translate_for_debug
  target/hexagon: Convert to translate_for_debug
  target/tricore: define and call helpers using HELPER macro
  target/sparc: define and call helpers using HELPER macro
  target/sh4: define and call helpers using HELPER macro
  target/s390x: define and call helpers using HELPER macro
  target/riscv: define and call helpers using HELPER macro
  target/ppc: define and call helpers using HELPER macro
  target/or1k: define and call helpers using HELPER macro
  target/mips: define and call helpers using HELPER macro
  target/microblaze: define and call helpers using HELPER macro
  target/m68k: define and call helpers using HELPER macro
  target/loongarch: define and call helpers using HELPER macro
  target/i386: define and call helpers using HELPER macro
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2026-10-24 13:07:53 +02:00
Marc-André Lureau ee7963229f MAINTAINERS: cover riscv GDB XML files
Add an entry so changes to these files are routed to the RISC-V
maintainers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022-query-reg-v3-16-7ad902b9a7cf@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:48 +02:00
Marc-André Lureau eab80370b9 MAINTAINERS: cover x86 GDB XML files
Add entries so changes to these files are routed to the X86
maintainers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022-query-reg-v3-5-7ad902b9a7cf@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:48 +02:00
Marc-André Lureau c362193a7a MAINTAINERS: cover m68k GDB XML files
Add entries so changes to these files are routed to the m68k
maintainers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022-query-reg-v3-12-7ad902b9a7cf@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:48 +02:00
Peter Maydell cd1980bf96 target/mips: Convert to translate_for_debug
Convert mips to providing the translate_for_debug method rather
than the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261022125858.310252-6-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:48 +02:00
Peter Maydell 37b27a5f82 target/m68k: Convert to translate_for_debug
Convert m68k to providing the translate_for_debug method rather
than the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261022125858.310252-5-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:48 +02:00
Peter Maydell 079d8046a0 target/loongarch: Convert to translate_for_debug
Convert loongarch to providing the translate_for_debug method rather
than the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261022125858.310252-4-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:48 +02:00
Peter Maydell 9e754ae5dd target/hppa: Convert to translate_for_debug
Convert hppa to providing the translate_for_debug method rather
than the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261022125858.310252-3-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Peter Maydell 16138a0c0c target/hexagon: Convert to translate_for_debug
Convert hexagon to providing the translate_for_debug method rather
than the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261022125858.310252-2-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier ff8c604329 target/tricore: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-18-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier a2ae1db293 target/sparc: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-17-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier b9d742b687 target/sh4: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-16-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier a8276d7e3b target/s390x: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-15-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier 11eeabd21d target/riscv: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-13-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier 14c23df636 target/ppc: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-12-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier 24b1dcd11c target/or1k: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-11-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier d4680ed403 target/mips: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-10-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier f66fa4f60a target/microblaze: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-9-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier ee28be00bd target/m68k: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-8-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier db61a615c3 target/loongarch: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-7-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier 482ea5f259 target/i386: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-6-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier 86223d1c07 target/hppa: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-5-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier 62cad9aaa9 target/avr: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-4-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier d129fbc5b7 target/arm: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-3-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Pierrick Bouvier e3cc72cca1 target/alpha: define and call helpers using HELPER macro
In a upcoming commit, we'll prefix all helpers and helper_info with target
prefix, to disambiguate symbols between targets. As a first step, we need to
make sure all usages are using the existing HELPER macro.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20261019212046.149572-2-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:47 +02:00
Peter Maydell 97f45d8ded target/tricore: Convert to translate_for_debug
Convert tricore to providing the translate_for_debug method rather
than the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261020122752.3651914-6-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Peter Maydell 1a3ec6fdfc target/rx: Convert to translate_for_debug
Convert rx to providing the translate_for_debug method rather than
the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261020122752.3651914-5-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Peter Maydell 295803fe2e target/or1k: Convert to translate_for_debug
Convert or1k to providing the translate_for_debug method rather than
the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261020122752.3651914-4-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Peter Maydell e188b2351c target/avr: Convert to translate_for_debug
Convert avr to providing the translate_for_debug method rather than
the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261020122752.3651914-3-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Peter Maydell 85ba1f38ee target/alpha: Convert to translate_for_debug
Convert alpha to providing the translate_for_debug method rather than
the deprecated get_phys_addr_debug method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Message-ID: <20261020122752.3651914-2-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 07a10df87d target/xtensa: Implement and register CPUClass::exception_name()
Implement xtensa_exception_name() and register it as the
CPUClass::exception_name() handler, so the common exception
logging can resolve Xtensa exception codes to names.

Use the new helper in xtensa_cpu_do_interrupt().

With '-d int', xtensa_cpu_do_interrupt() now logs the exception
name after its number.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-34-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 1647c22d64 target/sparc: Register CPUClass::exception_name() handler
For each SPARC / SPARC64 target:
factor sparc_exception_name() out of sparc_cpu_do_interrupt()
and register it as the CPUClass::exception_name() handler, so
the common exception logging can resolve SPARC exception codes
to names.

With '-d int', unlisted codes are now logged as "unknown" instead
of "Unknown". On SPARC, the "Error state" abort message now names
trap instructions (0x80-0xff) instead of calling them "Unknown".
On SPARC64, trap 0x1ff is now named "Hyperprivileged Trap
Instruction"; it was "Unknown" because of an off-by-one in the
former range check.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-33-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 1951f82837 target/sparc: Remove always-defined DEBUG_PCALL
DEBUG_PCALL has been unconditionally defined for 14 years now
(see commit b884fc5eca "target-sparc: Make CPU_LOG_INT useful
by default"), so the #ifdef guards around the exception name
table and the CPU_LOG_INT block are always taken. Remove the
define and the now-redundant guards.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-32-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé ef532fac00 target/sh4: Use a static table in sh4_exception_name()
Replace the switch statement with a static lookup table.

With '-d int', unlisted exception codes are now logged as
"unknown" instead of "???".

Suggested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-31-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 8e95c6e960 target/sh4: Register CPUClass::exception_name() handler
Factor sh4_exception_name() out of superh_cpu_do_interrupt()
and register it as the CPUClass::exception_name() handler,
so the common exception logging can resolve SH-4 exception
codes to names.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-30-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Yonggang Luo e54a9125e9 target/sh4: Define exception vector constants
Name SH4 exception vectors and use the definitions throughout
exception handling and exception raising.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-29-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé b3fcf159cf target/s390x: Implement and register CPUClass::exception_name()
Implement s390x_exception_name() and register it as the
CPUClass::exception_name() handler, so the common exception
logging can resolve s390x exception codes to names.

Use the new helper in s390_cpu_do_interrupt() and helper_exception().

With '-d int', s390_cpu_do_interrupt() now logs the exception
name in parentheses after its number.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-28-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 4435157a15 target/rx: Register CPUClass::exception_name() handler
Factor rx_exception_name() out of rx_cpu_do_interrupt()
and register it as the CPUClass::exception_name() handler,
so the common exception logging can resolve RX exception
codes to names.

With '-d int', unlisted codes are now logged as "unknown"
instead of "unknown exception".

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-27-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Yonggang Luo 138e50577f target/rx: Define exception vector constants
Name RX exception vectors and trap ranges, and use the
definitions throughout exception handling and exception
raising.

Assert that exception indexes remain within the defined
range before accessing their vector tables.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Co-developed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Yoshinori Sato <yoshinori.sato@nifty.com>
Message-ID: <20261022215115.19680-26-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé ec4f1df6bc target/rx: Unify BRK and INT trap handling
BRK is equivalent to INT #0, so route both instructions
through the same trap helper.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Yoshinori Sato <yoshinori.sato@nifty.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-25-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 7ce4410806 target/riscv: Register CPUClass::exception_name() handler
Factor riscv_excp_name() and riscv_intr_name() out of
riscv_cpu_get_trap_name(). Register riscv_excp_name()
as the CPUClass::exception_name() handler, so the common
exception logging can resolve RISCV exception codes to names.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Reviewed-by: Chao Liu <chao.liu@processmission.com>
Message-ID: <20261022215115.19680-24-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 8ee087bb94 target/ppc: Register CPUClass::exception_name() handler
Expose powerpc_excp_name() prototype and register it
as the CPUClass::exception_name() handler, so the common
exception logging can resolve PPC exception codes to names.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-23-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé 6f26c03b54 target/ppc: Use a static table in powerpc_excp_name()
Replace the switch statement with a static lookup table.

Unlisted exception codes now return "unknown" instead of reaching
g_assert_not_reached(), so with '-d int' they are logged instead
of aborting QEMU. Do this before registering the function as the
CPUClass::exception_name() handler, which must accept any code.

Suggested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-22-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé fe0f4a5a57 target/ppc: Name the EBB exceptions
POWERPC_EXCP_PERFM_EBB and POWERPC_EXCP_EXTERNAL_EBB are raised on
POWER8+. With '-d int', powerpc_excp() logs them through
powerpc_excp_name(), which has no entry for them and reaches
g_assert_not_reached(), aborting QEMU. Add their names.

Cc: qemu-stable@nongnu.org
Fixes: cb76bbc43f ("target/ppc: add PPC_INTERRUPT_EBB and EBB exceptions")
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-21-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00
Philippe Mathieu-Daudé ff9665d608 target/or1k: Register CPUClass::exception_name() handler
Factor openrisc_excp_name() out of openrisc_cpu_do_interrupt()
and register it as the CPUClass::exception_name() handler, so
the common exception logging can resolve OpenRISC exception
codes to names.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20261022215115.19680-20-philmd@oss.qualcomm.com>
2026-10-24 11:48:29 +02:00