Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a9938e4
fix(riscv): read every devicetree memory node
lexoliu Nov 11, 2026
22c66c2
fix(riscv): find the PLIC whose contexts name the hart
lexoliu Nov 11, 2026
bfedd71
refactor(kernel): remove the unused KernelPhysFrameAllocator
lexoliu Nov 11, 2026
6894d19
refactor(kernel): drop ReportedFrames::take, whose only caller was th…
lexoliu Nov 11, 2026
51aa088
test(kernel): drive ReportedFrames through take_bytes
lexoliu Nov 11, 2026
ae6b942
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 11, 2026
bbd6b78
feat(hal)!: memory regions carry their node, and a NUMA description r…
lexoliu Nov 11, 2026
b384c0d
fix(kernel): walk every node for a free-page hint and format
lexoliu Nov 11, 2026
a75e985
fix(kernel): name the node in the user-pool frame allocator tests
lexoliu Nov 11, 2026
72fb2c3
feat(firmware): read NUMA locality from a devicetree
lexoliu Nov 11, 2026
ce0fe1f
docs(agents): place firmware/ in the tree and in test-units
lexoliu Nov 11, 2026
a31920e
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
acc097c
chore: follow dev's thiserror in the firmware crate's lock entry
lexoliu Nov 12, 2026
d95b031
feat(kernel): one user frame pool per NUMA node
lexoliu Nov 12, 2026
164ae7c
feat(kernel): one ready queue per NUMA node and a home node per instance
lexoliu Nov 12, 2026
e7890ff
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
eeef107
feat(riscv,aarch64): read the NUMA description from the device tree
lexoliu Nov 12, 2026
285789d
feat(kernel): report user memory per NUMA node in the stats sample
lexoliu Nov 12, 2026
ca06d53
feat(inspector): present a NUMA machine with --numa-nodes
lexoliu Nov 12, 2026
811651e
feat(kernel): back per-processor structures from their processor's node
lexoliu Nov 12, 2026
f6bf5c1
ci(smoke): boot aarch64 and riscv64 on two NUMA nodes
lexoliu Nov 12, 2026
b27a0bb
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
95b2489
docs(agents): list the two-node NUMA boots in the smoke lanes
lexoliu Nov 12, 2026
570eae0
fix(inspector): place NUMA processors by index
lexoliu Nov 12, 2026
e7df719
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
061e8ce
ci(smoke-riscv64): read the two-node layout from a boot whose UART ca…
lexoliu Nov 12, 2026
1244cf2
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
4b20d69
fix(riscv): route each device through the PLIC its devicetree node names
lexoliu Nov 12, 2026
40be55e
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
e13224b
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
7f73717
style(firmware): read the distance map with as_chunks
lexoliu Nov 12, 2026
7ce889e
style(x86): pass the ACPI handler to build_boot_context
lexoliu Nov 12, 2026
b693885
fix(riscv): the taking hart opens its own PLIC contexts
lexoliu Nov 12, 2026
17b4c57
feat(firmware): read NUMA topology from the ACPI SRAT and SLIT
lexoliu Nov 12, 2026
d337079
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 12, 2026
e256ae5
test(inspector): give the stats sample its guest ISA fields
lexoliu Nov 13, 2026
8219251
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
82600a0
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
840b8a5
fix(aarch64): read NUMA locality from the firmware's own device tree
lexoliu Nov 13, 2026
6e3a003
fix(aarch64): name Limine's mapped-reserved memory type as the crate …
lexoliu Nov 13, 2026
53ba3c0
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
205fd28
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
922dae5
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
85bb093
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
c1268e0
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
f1259eb
Merge remote-tracking branch 'origin/dev' into feat/516-numa-topology
lexoliu Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,33 @@ jobs:
shell -c 'echo ok' > vsock-smoke.out
cat vsock-smoke.out
grep -Fqx ok vsock-smoke.out
- name: Boot riscv64 guest on two NUMA nodes
timeout-minutes: 5
shell: bash
working-directory: helios
env:
HELIOS_BOOT_SYNC_TIMEOUT_SECS: "3600"
run: |
# Every other boot describes one node, so nothing else reads
# `numa-node-id` or the distance map from a real device tree
# (#516). The kernel prints the layout it placed memory and
# processors by; the log carries colour escapes, hence `-a`.
# The RPC rides vsock here because the boot UART carries the
# kernel log only when the debugger does not need the line.
set -o pipefail
runtime="$GITHUB_WORKSPACE/smoke-runtime/numa"
mkdir -p "$runtime"
./target/release/helios-inspector vm --arch riscv64 --release --memory 2G \
--accel tcg --smp 4 --numa-nodes 2 --numa-distance 20 \
--rpc-transport vsock \
--runtime-dir "$runtime" --keep-runtime-dir \
--boot-program dash --boot-program debugger --no-compiler-plugin \
shell -c 'echo ok' 2>&1 > boot-numa.out | tee "$runtime/inspector.log"
cat boot-numa.out
grep -Fqx ok boot-numa.out
grep -aF 'NUMA topology nodes=2 distances=10,20;20,10' "$runtime/debug-serial.log"
grep -aF 'NUMA node node=0' "$runtime/debug-serial.log" | grep -aF 'processors=0-1'
grep -aF 'NUMA node node=1' "$runtime/debug-serial.log" | grep -aF 'processors=2-3'
- name: Fetch over virtio-net with curl
timeout-minutes: 5
shell: bash
Expand Down Expand Up @@ -845,6 +872,56 @@ jobs:
# proves the walk still sees a real device rather than
# nothing.
grep -F 'device grant published device=pl061@9030000' "$runtime/inspector.log"
- name: Boot aarch64 guest on two NUMA nodes from the device tree
shell: bash
working-directory: helios
env:
HELIOS_LIMINE_SHARE: ${{ github.workspace }}/limine
HELIOS_LIMINE_BIN: ${{ github.workspace }}/limine/limine
HELIOS_BOOT_SYNC_TIMEOUT_SECS: "3600"
run: |
# Every other boot describes one node, so nothing else reads
# `numa-node-id` or the distance map from a real device tree
# (#516). The kernel prints the layout it placed memory and
# processors by; the log carries colour escapes, hence `-a`.
set -o pipefail
runtime="$GITHUB_WORKSPACE/smoke-runtime/numa"
mkdir -p "$runtime"
./target/release/helios-inspector vm --arch aarch64 --release --memory 2G \
--accel tcg --smp 4 --numa-nodes 2 --numa-distance 20 \
--runtime-dir "$runtime" --keep-runtime-dir \
--boot-program dash --boot-program debugger --no-compiler-plugin \
shell -c 'echo ok' 2>&1 > boot-numa.out | tee "$runtime/inspector.log"
cat boot-numa.out
grep -Fqx ok boot-numa.out
grep -aF 'NUMA topology nodes=2 distances=10,20;20,10' "$runtime/debug-serial.log"
grep -aF 'NUMA node node=0' "$runtime/debug-serial.log" | grep -aF 'processors=0-1'
grep -aF 'NUMA node node=1' "$runtime/debug-serial.log" | grep -aF 'processors=2-3'
- name: Boot aarch64 guest on two NUMA nodes from ACPI
shell: bash
working-directory: helios
env:
HELIOS_LIMINE_SHARE: ${{ github.workspace }}/limine
HELIOS_LIMINE_BIN: ${{ github.workspace }}/limine/limine
HELIOS_BOOT_SYNC_TIMEOUT_SECS: "3600"
run: |
# The same machine as the boot above, described by the SRAT, the
# SLIT and the MADT's GICC entries instead of `numa-node-id` and
# the distance map (#516).
set -o pipefail
runtime="$GITHUB_WORKSPACE/smoke-runtime/acpi-numa"
mkdir -p "$runtime"
./target/release/helios-inspector vm --arch aarch64 --release --memory 2G --acpi \
--accel tcg --smp 4 --numa-nodes 2 --numa-distance 20 \
--runtime-dir "$runtime" --keep-runtime-dir \
--boot-program dash --boot-program debugger --no-compiler-plugin \
shell -c 'echo ok' 2>&1 > boot-acpi-numa.out | tee "$runtime/inspector.log"
cat boot-acpi-numa.out
grep -Fqx ok boot-acpi-numa.out
grep -F 'platform described by acpi' "$runtime/inspector.log"
grep -aF 'NUMA topology nodes=2 distances=10,20;20,10' "$runtime/debug-serial.log"
grep -aF 'NUMA node node=0' "$runtime/debug-serial.log" | grep -aF 'processors=0-1'
grep -aF 'NUMA node node=1' "$runtime/debug-serial.log" | grep -aF 'processors=2-3'
# The same guest under the same accelerator as the device-tree
# boot above, described the other way. ACPI carries no counterpart
# to `/chosen/rng-seed`, so this boot's seed comes from the CPU's
Expand Down Expand Up @@ -1383,6 +1460,30 @@ jobs:
# The inspector attaches `vmgenid` on the x86 profile, so the
# guest has to have found its generation ID window (#572).
grep -aF 'vmgenid online' "$runtime/debug-serial.log"
- name: Boot x86-64 guest on two NUMA nodes
timeout-minutes: 5
shell: bash
working-directory: helios
run: |
# Every other boot describes one node, so nothing else reads the
# SRAT or the SLIT from real ACPI tables (#516). `-smp
# 4,sockets=2,cores=2` gives processors 0-3 APIC ids 0-3 in MADT
# order, and `-numa node,cpus=` puts 0-1 on node 0 and 2-3 on
# node 1. The kernel prints the layout it placed memory and
# processors by; the log carries colour escapes, hence `-a`.
set -o pipefail
runtime="$GITHUB_WORKSPACE/smoke-runtime/numa"
mkdir -p "$runtime"
./target/release/helios-inspector vm --arch x86-64 --release --memory 2G \
--accel kvm --smp 4 --numa-nodes 2 --numa-distance 20 \
--runtime-dir "$runtime" --keep-runtime-dir \
--boot-program dash --boot-program debugger --no-compiler-plugin \
shell -c 'echo ok' 2>&1 > boot-numa.out | tee "$runtime/inspector.log"
cat boot-numa.out
grep -Fqx ok boot-numa.out
grep -aF 'NUMA topology nodes=2 distances=10,20;20,10' "$runtime/debug-serial.log"
grep -aF 'NUMA node node=0' "$runtime/debug-serial.log" | grep -aF 'processors=0-1'
grep -aF 'NUMA node node=1' "$runtime/debug-serial.log" | grep -aF 'processors=2-3'
- uses: ./helios/.github/actions/swtpm
# The kernel's signing seed is sealed in the TPM to the measured
# boot chain (#602). Two boots of one payload on one TPM state
Expand Down
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ never depends on anything above it.
| Layer | Crates | Contents |
| --- | --- | --- |
| Hardware contracts | `hal/` | Traits, capability types and value types only. `#![no_std]`. |
| Device and protocol libraries | `netstack/`, `virtio/`, `i6300esb/`, `tpm/` | `#![no_std]` protocol engines and drivers. `virtio/` builds on `netstack/`; `tpm/` drives a TPM 2.0 over the FIFO and CRB interfaces for measured boot and sealing only; all four depend on `hal/` and none on the kernel. |
| Device and protocol libraries | `netstack/`, `virtio/`, `i6300esb/`, `tpm/`, `firmware/` | `#![no_std]` protocol engines and drivers. `virtio/` builds on `netstack/`; `tpm/` drives a TPM 2.0 over the FIFO and CRB interfaces for measured boot and sealing only; `firmware/` turns the platform description a backend hands it (the device tree's NUMA properties, the ACPI SRAT and SLIT) into `hal/` values; all five depend on `hal/` and none on the kernel. |
| Shared ABIs | `compiler-abi/`, `artifact/` | `#![no_std]` wire formats shared by the kernel and host tools: the compiler plugin's request and response headers, `cwasm` target flags, the signature trailer, and the `helios-bootfs` payload image the kernel reads at bring-up. |
| Kernel | `kernel/` | Every piece of hardware-independent runtime logic: executor, timer, memory and OOM, instance registry, component host, Wasmtime adapter, network service, host-fs client, every WIT service. `#![no_std]`, generic over `Cpu`. The user payload is not linked into the kernel: it arrives as a boot module (`docs/boot.md`). |
| Backends | `aarch64/`, `riscv/`, `x86/`, `hosted/` | Boot, trap, IRQ, timer, MMIO, UART, virtio transport and SMP wiring, and nothing else. `hosted/` runs the same kernel on the host OS under the same restriction. |
Expand Down Expand Up @@ -453,7 +453,7 @@ just test-units
`just lint` is `tools/fmt.sh --check`, `cargo deny --workspace check bans`
against `deny.toml`, and `cargo clippy … -D warnings` over the host crates, each
guest program, and the three bare-metal targets.
`just test-units` runs the `hal`, `virtio`, `netstack`, `tpm`, `kernel`,
`just test-units` runs the `hal`, `virtio`, `netstack`, `tpm`, `firmware`, `kernel`,
`inspector-protocol` and `workspace-root` unit tests, every `hosted` test,
and the `hal_layering` test (`kernel/tests/`) that enforces §1. The recipe names each integration
test with `--test <name>`, so a new enforcement test is added to the recipe
Expand All @@ -470,10 +470,10 @@ red lane names the surface that broke:
| `check-host` | `ubuntu-24.04` | The host surfaces compile. |
| `lint-fmt`, `lint-host`, `lint-aarch64`, `lint-riscv`, `lint-x86` | `ubuntu-24.04` | Formatting, the `deny.toml` bans, and clippy at `-D warnings`; a bare-metal lint lane is also that target's compile check, since clippy builds the packages `check-target` checks. |
| `test-units`, `test-embedded-debugger` | `ubuntu-24.04` | Unit tests and the embedded debugger. |
| `smoke-x86-64` | `ubuntu-24.04`, `--accel kvm` | Boot, shell, CPython, the in-kernel compiler, a trapped OOB load, curl over virtio-net, the raw serial captures; under `swtpm`, the kernel's signing key kept across two boots, resealed after a changed payload, and a tampered payload refused. |
| `smoke-x86-64` | `ubuntu-24.04`, `--accel kvm` | Boot on one node and on two NUMA nodes, shell, CPython, the in-kernel compiler, a trapped OOB load, curl over virtio-net, the raw serial captures; under `swtpm`, the kernel's signing key kept across two boots, resealed after a changed payload, and a tampered payload refused. |
| `smoke-x86-64-venus` | `ubuntu-24.04`, `--accel kvm` | `gpu-test` on a Venus `virtio-gpu-gl` device rendered through lavapipe: a virgl context's fence, host and guest blobs, two instances at once. It runs only on changes to the 3D path, against a pinned QEMU and virglrenderer it builds and caches. |
| `smoke-riscv64` | `ubuntu-24.04`, `--accel tcg` | Boot, shell, CPython, a trapped OOB load, the inspector RPC over vsock, curl over virtio-net. |
| `smoke-aarch64` | `ubuntu-24.04-arm`, `--accel tcg` | Boot from the device tree and from ACPI; under `swtpm`, the kernel's signing key kept across two ACPI boots, resealed after a changed payload, changed state detected across device-tree boots, and a tampered payload refused. Runs against a pinned upstream QEMU the lane builds and caches, because Ubuntu 24.04's QEMU asserts in its emulated GICv3 under multi-threaded TCG. |
| `smoke-riscv64` | `ubuntu-24.04`, `--accel tcg` | Boot, a two-node NUMA boot, shell, CPython, a trapped OOB load, the inspector RPC over vsock, curl over virtio-net. |
| `smoke-aarch64` | `ubuntu-24.04-arm`, `--accel tcg` | Boot from the device tree and from ACPI, each on one node and on two NUMA nodes; under `swtpm`, the kernel's signing key kept across two ACPI boots, resealed after a changed payload, changed state detected across device-tree boots, and a tampered payload refused. Runs against a pinned upstream QEMU the lane builds and caches, because Ubuntu 24.04's QEMU asserts in its emulated GICv3 under multi-threaded TCG. |
| `bench-x86-64-linux` | `ubuntu-24.04`, `--accel kvm`, multi-queue tap | The workload benchmarks of §3.6, with the negotiated virtio-net features reported. |

The bench lane is the exception: it lives in `bench-lane.yml` and runs
Expand Down
39 changes: 22 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"aarch64", "acpi", "api", "api-macro", "artifact", "cli", "compiler-abi", "compiler-host", "compiler-plugin", "compiler-support", "hal", "i6300esb", "hosted", "kernel", "netstack", "profdata", "programs/audio-test", "programs/compositor", "programs/compositor/render", "programs/cpu", "programs/date", "programs/debugger", "programs/display-test", "programs/gpu-test", "programs/http-client", "programs/init", "programs/input-test", "programs/oob-load", "programs/perf", "programs/ping", "programs/procbench", "programs/sched-tasks", "programs/surface-test", "riscv", "tools/branch-hints", "tools/desktop/check-text", "tpm", "venus", "venus-gen", "x86", "inspector", "inspector-protocol", "virtio", "workspace-root",
"aarch64", "acpi", "api", "api-macro", "artifact", "cli", "compiler-abi", "compiler-host", "compiler-plugin", "compiler-support", "firmware", "hal", "i6300esb", "hosted", "kernel", "netstack", "profdata", "programs/audio-test", "programs/compositor", "programs/compositor/render", "programs/cpu", "programs/date", "programs/debugger", "programs/display-test", "programs/gpu-test", "programs/http-client", "programs/init", "programs/input-test", "programs/oob-load", "programs/perf", "programs/ping", "programs/procbench", "programs/sched-tasks", "programs/surface-test", "riscv", "tools/branch-hints", "tools/desktop/check-text", "tpm", "venus", "venus-gen", "x86", "inspector", "inspector-protocol", "virtio", "workspace-root",
]
resolver = "2"

