Skip to contentSkip to conversation

testing updates (gitlab, MacOS, MAINTAINERS)

GIT PULL Applied Alex Bennée 2 participants 15 messages May 29 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit 2db91528542672cf0db78b3f2cc0e22b36302b38:

Merge tag 'pull-vfio-20260527' of https://github.com/legoater/qemu into staging (2026-05-27 14:45:58 -0400)

are available in the Git repository at:

https://gitlab.com/stsquad/qemu.git tags/pull-11.1-testing-macos-and-misc-280526-1

for you to fetch changes up to 54b78a130be9abd5792c81726c5ebbeb5a68cad2:

MAINTAINERS: Cover python.docker with Python library section (2026-05-28 21:33:46 +0100)

----------------------------------------------------------------
testing updates (gitlab, MacOS, MAINTAINERS)

- move tests/Makefile.include earlier in order
- add binary deps to .ninja-goals.run-tcg-tests-FOO
- clean-up jit locking around do_tb_phys_invalidate
- drop deprecated cirrus MacOS builds
- add gitlab MacOS builds
- update the gitlab issue template around binary test cases
- fix-up MAINTAINERS for dockerfiles

----------------------------------------------------------------
Alex Bennée (8):
Makefile: include tests/Makefile.include before ninja calculation tests/Makefile.include: fix typo in comment tests/Makefile.include: add binary dependency to run-tcg-tests-% rules accel/tcg: move jit thread manipulation into do_tb_phys_invalidate
ci: drop cirrus MacOS build
gitlab: add initial MacOS 15 on gitlab runner
gitlab: add MacOS 26 job on gitlab runner
gitlab: update issue template for binary test cases

Philippe Mathieu-Daudé (5):
MAINTAINERS: Fix docker/dockerfiles/debian-hexagon-cross.docker path
MAINTAINERS: Cover debian-loongarch-cross.docker with LoongArch section
MAINTAINERS: Cover debian-xtensa-cross.docker with Xtensa section
MAINTAINERS: Cover debian-tricore-cross.docker with TriCore section
MAINTAINERS: Cover python.docker with Python library section

 MAINTAINERS                             |  6 +++-
 Makefile                                |  4 +--
 accel/tcg/tb-maint.c                    | 43 ++++++++++------------
 tests/lcitool/refresh                   | 12 ++++++-
 .gitlab-ci.d/cirrus.yml                 | 14 --------
 .gitlab-ci.d/{cirrus => }/macos-14.vars |  0
 .gitlab-ci.d/macos.yml                  | 63 +++++++++++++++++++++++++++++++++
 .gitlab-ci.d/qemu-project.yml           |  1 +
 .gitlab/issue_templates/bug.md          |  4 +++
 tests/Makefile.include                  |  8 ++++-
 10 files changed, 112 insertions(+), 43 deletions(-)
 rename .gitlab-ci.d/{cirrus => }/macos-14.vars (100%)
 create mode 100644 .gitlab-ci.d/macos.yml
Signature · 1 line
2.47.3
#1 lore raw

[PULL 05/13] ci: drop cirrus MacOS build

CirrusCI is closing down soon so time to migrate.

Message-ID: <[email protected]>

tests/lcitool/refresh +0 -1
index 365435b0d70..4be6a9261ee 100755
@@ -301,7 +301,6 @@ try:
     # Cirrus packages lists for GitLab
     #
     generate_cirrus("freebsd-14")
-    generate_cirrus("macos-14")
 
     #
     # VM packages lists
.gitlab-ci.d/cirrus.yml +0 -14
index f2a9a64b76a..b71ab090b65 100644
@@ -44,17 +44,3 @@ x64-freebsd-14-build:
     INSTALL_COMMAND: pkg install -y
     CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,mips64el-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,sh4eb-softmmu,xtensa-softmmu --enable-rust
     TEST_TARGETS: check
