Skip to content

Commit 6d1829f

Browse files
committed
Merge tag 'pull-10.0-for-softfreeze-100325-3' of https://gitlab.com/stsquad/qemu into staging
functional and tcg tests, plugins and MAINTAINERS - update and expand aarch64 GPU tests - fix build dependence for plugins - update libvirt-ci to vulkan-tools - allow plugin tests to run on non-POSIX systems - tweak test/vm times - mark test-vma as linux only - various compiler fixes for tcg tests - add gitlab build unit tracker - error out early on stalled RME tests - compile core plugin code once - update MAINTAINERS # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmfOwjcACgkQ+9DbCVqe # KkRkcwgAlRTflCqYlZxdlo4CiOSXaHAFr8yfwWq138LJQRQH530JZnz1lZtxTbEM # pXT7ixnuJQDMybCQJmvUlK5UTUkZhGS3VuAR1VeM2J8/3VXYzf5sFjZ7yko9mA8S # 2FX8vdfbko8/J31+lKccA0tpbHyi2AbMR+mO8xj6KZQoePwmHoRmhgH7p7LE35YO # 8ytaOjMwTKF5fReVK+tlcrVJHFMdGsGNwtsnB2FhhVjI56fQqyM5hGXfOING2Fx3 # iZH3rjzfDB4SWbBqaRsMgH9RXjuB9Eo4v0Qs5ve5SjDyzRJk+/CbbBJ4oRt9hurJ # bA+CYZuNLGBf8Z/mUeYMavA7rxT5rw== # =qobU # -----END PGP SIGNATURE----- # gpg: Signature made Mon 10 Mar 2025 18:43:03 HKT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <[email protected]>" [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.0-for-softfreeze-100325-3' of https://gitlab.com/stsquad/qemu: (31 commits) MAINTAINERS: remove widely sanctioned entities plugins/core: make a single build unit plugins/api: build only once plugins/api: split out time control helpers plugins/api: split out the vaddr/hwaddr helpers plugins/api: split out binary path/start/end/entry code plugins/loader: compile loader only once plugins/plugin.h: include queue.h plugins/api: clean-up the includes include/qemu: plugin-memory.h doesn't need cpu-defs.h plugins/loader: populate target_name with target_name() plugins/api: use qemu_target_page_mask() to get value tests/functional: add boot error detection for RME tests gitlab: add a new build_unit job to track build size tests/tcg: Suppress compiler false-positive warning on sha1.c tests/tcg: enable -fwrapv for test-i386-bmi tests/tcg: fix constraints in test-i386-adcox tests/tcg: add message to _Static_assert in test-avx tests/tcg: mark test-vma as a linux-only test tests/vm: bump timeout for shutdown ... Signed-off-by: Stefan Hajnoczi <[email protected]>
2 parents 5136598 + 0d3dea7 commit 6d1829f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+647
-302
lines changed

