Richard Henderson
d6dfd8d40c
Merge tag 'pull-target-arm-20250926' of https://gitlab.com/pm215/qemu into staging
...
target-arm queue:
* reimplement VHE alias register handling
* replace magic GIC values by proper definitions
* convert power control DPRINTF() uses to trace events
* better reset related tracepoints
* implement ID_AA64PFR2_EL1
* hw/usb/hcd-uhci: don't assert for SETUP to non-0 endpoint
* net/passt: Fix build failure due to missing GIO dependency
# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmjWnkUZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3upeD/4x0k6ciiJ2wRE1PFUA2KHZ
# bS12+j6Um5BNdcZtRV1aT3x3xOrW3X0JTcmhb9/UdpEPki/krQQgQX50tOiLCeU2
# U4lZke5160Gk3ThdkpELlQDnCVDuNR0wxYgy1GBgAInCa/T/qFnyWwaWBIooCCUh
# +UMJ9tP4XWKvKlkzw9ONFYChxerY2enpOewEbnfSU4NPg9pU8OEZ3yeFWaLZ3Tnl
# 0bei/iFFeuN8RtgJEkuqWI6oENEZZbxGtJ+J/+wvggAfOzfy0I6CmW6y9tQMmKe8
# fTnCQ837uHmlRPWQ615M2wWydbJ1ffdEIYDb5U6UsbfG8sMt5+qg38yo0AyDs6RK
# qJkTceuhqFTDIoi92o2+NFnohCTfASeYaCHjODgcdjGUtbZO7LZ31fOKQrdsHc5e
# chAOnzNxCu9Bt4UqpUmb+ED0fXWDahV1tmgazFS2LORYxnr2q+/WJEdwSgHXNzVy
# 2rdyUx7v7U1finhRE1nAdy8XwJTCQ3gDwDbPGBrH9mhR9DnK6eotFCljI2XnDtAE
# f1i0w/47cnyRW6KsBVK6dJObiOfBRrRYqe3Rt4nA4xjeCNmWcr5IcytpnL/2YT1p
# 1vj+RklbcK7Ns+kWH3H2a9b44zKQrtGGXf8fcNyAqT1YrzrrLUqaiKTfesGfjWit
# ekMWOulOe6UePnoC3SJHFw==
# =+Aj+
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 26 Sep 2025 07:08:05 AM PDT
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org "
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org >" [unknown]
# gpg: aka "Peter Maydell <pmaydell@gmail.com >" [unknown]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk >" [unknown]
# gpg: aka "Peter Maydell <peter@archaic.org.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: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* tag 'pull-target-arm-20250926' of https://gitlab.com/pm215/qemu : (44 commits)
target/arm: Implement ID_AA64PFR2_EL1
target/arm: Move ID register field defs to cpu-features.h
target/arm: Trace vCPU reset call
target/arm: Trace emulated firmware reset call
target/arm: Convert power control DPRINTF() uses to trace events
target/arm: Replace magic GIC values by proper definitions
target/arm: Remove define_arm_vh_e2h_redirects_aliases
target/arm: Rename some cpreg to their aarch64 names
target/arm: Redirect VHE FOO_EL12 to FOO_EL1 during translation
target/arm: Redirect VHE FOO_EL1 -> FOO_EL2 during translation
target/arm: Split out redirect_cpreg
target/arm: Rename TBFLAG_A64_NV2_MEM_E20 with *_E2H
target/arm: Move endianness fixup for 32-bit registers
target/arm: Move writeback of CP_ANY fields
target/arm: Move alias setting for wildcards
target/arm: Remove name argument to alloc_cpreg
target/arm: Hoist the allocation of ARMCPRegInfo
target/arm: Split out alloc_cpreg
target/arm: Add key parameter to add_cpreg_to_hashtable
target/arm: Move cpreg elimination to define_one_arm_cp_reg
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-09-26 13:27:01 -07:00
Richard Henderson
d08b8becc3
Merge tag 'pull-10.2-maintainer-260925-1' of https://gitlab.com/stsquad/qemu into staging
...
September maintainer updates (scripts, semihosting, plugins)
- new gitlab-failure-analysis script
- tweak checkpath to ignore license in removed lines
- refactor semihosting to build once
- add explicit assert to execlog for coverity
- new uftrace plugin
# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmjWWJYACgkQ+9DbCVqe
# KkS1sgf+LsP0jsc1wKhzBhO4WarXXacWCDxK22riJ3aolm+gJ+b0WI4ds18A0e3R
# z/J8VJVxBZ+6Hid+tOCQwfZ+Hb1p9IofzBdZryGUvwguviNdlpEChhXXnoZkicym
# aGcC/jYRkhTx42dKRdZrSzPd3ccipqop9RvGx57bjCSBAEHYNz679p4z91kNR5a9
# UfcCzIQHbBUPZo0F9gQkNnBrjsJQhvF+gXPmmsmBI1pby6gNRQvFshrTQ1C32VpL
# VgXNc9cZ6vaREWlgb6izNjsMP7cYTMH2Ppxty/FyEMg7GTfWRjI6Ec8fJKjPFtKr
# ZbCNNAeJ9uLK6pJfTk2YxYabxx3JuQ==
# =cR9e
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 26 Sep 2025 02:10:46 AM PDT
# 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-10.2-maintainer-260925-1' of https://gitlab.com/stsquad/qemu : (24 commits)
contrib/plugins/uftrace: add documentation
contrib/plugins/uftrace_symbols.py
contrib/plugins/uftrace: implement x64 support
contrib/plugins/uftrace: generate additional files for uftrace
contrib/plugins/uftrace: implement privilege level tracing
contrib/plugins/uftrace: implement tracing
contrib/plugins/uftrace: track callstack
contrib/plugins/uftrace: define cpu operations and implement aarch64
contrib/plugins/uftrace: skeleton file
contrib/plugins/execlog: Explicitly check for qemu_plugin_read_register() failure
semihosting/arm-compat-semi: compile once in system and per target for user mode
semihosting/arm-compat-semi: remove dependency on cpu.h
semihosting/arm-compat-semi: eradicate target_long
semihosting/arm-compat-semi: replace target_ulong
semihosting/arm-compat-semi: eradicate sizeof(target_ulong)
include/semihosting/common-semi: extract common_semi API
target/{arm, riscv}/common-semi-target: eradicate target_ulong
target/riscv/common-semi-target: remove sizeof(target_ulong)
semihosting/arm-compat-semi: change common_semi_sys_exit_extended
semihosting/guestfd: compile once for system/user
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-09-26 13:26:30 -07:00
Richard Henderson
a7732a5e17
Merge tag 'pull-vfio-20250926' of https://github.com/legoater/qemu into staging
...
vfio queue:
* New vfio-user functional test
* Improved naming conventions
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmjWJaEACgkQUaNDx8/7
# 7KE9Kw/+Ne/AJBxJ0EceK6oCX/1d/56l8dlY7/PHa/LuX8LDzZq42c6+CC2bQ5Ze
# +C5RvM1aavUkvlW73jjmXs1/sdvqq5etGpxbf+hjlLh7uXFaceszWw0+ljH11Pk3
# INZj4iVrPTX7A2d9Gip0ouTFc02DYYllKpUnpbN9MYk0WRgoMBvZISc9T6A28oj1
# Zm24XWOW5ySux9IDIm+zSpvtRp+5r5PgwwwPZvNKBa5jqfJiw6+ZmejLUNEvwfgr
# vkBCGuCywzf+l5wX5z+ofl5GDd6YyRa5W+nDQE7viDwo0XTtZC3WxRKDpqdAruld
# fPjuflqHUpqnyabFuVVc5VV9iyBLGs0cFt2BHPn0vHRZTaCNAGZKZZDzVOP9EYuK
# Jmx5B2vCTnVbg2ZfG+ErEYAVVX97Tgks0xtUxGOpJwbImlRCKdwbrDKSFWT5NYCN
# BlfZX4iFrWLo2fntWP4c3DtM7w6Vn/x5hevyy9pD3i5D8zqDx3FaYJCuM4+5KFAO
# WenxUIkjOcJ829NBfQvF2HtJDEeuLv3eMxszU4pyRnH1vsk38ofOfvZVl2uQd7XT
# NrW207wAAOO+QxrelUGIuuMwhYuh16KnHkjjVe0yEh6htBF5ceIImqZH8SU97qWU
# vQjbcmx/fNQKlKCLc+JOCQz+KJyKahPDGcHi1vxEKXObHFI0rfw=
# =Jl4i
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 25 Sep 2025 10:33:21 PM PDT
# gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@redhat.com >" [full]
# gpg: aka "Cédric Le Goater <clg@kaod.org >" [full]
* tag 'pull-vfio-20250926' of https://github.com/legoater/qemu : (29 commits)
include/hw/vfio/vfio-device.h: fix include header guard name
vfio-user/pci.c: rename vfio_user_pci_dev_info to vfio_user_pci_info
vfio-user/pci.c: rename vfio_user_instance_finalize() to vfio_user_pci_finalize()
vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()
vfio-user/pci.c: rename vfio_user_pci_dev_properties[] to vfio_user_pci_properties[]
vfio-user/pci.c: rename vfio_user_pci_dev_class_init() to vfio_user_pci_class_init()
vfio/pci.c: rename vfio_pci_nohotplug_dev_info to vfio_pci_nohotplug_info
vfio/pci.c: rename vfio_pci_nohotplug_dev_class_init() to vfio_pci_nohotplug_class_init()
vfio/pci.c: rename vfio_pci_dev_nohotplug_properties[] to vfio_pci_nohotplug_properties[]
vfio/pci.c: rename vfio_pci_dev_properties[] to vfio_pci_properties[]
vfio/pci.c: rename vfio_pci_base_dev_info to vfio_pci_device_info
vfio/pci.c: rename vfio_pci_base_dev_class_init() to vfio_pci_device_class_init()
hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE
vfio/pci.c: rename vfio_pci_dev_info to vfio_pci_info
vfio/pci.c: rename vfio_pci_dev_class_init() to vfio_pci_class_init()
vfio/pci.c: rename vfio_instance_finalize() to vfio_pci_finalize()
vfio/pci.c: rename vfio_instance_init() to vfio_pci_init()
vfio/spapr.c: rename VFIOContainer bcontainer field to parent_obj
vfio/spapr.c: use QOM casts where appropriate
vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-09-26 13:26:08 -07:00
Peter Maydell
b71e2b281a
target/arm: Implement ID_AA64PFR2_EL1
...
Currently we define the ID_AA64PFR2_EL1 encoding as reserved (with
the required RAZ behaviour for unassigned system registers in the ID
register encoding space). Newer architecture versions start to
define fields in this ID register, so define the appropriate
constants and implement it as an ID register backed by a field in
cpu->isar. Since none of our CPUs set that isar field to non-zero,
there is no behavioural change here (other than the name exposed to
the user via the gdbstub), but this paves the way for implementing
the new features that use fields in this register.
The fields here are the ones documented in rev L.b of the Arm ARM.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2025-09-26 13:43:33 +01:00
Peter Maydell
ff197ae9a4
target/arm: Move ID register field defs to cpu-features.h
...
Currently we define constants for the ID register fields in cpu.h.
This means they're defined for a lot more code in QEMU than actually
needs them. Move them to cpu-features.h, which is where we define
the feature functions that test fields in these registers.
There's only one place where we need to use some of these macro
definitions that we weren't already including cpu-features.h:
linux-user/arm/target_proc.h. Otherwise this patch is a pure
movement of code from one file to the other.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2025-09-26 13:40:43 +01:00
Philippe Mathieu-Daudé
ded97005b2
target/arm: Trace vCPU reset call
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-09-26 11:12:22 +01:00
Philippe Mathieu-Daudé
e733dfcf90
target/arm: Trace emulated firmware reset call
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-09-26 11:12:19 +01:00
Philippe Mathieu-Daudé
436f4085a2
target/arm: Convert power control DPRINTF() uses to trace events
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-09-26 11:08:56 +01:00
Philippe Mathieu-Daudé
674fe90667
target/arm: Replace magic GIC values by proper definitions
...
Prefer the FIELD_DP64() macro and self-describing GIC
definitions over magic values.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2025-09-26 11:06:30 +01:00
Pierrick Bouvier
16b10fbf8b
contrib/plugins/uftrace: add documentation
...
This documentation summarizes how to use the plugin, and present two
examples of the possibilities offered by it, in system and user mode.
As well, it explains how to rebuild and reproduce those examples.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-10-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-26-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
a073d1149e
contrib/plugins/uftrace_symbols.py
...
usage: contrib/plugins/uftrace_symbols.py \
--prefix-symbols \
arm-trusted-firmware/build/qemu/debug/bl1/bl1.elf \
arm-trusted-firmware/build/qemu/debug/bl2/bl2.elf \
arm-trusted-firmware/build/qemu/debug/bl31/bl31.elf \
u-boot/u-boot:0x60000000 \
u-boot/u-boot.relocated:0x000000023f6b6000 \
linux/vmlinux
Will generate symbols and memory mapping files for uftrace, allowing to
have an enhanced trace, instead of raw addresses.
It takes a collection of elf files, and automatically find all their
symbols, and generate an ordered memory map based on that.
This script uses the python (native) pyelftools module.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Acked-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250902075042.223990-9-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-25-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
b860d96f00
contrib/plugins/uftrace: implement x64 support
...
It's trivial to implement x64 support, as it's the same stack layout
as aarch64.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-8-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-24-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
7278747595
contrib/plugins/uftrace: generate additional files for uftrace
...
Beyond traces per cpu, uftrace expect to find some specific files.
- info: contains information about machine/program run
those values are not impacting uftrace behaviour (only reported by
uftrace info), and we simply added empty strings.
- memory mapping: how every binary is mapped in memory. For system mode,
we generate an empty mapping (uftrace_symbols.py, coming in future
commit, will take care of that). For user mode, we copy current
/proc/self/maps. We don't need to do any special filtering, as
reported addresses will necessarily concern guest program, and not
QEMU and its libraries.
- task: list of tasks. We present every vcpu/privilege level as a
separate process, as it's the best view we can have when generating a
(visual) chrome trace. Using threads is less convenient in terms of
UI.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-7-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-23-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
308c20108a
contrib/plugins/uftrace: implement privilege level tracing
...
We add new option trace-privilege-level=bool, which will create a
separate trace for each privilege level.
This allows to follow changes of privilege during execution.
We implement aarch64 operations to track current privilege level
accordingly.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-6-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-22-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
bba94f7876
contrib/plugins/uftrace: implement tracing
...
We implement tracing, following uftrace format.
Trace is flushed every 32 MB, so file operations don't impact
performance at runtime.
A different trace is generated per cpu, and we ensure they have a unique
name, based on vcpu_index, while keeping room for privilege level coming
in next commit.
Uftrace format is not officially documented, but it can be found here:
https://github.com/namhyung/uftrace/blob/v0.18/libmcount/record.c#L909
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-5-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-21-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
992fe17bd7
contrib/plugins/uftrace: track callstack
...
We now track callstack, based on frame pointer analysis. We can detect
function calls, returns, and discontinuities.
We implement a frame pointer based unwinding that is used for
discontinuities.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-4-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-20-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
490aa81855
contrib/plugins/uftrace: define cpu operations and implement aarch64
...
We define a new CpuOps structure that will be used to implement tracking
independently of guest architecture.
As well, we now instrument only instructions following ones that might
have touched the frame pointer.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-3-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-19-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
293028ca25
contrib/plugins/uftrace: skeleton file
...
We define a scoreboard that will hold our data per cpu. As well, we
define a buffer per cpu that will be used to read registers and memories
in a thread-safe way.
For now, we just instrument all instructions with an empty callback.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250902075042.223990-2-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-18-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Peter Maydell
04387b4a05
contrib/plugins/execlog: Explicitly check for qemu_plugin_read_register() failure
...
In insn_check_regs() we don't explicitly check whether
qemu_plugin_read_register() failed, which confuses Coverity into
thinking that sz can be -1 in the memcmp(). In fact the assertion
that sz == reg->last->len means this can't happen, but it's clearer
to both humans and Coverity if we explicitly assert that sz > 0, as
we already do in init_vcpu_register().
Coverity: CID 1611901, 1611902
Fixes: af6e4e0a22 ("contrib/plugins: extend execlog to track register changes")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250710144543.1187715-1-peter.maydell@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-17-alex.bennee@linaro.org >
2025-09-26 10:07:54 +01:00
Pierrick Bouvier
c9e79557e4
semihosting/arm-compat-semi: compile once in system and per target for user mode
...
We don't have any target dependency left in system mode, so we can
compile once.
User mode depends on qemu.h, which is duplicated between linux and bsd,
so we can't easily compile it once.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-13-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-16-alex.bennee@linaro.org >
2025-09-26 10:07:53 +01:00
Pierrick Bouvier
d3fe754007
semihosting/arm-compat-semi: remove dependency on cpu.h
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-12-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-15-alex.bennee@linaro.org >
2025-09-26 10:07:53 +01:00
Pierrick Bouvier
ab385d594c
semihosting/arm-compat-semi: eradicate target_long
...
We use int64_t or int32_t depending on ret size.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-11-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-14-alex.bennee@linaro.org >
2025-09-26 10:07:53 +01:00
Pierrick Bouvier
6dfbf9b6cf
semihosting/arm-compat-semi: replace target_ulong
...
Replace with vaddr or uint64_t where appropriate.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-10-pierrick.bouvier@linaro.org >
[AJB: tweak commit message]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-13-alex.bennee@linaro.org >
2025-09-26 10:05:48 +01:00
Pierrick Bouvier
feb49fa79b
semihosting/arm-compat-semi: eradicate sizeof(target_ulong)
...
No semantic change.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-9-pierrick.bouvier@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-12-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Pierrick Bouvier
9e65902904
include/semihosting/common-semi: extract common_semi API
...
We transform target/{arm,riscv}/common-semi-target.h headers to proper
compilation units, and use them in arm-compat-semi.c.
This way, we can include only the declaration header (which is target
agnostic), and selectively link the appropriate implementation based on
current target.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-8-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-11-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Pierrick Bouvier
632308c591
target/{arm, riscv}/common-semi-target: eradicate target_ulong
...
We replace mechanically with uint64_t.
There is no semantic change, and allows us to extract a proper API from
this set of functions.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-7-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-10-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Pierrick Bouvier
2131f0dcdf
target/riscv/common-semi-target: remove sizeof(target_ulong)
...
Only riscv64 extends SYS_EXIT, similar to aarch64.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-6-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-9-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Pierrick Bouvier
a92e151bd0
semihosting/arm-compat-semi: change common_semi_sys_exit_extended
...
We now check only is sys_exit is extended.
This allows to break dependency to TARGET_SYS_EXIT_EXTENDED which will
not be available anymore from this code.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-5-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-8-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Pierrick Bouvier
d8028d4ede
semihosting/guestfd: compile once for system/user
...
We move relevant code to semihosting/arm-compat-semi.c, and add
functions to query CONFIG_ARM_COMPATIBLE_SEMIHOSTING at runtime.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-4-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-7-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Pierrick Bouvier
664172404a
semihosting/syscalls: replace uint64_t with vaddr where appropriate
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-3-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-6-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Pierrick Bouvier
abc4522d01
semihosting/syscalls: compile once in system and per target for user mode
...
We replace target_ulong mechanically by uint64_t.
We can't compile (easily) this code once for user, as it relies on
various target/function types, so leave it in specific_ss for user mode.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Message-ID: <20250822150058.18692-2-pierrick.bouvier@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-5-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Nabih Estefan
24e51fc773
checkpatch: Ignore removed lines in license check
...
When running the license check, if we are updating a license it is
possible for the checkpatch script to test against old license lines
instead of newer ones, since the removal lines appear before the
addition lines in a .patch file.
Fix this by skipping over lines that start with "-" in the checkpatch
script.
Signed-off-by: Nabih Estefan <nabihestefan@google.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250916165928.10048-1-nabihestefan@google.com >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-4-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Alex Bennée
5a449678d6
scripts/ci: add gitlab-failure-analysis script
...
This is a script designed to collect data from multiple pipelines and
analyse the failure modes they have. By default it will probe the last
3 failed jobs on the staging branch. However this can all be
controlled by the CLI:
./scripts/ci/gitlab-failure-analysis --count 2 --branch=testing/next --id 39915562 --status=
running pipeline 2028486060, total jobs 125, skipped 5, failed 0, 39742 tests, 0 failed tests
success pipeline 2015018135, total jobs 125, skipped 5, failed 0, 49219 tests, 0 failed tests
You can also skip failing jobs and just dump the tests:
./scripts/ci/gitlab-failure-analysis --branch= --id 39915562 --status= --skip-jobs --pipeline 1946202491 1919542960
failed pipeline 1946202491, total jobs 127, skipped 5, failed 26, 38742 tests, 278 skipped tests, 2 failed tests
Failed test qemu.qemu:qtest+qtest-s390x / qtest-s390x/boot-serial-test, check-system-opensuse, 1 /s390x/boot-serial/s390-ccw-virtio - FATAL-ERROR: Failed to find expected string. Please check '/tmp/qtest-boot-serial-sW77EA3'
Failed test qemu.qemu:qtest+qtest-aarch64 / qtest-aarch64/arm-cpu-features, check-system-opensuse, 1 /aarch64/arm/query-cpu-model-expansion - ERROR:../tests/qtest/arm-cpu-features.c:459:test_query_cpu_model_expansion: assertion failed (_error == "The CPU type 'host' requires KVM"): ("The CPU type 'host' requires hardware accelerator" == "The CPU type 'host' requires KVM")
failed pipeline 1919542960, total jobs 127, skipped 5, failed 2, 48753 tests, 441 skipped tests, 1 failed tests
Failed test qemu.qemu:unit / test-aio, msys2-64bit, 12 /aio/timer/schedule - ERROR:../tests/unit/test-aio.c:413:test_timer_schedule: assertion failed: (aio_poll(ctx, true))
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-ID: <20250922093711.2768983-3-alex.bennee@linaro.org >
2025-09-26 09:55:19 +01:00
Mark Cave-Ayland
7c773b4267
include/hw/vfio/vfio-device.h: fix include header guard name
...
The header guard was incorrectly called HW_VFIO_VFIO_COMMON_H instead of
HW_VFIO_VFIO_DEVICE_H.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-29-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
d0776b8c60
vfio-user/pci.c: rename vfio_user_pci_dev_info to vfio_user_pci_info
...
This changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-28-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
d5447437ae
vfio-user/pci.c: rename vfio_user_instance_finalize() to vfio_user_pci_finalize()
...
This is the more typical naming convention for QOM finalize() functions, in
particular it changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-27-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
de837b5cbd
vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()
...
This is the more typical naming convention for QOM init() functions, in
particular it changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-26-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
78f4b77607
vfio-user/pci.c: rename vfio_user_pci_dev_properties[] to vfio_user_pci_properties[]
...
This changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-25-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
c833f7a5c6
vfio-user/pci.c: rename vfio_user_pci_dev_class_init() to vfio_user_pci_class_init()
...
This changes the function prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-24-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
5bdf0db823
vfio/pci.c: rename vfio_pci_nohotplug_dev_info to vfio_pci_nohotplug_info
...
This changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-23-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
cc44b39c27
vfio/pci.c: rename vfio_pci_nohotplug_dev_class_init() to vfio_pci_nohotplug_class_init()
...
This changes the function prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-22-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
05530ba246
vfio/pci.c: rename vfio_pci_dev_nohotplug_properties[] to vfio_pci_nohotplug_properties[]
...
This changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-21-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
7c53e1f43e
vfio/pci.c: rename vfio_pci_dev_properties[] to vfio_pci_properties[]
...
This changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-20-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
596b158ffd
vfio/pci.c: rename vfio_pci_base_dev_info to vfio_pci_device_info
...
This changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-19-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
153273f279
vfio/pci.c: rename vfio_pci_base_dev_class_init() to vfio_pci_device_class_init()
...
This changes the function prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-18-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
af2a8bfb3c
hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE
...
This brings the QOM type name in line with the underlying VFIOPCIDevice structure.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-17-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:20 +02:00
Mark Cave-Ayland
25c8376b37
vfio/pci.c: rename vfio_pci_dev_info to vfio_pci_info
...
This changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-16-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:19 +02:00
Mark Cave-Ayland
784fa15f02
vfio/pci.c: rename vfio_pci_dev_class_init() to vfio_pci_class_init()
...
This changes the function prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-15-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:19 +02:00
Mark Cave-Ayland
e6fd80873a
vfio/pci.c: rename vfio_instance_finalize() to vfio_pci_finalize()
...
This is the more typical naming convention for QOM finalize() functions, in
particular it changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-14-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:19 +02:00
Mark Cave-Ayland
d5db50dd81
vfio/pci.c: rename vfio_instance_init() to vfio_pci_init()
...
This is the more typical naming convention for QOM init() functions, in
particular it changes the prefix to match the name of the QOM type.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com >
Reviewed-by: Cédric Le Goater <clg@redhat.com >
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-13-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-09-25 17:55:19 +02:00