interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

GitHub aien-dev/aienux#81 (code only)

closed derived d3e5b0ce70887896 #81

Imported from GitHub aien-dev/aienux#81 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 6b4290f3dbc110204039dca7b2b17dfccd7e5a8c · Head dd00525ed5c569f7dbd167da82cc69bd448bbaf7

Fetch it

A git bundle of the pull request's head, 2552 bytes.

curl -fsSL https://interplane.io/drakestapleton/aienux/patches/d3e5b0ce70887896.bundle -o d3e5b0ce70887896.bundle
git fetch d3e5b0ce70887896.bundle refs/pull/81/head

Raw bundle · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aienux
81
dd00525ed5c569f7dbd167da82cc69bd448bbaf7
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":81,"url":"https://github.com/aien-dev/aienux/pull/81","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:44Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/scripts/qemu_boot_test.sh b/scripts/qemu_boot_test.sh
index 9f0d4efb..f669e7dc 100755
--- a/scripts/qemu_boot_test.sh
+++ b/scripts/qemu_boot_test.sh
@@ -27,10 +27,13 @@ cp target/aarch64-unknown-uefi/release/aienos-handoff.efi "${work}/esp/EFI/BOOT/
 cp "${vars_fd}" "${work}/vars.fd"
 log="${work}/serial.log"
 
+# Issue #61: single-threaded TCG completed 120/120 soak boots; MTTCG hung in 1/40.
+qemu_accel=(-accel tcg,thread=single)
+
 started=$(date +%s)
 set +e
 timeout "${AIENOS_QEMU_TIMEOUT:-180}" qemu-system-aarch64 \
-    -M virt,virtualization=on -cpu max -smp 4 -m 2048 \
+    -M virt,virtualization=on "${qemu_accel[@]}" -cpu max -smp 4 -m 2048 \
     -drive if=pflash,format=raw,readonly=on,file="${code_fd}" \
     -drive if=pflash,format=raw,file="${work}/vars.fd" \
     -drive if=none,id=esp,format=raw,file=fat:rw:"${work}/esp" \
diff --git a/scripts/qemu_keyboard_test.sh b/scripts/qemu_keyboard_test.sh
index 7d776794..28801dfc 100755
--- a/scripts/qemu_keyboard_test.sh
+++ b/scripts/qemu_keyboard_test.sh
@@ -71,8 +71,10 @@ boot_once() {
     cp "${vars_fd}" "${work}/vars.fd"
     rm -f "${work}/serial.log" "${work}/mon.in" "${work}/mon.out"
     mkfifo "${work}/mon.in" "${work}/mon.out"
+    # Single-threaded TCG: multi-threaded TCG intermittently loses the
+    # firmware's timer wake-up and hangs before AIENOS output (#61).
     qemu-system-aarch64 \
-        -M virt,virtualization=on -cpu max -smp 4 -m 2048 \
+        -M virt,virtualization=on -accel tcg,thread=single -cpu max -smp 4 -m 2048 \
         -drive if=pflash,format=raw,readonly=on,file="${code_fd}" \
         -drive if=pflash,format=raw,file="${work}/vars.fd" \
         -drive if=none,id=esp,format=raw,file=fat:rw:"${work}/esp" \
diff --git a/scripts/qemu_security_suite.sh b/scripts/qemu_security_suite.sh
index 25abe9b7..5f4a44c3 100755
--- a/scripts/qemu_security_suite.sh
+++ b/scripts/qemu_security_suite.sh
@@ -16,6 +16,10 @@ code_fd="${AAVMF_CODE:-/usr/share/AAVMF/AAVMF_CODE.no-secboot.fd}"
 vars_fd="${AAVMF_VARS:-/usr/share/AAVMF/AAVMF_VARS.fd}"
 ITERATIONS="${GATE4_SOAK_RUNS:-5}"
 
+# Issue #61: MTTCG hung in 1/40 boots with -smp 1 and 1/40 with cortex-a76;
+# single-threaded TCG completed 120/120 boots (40 initial plus 80 confirmation).
+qemu_accel=(-accel tcg,thread=single)
+
 command -v qemu-system-aarch64 >/dev/null || { echo "Error: qemu-system-aarch64 not installed" >&2; exit 2; }
 command -v swtpm >/dev/null || { echo "Error: swtpm not installed" >&2; exit 2; }
 [[ -r "${code_fd}" && -r "${vars_fd}" ]] || { echo "Error: AAVMF firmware not found" >&2; exit 2; }
@@ -53,7 +57,7 @@ log="${work}/subtest1/serial_tpm.log"
 
 set +e
 timeout ${AIENOS_QEMU_TIMEOUT:-120} qemu-system-aarch64 \
-    -M virt,virtualization=on -cpu max -smp 4 -m 2048 \
+    -M virt,virtualization=on "${qemu_accel[@]}" -cpu max -smp 4 -m 2048 \
     -chardev socket,id=chrtpm,path="${tpm_dir}/swtpm-sock" \
     -tpmdev emulator,id=tpm0,chardev=chrtpm \
     -device tpm-tis-device,tpmdev=tpm0 \
@@ -85,7 +89,7 @@ for i in $(seq 1 "${ITERATIONS}"); do
     soak_log="${soak_work}/serial_soak.log"
     set +e
     timeout ${AIENOS_QEMU_TIMEOUT:-120} qemu-system-aarch64 \
-        -M virt,virtualization=on -cpu max -smp 4 -m 2048 \
+        -M virt,virtualization=on "${qemu_accel[@]}" -cpu max -smp 4 -m 2048 \
         -drive if=pflash,format=raw,readonly=on,file="${code_fd}" \
         -drive if=pflash,format=raw,file="${soak_work}/vars.fd" \
         -drive if=none,id=esp,format=raw,file=fat:rw:"${soak_work}/esp" \
@@ -113,7 +117,7 @@ corrupt_log="${corrupt_work}/serial_corrupt.log"
 
 set +e
 timeout 30 qemu-system-aarch64 \
-    -M virt,virtualization=on -cpu max -smp 4 -m 2048 \
+    -M virt,virtualization=on "${qemu_accel[@]}" -cpu max -smp 4 -m 2048 \
     -drive if=pflash,format=raw,readonly=on,file="${code_fd}" \
     -drive if=pflash,format=raw,file="${corrupt_work}/vars.fd" \
     -drive if=none,id=esp,format=raw,file=fat:rw:"${corrupt_work}/esp" \