.gitlab-ci.d/check-units.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env python3
2+
#
3+
# check-units.py: check the number of compilation units and identify
4+
# those that are rebuilt multiple times
5+
#
6+
# Copyright (C) 2025 Linaro Ltd.
7+
#
8+
# SPDX-License-Identifier: GPL-2.0-or-later
9+
10+
from os import access, R_OK, path
11+
from sys import argv, exit
12+
import json
13+
from collections import Counter
14+
15+
16+
def extract_build_units(cc_path):
17+
"""
18+
Extract the build units and their counds from compile_commands.json file.
19+
20+
Returns:
21+
Hash table of ["unit"] = count
22+
"""
23+
24+
j = json.load(open(cc_path, 'r'))
25+
files = [f['file'] for f in j]
26+
build_units = Counter(files)
27+
28+
return build_units
29+
30+
31+
def analyse_units(build_units):
32+
"""
33+
Analyse the build units and report stats and the top 10 rebuilds
34+
"""
35+
36+
print(f"Total source files: {len(build_units.keys())}")
37+
print(f"Total build units: {sum(units.values())}")
38+
39+
# Create a sorted list by number of rebuilds
40+
sorted_build_units = sorted(build_units.items(),
41+
key=lambda item: item[1],
42+
reverse=True)
43+
44+
print("Most rebuilt units:")
45+
for unit, count in sorted_build_units[:20]:
46+
print(f" {unit} built {count} times")
47+
48+
print("Least rebuilt units:")
49+
for unit, count in sorted_build_units[-10:]:
50+
print(f" {unit} built {count} times")
51+
52+
53+
if __name__ == "__main__":
54+
if len(argv) != 2:
55+
script_name = path.basename(argv[0])
56+
print(f"Usage: {script_name} <path_to_compile_commands.json>")
57+
exit(1)
58+
59+
cc_path = argv[1]
60+
if path.isfile(cc_path) and access(cc_path, R_OK):
61+
units = extract_build_units(cc_path)
62+
analyse_units(units)
63+
exit(0)
64+
else:
65+
print(f"{cc_path} doesn't exist or isn't readable")
66+
exit(1)

.gitlab-ci.d/cirrus/freebsd-14.vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
1111
NINJA='/usr/local/bin/ninja'
1212
PACKAGING_COMMAND='pkg'
1313
PIP3='/usr/local/bin/pip'
14-
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache4 cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk-vnc gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-pyyaml py311-sphinx py311-sphinx_rtd_theme py311-tomli python3 rpm2cpio rust rust-bindgen-cli sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd'
14+
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache4 cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk-vnc gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py311-numpy py311-pillow py311-pip py311-pyyaml py311-sphinx py311-sphinx_rtd_theme py311-tomli python3 rpm2cpio rust rust-bindgen-cli sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 vulkan-tools xorriso zstd'
1515
PYPI_PKGS=''
1616
PYTHON='/usr/local/bin/python3'

.gitlab-ci.d/cirrus/macos-14.vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ MAKE='/opt/homebrew/bin/gmake'
1111
NINJA='/opt/homebrew/bin/ninja'
1212
PACKAGING_COMMAND='brew'
1313
PIP3='/opt/homebrew/bin/pip3'
14-
PKGS='bash bc bindgen bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 gtk-vnc jemalloc jpeg-turbo json-c libcbor libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python3 rpm2cpio rust sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 xorriso zlib zstd'
14+
PKGS='bash bc bindgen bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 gtk-vnc jemalloc jpeg-turbo json-c libcbor libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python3 rpm2cpio rust sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 vulkan-tools xorriso zlib zstd'
1515
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli'
1616
PYTHON='/opt/homebrew/bin/python3'

.gitlab-ci.d/static_checks.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,25 @@ check-rust-tools-nightly:
7070
expire_in: 2 days
7171
paths:
7272
- rust/target/doc
73+
74+
check-build-units:
75+
extends: .base_job_template
76+
stage: build
77+
image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
78+
needs:
79+
job: amd64-debian-container
80+
before_script:
81+
- source scripts/ci/gitlab-ci-section
82+
- section_start setup "Install Tools"
83+
- apt install --assume-yes --no-install-recommends jq
84+
- section_end setup
85+
script:
86+
- mkdir build
87+
- cd build
88+
- section_start configure "Running configure"
89+
- ../configure
90+
- cd ..
91+
- section_end configure
92+
- section_start analyse "Analyse"
93+
- .gitlab-ci.d/check-units.py build/compile_commands.json
94+
- section_end analyse

MAINTAINERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,8 +2547,7 @@ F: hw/i2c/i2c_mux_pca954x.c
25472547
F: include/hw/i2c/i2c_mux_pca954x.h
25482548

25492549
pcf8574
2550-
M: Dmitrii Sharikhin <[email protected]>
2551-
S: Maintained
2550+
S: Orphaned
25522551
F: hw/gpio/pcf8574.c
25532552
F: include/gpio/pcf8574.h
25542553

