Merge tag 'pull-11.1-testing-macos-and-misc-280526-1' of https://gitlab.com/stsquad/qemu into staging

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

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmoYp8EACgkQ+9DbCVqe
# KkRL3wf+LmazWrTWC0hkP0KcFEvBVYNin87BnYFEcXYfo/dkNEXMQeHNHpkEGm1J
# dTwWrmlDLIuvSowrCT5J597t9ssmsy8e2djo7yYx2aKBZvjyfVF/AadA4xSYz7XV
# P0EaxYlGcN7CRyCSRMswFUJB7UwCopwjgaitITCGR6tb80nQRnbzzVTd/13Ne8qd
# E1qeOT3G/+10uL0iOAGBUXgxT4tTsbdwrm0hk6vvEX4oGGwg11WpTZFAKVUwm3kK
# 5CTUF4sJTy2Y2yht0AqSMteuUoTbvp5xKKJQ1yuDYFByma0d0K2MRtcdxSmdx7eO
# rp4gGzXafPY/sXF2QYCXv/8VaCXEoA==
# =p5gv
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 28 May 2026 16:38:25 EDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-11.1-testing-macos-and-misc-280526-1' of https://gitlab.com/stsquad/qemu:
  MAINTAINERS: Cover python.docker with Python library section
  MAINTAINERS: Cover debian-tricore-cross.docker with TriCore section
  MAINTAINERS: Cover debian-xtensa-cross.docker with Xtensa section
  MAINTAINERS: Cover debian-loongarch-cross.docker with LoongArch section
  MAINTAINERS: Fix docker/dockerfiles/debian-hexagon-cross.docker path
  gitlab: update issue template for binary test cases
  gitlab: add MacOS 26 job on gitlab runner
  gitlab: add initial MacOS 15 on gitlab runner
  ci: drop cirrus MacOS build
  accel/tcg: move jit thread manipulation into do_tb_phys_invalidate
  tests/Makefile.include: add binary dependency to run-tcg-tests-% rules
  tests/Makefile.include: fix typo in comment
  Makefile: include tests/Makefile.include before ninja calculation

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefan Hajnoczi
2026-05-29 12:58:13 -04:00
10 changed files with 116 additions and 47 deletions

View File

@@ -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

63
.gitlab-ci.d/macos.yml Normal file
View File

@@ -0,0 +1,63 @@
.macos_job_template:
extends: .base_job_template
stage: build
tags:
- saas-macos-large-m2pro
needs: []
timeout: 80m
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in: 7 days
paths:
- build/meson-logs/
- build/tests/tcg/
reports:
junit: build/meson-logs/*.junit.xml
when: always
before_script:
- set -o allexport
- source .gitlab-ci.d/macos-14.vars
- set +o allexport
- export PATH="$PATH_EXTRA:$PATH"
- export PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
- brew update
- brew install $PKGS
- brew install gdb aarch64-elf-gcc i686-elf-gcc x86_64-elf-gcc
- if test -n "$PYPI_PKGS" ; then PYLIB=$($PYTHON -c 'import sysconfig; print(sysconfig.get_path("stdlib"))'); rm -f $PYLIB/EXTERNALLY-MANAGED; $PIP3 install --break-system-packages $PYPI_PKGS ; fi
script:
- mkdir build
- cd build
- ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
- $MAKE -j$(sysctl -n hw.ncpu)
- for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
aarch64-macos-15-build:
extends: .macos_job_template
image: macos-15-xcode-16
variables:
NAME: macos-15
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
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

View File

@@ -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'

View File

@@ -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.
-->
<!--

View File

@@ -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
@@ -280,6 +280,7 @@ LoongArch TCG CPUs
M: Song Gao <gaosong@loongson.cn>
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
@@ -444,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/
@@ -456,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
@@ -3475,6 +3478,7 @@ M: John Snow <jsnow@redhat.com>
M: Cleber Rosa <crosa@redhat.com>
S: Maintained
F: python/
F: tests/docker/dockerfiles/python.docker
T: git https://gitlab.com/jsnow/qemu.git python
Python scripts

View File

@@ -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)))

View File

@@ -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 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 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);
}
/* 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);
/* 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);
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);
}
}

View File

@@ -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))
@@ -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, \

View File

@@ -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]
@@ -301,7 +307,11 @@ try:
# Cirrus packages lists for GitLab
#
generate_cirrus("freebsd-14")
generate_cirrus("macos-14")
#
# GitLab packages lists
#
generate_vars("macos-14")
#
# VM packages lists