-
-aarch64-macos-build:
-  extends: .cirrus_build_job
-  variables:
-    NAME: macos-14
-    CIRRUS_VM_INSTANCE_TYPE: macos_instance
-    CIRRUS_VM_IMAGE_SELECTOR: image
-    CIRRUS_VM_IMAGE_NAME: ghcr.io/cirruslabs/macos-runner:sonoma
-    UPDATE_COMMAND: brew update
-    INSTALL_COMMAND: brew install
-    PATH_EXTRA: /opt/homebrew/ccache/libexec:/opt/homebrew/gettext/bin
-    PKG_CONFIG_PATH: /opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig
-    CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,mips64-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,sh4-softmmu,xtensaeb-softmmu --enable-rust
-    TEST_TARGETS: check-unit check-block check-qapi-schema check-softfloat check-qtest-x86_64
.gitlab-ci.d/cirrus/macos-14.vars deleted +0 -16
deleted file mode 100644
index def77cfdea5..00000000000
@@ -1,16 +0,0 @@
-# THIS FILE WAS AUTO-GENERATED
-#
-#  $ lcitool variables macos-14 qemu
-#
-# https://gitlab.com/libvirt/libvirt-ci
-
-CCACHE='/opt/homebrew/bin/ccache'
-CPAN_PKGS=''
-CROSS_PKGS=''
-MAKE='/opt/homebrew/bin/gmake'
-NINJA='/opt/homebrew/bin/ninja'
-PACKAGING_COMMAND='brew'
-PIP3='/opt/homebrew/bin/pip3'
-PKGS='bash bc bindgen bison bzip2 capstone ccache cmocka coreutils ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 gtk-vnc jemalloc jpeg-turbo json-c libcbor libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python-setuptools python3 rpm2cpio rust sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 vulkan-tools xorriso zlib zstd'
-PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli'
-PYTHON='/opt/homebrew/bin/python3'
Signature · 1 line
2.47.3
#2 lore raw

[PULL 09/13] MAINTAINERS: Fix docker/dockerfiles/debian-hexagon-cross.docker path

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Fixes afbdf0a44ea ("docker: Add Hexagon image")

Message-ID: <[email protected]>
Message-ID: <[email protected]>

MAINTAINERS +1 -1
index 7eb5823da61..7d7050f4b6b 100644
@@ -257,7 +257,7 @@ F: linux-user/hexagon/
 F: tests/tcg/hexagon/
 F: disas/hexagon.c
 F: configs/targets/hexagon-linux-user/default.mak
-F: docker/dockerfiles/debian-hexagon-cross.docker
+F: tests/docker/dockerfiles/debian-hexagon-cross.docker
 F: gdbstub/gdb-xml/hexagon*.xml
 T: git https://github.com/qualcomm/qemu.git hex-next
 
Signature · 1 line
2.47.3
#3 lore raw

[PULL 12/13] MAINTAINERS: Cover debian-tricore-cross.docker with TriCore section

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Message-ID: <[email protected]>
Message-ID: <[email protected]>

MAINTAINERS +1 -0
index 13894537aba..225bc5e7910 100644
@@ -458,6 +458,7 @@ S: Orphan
 F: target/tricore/
 F: hw/tricore/
 F: include/hw/tricore/
+F: tests/docker/dockerfiles/debian-tricore-cross.docker
 F: tests/tcg/tricore/
 
 Multiarch Linux User Tests
Signature · 1 line
2.47.3
#4 lore raw

[PULL 01/13] Makefile: include tests/Makefile.include before ninja calculation

In reply to Alex Bennée

As the tests Makefile sets .ninja-goals we need it to be included before we do the calculations in the main Makefile.

Message-ID: <[email protected]>

Makefile +2 -2
index 54547a37b1a..829c51e364c 100644
@@ -45,6 +45,8 @@ include config-host.mak
 include Makefile.prereqs
 Makefile.prereqs: config-host.mak
 
+include $(SRC_PATH)/tests/Makefile.include
+
 # 0. ensure the build tree is okay
 
 # Check that we're not trying to do an out-of-tree build from
@@ -180,8 +182,6 @@ endif # config-host.mak does not exist
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet)
 
-include $(SRC_PATH)/tests/Makefile.include
-
 all: recurse-all
 
 SUBDIR_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS)))
Signature · 1 line
2.47.3
#5 lore raw

[PULL 06/13] gitlab: add initial MacOS 15 on gitlab runner

In reply to Alex Bennée

The gitlab runners are currently in beta but available to projects on the Premium and Ultimate plans (which QEMU is via the Open Source program).

We install some compilers via brew so we can run some of the check-tcg softmmu test cases.

We disable rust as the version is too old.

We disable plugins because we haven't taught the test harness about .dynlib vs .so yet.

