From bcb8b91fc4e29f1f443b80845382d73f73f5a34a Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Fri, 6 Nov 2026 08:32:08 -0500 Subject: [PATCH] ci: the emulated vector and SME legs bring their own emulator The vector unit's sve and rvv legs and the matrix extension's emulated leg ran their aarch64 and riscv64 test binaries directly (cargo's runner set to env), so the host's binfmt handler ran them. Whether that worked depended on which `linux` runner claimed the leg: one without a handler ran the binary as a shell script and failed (a new x86_64 runner failed 4 of 4 such legs on 6 Nov, main's own SME run among them), and the hosts that have one run different versions (8.2.2 on some, 10.2.1 on another) while every certificate said 8.2.2. - Each emulated leg fetches Debian's static QEMU 10.0.13 (qemu-user, SHA-256 pinned; snapshot.debian.org by SHA-1 if the pool has moved on), once per host into the workflow's cache under the lock it already holds, and names it as cargo's runner with -L to the image's sysroot. QEMU_CPU, the vector length and RVV settings, is passed as before. - A preflight builds a trivial program for the target and runs it the way cargo will; an emulator that cannot run it, or a program that does not report the target's machine, fails the leg there with a message saying so. - The certificates name the emulator that ran: qemu-user 10.0.13 (Debian's static build, run by the job). The image's own emulators (5.1, 6.1) are not used, as before. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/wai-quantum-sme.yml | 51 +++++++++++++++---- .github/workflows/wai-quantum-vector.yml | 63 ++++++++++++++++++++---- 2 files changed, 95 insertions(+), 19 deletions(-) diff --git a/.github/workflows/wai-quantum-sme.yml b/.github/workflows/wai-quantum-sme.yml index 4f49399dd..aaf1cdbe7 100644 --- a/.github/workflows/wai-quantum-sme.yml +++ b/.github/workflows/wai-quantum-sme.yml @@ -5,9 +5,10 @@ name: wai-quantum matrix-extension member # against the CPU reference's pinned corpus digests. # # - sme-emulated (the container runner): the member's device tests for aarch64 -# Linux, run through the host's user-mode emulator (its binfmt handler, which -# emulates SME); the runner declares the emulator, and every certificate says -# it was earned there, never on silicon. +# Linux, run under a user-mode emulator the job fetches and runs itself +# (Debian's static QEMU, pinned, which emulates SME), never the host's binfmt +# handler; the job declares the emulator, and every certificate says it was +# earned there, never on silicon. # - sme-absent (the macOS runner, whose processor has no SME): the same build # finds no member and says why. # @@ -62,12 +63,17 @@ jobs: options: --memory=6g --memory-swap=6g env: WAI_QUANTUM_SME_EXPECT: cpu-matrix-sme - # The host's binfmt handler runs every aarch64 binary; its emulator is - # what the certificates name. - WAI_QUANTUM_SME_EMULATOR: qemu-user 8.2.2 (the host's binfmt handler) - # Run the test binary directly, so the host's handler (which emulates - # SME) runs it, not the image's older emulator. - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER: env + # The emulator every aarch64 test binary runs under, which the certificates + # name: Debian's static QEMU, SHA-256 pinned, fetched by the job and named as + # cargo's runner. Not the image's own (5.1), and not the host's binfmt + # handler, which some `linux` runners lack and others run at another + # version. (Not QEMU_*: qemu-user reads every QEMU_