* [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR
@ 2025-10-16 15:03 Alex Bennée
2025-10-16 15:03 ` [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs Alex Bennée
` (10 more replies)
0 siblings, 11 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki
Softfreeze is only a few short weeks away so I want to flush out what
is ready from my various maintainer trees.
Most have already been reviewed from the various sub-trees but the
following could still do with a quick look over:
hw/display: add blob map/unmap trace events
gitlab: drop aarch32 runner and associated bits
gitlab: use template for ubuntu-24.04-aarch64 jobs
Alex.
Alex Bennée (7):
gitlab: use template for ubuntu-24.04-aarch64 jobs
gitlab: drop aarch32 runner and associated bits
hw/display: add blob map/unmap trace events
docs/system: split VirtIO devices from the rest
docs/system: unify the naming style for VirtIO devices
docs/system: drop vhost-user-rng docs
docs/system: merge vhost-user-input into vhost-user-contrib
Andrew Keesler (1):
Support per-head resolutions with virtio-gpu
Dongwon Kim (1):
ui/gtk-gl-area: Remove extra draw call in refresh
Peter Maydell (1):
tests/tcg/multiarch/linux/linux-test: Don't try to test atime update
Pierrick Bouvier (1):
contrib/plugins/uftrace_symbols.py: generate debug files to map
symbols to source
docs/system/device-emulation.rst | 18 +-
docs/system/devices/vfio-user.rst | 2 +-
docs/system/devices/vhost-user-input.rst | 45 ----
docs/system/devices/vhost-user-rng.rst | 41 ----
docs/system/devices/virtio/index.rst | 29 +++
.../devices/virtio/vhost-user-contrib.rst | 87 +++++++
.../devices/{ => virtio}/vhost-user.rst | 22 +-
.../devices/{ => virtio}/virtio-gpu.rst | 4 +-
.../devices/{ => virtio}/virtio-pmem.rst | 6 +-
.../devices/{ => virtio}/virtio-snd.rst | 2 +-
qapi/virtio.json | 10 +-
hw/display/virtio-gpu-base.c | 9 +
hw/display/virtio-gpu-virgl.c | 4 +
tests/tcg/multiarch/linux/linux-test.c | 9 +-
ui/gtk-gl-area.c | 17 +-
.gitlab-ci.d/custom-runners.yml | 1 -
.../custom-runners/ubuntu-24.04-aarch32.yml | 25 --
.../custom-runners/ubuntu-24.04-aarch64.yml | 230 ++++++++----------
contrib/plugins/uftrace_symbols.py | 120 +++++----
hw/display/trace-events | 2 +
scripts/ci/setup/ubuntu/build-environment.yml | 17 --
.../setup/ubuntu/ubuntu-2204-armhf-cross.yml | 127 ----------
22 files changed, 361 insertions(+), 466 deletions(-)
delete mode 100644 docs/system/devices/vhost-user-input.rst
delete mode 100644 docs/system/devices/vhost-user-rng.rst
create mode 100644 docs/system/devices/virtio/index.rst
create mode 100644 docs/system/devices/virtio/vhost-user-contrib.rst
rename docs/system/devices/{ => virtio}/vhost-user.rst (77%)
rename docs/system/devices/{ => virtio}/virtio-gpu.rst (99%)
rename docs/system/devices/{ => virtio}/virtio-pmem.rst (98%)
rename docs/system/devices/{ => virtio}/virtio-snd.rst (99%)
delete mode 100644 .gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml
delete mode 100644 scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
--
2.47.3
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:32 ` Pierrick Bouvier
2025-10-17 17:43 ` Richard Henderson
2025-10-16 15:03 ` [PATCH 02/11] gitlab: drop aarch32 runner and associated bits Alex Bennée
` (9 subsequent siblings)
10 siblings, 2 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki
Most of the test is pure boilerplate so to save ourselves from
repetition move all the main bits into a minimal copy of
native_build_job_template but without the caching.
We keep all the current allow_fail and configure setups but do take
the opportunity to replace the -j`nproc --ignore=40` hack with
something that almost, but not quite, saturates the machine its being
built on.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.../custom-runners/ubuntu-24.04-aarch64.yml | 230 ++++++++----------
1 file changed, 96 insertions(+), 134 deletions(-)
diff --git a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
index d26c7827f45..46db9ae0138 100644
--- a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
+++ b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
@@ -2,150 +2,112 @@
# setup by the scripts/ci/setup/ubuntu/build-environment.yml task
# "Install basic packages to build QEMU on Ubuntu 24.04"
+.ubuntu_aarch64_template:
+ extends: .custom_runner_template
+ needs: []
+ stage: build
+ tags:
+ - ubuntu_24.04
+ - aarch64
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
+ - if: "$AARCH64_RUNNER_AVAILABLE"
+ before_script:
+ - source scripts/ci/gitlab-ci-section
+ - section_start setup "Pre-script setup"
+ - JOBS=$(expr $(nproc) - 4)
+ - section_end setup
+ script:
+ - mkdir build
+ - cd build
+ - section_start configure "Running configure"
+ - ../configure $CONFIGURE_ARGS ||
+ { cat config.log meson-logs/meson-log.txt && exit 1; }
+ - section_end configure
+ - section_start build "Building QEMU"
+ - make --output-sync -j"$JOBS"
+ - section_end build
+ - section_start test "Running tests"
+ - if test -n "$MAKE_CHECK_ARGS";
+ then
+ make -j"$JOBS" $MAKE_CHECK_ARGS ;
+ fi
+ - section_end test
+
ubuntu-24.04-aarch64-all-linux-static:
- extends: .custom_runner_template
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch64
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- - if: "$AARCH64_RUNNER_AVAILABLE"
- script:
- - mkdir build
- - cd build
- # Disable -static-pie due to build error with system libc:
- # https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1987438
- - ../configure --enable-debug --static --disable-system --disable-pie
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make --output-sync -j`nproc --ignore=40`
- - make check-tcg
- - make --output-sync -j`nproc --ignore=40` check
+ extends: .ubuntu_aarch64_template
+ variables:
+ # Disable -static-pie due to build error with system libc:
+ # https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1987438
+ CONFIGURE_ARGS: --enable-debug --static --disable-system --disable-pie
+ MAKE_CHECK_ARGS: check-tcg
ubuntu-24.04-aarch64-all:
- extends: .custom_runner_template
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch64
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- when: manual
- allow_failure: true
- - if: "$AARCH64_RUNNER_AVAILABLE"
- when: manual
- allow_failure: true
- script:
- - mkdir build
- - cd build
- - ../configure
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make --output-sync -j`nproc --ignore=40`
- - make --output-sync -j`nproc --ignore=40` check
+ extends: .ubuntu_aarch64_template
+ variables:
+ MAKE_CHECK_ARGS: check
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
+ when: manual
+ allow_failure: true
+ - if: "$AARCH64_RUNNER_AVAILABLE"
+ when: manual
+ allow_failure: true
ubuntu-24.04-aarch64-without-defaults:
- extends: .custom_runner_template
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch64
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- when: manual
- allow_failure: true
- - if: "$AARCH64_RUNNER_AVAILABLE"
- when: manual
- allow_failure: true
- script:
- - mkdir build
- - cd build
- - ../configure --disable-user --without-default-devices --without-default-features
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make --output-sync -j`nproc --ignore=40`
- - make --output-sync -j`nproc --ignore=40` check
+ extends: .ubuntu_aarch64_template
+ variables:
+ CONFIGURE_ARGS: --disable-user --without-default-devices --without-default-features
+ MAKE_CHECK_ARGS: check
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
+ when: manual
+ allow_failure: true
+ - if: "$AARCH64_RUNNER_AVAILABLE"
+ when: manual
+ allow_failure: true
ubuntu-24.04-aarch64-alldbg:
- extends: .custom_runner_template
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch64
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- - if: "$AARCH64_RUNNER_AVAILABLE"
- script:
- - mkdir build
- - cd build
- - ../configure --enable-debug
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make clean
- - make --output-sync -j`nproc --ignore=40`
- - make --output-sync -j`nproc --ignore=40` check
+ extends: .ubuntu_aarch64_template
+ variables:
+ CONFIGURE_ARGS: --enable-debug
+ MAKE_CHECK_ARGS: check-tcg
ubuntu-24.04-aarch64-clang:
- extends: .custom_runner_template
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch64
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- when: manual
- allow_failure: true
- - if: "$AARCH64_RUNNER_AVAILABLE"
- when: manual
- allow_failure: true
- script:
- - mkdir build
- - cd build
- - ../configure --disable-libssh --cc=clang --cxx=clang++ --enable-ubsan
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make --output-sync -j`nproc --ignore=40`
- - make --output-sync -j`nproc --ignore=40` check
+ extends: .ubuntu_aarch64_template
+ variables:
+ CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-ubsan
+ MAKE_CHECK_ARGS: check
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
+ when: manual
+ allow_failure: true
+ - if: "$AARCH64_RUNNER_AVAILABLE"
+ when: manual
+ allow_failure: true
ubuntu-24.04-aarch64-tci:
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch64
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- when: manual
- allow_failure: true
- - if: "$AARCH64_RUNNER_AVAILABLE"
- when: manual
- allow_failure: true
- script:
- - mkdir build
- - cd build
- - ../configure --enable-tcg-interpreter
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make --output-sync -j`nproc --ignore=40`
+ extends: .ubuntu_aarch64_template
+ variables:
+ CONFIGURE_ARGS: --enable-tcg-interpreter
+ MAKE_CHECK_ARGS: check
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
+ when: manual
+ allow_failure: true
+ - if: "$AARCH64_RUNNER_AVAILABLE"
+ when: manual
+ allow_failure: true
ubuntu-24.04-aarch64-notcg:
- extends: .custom_runner_template
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch64
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- when: manual
- allow_failure: true
- - if: "$AARCH64_RUNNER_AVAILABLE"
- when: manual
- allow_failure: true
- script:
- - mkdir build
- - cd build
- - ../configure --disable-tcg --with-devices-aarch64=minimal
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make --output-sync -j`nproc --ignore=40`
- - make --output-sync -j`nproc --ignore=40` check
+ extends: .ubuntu_aarch64_template
+ variables:
+ CONFIGURE_ARGS: --disable-tcg --with-devices-aarch64=minimal
+ MAKE_CHECK_ARGS: check
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
+ when: manual
+ allow_failure: true
+ - if: "$AARCH64_RUNNER_AVAILABLE"
+ when: manual
+ allow_failure: true
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 02/11] gitlab: drop aarch32 runner and associated bits
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
2025-10-16 15:03 ` [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:31 ` Pierrick Bouvier
2025-10-17 17:56 ` Richard Henderson
2025-10-16 15:03 ` [PATCH 03/11] tests/tcg/multiarch/linux/linux-test: Don't try to test atime update Alex Bennée
` (8 subsequent siblings)
10 siblings, 2 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki
While working out what hoops to jump through to get a full set of
aarch32 packages installed on the aarch64 runner it was pointed out 32
bit host support is deprecated. As the extra packages where needed for
system emulation (marked deprecated since 8.0!) there didn't seem much
point keeping this in.
While the full expunging of 32 bit host support will probably be done
for 11.0 we can at least reduce the CI burden a bit now.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitlab-ci.d/custom-runners.yml | 1 -
.../custom-runners/ubuntu-24.04-aarch32.yml | 25 ----
scripts/ci/setup/ubuntu/build-environment.yml | 17 ---
.../setup/ubuntu/ubuntu-2204-armhf-cross.yml | 127 ------------------
4 files changed, 170 deletions(-)
delete mode 100644 .gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml
delete mode 100644 scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
diff --git a/.gitlab-ci.d/custom-runners.yml b/.gitlab-ci.d/custom-runners.yml
index 3eb8216d571..142fbf4a242 100644
--- a/.gitlab-ci.d/custom-runners.yml
+++ b/.gitlab-ci.d/custom-runners.yml
@@ -31,4 +31,3 @@
include:
- local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml'
- local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml'
- - local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml'
diff --git a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml
deleted file mode 100644
index 75029c9187e..00000000000
--- a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-# All ubuntu-24.04 jobs should run successfully in an environment
-# setup by the scripts/ci/setup/ubuntu/build-environment.yml task
-# "Install basic packages to build QEMU on Ubuntu 24.04"
-
-ubuntu-24.04-aarch32-all:
- extends: .custom_runner_template
- needs: []
- stage: build
- tags:
- - ubuntu_24.04
- - aarch32
- rules:
- - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
- when: manual
- allow_failure: true
- - if: "$AARCH32_RUNNER_AVAILABLE"
- when: manual
- allow_failure: true
- script:
- - mkdir build
- - cd build
- - ../configure --cross-prefix=arm-linux-gnueabihf-
- || { cat config.log meson-logs/meson-log.txt; exit 1; }
- - make --output-sync -j`nproc --ignore=40`
- - make --output-sync -j`nproc --ignore=40` check
diff --git a/scripts/ci/setup/ubuntu/build-environment.yml b/scripts/ci/setup/ubuntu/build-environment.yml
index 6042750cb4d..0f8ec5fab04 100644
--- a/scripts/ci/setup/ubuntu/build-environment.yml
+++ b/scripts/ci/setup/ubuntu/build-environment.yml
@@ -47,21 +47,4 @@
- ansible_facts['distribution'] == 'Ubuntu'
- ansible_facts['distribution_version'] == '24.04'
- - name: Install armhf cross-compile packages to build QEMU on AArch64 Ubuntu 24.04
- package:
- name:
- - binutils-arm-linux-gnueabihf
- - gcc-arm-linux-gnueabihf
- - libblkid-dev:armhf
- - libc6-dev:armhf
- - libffi-dev:armhf
- - libglib2.0-dev:armhf
- - libmount-dev:armhf
- - libpcre2-dev:armhf
- - libpixman-1-dev:armhf
- - zlib1g-dev:armhf
- when:
- - ansible_facts['distribution'] == 'Ubuntu'
- - ansible_facts['distribution_version'] == '24.04'
- - ansible_facts['architecture'] == 'aarch64'
diff --git a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml b/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
deleted file mode 100644
index 0cc34cd10b9..00000000000
--- a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
+++ /dev/null
@@ -1,127 +0,0 @@
-# THIS FILE WAS AUTO-GENERATED
-#
-# $ lcitool variables --cross-arch armv7l ubuntu-2204 qemu
-#
-# https://gitlab.com/libvirt/libvirt-ci
-
-packages:
- - bash
- - bc
- - bison
- - bsdextrautils
- - bzip2
- - ca-certificates
- - ccache
- - dbus
- - debianutils
- - diffutils
- - exuberant-ctags
- - findutils
- - flex
- - gcc
- - gcovr
- - gettext
- - git
- - hostname
- - libglib2.0-dev
- - libpcre2-dev
- - libsndio-dev
- - libspice-protocol-dev
- - llvm
- - locales
- - make
- - meson
- - mtools
- - ncat
- - ninja-build
- - openssh-client
- - pkgconf
- - python3
- - python3-numpy
- - python3-opencv
- - python3-pillow
- - python3-pip
- - python3-sphinx
- - python3-sphinx-rtd-theme
- - python3-tomli
- - python3-venv
- - python3-yaml
- - rpm2cpio
- - sed
- - socat
- - sparse
- - swtpm
- - tar
- - tesseract-ocr
- - tesseract-ocr-eng
- - xorriso
- - zstd
- - gcc-arm-linux-gnueabihf
- - libaio-dev:armhf
- - libasan6:armhf
- - libasound2-dev:armhf
- - libattr1-dev:armhf
- - libbpf-dev:armhf
- - libbrlapi-dev:armhf
- - libbz2-dev:armhf
- - libc6-dev:armhf
- - libcacard-dev:armhf
- - libcap-ng-dev:armhf
- - libcapstone-dev:armhf
- - libcmocka-dev:armhf
- - libcurl4-gnutls-dev:armhf
- - libdaxctl-dev:armhf
- - libdrm-dev:armhf
- - libepoxy-dev:armhf
- - libfdt-dev:armhf
- - libffi-dev:armhf
- - libfuse3-dev:armhf
- - libgbm-dev:armhf
- - libgcrypt20-dev:armhf
- - libglib2.0-dev:armhf
- - libglusterfs-dev:armhf
- - libgnutls28-dev:armhf
- - libgtk-3-dev:armhf
- - libibumad-dev:armhf
- - libibverbs-dev:armhf
- - libiscsi-dev:armhf
- - libjemalloc-dev:armhf
- - libjpeg-turbo8-dev:armhf
- - libjson-c-dev:armhf
- - liblttng-ust-dev:armhf
- - liblzo2-dev:armhf
- - libncursesw5-dev:armhf
- - libnfs-dev:armhf
- - libnuma-dev:armhf
- - libpam0g-dev:armhf
- - libpipewire-0.3-dev:armhf
- - libpixman-1-dev:armhf
- - libpng-dev:armhf
- - libpulse-dev:armhf
- - librbd-dev:armhf
- - librdmacm-dev:armhf
- - libsasl2-dev:armhf
- - libsdl2-dev:armhf
- - libsdl2-image-dev:armhf
- - libseccomp-dev:armhf
- - libselinux1-dev:armhf
- - libslirp-dev:armhf
- - libsnappy-dev:armhf
- - libspice-server-dev:armhf
- - libssh-dev:armhf
- - libsystemd-dev:armhf
- - libtasn1-6-dev:armhf
- - libubsan1:armhf
- - libudev-dev:armhf
- - liburing-dev:armhf
- - libusb-1.0-0-dev:armhf
- - libusbredirhost-dev:armhf
- - libvdeplug-dev:armhf
- - libvirglrenderer-dev:armhf
- - libvte-2.91-dev:armhf
- - libxen-dev:armhf
- - libzstd-dev:armhf
- - nettle-dev:armhf
- - systemtap-sdt-dev:armhf
- - zlib1g-dev:armhf
-
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 03/11] tests/tcg/multiarch/linux/linux-test: Don't try to test atime update
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
2025-10-16 15:03 ` [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs Alex Bennée
2025-10-16 15:03 ` [PATCH 02/11] gitlab: drop aarch32 runner and associated bits Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-17 18:02 ` Richard Henderson
2025-10-16 15:03 ` [PATCH 04/11] Support per-head resolutions with virtio-gpu Alex Bennée
` (7 subsequent siblings)
10 siblings, 1 reply; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki, Peter Maydell, qemu-stable
From: Peter Maydell <peter.maydell@linaro.org>
The linux-test test includes an attempt to check the utime and stat
syscalls by setting the atime and mtime of a file to specific values,
and then calling stat() to check that the values read back correctly.
Unfortunately this is flaky, as it will fail if some other process
(for instance a virus scanner, backup program, etc) gets in and reads
the file between the utime() and stat() call, resulting in a host
syscall sequence like this:
utimensat(AT_FDCWD, "file2",
[{tv_sec=1001, tv_nsec=0} /* 1970-01-01T01:16:41+0100 */,
{tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */], 0) = 0
# successfully set atime to 1001 and mtime to 1000
statx(AT_FDCWD, "file2", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT,
STATX_BASIC_STATS,
{stx_mask=STATX_BASIC_STATS|STATX_MNT_ID,
stx_blksize=4096, stx_attributes=0, stx_nlink=1, stx_uid=32808,
stx_gid=32808, stx_mode=S_IFREG|0600, stx_ino=21659016,
stx_size=100, stx_blocks=8,
stx_attributes_mask=STATX_ATTR_COMPRESSED|STATX_ATTR_IMMUTABLE|
STATX_ATTR_APPEND|STATX_ATTR_NODUMP|STATX_ATTR_ENCRYPTED|
STATX_ATTR_AUTOMOUNT|STATX_ATTR_MOUNT_ROOT|STATX_ATTR_VERITY|
STATX_ATTR_DAX,
stx_atime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
stx_ctime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
stx_mtime={tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */,
stx_rdev_major=0, stx_rdev_minor=0, stx_dev_major=252,
stx_dev_minor=0, stx_mnt_id=0x1f}) = 0
# but when we statx the file, we get back an mtime of 1000
# but an atime corresponding to when the other process read it
and which will cause the test program to fail with the error
message "stat time".
In theory we could defend against this by e.g. operating on files in
a dummy loopback mount filesystem which we mounted as 'noatime', but
this isn't worth the hassle. Just drop the check on atime.
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/tcg/multiarch/linux/linux-test.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/tcg/multiarch/linux/linux-test.c b/tests/tcg/multiarch/linux/linux-test.c
index 64f57cb287e..bf6e0fda262 100644
--- a/tests/tcg/multiarch/linux/linux-test.c
+++ b/tests/tcg/multiarch/linux/linux-test.c
@@ -155,9 +155,14 @@ static void test_file(void)
error("stat mode");
if ((st.st_mode & 0777) != 0600)
error("stat mode2");
- if (st.st_atime != 1001 ||
- st.st_mtime != 1000)
+ /*
+ * Only check mtime, not atime: other processes such as
+ * virus scanners might race with this test program and get
+ * in and update the atime, causing random failures.
+ */
+ if (st.st_mtime != 1000) {
error("stat time");
+ }
chk_error(stat(tmpdir, &st));
if (!S_ISDIR(st.st_mode))
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 04/11] Support per-head resolutions with virtio-gpu
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (2 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 03/11] tests/tcg/multiarch/linux/linux-test: Don't try to test atime update Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:03 ` [PATCH 05/11] ui/gtk-gl-area: Remove extra draw call in refresh Alex Bennée
` (6 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki, Andrew Keesler, Daniel P. Berrangé
From: Andrew Keesler <ankeesler@google.com>
In 454f4b0f, we started down the path of supporting separate
configurations per display head (e.g., you have 2 heads - one with
EDID name "AAA" and the other with EDID name "BBB").
In this change, we add resolution to this configuration surface (e.g.,
you have 2 heads - one with resolution 111x222 and the other with
resolution 333x444).
-display vnc=localhost:0,id=aaa,display=vga,head=0 \
-display vnc=localhost:1,id=bbb,display=vga,head=1 \
-device '{"driver":"virtio-vga",
"max_outputs":2,
"id":"vga",
"outputs":[
{
"name":"AAA",
"xres":111,
"yres":222
},
{
"name":"BBB",
"xres":333,
"yres":444
}
]}'
Here is the behavior matrix of the current resolution configuration
surface (xres/yres) with the new resolution configuration surface
(outputs[i].xres/yres).
Case: !(xres || yres) && !(outputs[i].has_xres && outputs[i].has_yres)
Behavior: current behavior - outputs[0] enabled with default xres/yres
Case: (xres || yres) && !(outputs[i].has_xres && outputs[i].has_yres)
Behavior: current behavior - outputs[0] enabled with xres/yres
Case: !(xres || yres) && (outputs[i].has_xres && outputs[i].has_yres)
Behavior: new behavior - outputs[i] enabled with outputs[i].xres/yres
Case: (xres || yres) && (outputs[i].has_xres && outputs[i].has_yres)
Behavior: new behavior - outputs[i] enabled with outputs[i].xres/yres
Signed-off-by: Andrew Keesler <ankeesler@google.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250902141312.750525-2-ankeesler@google.com>
[AJB: dropped pointless output_idx range check, tweak commit]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
qapi/virtio.json | 10 ++++++++--
hw/display/virtio-gpu-base.c | 9 +++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/qapi/virtio.json b/qapi/virtio.json
index 05295ab6655..0ce789bb22f 100644
--- a/qapi/virtio.json
+++ b/qapi/virtio.json
@@ -971,15 +971,21 @@
##
# @VirtIOGPUOutput:
#
-# Describes configuration of a VirtIO GPU output.
+# Describes configuration of a VirtIO GPU output. If both xres and
+# yres are set, they take precedence over root virtio-gpu
+# resolution configuration and enable the corresponding output.
#
# @name: the name of the output
#
+# @xres: horizontal resolution of the output in pixels (since 10.2)
+#
+# @yres: vertical resolution of the output in pixels (since 10.2)
+#
# Since: 10.1
##
{ 'struct': 'VirtIOGPUOutput',
- 'data': { 'name': 'str' } }
+ 'data': { 'name': 'str', '*xres': 'uint16', '*yres': 'uint16' } }
##
# @DummyVirtioForceArrays:
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index 7269477a1c8..14058f6bffb 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -233,6 +233,15 @@ virtio_gpu_base_device_realize(DeviceState *qdev,
g->req_state[0].width = g->conf.xres;
g->req_state[0].height = g->conf.yres;
+ for (output_idx = 0, node = g->conf.outputs;
+ node; output_idx++, node = node->next) {
+ if (node->value->has_xres && node->value->has_yres) {
+ g->enabled_output_bitmask |= (1 << output_idx);
+ g->req_state[output_idx].width = node->value->xres;
+ g->req_state[output_idx].height = node->value->yres;
+ }
+ }
+
g->hw_ops = &virtio_gpu_ops;
for (i = 0; i < g->conf.max_outputs; i++) {
g->scanout[i].con =
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 05/11] ui/gtk-gl-area: Remove extra draw call in refresh
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (3 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 04/11] Support per-head resolutions with virtio-gpu Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:03 ` [PATCH 06/11] hw/display: add blob map/unmap trace events Alex Bennée
` (5 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki, Dongwon Kim, Vivek Kasireddy, qemu-stable
From: Dongwon Kim <dongwon.kim@intel.com>
This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
which causes some guest display corruption when gtk-gl-area
is used for GTK rendering (e.g. Wayland Compositor) possibly due to
simulataneous accesses on the guest frame buffer by host compositor
and the guest.
Fixes: 77bf310084 ("ui/gtk: Draw guest frame at refresh cycle")
Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20250214170813.2234754-1-dongwon.kim@intel.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250603110204.838117-12-alex.bennee@linaro.org>
Cc: qemu-stable@nongnu.org
---
vpre-PR:
- added large comment where draw command was removed
---
ui/gtk-gl-area.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 05fc38096ec..cd86022d264 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -165,7 +165,22 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
if (vc->gfx.guest_fb.dmabuf &&
qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
- gd_gl_area_draw(vc);
+ /*
+ * gd_egl_refresh() calls gd_egl_draw() if a DMA-BUF draw has already
+ * been submitted, but this function does not call gd_gl_area_draw() in
+ * such a case due to display corruption.
+ *
+ * Calling gd_gl_area_draw() is necessary to prevent a situation where
+ * there is a scheduled draw event but it won't happen bacause the window
+ * is currently in inactive state (minimized or tabified). If draw is not
+ * done for a long time, gl_block timeout and/or fence timeout (on the
+ * guest) will happen eventually.
+ *
+ * However, it is found that calling gd_gl_area_draw() here causes guest
+ * display corruption on a Wayland Compositor. The display corruption is
+ * more serious than the possible fence timeout so gd_gl_area_draw() is
+ * omitted for now.
+ */
return;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 06/11] hw/display: add blob map/unmap trace events
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (4 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 05/11] ui/gtk-gl-area: Remove extra draw call in refresh Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:31 ` Pierrick Bouvier
2025-10-16 15:03 ` [PATCH 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source Alex Bennée
` (4 subsequent siblings)
10 siblings, 1 reply; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki
As these events happen dynamically as the guest does various things
they are quite handy to trace.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
hw/display/virtio-gpu-virgl.c | 4 ++++
hw/display/trace-events | 2 ++
2 files changed, 6 insertions(+)
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 94ddc01f91c..07f6355ad62 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -134,6 +134,8 @@ virtio_gpu_virgl_map_resource_blob(VirtIOGPU *g,
res->mr = mr;
+ trace_virtio_gpu_cmd_res_map_blob(res->base.resource_id, vmr, mr);
+
return 0;
}
@@ -153,6 +155,8 @@ virtio_gpu_virgl_unmap_resource_blob(VirtIOGPU *g,
vmr = to_hostmem_region(res->mr);
+ trace_virtio_gpu_cmd_res_unmap_blob(res->base.resource_id, mr, vmr->finish_unmapping);
+
/*
* Perform async unmapping in 3 steps:
*
diff --git a/hw/display/trace-events b/hw/display/trace-events
index 52786e6e184..e323a82cff2 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -38,6 +38,8 @@ virtio_gpu_cmd_set_scanout_blob(uint32_t id, uint32_t res, uint32_t w, uint32_t
virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint32_t h) "res 0x%x, fmt 0x%x, w %d, h %d"
virtio_gpu_cmd_res_create_3d(uint32_t res, uint32_t fmt, uint32_t w, uint32_t h, uint32_t d) "res 0x%x, fmt 0x%x, w %d, h %d, d %d"
virtio_gpu_cmd_res_create_blob(uint32_t res, uint64_t size) "res 0x%x, size %" PRId64
+virtio_gpu_cmd_res_map_blob(uint32_t res, void *vmr, void *mr) "res 0x%x, vmr %p, mr %p"
+virtio_gpu_cmd_res_unmap_blob(uint32_t res, void *mr, bool finish_unmapping) "res 0x%x, mr %p, finish_unmapping %d"
virtio_gpu_cmd_res_unref(uint32_t res) "res 0x%x"
virtio_gpu_cmd_res_back_attach(uint32_t res) "res 0x%x"
virtio_gpu_cmd_res_back_detach(uint32_t res) "res 0x%x"
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (5 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 06/11] hw/display: add blob map/unmap trace events Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-19 7:56 ` Akihiko Odaki
2025-10-16 15:03 ` [PATCH 08/11] docs/system: split VirtIO devices from the rest Alex Bennée
` (3 subsequent siblings)
10 siblings, 1 reply; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Enhance uftrace_symbols.py to generate .dbg files, containing
source location for every symbol present in .sym file.
It allows to use `uftrace {replay,dump} --srcline` and show origin of
functions, connecting trace to original source code.
It was first implemented with pyelftools DWARF parser, which was way
too slow (~minutes) to get locations for every symbol in the linux
kernel. Thus, we use `addr2line` instead, which runs in seconds.
As well, there were some bugs with latest pyelftools release,
requiring to run master version, which is not installable with pip.
Thus, since we now require binutils (addr2line), we can ditch pyelftools
based implementation and simply rely on `nm` to get symbols information,
which is faster and better.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
contrib/plugins/uftrace_symbols.py | 120 +++++++++++++++++++----------
1 file changed, 78 insertions(+), 42 deletions(-)
diff --git a/contrib/plugins/uftrace_symbols.py b/contrib/plugins/uftrace_symbols.py
index b49e03203c8..45fb79c7a58 100755
--- a/contrib/plugins/uftrace_symbols.py
+++ b/contrib/plugins/uftrace_symbols.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
-# Create symbols and mapping files for uftrace.
+# Create symbols, debug and mapping files for uftrace.
#
# Copyright 2025 Linaro Ltd
# Author: Pierrick Bouvier <pierrick.bouvier@linaro.org>
@@ -9,44 +9,71 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import argparse
-import elftools # pip install pyelftools
import os
-
-from elftools.elf.elffile import ELFFile
-from elftools.elf.sections import SymbolTableSection
-
-def elf_func_symbols(elf):
- symbol_tables = [(idx, s) for idx, s in enumerate(elf.iter_sections())
- if isinstance(s, SymbolTableSection)]
- symbols = []
- for _, section in symbol_tables:
- for _, symbol in enumerate(section.iter_symbols()):
- if symbol_size(symbol) == 0:
- continue
- type = symbol['st_info']['type']
- if type == 'STT_FUNC' or type == 'STT_NOTYPE':
- symbols.append(symbol)
- symbols.sort(key = lambda x: symbol_addr(x))
+import subprocess
+
+class Symbol:
+ def __init__(self, name, addr, size):
+ self.name = name
+ # clamp addr to 48 bits, like uftrace entries
+ self.addr = addr & 0xffffffffffff
+ self.full_addr = addr
+ self.size = size
+
+ def set_loc(self, file, line):
+ self.file = file
+ self.line = line
+
+def get_symbols(elf_file):
+ symbols=[]
+ try:
+ out = subprocess.check_output(['nm', '--print-size', elf_file],
+ stderr=subprocess.STDOUT,
+ text=True)
+ except subprocess.CalledProcessError as e:
+ print(e.output)
+ raise
+ out = out.strip().split('\n')
+ for line in out:
+ info = line.split(' ')
+ if len(info) == 3:
+ # missing size information
+ continue
+ addr, size, type, name = info
+ # add only symbols from .text section
+ if type.lower() != 't':
+ continue
+ addr = int(addr, 16)
+ size = int(size, 16)
+ symbols.append(Symbol(name, addr, size))
+ symbols.sort(key = lambda x: x.addr)
return symbols
-def symbol_size(symbol):
- return symbol['st_size']
-
-def symbol_addr(symbol):
- addr = symbol['st_value']
- # clamp addr to 48 bits, like uftrace entries
- return addr & 0xffffffffffff
-
-def symbol_name(symbol):
- return symbol.name
+def find_symbols_locations(elf_file, symbols):
+ addresses = '\n'.join([hex(x.full_addr) for x in symbols])
+ try:
+ out = subprocess.check_output(['addr2line', '--exe', elf_file],
+ stderr=subprocess.STDOUT,
+ input=addresses, text=True)
+ except subprocess.CalledProcessError as e:
+ print(e.output)
+ raise
+ out = out.strip().split('\n')
+ assert len(out) == len(symbols)
+ for i in range(len(symbols)):
+ s = symbols[i]
+ file, line = out[i].split(':')
+ # addr2line may return 'line (discriminator [0-9]+)' sometimes,
+ # remove this to keep only line number.
+ line = line.split(' ')[0]
+ s.set_loc(file, line)
class BinaryFile:
def __init__(self, path, map_offset):
self.fullpath = os.path.realpath(path)
self.map_offset = map_offset
- with open(path, 'rb') as f:
- self.elf = ELFFile(f)
- self.symbols = elf_func_symbols(self.elf)
+ self.symbols = get_symbols(self.fullpath)
+ find_symbols_locations(self.fullpath, self.symbols)
def path(self):
return self.fullpath
@@ -56,24 +83,31 @@ def addr_start(self):
def addr_end(self):
last_sym = self.symbols[-1]
- return symbol_addr(last_sym) + symbol_size(last_sym) + self.map_offset
+ return last_sym.addr + last_sym.size + self.map_offset
def generate_symbol_file(self, prefix_symbols):
binary_name = os.path.basename(self.fullpath)
- sym_file_path = f'./uftrace.data/{binary_name}.sym'
+ sym_file_path = os.path.join('uftrace.data', f'{binary_name}.sym')
print(f'{sym_file_path} ({len(self.symbols)} symbols)')
with open(sym_file_path, 'w') as sym_file:
# print hexadecimal addresses on 48 bits
addrx = "0>12x"
for s in self.symbols:
- addr = symbol_addr(s)
+ addr = s.addr
addr = f'{addr:{addrx}}'
- size = f'{symbol_size(s):{addrx}}'
- name = symbol_name(s)
+ size = f'{s.size:{addrx}}'
if prefix_symbols:
- name = f'{binary_name}:{name}'
+ name = f'{binary_name}:{s.name}'
print(addr, size, 'T', name, file=sym_file)
+ def generate_debug_file(self):
+ binary_name = os.path.basename(self.fullpath)
+ dbg_file_path = os.path.join('uftrace.data', f'{binary_name}.dbg')
+ with open(dbg_file_path, 'w') as dbg_file:
+ for s in self.symbols:
+ print(f'F: {hex(s.addr)} {s.name}', file=dbg_file)
+ print(f'L: {s.line} {s.file}', file=dbg_file)
+
def parse_parameter(p):
s = p.split(":")
path = s[0]
@@ -84,7 +118,7 @@ def parse_parameter(p):
offset = s[1]
if not offset.startswith('0x'):
err = f'offset "{offset}" is not an hexadecimal constant. '
- err += 'It should starts with "0x".'
+ err += 'It should start with "0x".'
raise ValueError(err)
offset = int(offset, 16)
return path, offset
@@ -97,7 +131,7 @@ def is_from_user_mode(map_file_path):
return False
def generate_map(binaries):
- map_file_path = './uftrace.data/sid-0.map'
+ map_file_path = os.path.join('uftrace.data', 'sid-0.map')
if is_from_user_mode(map_file_path):
print(f'do not overwrite {map_file_path} generated from qemu-user')
@@ -124,7 +158,8 @@ def generate_map(binaries):
def main():
parser = argparse.ArgumentParser(description=
- 'generate symbol files for uftrace')
+ 'generate symbol files for uftrace. '
+ 'Require binutils (nm and addr2line).')
parser.add_argument('elf_file', nargs='+',
help='path to an ELF file. '
'Use /path/to/file:0xdeadbeef to add a mapping offset.')
@@ -133,8 +168,8 @@ def main():
action=argparse.BooleanOptionalAction)
args = parser.parse_args()
- if not os.path.exists('./uftrace.data'):
- os.mkdir('./uftrace.data')
+ if not os.path.exists('uftrace.data'):
+ os.mkdir('uftrace.data')
binaries = []
for file in args.elf_file:
@@ -145,6 +180,7 @@ def main():
for b in binaries:
b.generate_symbol_file(args.prefix_symbols)
+ b.generate_debug_file()
generate_map(binaries)
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 08/11] docs/system: split VirtIO devices from the rest
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (6 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:03 ` [PATCH 09/11] docs/system: unify the naming style for VirtIO devices Alex Bennée
` (2 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki, Manos Pitsidianakis
In an effort to tidy up our device documentation split the VirtIO docs
from the rest of the index and put the index to them at the front of
the list. Sort the remaining entries alphabetically and tweak the
references appropriately.
Add a short preface to the VirtIO section nudging users to use VirtIO
unless they specifically want a particular piece of hardware
emulation.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- fix recommend/recommended
---
docs/system/device-emulation.rst | 18 +++++------
docs/system/devices/vfio-user.rst | 2 +-
docs/system/devices/virtio/index.rst | 30 +++++++++++++++++++
.../devices/{ => virtio}/vhost-user-input.rst | 0
.../devices/{ => virtio}/vhost-user-rng.rst | 0
.../devices/{ => virtio}/vhost-user.rst | 0
.../devices/{ => virtio}/virtio-gpu.rst | 0
.../devices/{ => virtio}/virtio-pmem.rst | 0
.../devices/{ => virtio}/virtio-snd.rst | 0
9 files changed, 38 insertions(+), 12 deletions(-)
create mode 100644 docs/system/devices/virtio/index.rst
rename docs/system/devices/{ => virtio}/vhost-user-input.rst (100%)
rename docs/system/devices/{ => virtio}/vhost-user-rng.rst (100%)
rename docs/system/devices/{ => virtio}/vhost-user.rst (100%)
rename docs/system/devices/{ => virtio}/virtio-gpu.rst (100%)
rename docs/system/devices/{ => virtio}/virtio-pmem.rst (100%)
rename docs/system/devices/{ => virtio}/virtio-snd.rst (100%)
diff --git a/docs/system/device-emulation.rst b/docs/system/device-emulation.rst
index 911381643f1..db714ad47aa 100644
--- a/docs/system/device-emulation.rst
+++ b/docs/system/device-emulation.rst
@@ -82,22 +82,18 @@ Emulated Devices
.. toctree::
:maxdepth: 1
+ devices/virtio/index.rst
+
devices/can.rst
+ devices/canokey.rst
devices/ccid.rst
devices/cxl.rst
- devices/vfio-user.rst
- devices/ivshmem.rst
+ devices/igb.rst
devices/ivshmem-flat.rst
+ devices/ivshmem.rst
devices/keyboard.rst
devices/net.rst
devices/nvme.rst
- devices/usb.rst
- devices/vhost-user.rst
- devices/virtio-gpu.rst
- devices/virtio-pmem.rst
- devices/virtio-snd.rst
- devices/vhost-user-input.rst
- devices/vhost-user-rng.rst
- devices/canokey.rst
devices/usb-u2f.rst
- devices/igb.rst
+ devices/usb.rst
+ devices/vfio-user.rst
diff --git a/docs/system/devices/vfio-user.rst b/docs/system/devices/vfio-user.rst
index b6dcaa5615e..30c2215f4ea 100644
--- a/docs/system/devices/vfio-user.rst
+++ b/docs/system/devices/vfio-user.rst
@@ -6,7 +6,7 @@ vfio-user
QEMU includes a ``vfio-user`` client. The ``vfio-user`` specification allows for
implementing (PCI) devices in userspace outside of QEMU; it is similar to
-``vhost-user`` in this respect (see :doc:`vhost-user`), but can emulate arbitrary
+``vhost-user`` in this respect (see :doc:`virtio/vhost-user`), but can emulate arbitrary
PCI devices, not just ``virtio``. Whereas ``vfio`` is handled by the host
kernel, ``vfio-user``, while similar in implementation, is handled entirely in
userspace.
diff --git a/docs/system/devices/virtio/index.rst b/docs/system/devices/virtio/index.rst
new file mode 100644
index 00000000000..fc457ca74c7
--- /dev/null
+++ b/docs/system/devices/virtio/index.rst
@@ -0,0 +1,30 @@
+VirtIO Devices
+==============
+
+VirtIO devices are paravirtualized devices designed to be efficient to
+emulate and virtualize. Unless you are specifically trying to exercise
+a driver for some particular hardware they are the recommended device
+models to use for virtual machines.
+
+The `VirtIO specification`_ is an open standard managed by OASIS. It
+describes how a *driver* in a guest operating system interacts with
+the *device* model provided by QEMU. Multiple Operating Systems
+support drivers for VirtIO with Linux perhaps having the widest range
+of device types supported.
+
+The device implementation can either be provided wholly by QEMU, or in
+concert with the kernel (known as *vhost*). The device implementation
+can also be off-loaded to an external process via :ref:`vhost user
+<vhost_user>`.
+
+.. toctree::
+ :maxdepth: 1
+
+ virtio-gpu.rst
+ virtio-pmem.rst
+ virtio-snd.rst
+ vhost-user.rst
+ vhost-user-input.rst
+ vhost-user-rng.rst
+
+.. _VirtIO specification: https://docs.oasis-open.org/virtio/virtio/v1.3/virtio-v1.3.html
diff --git a/docs/system/devices/vhost-user-input.rst b/docs/system/devices/virtio/vhost-user-input.rst
similarity index 100%
rename from docs/system/devices/vhost-user-input.rst
rename to docs/system/devices/virtio/vhost-user-input.rst
diff --git a/docs/system/devices/vhost-user-rng.rst b/docs/system/devices/virtio/vhost-user-rng.rst
similarity index 100%
rename from docs/system/devices/vhost-user-rng.rst
rename to docs/system/devices/virtio/vhost-user-rng.rst
diff --git a/docs/system/devices/vhost-user.rst b/docs/system/devices/virtio/vhost-user.rst
similarity index 100%
rename from docs/system/devices/vhost-user.rst
rename to docs/system/devices/virtio/vhost-user.rst
diff --git a/docs/system/devices/virtio-gpu.rst b/docs/system/devices/virtio/virtio-gpu.rst
similarity index 100%
rename from docs/system/devices/virtio-gpu.rst
rename to docs/system/devices/virtio/virtio-gpu.rst
diff --git a/docs/system/devices/virtio-pmem.rst b/docs/system/devices/virtio/virtio-pmem.rst
similarity index 100%
rename from docs/system/devices/virtio-pmem.rst
rename to docs/system/devices/virtio/virtio-pmem.rst
diff --git a/docs/system/devices/virtio-snd.rst b/docs/system/devices/virtio/virtio-snd.rst
similarity index 100%
rename from docs/system/devices/virtio-snd.rst
rename to docs/system/devices/virtio/virtio-snd.rst
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 09/11] docs/system: unify the naming style for VirtIO devices
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (7 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 08/11] docs/system: split VirtIO devices from the rest Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:03 ` [PATCH 10/11] docs/system: drop vhost-user-rng docs Alex Bennée
2025-10-16 15:03 ` [PATCH 11/11] docs/system: merge vhost-user-input into vhost-user-contrib Alex Bennée
10 siblings, 0 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki
This makes the index look a little neater.
Reviewed-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
docs/system/devices/virtio/virtio-gpu.rst | 2 +-
docs/system/devices/virtio/virtio-pmem.rst | 6 ++----
docs/system/devices/virtio/virtio-snd.rst | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/docs/system/devices/virtio/virtio-gpu.rst b/docs/system/devices/virtio/virtio-gpu.rst
index b7eb0fc0e72..39d2fd2d21c 100644
--- a/docs/system/devices/virtio/virtio-gpu.rst
+++ b/docs/system/devices/virtio/virtio-gpu.rst
@@ -1,7 +1,7 @@
..
SPDX-License-Identifier: GPL-2.0-or-later
-virtio-gpu
+VirtIO GPU
==========
This document explains the setup and usage of the virtio-gpu device.
diff --git a/docs/system/devices/virtio/virtio-pmem.rst b/docs/system/devices/virtio/virtio-pmem.rst
index c82ac067315..0c24de83ec7 100644
--- a/docs/system/devices/virtio/virtio-pmem.rst
+++ b/docs/system/devices/virtio/virtio-pmem.rst
@@ -1,7 +1,5 @@
-
-===========
-virtio pmem
-===========
+VirtIO Persistent Memory
+========================
This document explains the setup and usage of the virtio pmem device.
The virtio pmem device is a paravirtualized persistent memory device
diff --git a/docs/system/devices/virtio/virtio-snd.rst b/docs/system/devices/virtio/virtio-snd.rst
index 2a9187fd701..3c797f66e03 100644
--- a/docs/system/devices/virtio/virtio-snd.rst
+++ b/docs/system/devices/virtio/virtio-snd.rst
@@ -1,4 +1,4 @@
-virtio sound
+VirtIO Sound
============
This document explains the setup and usage of the Virtio sound device.
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 10/11] docs/system: drop vhost-user-rng docs
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (8 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 09/11] docs/system: unify the naming style for VirtIO devices Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
2025-10-16 15:03 ` [PATCH 11/11] docs/system: merge vhost-user-input into vhost-user-contrib Alex Bennée
10 siblings, 0 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki
This is a fairly lightweight document which doesn't add much to the
general advice in vhost-user. Update the vhost-user docs to point
directly at the rust-vmm repo.
Reviewed-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
docs/system/devices/virtio/index.rst | 1 -
docs/system/devices/virtio/vhost-user-rng.rst | 41 -------------------
docs/system/devices/virtio/vhost-user.rst | 2 +-
3 files changed, 1 insertion(+), 43 deletions(-)
delete mode 100644 docs/system/devices/virtio/vhost-user-rng.rst
diff --git a/docs/system/devices/virtio/index.rst b/docs/system/devices/virtio/index.rst
index fc457ca74c7..e3839e61824 100644
--- a/docs/system/devices/virtio/index.rst
+++ b/docs/system/devices/virtio/index.rst
@@ -25,6 +25,5 @@ can also be off-loaded to an external process via :ref:`vhost user
virtio-snd.rst
vhost-user.rst
vhost-user-input.rst
- vhost-user-rng.rst
.. _VirtIO specification: https://docs.oasis-open.org/virtio/virtio/v1.3/virtio-v1.3.html
diff --git a/docs/system/devices/virtio/vhost-user-rng.rst b/docs/system/devices/virtio/vhost-user-rng.rst
deleted file mode 100644
index ead14053264..00000000000
--- a/docs/system/devices/virtio/vhost-user-rng.rst
+++ /dev/null
@@ -1,41 +0,0 @@
-.. _vhost_user_rng:
-
-QEMU vhost-user-rng - RNG emulation
-===================================
-
-Background
-----------
-
-What follows builds on the material presented in vhost-user.rst - it should
-be reviewed before moving forward with the content in this file.
-
-Description
------------
-
-The vhost-user-rng device implementation was designed to work with a random
-number generator daemon such as the one found in the vhost-device crate of
-the rust-vmm project available on github [1].
-
-[1]. https://github.com/rust-vmm/vhost-device
-
-Examples
---------
-
-The daemon should be started first:
-
-::
-
- host# vhost-device-rng --socket-path=rng.sock -c 1 -m 512 -p 1000
-
-The QEMU invocation needs to create a chardev socket the device can
-use to communicate as well as share the guests memory over a memfd.
-
-::
-
- host# qemu-system \
- -chardev socket,path=$(PATH)/rng.sock,id=rng0 \
- -device vhost-user-rng-pci,chardev=rng0 \
- -m 4096 \
- -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
- -numa node,memdev=mem \
- ...
diff --git a/docs/system/devices/virtio/vhost-user.rst b/docs/system/devices/virtio/vhost-user.rst
index bddf8df5ed5..9c9a28df380 100644
--- a/docs/system/devices/virtio/vhost-user.rst
+++ b/docs/system/devices/virtio/vhost-user.rst
@@ -45,7 +45,7 @@ platform details for what sort of virtio bus to use.
- :ref:`vhost_user_input`
* - vhost-user-rng
- Entropy driver
- - :ref:`vhost_user_rng`
+ - See https://github.com/rust-vmm/vhost-device
* - vhost-user-scmi
- System Control and Management Interface
- See https://github.com/rust-vmm/vhost-device
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 11/11] docs/system: merge vhost-user-input into vhost-user-contrib
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
` (9 preceding siblings ...)
2025-10-16 15:03 ` [PATCH 10/11] docs/system: drop vhost-user-rng docs Alex Bennée
@ 2025-10-16 15:03 ` Alex Bennée
10 siblings, 0 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-16 15:03 UTC (permalink / raw)
To: qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin, Alex Bennée,
Akihiko Odaki, Manos Pitsidianakis
We might as well group all the contrib submissions together and gently
dissuade people from using them in production. Update the references in
vhost-user to neatly refer to the storage daemon and the various
external rust backends.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- some typo fixes
---
docs/system/devices/virtio/index.rst | 2 +-
.../devices/virtio/vhost-user-contrib.rst | 87 +++++++++++++++++++
.../devices/virtio/vhost-user-input.rst | 45 ----------
docs/system/devices/virtio/vhost-user.rst | 22 ++---
docs/system/devices/virtio/virtio-gpu.rst | 2 +
5 files changed, 101 insertions(+), 57 deletions(-)
create mode 100644 docs/system/devices/virtio/vhost-user-contrib.rst
delete mode 100644 docs/system/devices/virtio/vhost-user-input.rst
diff --git a/docs/system/devices/virtio/index.rst b/docs/system/devices/virtio/index.rst
index e3839e61824..c292101ade6 100644
--- a/docs/system/devices/virtio/index.rst
+++ b/docs/system/devices/virtio/index.rst
@@ -24,6 +24,6 @@ can also be off-loaded to an external process via :ref:`vhost user
virtio-pmem.rst
virtio-snd.rst
vhost-user.rst
- vhost-user-input.rst
+ vhost-user-contrib.rst
.. _VirtIO specification: https://docs.oasis-open.org/virtio/virtio/v1.3/virtio-v1.3.html
diff --git a/docs/system/devices/virtio/vhost-user-contrib.rst b/docs/system/devices/virtio/vhost-user-contrib.rst
new file mode 100644
index 00000000000..48d04d2ade3
--- /dev/null
+++ b/docs/system/devices/virtio/vhost-user-contrib.rst
@@ -0,0 +1,87 @@
+vhost-user daemons in contrib
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+QEMU provides a number of :ref:`vhost_user` daemons in the contrib
+directory. They were often written when vhost-user was initially added
+to the code base. You should also consider if other vhost-user daemons
+such as those from the rust-vmm `vhost-device repository`_ are better
+suited for production use.
+
+.. _vhost-device repository: https://github.com/rust-vmm/vhost-device
+
+.. _vhost_user_block:
+
+vhost-user-block - block device
+===============================
+
+vhost-user-block is a backend for exposing block devices. It can
+present a flat file or block device as a simple block device to the
+guest. You almost certainly want to use the :ref:`storage-daemon`
+instead which supports a wide variety of storage modes and exports a
+number of interfaces including vhost-user.
+
+.. _vhost_user_gpu:
+
+vhost-user-gpu - gpu device
+===========================
+
+vhost-user-gpu presents a paravirtualized GPU and display controller.
+You probably want to use the internal :ref:`virtio_gpu` implementation
+if you want the latest features. There is also a `vhost_device_gpu`_
+daemon as part of the rust-vmm project.
+
+.. _vhost_device_gpu: https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-gpu
+
+.. _vhost_user_input:
+
+vhost-user-input - Input emulation
+==================================
+
+The Virtio input device is a paravirtualized device for input events.
+
+Description
+-----------
+
+The vhost-user-input device implementation was designed to work with a daemon
+polling on input devices and passes input events to the guest.
+
+QEMU provides a backend implementation in contrib/vhost-user-input.
+
+Linux kernel support
+--------------------
+
+Virtio input requires a guest Linux kernel built with the
+``CONFIG_VIRTIO_INPUT`` option.
+
+Examples
+--------
+
+The backend daemon should be started first:
+
+::
+
+ host# vhost-user-input --socket-path=input.sock \
+ --evdev-path=/dev/input/event17
+
+The QEMU invocation needs to create a chardev socket to communicate with the
+backend daemon and access the VirtIO queues with the guest over the
+:ref:`shared memory <shared_memory_object>`.
+
+::
+
+ host# qemu-system \
+ -chardev socket,path=/tmp/input.sock,id=mouse0 \
+ -device vhost-user-input-pci,chardev=mouse0 \
+ -m 4096 \
+ -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
+ -numa node,memdev=mem \
+ ...
+
+
+.. _vhost_user_scsi:
+
+vhost-user-scsi - SCSI controller
+=================================
+
+The vhost-user-scsi daemon can proxy iSCSI devices onto a virtualized
+SCSI controller.
diff --git a/docs/system/devices/virtio/vhost-user-input.rst b/docs/system/devices/virtio/vhost-user-input.rst
deleted file mode 100644
index 118eb78101c..00000000000
--- a/docs/system/devices/virtio/vhost-user-input.rst
+++ /dev/null
@@ -1,45 +0,0 @@
-.. _vhost_user_input:
-
-QEMU vhost-user-input - Input emulation
-=======================================
-
-This document describes the setup and usage of the Virtio input device.
-The Virtio input device is a paravirtualized device for input events.
-
-Description
------------
-
-The vhost-user-input device implementation was designed to work with a daemon
-polling on input devices and passes input events to the guest.
-
-QEMU provides a backend implementation in contrib/vhost-user-input.
-
-Linux kernel support
---------------------
-
-Virtio input requires a guest Linux kernel built with the
-``CONFIG_VIRTIO_INPUT`` option.
-
-Examples
---------
-
-The backend daemon should be started first:
-
-::
-
- host# vhost-user-input --socket-path=input.sock \
- --evdev-path=/dev/input/event17
-
-The QEMU invocation needs to create a chardev socket to communicate with the
-backend daemon and access the VirtIO queues with the guest over the
-:ref:`shared memory <shared_memory_object>`.
-
-::
-
- host# qemu-system \
- -chardev socket,path=/tmp/input.sock,id=mouse0 \
- -device vhost-user-input-pci,chardev=mouse0 \
- -m 4096 \
- -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
- -numa node,memdev=mem \
- ...
diff --git a/docs/system/devices/virtio/vhost-user.rst b/docs/system/devices/virtio/vhost-user.rst
index 9c9a28df380..f556a840e99 100644
--- a/docs/system/devices/virtio/vhost-user.rst
+++ b/docs/system/devices/virtio/vhost-user.rst
@@ -27,37 +27,37 @@ platform details for what sort of virtio bus to use.
- Notes
* - vhost-user-blk
- Block storage
- - See contrib/vhost-user-blk
+ - :ref:`storage-daemon`
* - vhost-user-fs
- File based storage driver
- - See https://gitlab.com/virtio-fs/virtiofsd
+ - `virtiofsd <https://gitlab.com/virtio-fs/virtiofsd>`_
* - vhost-user-gpio
- Proxy gpio pins to host
- - See https://github.com/rust-vmm/vhost-device
+ - `vhost-device-gpio <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-gpio>`_
* - vhost-user-gpu
- GPU driver
- - See contrib/vhost-user-gpu
+ - `vhost-device-gpu <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-gpu>`_ or :ref:`vhost_user_gpu`
* - vhost-user-i2c
- Proxy i2c devices to host
- - See https://github.com/rust-vmm/vhost-device
+ - `vhost-device-i2c <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-i2c>`_
* - vhost-user-input
- Generic input driver
- - :ref:`vhost_user_input`
+ - `vhost-device-input <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-input>`_ or :ref:`vhost_user_input`
* - vhost-user-rng
- Entropy driver
- - See https://github.com/rust-vmm/vhost-device
+ - `vhost-device-rng <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-rng>`_
* - vhost-user-scmi
- System Control and Management Interface
- - See https://github.com/rust-vmm/vhost-device
+ - `vhost-device-scmi <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-scmi>`_
* - vhost-user-snd
- Audio device
- - See https://github.com/rust-vmm/vhost-device/staging
+ - `vhost-device-sound <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-sound>`_
* - vhost-user-scsi
- SCSI based storage
- - See contrib/vhost-user-scsi
+ - :ref:`vhost_user_scsi`
* - vhost-user-vsock
- Socket based communication
- - See https://github.com/rust-vmm/vhost-device
+ - `vhost-device-vsock <https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-vsock>`_
The referenced *daemons* are not exhaustive, any conforming backend
implementing the device and using the vhost-user protocol should work.
diff --git a/docs/system/devices/virtio/virtio-gpu.rst b/docs/system/devices/virtio/virtio-gpu.rst
index 39d2fd2d21c..0f4bb304a9b 100644
--- a/docs/system/devices/virtio/virtio-gpu.rst
+++ b/docs/system/devices/virtio/virtio-gpu.rst
@@ -1,6 +1,8 @@
..
SPDX-License-Identifier: GPL-2.0-or-later
+.. _virtio_gpu:
+
VirtIO GPU
==========
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 06/11] hw/display: add blob map/unmap trace events
2025-10-16 15:03 ` [PATCH 06/11] hw/display: add blob map/unmap trace events Alex Bennée
@ 2025-10-16 15:31 ` Pierrick Bouvier
0 siblings, 0 replies; 21+ messages in thread
From: Pierrick Bouvier @ 2025-10-16 15:31 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Philippe Mathieu-Daudé, John Levon, Dmitry Osipenko,
Thomas Huth, Alexandre Iooss, Markus Armbruster, Eric Blake,
Mahmoud Mandour, Michael S. Tsirkin, Akihiko Odaki
On 10/16/25 8:03 AM, Alex Bennée wrote:
> As these events happen dynamically as the guest does various things
> they are quite handy to trace.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> hw/display/virtio-gpu-virgl.c | 4 ++++
> hw/display/trace-events | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
> index 94ddc01f91c..07f6355ad62 100644
> --- a/hw/display/virtio-gpu-virgl.c
> +++ b/hw/display/virtio-gpu-virgl.c
> @@ -134,6 +134,8 @@ virtio_gpu_virgl_map_resource_blob(VirtIOGPU *g,
>
> res->mr = mr;
>
> + trace_virtio_gpu_cmd_res_map_blob(res->base.resource_id, vmr, mr);
> +
> return 0;
> }
>
> @@ -153,6 +155,8 @@ virtio_gpu_virgl_unmap_resource_blob(VirtIOGPU *g,
>
> vmr = to_hostmem_region(res->mr);
>
> + trace_virtio_gpu_cmd_res_unmap_blob(res->base.resource_id, mr, vmr->finish_unmapping);
> +
> /*
> * Perform async unmapping in 3 steps:
> *
> diff --git a/hw/display/trace-events b/hw/display/trace-events
> index 52786e6e184..e323a82cff2 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -38,6 +38,8 @@ virtio_gpu_cmd_set_scanout_blob(uint32_t id, uint32_t res, uint32_t w, uint32_t
> virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint32_t h) "res 0x%x, fmt 0x%x, w %d, h %d"
> virtio_gpu_cmd_res_create_3d(uint32_t res, uint32_t fmt, uint32_t w, uint32_t h, uint32_t d) "res 0x%x, fmt 0x%x, w %d, h %d, d %d"
> virtio_gpu_cmd_res_create_blob(uint32_t res, uint64_t size) "res 0x%x, size %" PRId64
> +virtio_gpu_cmd_res_map_blob(uint32_t res, void *vmr, void *mr) "res 0x%x, vmr %p, mr %p"
> +virtio_gpu_cmd_res_unmap_blob(uint32_t res, void *mr, bool finish_unmapping) "res 0x%x, mr %p, finish_unmapping %d"
> virtio_gpu_cmd_res_unref(uint32_t res) "res 0x%x"
> virtio_gpu_cmd_res_back_attach(uint32_t res) "res 0x%x"
> virtio_gpu_cmd_res_back_detach(uint32_t res) "res 0x%x"
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 02/11] gitlab: drop aarch32 runner and associated bits
2025-10-16 15:03 ` [PATCH 02/11] gitlab: drop aarch32 runner and associated bits Alex Bennée
@ 2025-10-16 15:31 ` Pierrick Bouvier
2025-10-17 17:56 ` Richard Henderson
1 sibling, 0 replies; 21+ messages in thread
From: Pierrick Bouvier @ 2025-10-16 15:31 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Philippe Mathieu-Daudé, John Levon, Dmitry Osipenko,
Thomas Huth, Alexandre Iooss, Markus Armbruster, Eric Blake,
Mahmoud Mandour, Michael S. Tsirkin, Akihiko Odaki
On 10/16/25 8:03 AM, Alex Bennée wrote:
> While working out what hoops to jump through to get a full set of
> aarch32 packages installed on the aarch64 runner it was pointed out 32
> bit host support is deprecated. As the extra packages where needed for
> system emulation (marked deprecated since 8.0!) there didn't seem much
> point keeping this in.
>
> While the full expunging of 32 bit host support will probably be done
> for 11.0 we can at least reduce the CI burden a bit now.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> .gitlab-ci.d/custom-runners.yml | 1 -
> .../custom-runners/ubuntu-24.04-aarch32.yml | 25 ----
> scripts/ci/setup/ubuntu/build-environment.yml | 17 ---
> .../setup/ubuntu/ubuntu-2204-armhf-cross.yml | 127 ------------------
> 4 files changed, 170 deletions(-)
> delete mode 100644 .gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml
> delete mode 100644 scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
>
> diff --git a/.gitlab-ci.d/custom-runners.yml b/.gitlab-ci.d/custom-runners.yml
> index 3eb8216d571..142fbf4a242 100644
> --- a/.gitlab-ci.d/custom-runners.yml
> +++ b/.gitlab-ci.d/custom-runners.yml
> @@ -31,4 +31,3 @@
> include:
> - local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml'
> - local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml'
> - - local: '/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml'
> diff --git a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml
> deleted file mode 100644
> index 75029c9187e..00000000000
> --- a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch32.yml
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -# All ubuntu-24.04 jobs should run successfully in an environment
> -# setup by the scripts/ci/setup/ubuntu/build-environment.yml task
> -# "Install basic packages to build QEMU on Ubuntu 24.04"
> -
> -ubuntu-24.04-aarch32-all:
> - extends: .custom_runner_template
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch32
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - when: manual
> - allow_failure: true
> - - if: "$AARCH32_RUNNER_AVAILABLE"
> - when: manual
> - allow_failure: true
> - script:
> - - mkdir build
> - - cd build
> - - ../configure --cross-prefix=arm-linux-gnueabihf-
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make --output-sync -j`nproc --ignore=40`
> - - make --output-sync -j`nproc --ignore=40` check
> diff --git a/scripts/ci/setup/ubuntu/build-environment.yml b/scripts/ci/setup/ubuntu/build-environment.yml
> index 6042750cb4d..0f8ec5fab04 100644
> --- a/scripts/ci/setup/ubuntu/build-environment.yml
> +++ b/scripts/ci/setup/ubuntu/build-environment.yml
> @@ -47,21 +47,4 @@
> - ansible_facts['distribution'] == 'Ubuntu'
> - ansible_facts['distribution_version'] == '24.04'
>
> - - name: Install armhf cross-compile packages to build QEMU on AArch64 Ubuntu 24.04
> - package:
> - name:
> - - binutils-arm-linux-gnueabihf
> - - gcc-arm-linux-gnueabihf
> - - libblkid-dev:armhf
> - - libc6-dev:armhf
> - - libffi-dev:armhf
> - - libglib2.0-dev:armhf
> - - libmount-dev:armhf
> - - libpcre2-dev:armhf
> - - libpixman-1-dev:armhf
> - - zlib1g-dev:armhf
> - when:
> - - ansible_facts['distribution'] == 'Ubuntu'
> - - ansible_facts['distribution_version'] == '24.04'
> - - ansible_facts['architecture'] == 'aarch64'
>
> diff --git a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml b/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
> deleted file mode 100644
> index 0cc34cd10b9..00000000000
> --- a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
> +++ /dev/null
> @@ -1,127 +0,0 @@
> -# THIS FILE WAS AUTO-GENERATED
> -#
> -# $ lcitool variables --cross-arch armv7l ubuntu-2204 qemu
> -#
> -# https://gitlab.com/libvirt/libvirt-ci
> -
> -packages:
> - - bash
> - - bc
> - - bison
> - - bsdextrautils
> - - bzip2
> - - ca-certificates
> - - ccache
> - - dbus
> - - debianutils
> - - diffutils
> - - exuberant-ctags
> - - findutils
> - - flex
> - - gcc
> - - gcovr
> - - gettext
> - - git
> - - hostname
> - - libglib2.0-dev
> - - libpcre2-dev
> - - libsndio-dev
> - - libspice-protocol-dev
> - - llvm
> - - locales
> - - make
> - - meson
> - - mtools
> - - ncat
> - - ninja-build
> - - openssh-client
> - - pkgconf
> - - python3
> - - python3-numpy
> - - python3-opencv
> - - python3-pillow
> - - python3-pip
> - - python3-sphinx
> - - python3-sphinx-rtd-theme
> - - python3-tomli
> - - python3-venv
> - - python3-yaml
> - - rpm2cpio
> - - sed
> - - socat
> - - sparse
> - - swtpm
> - - tar
> - - tesseract-ocr
> - - tesseract-ocr-eng
> - - xorriso
> - - zstd
> - - gcc-arm-linux-gnueabihf
> - - libaio-dev:armhf
> - - libasan6:armhf
> - - libasound2-dev:armhf
> - - libattr1-dev:armhf
> - - libbpf-dev:armhf
> - - libbrlapi-dev:armhf
> - - libbz2-dev:armhf
> - - libc6-dev:armhf
> - - libcacard-dev:armhf
> - - libcap-ng-dev:armhf
> - - libcapstone-dev:armhf
> - - libcmocka-dev:armhf
> - - libcurl4-gnutls-dev:armhf
> - - libdaxctl-dev:armhf
> - - libdrm-dev:armhf
> - - libepoxy-dev:armhf
> - - libfdt-dev:armhf
> - - libffi-dev:armhf
> - - libfuse3-dev:armhf
> - - libgbm-dev:armhf
> - - libgcrypt20-dev:armhf
> - - libglib2.0-dev:armhf
> - - libglusterfs-dev:armhf
> - - libgnutls28-dev:armhf
> - - libgtk-3-dev:armhf
> - - libibumad-dev:armhf
> - - libibverbs-dev:armhf
> - - libiscsi-dev:armhf
> - - libjemalloc-dev:armhf
> - - libjpeg-turbo8-dev:armhf
> - - libjson-c-dev:armhf
> - - liblttng-ust-dev:armhf
> - - liblzo2-dev:armhf
> - - libncursesw5-dev:armhf
> - - libnfs-dev:armhf
> - - libnuma-dev:armhf
> - - libpam0g-dev:armhf
> - - libpipewire-0.3-dev:armhf
> - - libpixman-1-dev:armhf
> - - libpng-dev:armhf
> - - libpulse-dev:armhf
> - - librbd-dev:armhf
> - - librdmacm-dev:armhf
> - - libsasl2-dev:armhf
> - - libsdl2-dev:armhf
> - - libsdl2-image-dev:armhf
> - - libseccomp-dev:armhf
> - - libselinux1-dev:armhf
> - - libslirp-dev:armhf
> - - libsnappy-dev:armhf
> - - libspice-server-dev:armhf
> - - libssh-dev:armhf
> - - libsystemd-dev:armhf
> - - libtasn1-6-dev:armhf
> - - libubsan1:armhf
> - - libudev-dev:armhf
> - - liburing-dev:armhf
> - - libusb-1.0-0-dev:armhf
> - - libusbredirhost-dev:armhf
> - - libvdeplug-dev:armhf
> - - libvirglrenderer-dev:armhf
> - - libvte-2.91-dev:armhf
> - - libxen-dev:armhf
> - - libzstd-dev:armhf
> - - nettle-dev:armhf
> - - systemtap-sdt-dev:armhf
> - - zlib1g-dev:armhf
> -
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs
2025-10-16 15:03 ` [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs Alex Bennée
@ 2025-10-16 15:32 ` Pierrick Bouvier
2025-10-17 17:43 ` Richard Henderson
1 sibling, 0 replies; 21+ messages in thread
From: Pierrick Bouvier @ 2025-10-16 15:32 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Philippe Mathieu-Daudé, John Levon, Dmitry Osipenko,
Thomas Huth, Alexandre Iooss, Markus Armbruster, Eric Blake,
Mahmoud Mandour, Michael S. Tsirkin, Akihiko Odaki
On 10/16/25 8:03 AM, Alex Bennée wrote:
> Most of the test is pure boilerplate so to save ourselves from
> repetition move all the main bits into a minimal copy of
> native_build_job_template but without the caching.
>
> We keep all the current allow_fail and configure setups but do take
> the opportunity to replace the -j`nproc --ignore=40` hack with
> something that almost, but not quite, saturates the machine its being
> built on.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> .../custom-runners/ubuntu-24.04-aarch64.yml | 230 ++++++++----------
> 1 file changed, 96 insertions(+), 134 deletions(-)
>
> diff --git a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
> index d26c7827f45..46db9ae0138 100644
> --- a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
> +++ b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
> @@ -2,150 +2,112 @@
> # setup by the scripts/ci/setup/ubuntu/build-environment.yml task
> # "Install basic packages to build QEMU on Ubuntu 24.04"
>
> +.ubuntu_aarch64_template:
> + extends: .custom_runner_template
> + needs: []
> + stage: build
> + tags:
> + - ubuntu_24.04
> + - aarch64
> + rules:
> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> + - if: "$AARCH64_RUNNER_AVAILABLE"
> + before_script:
> + - source scripts/ci/gitlab-ci-section
> + - section_start setup "Pre-script setup"
> + - JOBS=$(expr $(nproc) - 4)
> + - section_end setup
> + script:
> + - mkdir build
> + - cd build
> + - section_start configure "Running configure"
> + - ../configure $CONFIGURE_ARGS ||
> + { cat config.log meson-logs/meson-log.txt && exit 1; }
> + - section_end configure
> + - section_start build "Building QEMU"
> + - make --output-sync -j"$JOBS"
> + - section_end build
> + - section_start test "Running tests"
> + - if test -n "$MAKE_CHECK_ARGS";
> + then
> + make -j"$JOBS" $MAKE_CHECK_ARGS ;
> + fi
> + - section_end test
> +
> ubuntu-24.04-aarch64-all-linux-static:
> - extends: .custom_runner_template
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch64
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - - if: "$AARCH64_RUNNER_AVAILABLE"
> - script:
> - - mkdir build
> - - cd build
> - # Disable -static-pie due to build error with system libc:
> - # https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1987438
> - - ../configure --enable-debug --static --disable-system --disable-pie
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make --output-sync -j`nproc --ignore=40`
> - - make check-tcg
> - - make --output-sync -j`nproc --ignore=40` check
> + extends: .ubuntu_aarch64_template
> + variables:
> + # Disable -static-pie due to build error with system libc:
> + # https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1987438
> + CONFIGURE_ARGS: --enable-debug --static --disable-system --disable-pie
> + MAKE_CHECK_ARGS: check-tcg
>
> ubuntu-24.04-aarch64-all:
> - extends: .custom_runner_template
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch64
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - when: manual
> - allow_failure: true
> - - if: "$AARCH64_RUNNER_AVAILABLE"
> - when: manual
> - allow_failure: true
> - script:
> - - mkdir build
> - - cd build
> - - ../configure
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make --output-sync -j`nproc --ignore=40`
> - - make --output-sync -j`nproc --ignore=40` check
> + extends: .ubuntu_aarch64_template
> + variables:
> + MAKE_CHECK_ARGS: check
> + rules:
> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> + when: manual
> + allow_failure: true
> + - if: "$AARCH64_RUNNER_AVAILABLE"
> + when: manual
> + allow_failure: true
>
> ubuntu-24.04-aarch64-without-defaults:
> - extends: .custom_runner_template
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch64
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - when: manual
> - allow_failure: true
> - - if: "$AARCH64_RUNNER_AVAILABLE"
> - when: manual
> - allow_failure: true
> - script:
> - - mkdir build
> - - cd build
> - - ../configure --disable-user --without-default-devices --without-default-features
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make --output-sync -j`nproc --ignore=40`
> - - make --output-sync -j`nproc --ignore=40` check
> + extends: .ubuntu_aarch64_template
> + variables:
> + CONFIGURE_ARGS: --disable-user --without-default-devices --without-default-features
> + MAKE_CHECK_ARGS: check
> + rules:
> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> + when: manual
> + allow_failure: true
> + - if: "$AARCH64_RUNNER_AVAILABLE"
> + when: manual
> + allow_failure: true
>
> ubuntu-24.04-aarch64-alldbg:
> - extends: .custom_runner_template
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch64
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - - if: "$AARCH64_RUNNER_AVAILABLE"
> - script:
> - - mkdir build
> - - cd build
> - - ../configure --enable-debug
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make clean
> - - make --output-sync -j`nproc --ignore=40`
> - - make --output-sync -j`nproc --ignore=40` check
> + extends: .ubuntu_aarch64_template
> + variables:
> + CONFIGURE_ARGS: --enable-debug
> + MAKE_CHECK_ARGS: check-tcg
>
> ubuntu-24.04-aarch64-clang:
> - extends: .custom_runner_template
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch64
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - when: manual
> - allow_failure: true
> - - if: "$AARCH64_RUNNER_AVAILABLE"
> - when: manual
> - allow_failure: true
> - script:
> - - mkdir build
> - - cd build
> - - ../configure --disable-libssh --cc=clang --cxx=clang++ --enable-ubsan
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make --output-sync -j`nproc --ignore=40`
> - - make --output-sync -j`nproc --ignore=40` check
> + extends: .ubuntu_aarch64_template
> + variables:
> + CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-ubsan
> + MAKE_CHECK_ARGS: check
> + rules:
> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> + when: manual
> + allow_failure: true
> + - if: "$AARCH64_RUNNER_AVAILABLE"
> + when: manual
> + allow_failure: true
>
> ubuntu-24.04-aarch64-tci:
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch64
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - when: manual
> - allow_failure: true
> - - if: "$AARCH64_RUNNER_AVAILABLE"
> - when: manual
> - allow_failure: true
> - script:
> - - mkdir build
> - - cd build
> - - ../configure --enable-tcg-interpreter
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make --output-sync -j`nproc --ignore=40`
> + extends: .ubuntu_aarch64_template
> + variables:
> + CONFIGURE_ARGS: --enable-tcg-interpreter
> + MAKE_CHECK_ARGS: check
> + rules:
> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> + when: manual
> + allow_failure: true
> + - if: "$AARCH64_RUNNER_AVAILABLE"
> + when: manual
> + allow_failure: true
>
> ubuntu-24.04-aarch64-notcg:
> - extends: .custom_runner_template
> - needs: []
> - stage: build
> - tags:
> - - ubuntu_24.04
> - - aarch64
> - rules:
> - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> - when: manual
> - allow_failure: true
> - - if: "$AARCH64_RUNNER_AVAILABLE"
> - when: manual
> - allow_failure: true
> - script:
> - - mkdir build
> - - cd build
> - - ../configure --disable-tcg --with-devices-aarch64=minimal
> - || { cat config.log meson-logs/meson-log.txt; exit 1; }
> - - make --output-sync -j`nproc --ignore=40`
> - - make --output-sync -j`nproc --ignore=40` check
> + extends: .ubuntu_aarch64_template
> + variables:
> + CONFIGURE_ARGS: --disable-tcg --with-devices-aarch64=minimal
> + MAKE_CHECK_ARGS: check
> + rules:
> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> + when: manual
> + allow_failure: true
> + - if: "$AARCH64_RUNNER_AVAILABLE"
> + when: manual
> + allow_failure: true
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs
2025-10-16 15:03 ` [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs Alex Bennée
2025-10-16 15:32 ` Pierrick Bouvier
@ 2025-10-17 17:43 ` Richard Henderson
1 sibling, 0 replies; 21+ messages in thread
From: Richard Henderson @ 2025-10-17 17:43 UTC (permalink / raw)
To: qemu-devel
On 10/16/25 08:03, Alex Bennée wrote:
> Most of the test is pure boilerplate so to save ourselves from
> repetition move all the main bits into a minimal copy of
> native_build_job_template but without the caching.
>
> We keep all the current allow_fail and configure setups but do take
> the opportunity to replace the -j`nproc --ignore=40` hack with
> something that almost, but not quite, saturates the machine its being
> built on.
>
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
> .../custom-runners/ubuntu-24.04-aarch64.yml | 230 ++++++++----------
> 1 file changed, 96 insertions(+), 134 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 02/11] gitlab: drop aarch32 runner and associated bits
2025-10-16 15:03 ` [PATCH 02/11] gitlab: drop aarch32 runner and associated bits Alex Bennée
2025-10-16 15:31 ` Pierrick Bouvier
@ 2025-10-17 17:56 ` Richard Henderson
2025-10-19 22:12 ` Alex Bennée
1 sibling, 1 reply; 21+ messages in thread
From: Richard Henderson @ 2025-10-17 17:56 UTC (permalink / raw)
To: qemu-devel
On 10/16/25 08:03, Alex Bennée wrote:
> diff --git a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml b/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
> deleted file mode 100644
> index 0cc34cd10b9..00000000000
> --- a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
> +++ /dev/null
> @@ -1,127 +0,0 @@
> -# THIS FILE WAS AUTO-GENERATED
> -#
> -# $ lcitool variables --cross-arch armv7l ubuntu-2204 qemu
> -#
> -# https://gitlab.com/libvirt/libvirt-ci
Had this file been missing from tests/lcitool/refresh?
There appear to be no more references to ubuntu2204, which is still present in the refresh
script.
r~
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 03/11] tests/tcg/multiarch/linux/linux-test: Don't try to test atime update
2025-10-16 15:03 ` [PATCH 03/11] tests/tcg/multiarch/linux/linux-test: Don't try to test atime update Alex Bennée
@ 2025-10-17 18:02 ` Richard Henderson
0 siblings, 0 replies; 21+ messages in thread
From: Richard Henderson @ 2025-10-17 18:02 UTC (permalink / raw)
To: qemu-devel
On 10/16/25 08:03, Alex Bennée wrote:
> From: Peter Maydell<peter.maydell@linaro.org>
>
> The linux-test test includes an attempt to check the utime and stat
> syscalls by setting the atime and mtime of a file to specific values,
> and then calling stat() to check that the values read back correctly.
>
> Unfortunately this is flaky, as it will fail if some other process
> (for instance a virus scanner, backup program, etc) gets in and reads
> the file between the utime() and stat() call, resulting in a host
> syscall sequence like this:
>
> utimensat(AT_FDCWD, "file2",
> [{tv_sec=1001, tv_nsec=0} /* 1970-01-01T01:16:41+0100 */,
> {tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */], 0) = 0
> # successfully set atime to 1001 and mtime to 1000
> statx(AT_FDCWD, "file2", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT,
> STATX_BASIC_STATS,
> {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID,
> stx_blksize=4096, stx_attributes=0, stx_nlink=1, stx_uid=32808,
> stx_gid=32808, stx_mode=S_IFREG|0600, stx_ino=21659016,
> stx_size=100, stx_blocks=8,
> stx_attributes_mask=STATX_ATTR_COMPRESSED|STATX_ATTR_IMMUTABLE|
> STATX_ATTR_APPEND|STATX_ATTR_NODUMP|STATX_ATTR_ENCRYPTED|
> STATX_ATTR_AUTOMOUNT|STATX_ATTR_MOUNT_ROOT|STATX_ATTR_VERITY|
> STATX_ATTR_DAX,
> stx_atime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
> stx_ctime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
> stx_mtime={tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */,
> stx_rdev_major=0, stx_rdev_minor=0, stx_dev_major=252,
> stx_dev_minor=0, stx_mnt_id=0x1f}) = 0
> # but when we statx the file, we get back an mtime of 1000
> # but an atime corresponding to when the other process read it
>
> and which will cause the test program to fail with the error
> message "stat time".
>
> In theory we could defend against this by e.g. operating on files in
> a dummy loopback mount filesystem which we mounted as 'noatime', but
> this isn't worth the hassle. Just drop the check on atime.
>
> Cc:qemu-stable@nongnu.org
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> Reviewed-by: Thomas Huth<thuth@redhat.com>
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
> tests/tcg/multiarch/linux/linux-test.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source
2025-10-16 15:03 ` [PATCH 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source Alex Bennée
@ 2025-10-19 7:56 ` Akihiko Odaki
2025-10-19 17:24 ` Pierrick Bouvier
0 siblings, 1 reply; 21+ messages in thread
From: Akihiko Odaki @ 2025-10-19 7:56 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Pierrick Bouvier, Philippe Mathieu-Daudé, John Levon,
Dmitry Osipenko, Thomas Huth, Alexandre Iooss, Markus Armbruster,
Eric Blake, Mahmoud Mandour, Michael S. Tsirkin
On 2025/10/17 0:03, Alex Bennée wrote:
> From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>
> Enhance uftrace_symbols.py to generate .dbg files, containing
> source location for every symbol present in .sym file.
> It allows to use `uftrace {replay,dump} --srcline` and show origin of
> functions, connecting trace to original source code.
>
> It was first implemented with pyelftools DWARF parser, which was way
> too slow (~minutes) to get locations for every symbol in the linux
> kernel. Thus, we use `addr2line` instead, which runs in seconds.
nm have option -l, which shows filenames and line numbers. With the
option you can avoid executing addr2line and omit the associated logic.
>
> As well, there were some bugs with latest pyelftools release,
> requiring to run master version, which is not installable with pip.
> Thus, since we now require binutils (addr2line), we can ditch pyelftools
> based implementation and simply rely on `nm` to get symbols information,
> which is faster and better.
>
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> contrib/plugins/uftrace_symbols.py | 120 +++++++++++++++++++----------
> 1 file changed, 78 insertions(+), 42 deletions(-)
>
> diff --git a/contrib/plugins/uftrace_symbols.py b/contrib/plugins/uftrace_symbols.py
> index b49e03203c8..45fb79c7a58 100755
> --- a/contrib/plugins/uftrace_symbols.py
> +++ b/contrib/plugins/uftrace_symbols.py
> @@ -1,7 +1,7 @@
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
> #
> -# Create symbols and mapping files for uftrace.
> +# Create symbols, debug and mapping files for uftrace.
> #
> # Copyright 2025 Linaro Ltd
> # Author: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> @@ -9,44 +9,71 @@
> # SPDX-License-Identifier: GPL-2.0-or-later
>
> import argparse
> -import elftools # pip install pyelftools
> import os
> -
> -from elftools.elf.elffile import ELFFile
> -from elftools.elf.sections import SymbolTableSection
> -
> -def elf_func_symbols(elf):
> - symbol_tables = [(idx, s) for idx, s in enumerate(elf.iter_sections())
> - if isinstance(s, SymbolTableSection)]
> - symbols = []
> - for _, section in symbol_tables:
> - for _, symbol in enumerate(section.iter_symbols()):
> - if symbol_size(symbol) == 0:
> - continue
> - type = symbol['st_info']['type']
> - if type == 'STT_FUNC' or type == 'STT_NOTYPE':
> - symbols.append(symbol)
> - symbols.sort(key = lambda x: symbol_addr(x))
> +import subprocess
> +
> +class Symbol:
> + def __init__(self, name, addr, size):
> + self.name = name
> + # clamp addr to 48 bits, like uftrace entries
> + self.addr = addr & 0xffffffffffff
> + self.full_addr = addr
> + self.size = size
> +
> + def set_loc(self, file, line):
> + self.file = file
> + self.line = line
> +
> +def get_symbols(elf_file):
> + symbols=[]
> + try:
> + out = subprocess.check_output(['nm', '--print-size', elf_file],
> + stderr=subprocess.STDOUT,
> + text=True)
> + except subprocess.CalledProcessError as e:
> + print(e.output)
> + raise
> + out = out.strip().split('\n')
> + for line in out:
> + info = line.split(' ')
> + if len(info) == 3:
> + # missing size information
> + continue
> + addr, size, type, name = info
> + # add only symbols from .text section
> + if type.lower() != 't':
> + continue
> + addr = int(addr, 16)
> + size = int(size, 16)
> + symbols.append(Symbol(name, addr, size))
> + symbols.sort(key = lambda x: x.addr)
> return symbols
>
> -def symbol_size(symbol):
> - return symbol['st_size']
> -
> -def symbol_addr(symbol):
> - addr = symbol['st_value']
> - # clamp addr to 48 bits, like uftrace entries
> - return addr & 0xffffffffffff
> -
> -def symbol_name(symbol):
> - return symbol.name
> +def find_symbols_locations(elf_file, symbols):
> + addresses = '\n'.join([hex(x.full_addr) for x in symbols])
> + try:
> + out = subprocess.check_output(['addr2line', '--exe', elf_file],
> + stderr=subprocess.STDOUT,
> + input=addresses, text=True)
> + except subprocess.CalledProcessError as e:
> + print(e.output)
> + raise
> + out = out.strip().split('\n')
> + assert len(out) == len(symbols)
> + for i in range(len(symbols)):
> + s = symbols[i]
> + file, line = out[i].split(':')
> + # addr2line may return 'line (discriminator [0-9]+)' sometimes,
> + # remove this to keep only line number.
> + line = line.split(' ')[0]
> + s.set_loc(file, line)
>
> class BinaryFile:
> def __init__(self, path, map_offset):
> self.fullpath = os.path.realpath(path)
> self.map_offset = map_offset
> - with open(path, 'rb') as f:
> - self.elf = ELFFile(f)
> - self.symbols = elf_func_symbols(self.elf)
> + self.symbols = get_symbols(self.fullpath)
> + find_symbols_locations(self.fullpath, self.symbols)
>
> def path(self):
> return self.fullpath
> @@ -56,24 +83,31 @@ def addr_start(self):
>
> def addr_end(self):
> last_sym = self.symbols[-1]
> - return symbol_addr(last_sym) + symbol_size(last_sym) + self.map_offset
> + return last_sym.addr + last_sym.size + self.map_offset
>
> def generate_symbol_file(self, prefix_symbols):
> binary_name = os.path.basename(self.fullpath)
> - sym_file_path = f'./uftrace.data/{binary_name}.sym'
> + sym_file_path = os.path.join('uftrace.data', f'{binary_name}.sym')
> print(f'{sym_file_path} ({len(self.symbols)} symbols)')
> with open(sym_file_path, 'w') as sym_file:
> # print hexadecimal addresses on 48 bits
> addrx = "0>12x"
> for s in self.symbols:
> - addr = symbol_addr(s)
> + addr = s.addr
> addr = f'{addr:{addrx}}'
> - size = f'{symbol_size(s):{addrx}}'
> - name = symbol_name(s)
> + size = f'{s.size:{addrx}}'
> if prefix_symbols:
> - name = f'{binary_name}:{name}'
> + name = f'{binary_name}:{s.name}'
> print(addr, size, 'T', name, file=sym_file)
>
> + def generate_debug_file(self):
> + binary_name = os.path.basename(self.fullpath)
> + dbg_file_path = os.path.join('uftrace.data', f'{binary_name}.dbg')
> + with open(dbg_file_path, 'w') as dbg_file:
> + for s in self.symbols:
> + print(f'F: {hex(s.addr)} {s.name}', file=dbg_file)
> + print(f'L: {s.line} {s.file}', file=dbg_file)
> +
> def parse_parameter(p):
> s = p.split(":")
> path = s[0]
> @@ -84,7 +118,7 @@ def parse_parameter(p):
> offset = s[1]
> if not offset.startswith('0x'):
> err = f'offset "{offset}" is not an hexadecimal constant. '
> - err += 'It should starts with "0x".'
> + err += 'It should start with "0x".'
> raise ValueError(err)
> offset = int(offset, 16)
> return path, offset
> @@ -97,7 +131,7 @@ def is_from_user_mode(map_file_path):
> return False
>
> def generate_map(binaries):
> - map_file_path = './uftrace.data/sid-0.map'
> + map_file_path = os.path.join('uftrace.data', 'sid-0.map')
>
> if is_from_user_mode(map_file_path):
> print(f'do not overwrite {map_file_path} generated from qemu-user')
> @@ -124,7 +158,8 @@ def generate_map(binaries):
>
> def main():
> parser = argparse.ArgumentParser(description=
> - 'generate symbol files for uftrace')
> + 'generate symbol files for uftrace. '
> + 'Require binutils (nm and addr2line).')
> parser.add_argument('elf_file', nargs='+',
> help='path to an ELF file. '
> 'Use /path/to/file:0xdeadbeef to add a mapping offset.')
> @@ -133,8 +168,8 @@ def main():
> action=argparse.BooleanOptionalAction)
> args = parser.parse_args()
>
> - if not os.path.exists('./uftrace.data'):
> - os.mkdir('./uftrace.data')
> + if not os.path.exists('uftrace.data'):
> + os.mkdir('uftrace.data')
>
> binaries = []
> for file in args.elf_file:
> @@ -145,6 +180,7 @@ def main():
>
> for b in binaries:
> b.generate_symbol_file(args.prefix_symbols)
> + b.generate_debug_file()
>
> generate_map(binaries)
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source
2025-10-19 7:56 ` Akihiko Odaki
@ 2025-10-19 17:24 ` Pierrick Bouvier
0 siblings, 0 replies; 21+ messages in thread
From: Pierrick Bouvier @ 2025-10-19 17:24 UTC (permalink / raw)
To: Akihiko Odaki, Alex Bennée, qemu-devel
Cc: Thanos Makatos, Cédric Le Goater, Marc-André Lureau,
Philippe Mathieu-Daudé, John Levon, Dmitry Osipenko,
Thomas Huth, Alexandre Iooss, Markus Armbruster, Eric Blake,
Mahmoud Mandour, Michael S. Tsirkin
On 10/19/25 12:56 AM, Akihiko Odaki wrote:
> On 2025/10/17 0:03, Alex Bennée wrote:
>> From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>
>> Enhance uftrace_symbols.py to generate .dbg files, containing
>> source location for every symbol present in .sym file.
>> It allows to use `uftrace {replay,dump} --srcline` and show origin of
>> functions, connecting trace to original source code.
>>
>> It was first implemented with pyelftools DWARF parser, which was way
>> too slow (~minutes) to get locations for every symbol in the linux
>> kernel. Thus, we use `addr2line` instead, which runs in seconds.
>
> nm have option -l, which shows filenames and line numbers. With the
> option you can avoid executing addr2line and omit the associated logic.
>
I saw it. Unfortunately it's really slow (> 1 min) with big binaries.
Try it on a linux kernel, you'll see.
>>
>> As well, there were some bugs with latest pyelftools release,
>> requiring to run master version, which is not installable with pip.
>> Thus, since we now require binutils (addr2line), we can ditch pyelftools
>> based implementation and simply rely on `nm` to get symbols information,
>> which is faster and better.
>>
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> contrib/plugins/uftrace_symbols.py | 120 +++++++++++++++++++----------
>> 1 file changed, 78 insertions(+), 42 deletions(-)
>>
>> diff --git a/contrib/plugins/uftrace_symbols.py b/contrib/plugins/uftrace_symbols.py
>> index b49e03203c8..45fb79c7a58 100755
>> --- a/contrib/plugins/uftrace_symbols.py
>> +++ b/contrib/plugins/uftrace_symbols.py
>> @@ -1,7 +1,7 @@
>> #!/usr/bin/env python3
>> # -*- coding: utf-8 -*-
>> #
>> -# Create symbols and mapping files for uftrace.
>> +# Create symbols, debug and mapping files for uftrace.
>> #
>> # Copyright 2025 Linaro Ltd
>> # Author: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> @@ -9,44 +9,71 @@
>> # SPDX-License-Identifier: GPL-2.0-or-later
>>
>> import argparse
>> -import elftools # pip install pyelftools
>> import os
>> -
>> -from elftools.elf.elffile import ELFFile
>> -from elftools.elf.sections import SymbolTableSection
>> -
>> -def elf_func_symbols(elf):
>> - symbol_tables = [(idx, s) for idx, s in enumerate(elf.iter_sections())
>> - if isinstance(s, SymbolTableSection)]
>> - symbols = []
>> - for _, section in symbol_tables:
>> - for _, symbol in enumerate(section.iter_symbols()):
>> - if symbol_size(symbol) == 0:
>> - continue
>> - type = symbol['st_info']['type']
>> - if type == 'STT_FUNC' or type == 'STT_NOTYPE':
>> - symbols.append(symbol)
>> - symbols.sort(key = lambda x: symbol_addr(x))
>> +import subprocess
>> +
>> +class Symbol:
>> + def __init__(self, name, addr, size):
>> + self.name = name
>> + # clamp addr to 48 bits, like uftrace entries
>> + self.addr = addr & 0xffffffffffff
>> + self.full_addr = addr
>> + self.size = size
>> +
>> + def set_loc(self, file, line):
>> + self.file = file
>> + self.line = line
>> +
>> +def get_symbols(elf_file):
>> + symbols=[]
>> + try:
>> + out = subprocess.check_output(['nm', '--print-size', elf_file],
>> + stderr=subprocess.STDOUT,
>> + text=True)
>> + except subprocess.CalledProcessError as e:
>> + print(e.output)
>> + raise
>> + out = out.strip().split('\n')
>> + for line in out:
>> + info = line.split(' ')
>> + if len(info) == 3:
>> + # missing size information
>> + continue
>> + addr, size, type, name = info
>> + # add only symbols from .text section
>> + if type.lower() != 't':
>> + continue
>> + addr = int(addr, 16)
>> + size = int(size, 16)
>> + symbols.append(Symbol(name, addr, size))
>> + symbols.sort(key = lambda x: x.addr)
>> return symbols
>>
>> -def symbol_size(symbol):
>> - return symbol['st_size']
>> -
>> -def symbol_addr(symbol):
>> - addr = symbol['st_value']
>> - # clamp addr to 48 bits, like uftrace entries
>> - return addr & 0xffffffffffff
>> -
>> -def symbol_name(symbol):
>> - return symbol.name
>> +def find_symbols_locations(elf_file, symbols):
>> + addresses = '\n'.join([hex(x.full_addr) for x in symbols])
>> + try:
>> + out = subprocess.check_output(['addr2line', '--exe', elf_file],
>> + stderr=subprocess.STDOUT,
>> + input=addresses, text=True)
>> + except subprocess.CalledProcessError as e:
>> + print(e.output)
>> + raise
>> + out = out.strip().split('\n')
>> + assert len(out) == len(symbols)
>> + for i in range(len(symbols)):
>> + s = symbols[i]
>> + file, line = out[i].split(':')
>> + # addr2line may return 'line (discriminator [0-9]+)' sometimes,
>> + # remove this to keep only line number.
>> + line = line.split(' ')[0]
>> + s.set_loc(file, line)
>>
>> class BinaryFile:
>> def __init__(self, path, map_offset):
>> self.fullpath = os.path.realpath(path)
>> self.map_offset = map_offset
>> - with open(path, 'rb') as f:
>> - self.elf = ELFFile(f)
>> - self.symbols = elf_func_symbols(self.elf)
>> + self.symbols = get_symbols(self.fullpath)
>> + find_symbols_locations(self.fullpath, self.symbols)
>>
>> def path(self):
>> return self.fullpath
>> @@ -56,24 +83,31 @@ def addr_start(self):
>>
>> def addr_end(self):
>> last_sym = self.symbols[-1]
>> - return symbol_addr(last_sym) + symbol_size(last_sym) + self.map_offset
>> + return last_sym.addr + last_sym.size + self.map_offset
>>
>> def generate_symbol_file(self, prefix_symbols):
>> binary_name = os.path.basename(self.fullpath)
>> - sym_file_path = f'./uftrace.data/{binary_name}.sym'
>> + sym_file_path = os.path.join('uftrace.data', f'{binary_name}.sym')
>> print(f'{sym_file_path} ({len(self.symbols)} symbols)')
>> with open(sym_file_path, 'w') as sym_file:
>> # print hexadecimal addresses on 48 bits
>> addrx = "0>12x"
>> for s in self.symbols:
>> - addr = symbol_addr(s)
>> + addr = s.addr
>> addr = f'{addr:{addrx}}'
>> - size = f'{symbol_size(s):{addrx}}'
>> - name = symbol_name(s)
>> + size = f'{s.size:{addrx}}'
>> if prefix_symbols:
>> - name = f'{binary_name}:{name}'
>> + name = f'{binary_name}:{s.name}'
>> print(addr, size, 'T', name, file=sym_file)
>>
>> + def generate_debug_file(self):
>> + binary_name = os.path.basename(self.fullpath)
>> + dbg_file_path = os.path.join('uftrace.data', f'{binary_name}.dbg')
>> + with open(dbg_file_path, 'w') as dbg_file:
>> + for s in self.symbols:
>> + print(f'F: {hex(s.addr)} {s.name}', file=dbg_file)
>> + print(f'L: {s.line} {s.file}', file=dbg_file)
>> +
>> def parse_parameter(p):
>> s = p.split(":")
>> path = s[0]
>> @@ -84,7 +118,7 @@ def parse_parameter(p):
>> offset = s[1]
>> if not offset.startswith('0x'):
>> err = f'offset "{offset}" is not an hexadecimal constant. '
>> - err += 'It should starts with "0x".'
>> + err += 'It should start with "0x".'
>> raise ValueError(err)
>> offset = int(offset, 16)
>> return path, offset
>> @@ -97,7 +131,7 @@ def is_from_user_mode(map_file_path):
>> return False
>>
>> def generate_map(binaries):
>> - map_file_path = './uftrace.data/sid-0.map'
>> + map_file_path = os.path.join('uftrace.data', 'sid-0.map')
>>
>> if is_from_user_mode(map_file_path):
>> print(f'do not overwrite {map_file_path} generated from qemu-user')
>> @@ -124,7 +158,8 @@ def generate_map(binaries):
>>
>> def main():
>> parser = argparse.ArgumentParser(description=
>> - 'generate symbol files for uftrace')
>> + 'generate symbol files for uftrace. '
>> + 'Require binutils (nm and addr2line).')
>> parser.add_argument('elf_file', nargs='+',
>> help='path to an ELF file. '
>> 'Use /path/to/file:0xdeadbeef to add a mapping offset.')
>> @@ -133,8 +168,8 @@ def main():
>> action=argparse.BooleanOptionalAction)
>> args = parser.parse_args()
>>
>> - if not os.path.exists('./uftrace.data'):
>> - os.mkdir('./uftrace.data')
>> + if not os.path.exists('uftrace.data'):
>> + os.mkdir('uftrace.data')
>>
>> binaries = []
>> for file in args.elf_file:
>> @@ -145,6 +180,7 @@ def main():
>>
>> for b in binaries:
>> b.generate_symbol_file(args.prefix_symbols)
>> + b.generate_debug_file()
>>
>> generate_map(binaries)
>>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 02/11] gitlab: drop aarch32 runner and associated bits
2025-10-17 17:56 ` Richard Henderson
@ 2025-10-19 22:12 ` Alex Bennée
0 siblings, 0 replies; 21+ messages in thread
From: Alex Bennée @ 2025-10-19 22:12 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
Richard Henderson <richard.henderson@linaro.org> writes:
> On 10/16/25 08:03, Alex Bennée wrote:
>> diff --git a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml b/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
>> deleted file mode 100644
>> index 0cc34cd10b9..00000000000
>> --- a/scripts/ci/setup/ubuntu/ubuntu-2204-armhf-cross.yml
>> +++ /dev/null
>> @@ -1,127 +0,0 @@
>> -# THIS FILE WAS AUTO-GENERATED
>> -#
>> -# $ lcitool variables --cross-arch armv7l ubuntu-2204 qemu
>> -#
>> -# https://gitlab.com/libvirt/libvirt-ci
>
>
> Had this file been missing from tests/lcitool/refresh?
It appears to have been added by hand. In an earlier patch series I had
to make some changes to lcitool to be able to generate yaml:
https://gitlab.com/stsquad/libvirt-ci/-/commits/cross-yaml-support
>
> There appear to be no more references to ubuntu2204, which is still
> present in the refresh script.
lcitool dockerfile --layers all ubuntu-2204 qemu
points to:
tests/tcg/docker/dockerfiles/ubuntu2204.docker
we will bump those in due course although probably not worth rushing
for 10.2.
>
>
> r~
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2025-10-19 22:14 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 15:03 [PATCH 00/11] maintainer updates for October (gitlab, gpu, plugins, docs) pre-PR Alex Bennée
2025-10-16 15:03 ` [PATCH 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs Alex Bennée
2025-10-16 15:32 ` Pierrick Bouvier
2025-10-17 17:43 ` Richard Henderson
2025-10-16 15:03 ` [PATCH 02/11] gitlab: drop aarch32 runner and associated bits Alex Bennée
2025-10-16 15:31 ` Pierrick Bouvier
2025-10-17 17:56 ` Richard Henderson
2025-10-19 22:12 ` Alex Bennée
2025-10-16 15:03 ` [PATCH 03/11] tests/tcg/multiarch/linux/linux-test: Don't try to test atime update Alex Bennée
2025-10-17 18:02 ` Richard Henderson
2025-10-16 15:03 ` [PATCH 04/11] Support per-head resolutions with virtio-gpu Alex Bennée
2025-10-16 15:03 ` [PATCH 05/11] ui/gtk-gl-area: Remove extra draw call in refresh Alex Bennée
2025-10-16 15:03 ` [PATCH 06/11] hw/display: add blob map/unmap trace events Alex Bennée
2025-10-16 15:31 ` Pierrick Bouvier
2025-10-16 15:03 ` [PATCH 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source Alex Bennée
2025-10-19 7:56 ` Akihiko Odaki
2025-10-19 17:24 ` Pierrick Bouvier
2025-10-16 15:03 ` [PATCH 08/11] docs/system: split VirtIO devices from the rest Alex Bennée
2025-10-16 15:03 ` [PATCH 09/11] docs/system: unify the naming style for VirtIO devices Alex Bennée
2025-10-16 15:03 ` [PATCH 10/11] docs/system: drop vhost-user-rng docs Alex Bennée
2025-10-16 15:03 ` [PATCH 11/11] docs/system: merge vhost-user-input into vhost-user-contrib Alex Bennée
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).