There is a discrepancy between the vars and version of MacOS because lcitool needs teaching about other versions (although I don't think it matters as brew is shared across versions).

Message-ID: <[email protected]>

tests/lcitool/refresh +11 -0
index 4be6a9261ee..96ee861cbf7 100755
@@ -87,6 +87,12 @@ def generate_cirrus(target, trailer=None):
     generate(filename, cmd, trailer)
 
 
+def generate_vars(target, trailer=None):
+    filename = Path(src_dir, ".gitlab-ci.d", target + ".vars")
+    cmd = lcitool_cmd + ["variables", "--format", "shell", target, "qemu"]
+    generate(filename, cmd, trailer)
+
+
 def generate_pkglist(vm, target, project="qemu"):
     filename = Path(src_dir, "tests", "vm", "generated", vm + ".json")
     cmd = lcitool_cmd + ["variables", "--format", "json", target, project]
@@ -302,6 +308,11 @@ try:
     #
     generate_cirrus("freebsd-14")
 
+    #
+    # GitLab packages lists
+    #
+    generate_vars("macos-14")
+
     #
     # VM packages lists
     #
.gitlab-ci.d/macos-14.vars new file +16 -0
new file mode 100644
index 00000000000..def77cfdea5
@@ -0,0 +1,16 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool variables macos-14 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
+
+CCACHE='/opt/homebrew/bin/ccache'
+CPAN_PKGS=''
+CROSS_PKGS=''
+MAKE='/opt/homebrew/bin/gmake'
+NINJA='/opt/homebrew/bin/ninja'
+PACKAGING_COMMAND='brew'
+PIP3='/opt/homebrew/bin/pip3'
+PKGS='bash bc bindgen bison bzip2 capstone ccache cmocka coreutils ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 gtk-vnc jemalloc jpeg-turbo json-c libcbor libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python-setuptools python3 rpm2cpio rust sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 vulkan-tools xorriso zlib zstd'
+PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli'
+PYTHON='/opt/homebrew/bin/python3'
.gitlab-ci.d/macos.yml new file +47 -0

47 lines not on this page · raw message

.gitlab-ci.d/qemu-project.yml +1 -0
index 4d914c4897b..9cbb5fe787f 100644
@@ -19,3 +19,4 @@ include:
   - local: '/.gitlab-ci.d/custom-runners.yml'
   - local: '/.gitlab-ci.d/cirrus.yml'
   - local: '/.gitlab-ci.d/windows.yml'
+  - local: '/.gitlab-ci.d/macos.yml'
Signature · 1 line
2.47.3
#6 lore raw

[PULL 10/13] MAINTAINERS: Cover debian-loongarch-cross.docker with LoongArch section

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Message-ID: <[email protected]>
Message-ID: <[email protected]>

MAINTAINERS +1 -0
index 7d7050f4b6b..2dc6559c414 100644
@@ -280,6 +280,7 @@ LoongArch TCG CPUs
 M: Song Gao <[email protected]>
 S: Maintained
 F: target/loongarch/
+F: tests/docker/dockerfiles/debian-loongarch-cross.docker
 F: tests/tcg/loongarch64/
 F: tests/functional/loongarch64/meson.build
 F: tests/functional/loongarch64/test_virt.py
Signature · 1 line
2.47.3
#7 lore raw

[PULL 13/13] MAINTAINERS: Cover python.docker with Python library section

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Message-ID: <[email protected]>
Message-ID: <[email protected]>

MAINTAINERS +1 -0
index 225bc5e7910..e1c083b3900 100644
@@ -3478,6 +3478,7 @@ M: John Snow <[email protected]>
 M: Cleber Rosa <[email protected]>
 S: Maintained
 F: python/
+F: tests/docker/dockerfiles/python.docker
 T: git https://gitlab.com/jsnow/qemu.git python
 
 Python scripts
Signature · 1 line
2.47.3
#8 lore raw

[PULL 08/13] gitlab: update issue template for binary test cases

In reply to Alex Bennée

Binary test cases are sketchy because they can be vectors for phishing and other malware. Lets strongly hint that source bases tests are preferred and binaries should have their provenance declared.

Message-ID: <[email protected]>

.gitlab/issue_templates/bug.md +4 -0
index 53a79f58284..e20f586008d 100644
@@ -55,6 +55,10 @@ https://www.qemu.org/contribute/security-process/
 <!--
 Attach logs, stack traces, screenshots, etc. Compress the files if necessary.
 If using libvirt, libvirt logs and XML domain information may be relevant.
+
+If attaching binary test cases you should describe where they were obtained
+from, preferably linking to the original source. We greatly prefer test cases in
+the form of source code that can be audited before compiling by the engineer.
 -->
 
 <!--
Signature · 1 line
2.47.3
#9 lore raw

[PULL 03/13] tests/Makefile.include: add binary dependency to run-tcg-tests-% rules

In reply to Alex Bennée

Explicitly set the appropriate QEMU binary as a dependency so we can ensure they get built. This is especially important for MacOS which otherwise only builds the unsigned binaries on a normal "make all" run.

Message-ID: <[email protected]>

tests/Makefile.include +6 -0
index 3b1af78ca1e..494d0109f26 100644
@@ -58,6 +58,12 @@ RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TCG_TESTS_TARGETS))
 $(foreach TARGET,$(TCG_TESTS_TARGETS), \
         $(eval $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak: config-host.mak))
 