@@ -2631,6 +2630,7 @@ F: hw/display/virtio-gpu*
26312630
F: hw/display/virtio-vga.*
26322631
F: include/hw/virtio/virtio-gpu.h
26332632
F: docs/system/devices/virtio-gpu.rst
2633+
F: tests/functional/test_aarch64_virt_gpu.py
26342634

26352635
vhost-user-blk
26362636
M: Raphael Norwitz <[email protected]>
@@ -3659,10 +3659,10 @@ F: net/filter-mirror.c
36593659
F: tests/qtest/test-filter*
36603660

36613661
Record/replay
3662-
M: Pavel Dovgalyuk <[email protected]>
36633662
R: Paolo Bonzini <[email protected]>
3663+
R: Alex Bennée <[email protected]>
36643664
W: https://wiki.qemu.org/Features/record-replay
3665-
S: Supported
3665+
S: Odd Fixes
36663666
F: replay/*
36673667
F: block/blkreplay.c
36683668
F: net/filter-replay.c

bsd-user/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ bsd_user_ss.add(files(
1313
'elfload.c',
1414
'main.c',
1515
'mmap.c',
16+
'plugin-api.c',
1617
'signal.c',
1718
'strace.c',
1819
'uaccess.c',

bsd-user/plugin-api.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* QEMU Plugin API - bsd-user-mode only implementations
3+
*
4+
* Common user-mode only APIs are in plugins/api-user. These helpers
5+
* are only specific to bsd-user.
6+
*
7+
* Copyright (C) 2017, Emilio G. Cota <[email protected]>
8+
* Copyright (C) 2019-2025, Linaro
9+
*
10+
* SPDX-License-Identifier: GPL-2.0-or-later
11+
*/
12+
13+
#include "qemu/osdep.h"
14+
#include "qemu.h"
15+
#include "common-user/plugin-api.c.inc"

common-user/plugin-api.c.inc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* QEMU Plugin API - *-user-mode only implementations
3+
*
4+
* Common user-mode only APIs are in plugins/api-user. These helpers
5+
* are only specific to the *-user frontends.
6+
*
7+
* Copyright (C) 2017, Emilio G. Cota <[email protected]>
8+
* Copyright (C) 2019-2025, Linaro
9+
*
10+
* SPDX-License-Identifier: GPL-2.0-or-later
11+
*/
12+
13+
#include "qemu/osdep.h"
14+
#include "qemu/main-loop.h"
15+
#include "qemu/plugin.h"
16+
#include "qemu.h"
17+
18+
/*
19+
* Binary path, start and end locations. Host specific due to TaskState.
20+
*/
21+
const char *qemu_plugin_path_to_binary(void)
22+
{
23+
TaskState *ts = get_task_state(current_cpu);
24+
return g_strdup(ts->bprm->filename);
25+
}
26+
27+
uint64_t qemu_plugin_start_code(void)
28+
{
29+
TaskState *ts = get_task_state(current_cpu);
30+
return ts->info->start_code;
31+
}
32+
33+
uint64_t qemu_plugin_end_code(void)
34+
{
35+
TaskState *ts = get_task_state(current_cpu);
36+
return ts->info->end_code;
37+
}
38+
39+
uint64_t qemu_plugin_entry_code(void)
40+
{
41+
TaskState *ts = get_task_state(current_cpu);
42+
return ts->info->entry;
43+
}

contrib/plugins/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ if t.length() > 0
2626
else
2727
run_target('contrib-plugins', command: find_program('true'))
2828
endif
29+
30+
plugin_modules += t

include/qemu/plugin-memory.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef PLUGIN_MEMORY_H
1010
#define PLUGIN_MEMORY_H
1111

12-
#include "exec/cpu-defs.h"
1312
#include "exec/hwaddr.h"
1413

1514
struct qemu_plugin_hwaddr {

0 commit comments

Comments
 (0)