Changelog
All notable changes to Haven are documented in this file. Format follows Keep a Changelog. Versioning follows Semantic Versioning.
[Unreleased]
Section titled “[Unreleased]”Target changed to the CIX P1 SoC only (owner decision 2026-11-02); i.MX95 and
i.MX8QM code is kept as legacy. Detailed records: docs/methodology/stage0
to stage2, defects in docs/methodology/stage0/20261025-corrections/FINDINGS.md.
- External read-back of enforced state (
tools/readback/, now v4): stage-2, SMMUv3 stream tables and GICv3 routing, enables and priorities against a grant. - SMMUv3 command and event queues; one stage-2 table per granted DMA stream; blocked DMA logged from the event-queue interrupt; PCI BARs placed by Haven.
- Interrupt delivery to partitions as hardware-linked virtual interrupts; PPIs owned per CPU; partition B’s virtual timer.
qemu-psciboot profile; partition B runs on CPU 2 (scripts/qemu/partition-b-check.py, also in CI).tools/fwscan/IORT scanner for CIX UEFI images.
- Stage-2 permissions honoured (MM1); SMMU register offsets and STE layout (SM1-SM4); GICD_CTLR Non-secure layout (GI1); secondary-CPU EL2 setup (B2); per-CPU PPI enable (T1); list registers bounded by ICH_VTR_EL2 (I1).
Removed
Section titled “Removed”- Placeholder and GitHub-specific documents; an AI-tool workflow note.
Still open
Section titled “Still open”- Budget enforcement (EL2 timer), secondary-CPU ready handshake (B3), EL2 MMU and cache handoff (A1), board bring-up.
[0.6.2] - 2026-05-29
Section titled “[0.6.2] - 2026-05-29”Dev automation and hook hardening (PR #36)
scripts/dev/fix-emdash.sh- scans all tracked text files and replaces em-dash characters (U+2014) with ASCII hyphens to prevent toolchain/terminal encoding issues..githooks/pre-commit- updated to callfix-emdash.shand re-stage affected files before each commit;scripts/release.shupdated to absorb em-dash cleanup as step 0.
Safety and compliance documentation (PR #38)
docs/safety/MISRA_DEVIATION_RECORD.md- formal record of approved MISRA-C:2012 deviations with justification and sign-off fields for each rule deviation.docs/safety/STATIC_ANALYSIS_POLICY.md- static analysis toolchain policy: required tools, CI gate thresholds, suppression annotation format, and review process.
Thesis process documentation (PR #39)
docs/contributing/RELEASE_PROCESS.md- step-by-step release checklist covering version bumps, evidence packs, artifact signing, and submodule pointer updates.docs/thesis/REPRODUCIBILITY_APPENDIX.md- documents the reproducible build environment (Docker, CMake presets, toolchain pins) needed to reproduce thesis experiment results.docs/thesis/PAPER_OUTLINE.md- draft paper structure and chapter-to-milestone traceability mapping (M-P1 through M-P8).
Conference demo script (PR #40)
scripts/demo/conference-demo.sh- four-act interactive demo script covering boot isolation, DMA policy, temporal scheduling, and fault injection; supports--dry-runmode for rehearsal.
ARM64 context save/restore and FreeRTOS HVC yield (PR #41)
arch/arm64/context.S- strong-symbol implementations ofhv_arch_context_save()andhv_arch_context_restore()that save/restore x19–x29, SP, PC (from LR), and NZCV. Override the weak no-op stubs infreertos_integration.con ARM64 targets (M-P5-1).include/haven/freertos_integration.h,src/guest/rtos/freertos_integration.c- addedHV_HVC_BUDGET_TICKconstant andhv_freertos_yield_budget_tick()which issueshvc #1on ARM64 targets; no-op on host builds (M-P5-2).arch/arm64/cpu.c-hv_arch_psci_log_error()decodes all PSCI 1.2 error codes (NOT_SUPPORTED through INVALID_ADDRESS) to human-readable strings viahv_printk(M-P5-3).arch/arm64/boot.S-hv_arch_psci_cpu_onnow callshv_arch_psci_log_erroron non-zero return from the PSCICPU_ONHVC (M-P5-3).
SKILL.md enhancements (PR #37)
- Added sections 1–4 (skill overview, evidence taxonomy, pre-task setup checklist, evidence
directory structure) and sections 11–12 (FreeRTOS integration patterns, PSCI error handling)
to
.github/skills/thesis-evidence/SKILL.md. docs/roadmap/DESCRIPTION.md- appended Part 10 (Long-Term Maintenance: Phases 9–12) covering CI hardening, documentation debt, community readiness, and thesis finalisation.
QEMU launch script (PR #42)
scripts/qemu/qemu-run.sh- bash syntax error (fion same line asecho) caused the script to fail with a parse error on every invocation; fixed. Added macOS/Linux toolchain install hints whenhaven.binis missing.tools/scripts/qemu-run.sh- restored accidentally-deleted wrapper; corrected delegation path fromscripts/qemu-run.sh(non-existent) toscripts/qemu/qemu-run.sh.src/guest/rtos/freertos_integration.c- added missing trailing newline (EOF)..github/workflows/ci.yml- addedqemu-smokejob chained afterarm64-cross-compile; downloadshaven-arm64artifact, runsqemu-smoke.sh, uploads validation JSON.
Host test build (PR #43)
cmake/flags.cmake-HAVEN_HOST_CFLAGSnow suppresses-Wunused-variableand-Wno-unused-but-set-variablefor host/test builds. 100 pre-existing errors across 9 test files broke the entirecmake-host-testsCI job; production ARM64 flags unchanged.
Secondary CPU isolation tests and CI/docs hardening (PR #45)
tests/integration/test_secondary_cpu_isolation.c- added T7 (test_psci_error_path_rejection): verifies thathv_irq_assignwithtarget_cpu=999is rejected andhv_budget_setwithpartition_id=0returnsHV_EINVAL; and T8 (test_freertos_budget_period_fidelity): exercises budget period reset cycle for FreeRTOS scheduling fidelity coverage.docs/roadmap/DESCRIPTION.md- added §10.5 (QEMU End-to-End CI Track) and §10.6 (Host-Test Stability Policy) to Part 11 as binding operational policies..github/skills/thesis-evidence/SKILL.md- added §13 (Host-Test Build Contract), §14 (QEMU Smoke Validation protocol), and §15 (macOS Cross-Compile Setup notes).
Changed
Section titled “Changed”- Hypervisor version banner in
src/core/init.cupdated from0.4.0-devto0.6.2. VERSIONandCMakeLists.txtproject version bumped from0.6.0to0.6.2.- CHANGELOG date corrected to 2026-05-29 for the [0.6.2] entry.
[0.6.1] - 2026-05-26
Section titled “[0.6.1] - 2026-05-26”Changed
Section titled “Changed”Full CMake migration - Makefiles retired (PRs #31–#34)
CMakeLists.txt- primary build system migrated from Makefile to CMake ≥ 3.22 + Ninja;CMakePresets.jsonprovides four named presets:arm64-qemu,arm64-imx95,arm64-imx8qm,host-tests. Project version synced to0.6.0.cmake/arm64.cmake,cmake/host.cmake,cmake/flags.cmake- cross-compile toolchain files and compiler flag sets extracted from old Makefile rules.- All GitHub Actions workflows updated:
makeremoved fromapt-get installinci.yml,nightly.yml,benchmark.yml,evidence-pack.yml; build steps now callcmake --preset ….
scripts/evidence/benchmark-baseline.py broken paths (PR #34)
- Script called
./scripts/build.sh,./scripts/style-check.sh,./scripts/test.sh, which no longer exist after the script directory reorganisation. Paths corrected to./scripts/compile/build.sh,./scripts/dev/style-check.sh,./scripts/dev/test.sh. scripts/compile/build-arm64.sh,tools/scripts/cross-compile.sh- switched frommakeinvocation tocmake --preset arm64-qemu && cmake --build build.
Documentation
Section titled “Documentation”docs/andwebsite/references updated frommaketocmakebuild commands.docs/wikisubmodulechore/cmake-ref-cleanupbranch: Getting-Started, Contributing, and Changelog pages updated with cmake preset quick-start instructions.
[0.6.0] - 2026-05-14
Section titled “[0.6.0] - 2026-05-14”Partition B RTOS-class Guest Stub (PR #18)
tests/demos/guest_b_entry.S- bare-metal EL1 stub for Partition B (IPA0x60000000, PART_B_IPA_BASE). Runs 3 simulated RTOS task periods (busy-wait loops), deliberately reads Partition A’s IPA base (0x40000000) to trigger a stage-2 DABT (Haven logs denial and resumes), then writes a0xDEADBEEFsentinel at IPA+0x100 as a health-check indicator. No UART mapped - the PL011 at0x09000000is exclusively owned by Partition A; any B→UART access faults at stage-2, preserving the spatial isolation invariant.linker-guest-b.ld- ELF64 AArch64 linker script placing the stub at VMA0x60000000. Haven maps PA0xA0800000→ IPA0x60000000for Partition B.Makefile- ARM64alltarget now includesguest_b.bin; addedguest_b.elf/guest_b.binassembly + objcopy rules.scripts/qemu/qemu-run.sh- optionalGUEST_B_LOADERat PA0xA0800000(PART_B_PA_BASE).scripts/qemu/qemu-smoke.sh- loads guest B at0xA0800000when the binary is present; detectsPARTITION_B:marker (active once secondary-CPU bring-up is wired).
SMMU Integration Test Expansion (PR #19)
tests/integration/test_smmu_hardware.c- added 3 new scenarios (total 8):- S6: Read-only DMA window blocks write access (HV_EPERM for WO/RW request).
- S7: Write-only DMA window blocks read access (HV_EPERM for RO/RW request).
- S8: StreamID pool exhaustion → HV_ENOSPC (hard upper bound at HV_MAX_SMMU_DEVICES=64).
CI Benchmark Regression Gate (PR #20)
scripts/ci/bench-regression.sh- parsesbuild/benchmarks/*.json, comparesmean_nsper benchmark againsttests/benchmarks/latency-baseline.json, exits 1 on >10% regression. Uses Python 3 stdlib only.scripts/ci/bench-update-baseline.sh- reruns benchmark suite and regenerates the baseline file from current measurements.tests/benchmarks/latency-baseline.json- 15 baseline entries covering stage-2, IRQ, budget, SMMU, timer, and IOMMU hot paths. Seeded from current CI measurements..github/workflows/nightly.yml- newbenchmark-regressionjob: builds benchmarks, runs them, callsbench-regression.shwith 10% threshold, uploads results as 30-day artifact.
EL2 Virtual IRQ Injection (PR #17)
src/core/exc/el2_exceptions.c- completed two remaining stubs:hv_el2_exceptions_init(): callshv_install_vectors()(writes VBAR_EL2) andhv_arch_gic_el2_setup()(enables GICv3 virtual CPU interface via ICH_HCR_EL2/ICH_VMCR_EL2) underHAVEN_ARCH_ARM64. Both symbols are__attribute__((weak))for host builds.hv_el2_inject_exception(): forHV_EXC_IRQon ARM64, callshv_arch_inject_virtual_irq()which writes a free GICv3 List Register (ICH_LR_EL2) with Pending state so the guest receives the interrupt on next IRQ exception from EL1.
SMMU StreamID Pool Leak (PR #19)
src/core/dma/smmu.c,hv_smmu_reset_partition()- previously only freed StreamIDs whose DMA window had been configured. An allocated-but-unconfigured StreamID (e.g., one whoseconfigure_dma_windowcall was rejected due to PA overlap) would never be freed, permanently leaking quota from the global StreamID pool. Fixed:reset_partitionnow also frees unconfigured StreamIDs for the target partition.
Evidence
Section titled “Evidence”- SMMU integration: 8/8 scenarios pass (S1–S8); host + CI verified.
- EL2 exception unit tests: 35/35 pass (host builds, pre-merge validation).
- Benchmark regression baseline: 15/15 named benchmarks within 10% tolerance.
[0.5.0] - 2026-05-20
Section titled “[0.5.0] - 2026-05-20”QEMU Two-Partition Isolation Demo (R3 milestone)
tests/demos/guest_a_entry.S- minimal bare-metal EL1 stub for Partition A; prints greeting via PL011 UART, deliberately reads Partition B’s IPA base (0x60000000), and confirms Haven resumes it after the fault.linker-guest.ld- guest stub linker script; links binary at VMA0x40000000(Partition A IPA base).Makefile- addedguest_a.elf/guest_a.bintargets under the ARM64 build; binary loaded at PA0x80800000by QEMU.
Stage-2 Fault Enforcement
src/core/exc/el2_exceptions.c- EL2 sync handler now decodes ESR_EL2 (EC=0x24 DABT, FSC 0x04–0x0F) and HPFAR_EL2 to detect and log stage-2 violations; advances saved ELR_EL2 in the stack frame to skip the faulting instruction and resume the guest.arch/arm64/mm.c- fixed stage-2 S2AP field:attrs=0→ Normal WB inner-shareable RW;attrs=1→ Device nGnRE non-executable RW. Previously all mappings had S2AP=0b00 (no access).
Memory Layout Fixes
src/platform/qemu-virt/memory.h- corrected PA layout:HAVEN_SIZEincreased to 8 MB to cover BSS stage-2 pool;PART_B_IPA_BASEset to0x60000000(distinct from Partition A) to make cross-partition violations detectable.src/core/partition.c- added PL011 UART MMIO region (IPA/PA0x09000000, 4 KB, device attrs) to Partition A stage-2 mapping; guest stub can now print.
QEMU Smoke Test
scripts/qemu-smoke.sh- rewrote serial capture to use-chardev fileinstead of-nographic(fixes macOS TTY routing); loadsguest_a.binvia-device loader; passes when boot marker + guest greeting + stage-2 violation log + post-fault marker are all present in the UART output.scripts/qemu-run.sh- updated to loadguest_a.binat PA0x80800000alongsidehaven.bin.
- Stage-2 S2AP=0b00 (no access) bug in
arch/arm64/mm.c- all normal-memory mappings were inaccessible; fixed by translatingattrsto correctS2AP_RW | S2_MEMATTR_*descriptor bits. - ELR_EL2 not advancing after stage-2 fault - C handler was writing to the ELR_EL2 register directly, but
restore_minimalinentry.Soverwrote it from the stack frame; fixed by writing tosp+168(saved ELR slot) instead. - macOS QEMU serial capture -
-nographicroutes PL011 to/dev/tty(terminal), not stdout when redirected; fixed by using-chardev file,id=serial0,path=...which writes directly to a file on all platforms.
Evidence
Section titled “Evidence”QEMU UART capture (build/smoke/uart.log) shows:
PARTITION_A: Hello from partition A (EL1 guest)HAVEN: Denied stage-2 violation IPA=0x60000000 FAR=0x60000000 ESR=0x93c08006PARTITION_A: Post-fault check OKSmoke test result: validation_status=pass, elapsed_seconds=1.
[0.4.0] - 2026-05-18
Section titled “[0.4.0] - 2026-05-18”ARM64 Architecture Layer (arch/arm64/)
arch/arm64/entry.S- EL2 exception vector table (2KB-aligned, VBAR_EL2).arch/arm64/context.S- GP register save/restore (x0–x30, SP_EL0/EL1, NEON Q0–Q31).arch/arm64/boot.S- primary CPU EL2 entry and secondary CPU PSCI bring-up.arch/arm64/cpu.c- EL2 CPU init: HCR_EL2, VPIDR_EL2, VMPIDR_EL2, MDCR_EL2, CPTR_EL2.arch/arm64/mm.c- stage-2 page-table hardware: VTTBR_EL2, VTCR_EL2, TLB invalidation.arch/arm64/timer.c- EL2 physical timer: CNTHP_CTL_EL2, CNTHP_CVAL_EL2.arch/arm64/irq.c- EL2 IRQ handling, GICv3 List Register injection (ICH_LR0_EL2).arch/arm64/partition.S- partition launch: SPSR_EL2 + VTTBR_EL2 setup, ERET to guest.arch/arm64/include/asm/sysregs.h-read_sysreg/write_sysregmacros, all EL2 registers.arch/arm64/include/asm/page.h- stage-2 descriptor formats, S2AP permissions, granule support.arch/arm64/include/asm/gic.h- GICv3 distributor/redistributor MMIO offsets.arch/arm64/include/asm/smmu.h- SMMUv3 register offsets, STE/CD field definitions.
Hardware Drivers
drivers/irqchip/gic_v3.c- GICv3 init, IRQ routing (GICD_IROUTER), enable/disable, EOI.drivers/iommu/smmu_v3.c- SMMUv3 init, linear stream table, STE programming (partition/abort).drivers/uart/pl011.c- PL011 UART driver for QEMU virt board.drivers/uart/imx_uart.c- i.MX UART driver for i.MX95/i.MX8QM boards.drivers/linux/haven_driver.c- Linux guest kernel module (/dev/haven, IOCTL interface).drivers/guest-tools/haven_tool.c- Userspace CLI for hypervisor state inspection.
Core Layer Wiring
src/core/init.c- hypervisor entry point; calls all_init()andplatform_init().src/core/partition.c- partition launcher: maps stage-2, assigns IRQs, sets budget, fires ERET.src/core/mm/stage2.c- wired tohv_arch_stage2_map()for hardware page-table writes.src/core/irq/ownership.c- wired togic_v3_route_irq()/gic_v3_disable_irq().src/core/dma/smmu.c- wired tosmmu_v3_set_ste_partition()/smmu_v3_set_ste_abort().src/core/time/timer.c- wired tohv_arch_timer_now()andhv_arch_timer_set_deadline().src/core/exc/el2_exceptions.c- IRQ injection completed viahv_arch_inject_virtual_irq().
Common Utilities (src/common/)
printk.c,string.c,panic.c,spinlock.c- hypervisor utilities (no libc, LDAXR/STLXR).
Platform Abstractions (src/platform/)
qemu-virt/platform.c- PL011/GICv3/SMMUv3/timer bases for QEMU virt.imx95-devkit/platform.candmemory.h- i.MX95 Dev Kit UART/GIC/memory map.imx8qm-mek/platform.c- secondary validation board (i.MX8QM-MEK, GICv2).
Formal Verification (verification/)
verification/coq/IsolationModel.v- core spatial isolation invariant (Coq 8.18).verification/coq/Stage2Policy.v- stage-2 map-preserves-isolation lemma.verification/coq/BudgetScheduler.v- budget ≤ period invariant.verification/isabelle/HavenIsolation.thy- cross-validating Isabelle/HOL theory.
Tests
tests/integration/test_smmu_hardware.c- SMMU StreamID fault and window pass tests.tests/integration/test_fault_injection.c- 8 fault scenarios (F1–F8) with DENY assertions.tests/selftests/test_hypervisor_invariants.c- invariant checks across all isolation modules.tests/demos/demo_two_partition.c- two-partition boot demo (Linux-class + RTOS-class).tests/benchmarks/bench_isolation_latency.c- 6 hot-path enforcement latency measurements.tests/benchmarks/bench_stage2_fault.c- stage-2 containment check, 4 boundary cases.tests/benchmarks/bench_smmu_policy.c- SMMU DMA policy, 5 cases including StreamID alloc.tests/benchmarks/bench_temporal_isolation.c- RTOS response time under 5 Linux load levels.
Infrastructure
Dockerfile- Ubuntu 24.04, aarch64 cross-compiler, QEMU, Coq 8.18, Python/matplotlib.scripts/build-arm64.sh- auto-detects cross-compiler prefix; runsmake ARCH=arm64.linker.ld- ELF linker script,.textat0x80000000, 4-CPU stacks.CMakeLists.txt- optional CMake support for IDE integration.configs/riscv/qemu-riscv64.yamlandconfigs/x86/qemu-x86_64.yaml- future platform stubs.
CI/CD
.github/workflows/ci.yml- addedarm64-cross-compilejob: installs toolchain, builds ELF, verifies ARM64 ELF headers and key symbols..github/workflows/nightly.yml- addedarm64-cross-compile(TCB audit),coq-proof-check, andevidence-generationjobs (90-day artifact retention).
Documentation
docs/contributing/DEVELOPMENT_GUIDE.md,TESTING_GUIDE.md,REVIEW_CHECKLIST.md.docs/porting/IMX95_EVIDENCE_CAPTURE.md- evidence capture methodology and JSON schema.docs/thesis/REPRODUCIBILITY_APPENDIX.md- exact reproduction commands and Docker hash.- Expanded
docs/architecture/OVERVIEW.mdandISOLATION_MODEL.mdwith hardware binding details.
- Added
#define _POSIX_C_SOURCE 200809Lto all benchmark files to exposeclock_gettimeunder strict-std=c11 -Werror(was causing CI failures with both GCC and Clang).
Removed
Section titled “Removed”src/core/arch/.gitkeep,src/core/iommu/.gitkeep,src/core/time/.gitkeep- replaced by real implementation files.
[0.3.0] - 2026-05-10
Section titled “[0.3.0] - 2026-05-10”- Astro Starlight documentation portal (
website/) with 24 MDX pages covering architecture, getting started, platform guides, thesis traceability, and API reference. - Professional README with GitHub Actions CI badges, architecture ASCII diagram, and platform comparison table.
docs/thesis/README.md- chapter outline, references, and web portal link for master thesis working documents.website/src/assets/logo-light.svgandlogo-dark.svg- Haven “H” monogram branding.- Custom Haven blue (
#2563eb) Starlight theme viawebsite/src/styles/custom.css. docs/methodology/VERCEL_DEPLOYMENT.md- updated deployment guide for Astro structure.
Changed
Section titled “Changed”- Documentation portal migrated from static
site/index.htmlto Astro Starlight (website/). - Vercel CI workflow (
vercel.yml) rewritten: builds inwebsite/, patches Vercel project settings via API, then deploys with--prebuiltflag to bypass stale dashboard overrides. vercel.jsonupdated withrootDirectory: website,framework: astro, andoutputDirectory: dist.
- Removed hexapod thesis content that was incorrectly present in
thesis/background.mdx. - Removed stale
docs/final-hexapod-thesis/directory and its.gitignoreentry. - Fixed stale
site/index.htmlreference inREADME.md.
Removed
Section titled “Removed”- Static
site/portal folder.
[0.2.0] - 2026-05-09
Section titled “[0.2.0] - 2026-05-09”- C11 stub implementations for all five core isolation modules:
stage2.c,ownership.c,budget.c,smmu.c,el2_exceptions.c. - Guest module stubs:
uart.c,freertos_integration.c. - 7 test binaries covering unit, integration, and isolation scenarios:
test_core_stubs,test_el2_exceptions,test_freertos_integration,test_guest_uart,test_isolation_flow,test_isolation_negative,test_smmu_dma. build/benchmarks/baseline.json- initial performance baseline (stub measurement).build/ci/metadata.txtandbuild/evidence/metadata.txt- CI and evidence metadata.configs/arm64/imx8qm-mek.yaml- secondary validation board config.docs/methodology/PHYSICAL_BOARD_VALIDATION.md- physical board validation protocol.docs/methodology/VIRTUAL_PLATFORM_VALIDATION.md- QEMU validation protocol.docs/methodology/IMX95_EVIDENCE_TEMPLATE.md- structured evidence capture template.docs/porting/IMX95_HARDWARE_SETUP.md- i.MX95 Dev Kit hardware setup guide.docs/porting/IMX95_VALIDATION_RUNBOOK.md- step-by-step i.MX95 validation runbook.docs/porting/CROSS_OS_VIRTUALIZATION_RUNBOOK.md- cross-OS virtualization runbook.verification/coq/andverification/isabelle/scaffolding.- All empty roadmap release directories with
.gitkeepplaceholders. - 6 GitHub Actions workflows:
ci.yml,vercel.yml,nightly.yml,benchmark.yml,cross-os.yml,evidence-pack.yml.
Changed
Section titled “Changed”scripts/build.sh,scripts/test.sh,scripts/benchmark-baseline.py- updated for new module layout.
[0.1.0] - 2026-05-08
Section titled “[0.1.0] - 2026-05-08”- Initial repository structure with
src/,include/,configs/,tests/,docs/,scripts/. - Baseline governance:
README.md,CONTRIBUTING.md,SECURITY.md,CODE_OF_CONDUCT.md,CODING_STYLE.md,LICENSE(Apache 2.0). - Core public headers:
stage2.h,irq_ownership.h,budget_sched.h,smmu.h,el2_exceptions.h,guest_uart.h,freertos_integration.h,types.h. - Platform configs:
configs/arm64/qemu-virt.yaml,configs/arm64/imx95-devkit.yaml. - Documentation skeleton: architecture overview, isolation model, thesis deep-dive, threat model, assumptions, chapter traceability, evaluation plan.
- CI/CD scaffolding:
Makefile,scripts/build.sh,scripts/test.sh,scripts/style-check.sh. AGENTS.mdand.github/copilot-instructions.md- AI agent policy.