+# $1 = the stem (e.g., arm-softmmu or x86_64-linux-user)
+get-qemu-bin = $(if $(findstring softmmu,$1),qemu-system-$(subst -softmmu,,$1),qemu-$(subst -linux-user,,$1))
+
+$(foreach TARGET,$(TCG_TESTS_TARGETS), \
+        $(eval .ninja-goals.run-tcg-tests-$(TARGET) += $(call get-qemu-bin,$(TARGET))))
+
 .PHONY: $(TCG_TESTS_TARGETS:%=build-tcg-tests-%)
 $(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/tcg/config-%.mak
 	$(call quiet-command, \
Signature · 1 line
2.47.3
#10 lore raw

[PULL 04/13] accel/tcg: move jit thread manipulation into do_tb_phys_invalidate

In reply to Alex Bennée

To invalidate a TB on MacOS we need to enable write access to the JIT buffer. We were doing this for tb_phys_invalidate__locked but that is not the only path into do_tb_phys_invalidate. Move the manipulation into the shared function that does the work.

As a result we can drop the tb_phys_invalidate__locked function and update the calls directly.

This enables watchpoints to work in MacOS TCG guests.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3444

Message-ID: <[email protected]>

accel/tcg/tb-maint.c +19 -24
index cd7c32361bb..0c7ac5a72c0 100644
@@ -925,6 +925,7 @@ static void do_tb_phys_invalidate(TranslationBlock *tb, bool rm_from_page_list)
     uint32_t orig_cflags = tb_cflags(tb);
 
     assert_memory_lock();
+    qemu_thread_jit_write();
 
     /* make sure no further incoming jumps will be chained to this TB */
     qemu_spin_lock(&tb->jmp_lock);
@@ -935,33 +936,27 @@ static void do_tb_phys_invalidate(TranslationBlock *tb, bool rm_from_page_list)
     phys_pc = tb_page_addr0(tb);
     h = tb_hash_func(phys_pc, (orig_cflags & CF_PCREL ? 0 : tb->pc),
                      tb->flags, tb->cs_base, orig_cflags);
-    if (!qht_remove(&tb_ctx.htable, tb, h)) {
-        return;
-    }
+    if (qht_remove(&tb_ctx.htable, tb, h)) {
 
-    /* remove the TB from the page list */
-    if (rm_from_page_list) {
-        tb_remove(tb);
-    }
+        /* remove the TB from the page list */
+        if (rm_from_page_list) {
+            tb_remove(tb);
+        }
 
-    /* remove the TB from the hash list */
-    tb_jmp_cache_inval_tb(tb);
+        /* remove the TB from the hash list */
+        tb_jmp_cache_inval_tb(tb);
 
-    /* suppress this TB from the two jump lists */
-    tb_remove_from_jmp_list(tb, 0);
-    tb_remove_from_jmp_list(tb, 1);
+        /* suppress this TB from the two jump lists */
+        tb_remove_from_jmp_list(tb, 0);
+        tb_remove_from_jmp_list(tb, 1);
 
-    /* suppress any remaining jumps to this TB */
-    tb_jmp_unlink(tb);
+        /* suppress any remaining jumps to this TB */
+        tb_jmp_unlink(tb);
 
-    qatomic_set(&tb_ctx.tb_phys_invalidate_count,
-                tb_ctx.tb_phys_invalidate_count + 1);
-}
+        qatomic_set(&tb_ctx.tb_phys_invalidate_count,
+                    tb_ctx.tb_phys_invalidate_count + 1);
+    }
 
-static void tb_phys_invalidate__locked(TranslationBlock *tb)
-{
-    qemu_thread_jit_write();
-    do_tb_phys_invalidate(tb, true);
     qemu_thread_jit_execute();
 }
 
@@ -1030,7 +1025,7 @@ void tb_invalidate_phys_range(CPUState *cpu, tb_page_addr_t start,
     assert_memory_lock();
 
     PAGE_FOR_EACH_TB(start, last, unused, tb, n) {
-        tb_phys_invalidate__locked(tb);
+        do_tb_phys_invalidate(tb, true);
     }
 }
 
@@ -1091,7 +1086,7 @@ bool tb_invalidate_phys_page_unwind(CPUState *cpu, tb_page_addr_t addr,
             current_tb_modified = true;
             cpu_restore_state_from_tb(cpu, current_tb, pc);
         }
-        tb_phys_invalidate__locked(tb);
+        do_tb_phys_invalidate(tb, true);
     }
 
     if (current_tb_modified) {
@@ -1156,7 +1151,7 @@ tb_invalidate_phys_page_range__locked(CPUState *cpu,
                 current_tb_modified = true;
                 cpu_restore_state_from_tb(cpu, current_tb, retaddr);
             }
-            tb_phys_invalidate__locked(tb);
+            do_tb_phys_invalidate(tb, true);
         }
     }
 