Expand All @@ -19,9 +19,13 @@ publish = false
[workspace.dependencies]
helios-hal = { path = "hal" }
helios-acpi = { path = "acpi" }
# The fork carries `Handler::handle_notify` (rust-osdev/acpi#380), which
# processor hotplug needs to see the interpreter's `Notify`.
acpi = { git = "https://github.com/lexoliu/acpi", branch = "aml-notify-handler", default-features = false, features = ["aml"] }
# The fork's `helios` branch carries `Handler::handle_notify`
# (rust-osdev/acpi#380), which processor hotplug needs to see the
# interpreter's `Notify`, and the SRAT and SLIT fixes (rust-osdev/acpi#381):
# the published 6.1.1 and 7.0.0-pre1 misread the SRAT's memory length above
# 4 GiB and every multi-locality SLIT. A crate that runs AML names the `aml`
# feature itself.
acpi = { git = "https://github.com/lexoliu/acpi", branch = "helios", default-features = false }
helios-artifact = { path = "artifact" }
helios-compiler-abi = { path = "compiler-abi" }
helios-compiler-support = { path = "compiler-support" }
Expand All @@ -37,6 +41,7 @@ helios-virtio = { path = "virtio" }
helios-tpm = { path = "tpm" }
helios-workspace-root = { path = "workspace-root" }
helios-x86 = { path = "x86" }
helios-firmware = { path = "firmware", default-features = false }
i6300esb = { path = "i6300esb" }
crossbeam-utils = { version = "0.8.23", default-features = false }
tracing = { version = "0.1.44", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ test-units:
export HELIOS_KERNEL_ROOT_PUBLIC_KEY="${out_dir}/helios-root-public.key"
export HELIOS_KERNEL_ROOT_SECRET_KEY="${out_dir}/helios-root-secret.key"
cargo nextest run -p helios-hal -p helios-virtio -p helios-netstack -p helios-artifact -p helios-kernel --lib
cargo nextest run -p helios-firmware
cargo nextest run -p helios-workspace-root --lib
# The TPM driver: both interfaces against register models that
# enforce their state machines, and the sealing scenario replayed
Expand Down
6 changes: 5 additions & 1 deletion aarch64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ default = ["embedded-debugger"]
embedded-debugger = ["helios-kernel/embedded-debugger"]

[dependencies]
acpi.workspace = true
acpi = { workspace = true, features = ["aml"] }
helios-acpi.workspace = true
arm-gic = "0.9.1"
# The ID, key and control registers return-address signing programs. `arm-gic`
Expand All @@ -18,11 +18,15 @@ bytes = { version = "1.12.1", default-features = false }
critical-section = { version = "1.2.0", features = ["restore-state-usize"] }
fdt = { version = "0.1.5", default-features = false }
helios-artifact.workspace = true
helios-firmware = { workspace = true, features = ["acpi", "devicetree"] }
helios-hal.workspace = true
helios-kernel = { workspace = true, default-features = false, features = ["wasmtime-bare-metal"] }
helios-virtio.workspace = true
helios-tpm.workspace = true
limine = "0.6.5"
# The UEFI system and configuration table layouts and the device-tree table
# GUID, through which the firmware's own device tree is found.
r-efi = { version = "7.1.0", default-features = false }
smccc = "0.2.3"
spin = "0.12.3"
thiserror = { version = "2.0.20", default-features = false }
Expand Down
Loading
Loading