Signature · 1 line
2.47.3
#11 lore raw

[PULL 07/13] gitlab: add MacOS 26 job on gitlab runner

In reply to Alex Bennée

gitlab supports 3 MacOS images with 15 and 26 being the current supported ones. To get ahead of the curve lets enable 26 as well.

It re-uses the same brew list but also attempts to work around python configure failure by setting DYLD_LIBRARY_PATH:
/opt/homebrew/opt/expat/lib/

Message-ID: <[email protected]>

.gitlab-ci.d/macos.yml +16 -0
index c93bf12a294..f61750a3f4a 100644
@@ -45,3 +45,19 @@ aarch64-macos-15-build:
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
+
+aarch64-macos-26-build:
+  extends: .macos_job_template
+  image: macos-26-xcode-26
+  variables:
+    NAME: macos-26
+    DYLD_LIBRARY_PATH: /opt/homebrew/opt/expat/lib/
+    PATH_EXTRA: /opt/homebrew/gettext/bin
+    PKG_CONFIG_PATH: /opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig
+    CONFIGURE_ARGS:
+        --target-list=aarch64-softmmu,i386-softmmu,x86_64-softmmu
+        --cross-prefix-aarch64=aarch64-elf-
+        --cross-prefix-i386=i686-elf-
+        --cross-prefix-x86_64=x86_64-elf-
+        --disable-plugins
+    TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
Signature · 1 line
2.47.3
#12 lore raw

[PULL 02/13] tests/Makefile.include: fix typo in comment

In reply to Alex Bennée

Message-ID: <[email protected]>

tests/Makefile.include +1 -1
index a063a1d60fe..3b1af78ca1e 100644
@@ -42,7 +42,7 @@ SPEED = quick
 
 
 # TCG_TESTS_WITH_COMPILERS represents the test targets we have cross compiler
-# support for, CONFIGURED_TEST_TARGETS it what meson has finally
+# support for, CONFIGURED_TCG_TARGETS it what meson has finally
 # configured having rejected stuff we can't build.
 CONFIGURED_TCG_TARGETS=$(patsubst %-config-target.h, %, $(wildcard *-config-target.h))
 
Signature · 1 line
2.47.3
#13 lore raw

[PULL 11/13] MAINTAINERS: Cover debian-xtensa-cross.docker with Xtensa section

In reply to Alex Bennée

From: Philippe Mathieu-Daudé <[email protected]>

Message-ID: <[email protected]>
Message-ID: <[email protected]>

MAINTAINERS +1 -0
index 2dc6559c414..13894537aba 100644
@@ -445,6 +445,7 @@ W: http://wiki.osll.ru/doku.php?id=etc:users:jcmvbkbc:qemu-target-xtensa
 S: Maintained
 F: target/xtensa/
 F: hw/xtensa/
+F: tests/docker/dockerfiles/debian-xtensa-cross.docker
 F: tests/functional/xtensa/meson.build
 F: tests/tcg/xtensa/
 F: tests/tcg/xtensaeb/
Signature · 1 line
2.47.3