Repository navigation
feat(arm64): FL4 UEFI release artifacts, built-in FKI v5 driver, and configurable VSpaces - #273
Merged
Merged
Conversation
CommaBot
marked this pull request as draft
November 30, 2026 10:26
CommaBot
force-pushed
the
feat/arm64-vspaces-rng-nfsd
branch
from
November 30, 2026 10:54
5274894 to
c06d954
Compare
CommaBot
force-pushed
the
feat/arm64-vspaces-rng-nfsd
branch
from
November 30, 2026 11:09
c06d954 to
49ac92c
Compare
…ap, NFSD/dm-snapshot
- Allow CTL_VM_CREATE args[2] to configure a PV guest's VSpace pool size
(0 keeps default max(64, vcpus), non-zero validates 64..=512 and >= vcpus,
refused with EINVAL for HVM); raise MAX_VSPACES to 512 and expose
--vspaces in l4hctl and VmSpec::vspaces.
- Move ASID pool tracking into testable l4h_host::vmmgr::AsidPoolSet with a
single settle() commit/rollback path delegated by AsidPools::transaction,
unify check_afford across create_guest, create_hvm and CTL_VM_START
(ENOSPC for ASID exhaustion vs ENOMEM for memory/slots), replace panicking
AsidPools::assign with fallible try_assign distinguishing seL4_DeleteFirst
(ENOSPC) from other kernel errors (EIO) and
l4h_task::component::CreateError::{AsidExhausted, Sel4}, and test the
production create_guest/create_hvm rollback paths in tests/vm-create.rs.
- Expose hardware-neutral L4H_HOST_CAP_ARM64_PAUTH_FULL (1 << 0) in
CTL_HOST_INFO data[8..16] only when both the embedded guest provider was
built with L4H_PROVIDER_ARM_PAC (seL4_TCB_SetPACKeys) and AArch64 ID
registers report address auth (APA/API/APA3) plus generic PACGA
(GPA/GPI/GPA3).
- Enable CONFIG_DM_SNAPSHOT, CONFIG_NFSD, and CONFIG_NFSD_V4 in
guest/linux/arch/l4h/configs/defconfig for copy-on-write block snapshots
and loopback/in-guest NFSv4 file sharing, and update DESIGN.md.
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
CommaBot
force-pushed
the
feat/arm64-vspaces-rng-nfsd
branch
from
November 30, 2026 11:26
49ac92c to
82ee71d
Compare
Extend the native FL4 UEFI release pipeline and dom0 packaging to produce
bit-for-bit reproducible AArch64 release artifacts alongside x86_64:
- boot/l4h-fl4-efi: add AArch64 UEFI handoff via the pinned fl4-bootinfo
protocol without patching FL4, including UEFI TPM 2.0 event log
collection/final-events append, UEFI 2.10 §7.4 GetMemoryMap/ExitBootServices
retry loop, full-page module/TPM-log D-cache clean to PoC, arch-guarded
panic_handler (hlt/wfi), and aarch64-unknown-uefi in
kernel/fl4/rust-toolchain.toml.
- host/l4h-root: enable bootinfo loader_modules mapping on aarch64 so
modules handed over by l4h-fl4-efi (guest-kernel, guest-sdk,
dom0-initrd, l4h-config) are mapped identically to x86_64.
- guest/linux/arch/l4h/arm64/Makefile: link vdso.so with
-Wl,--build-id=none -Wl,-s so temporary assembler object paths are not
embedded into vmlinux via .incbin, making AArch64 vmlinux reproducible
across checkout paths.
- tools/{mkfl4-release-efi,build-fl4-efi,build-dom0,build-release,
check-reproducible,ci-setup,run-fl4-aarch64}.sh & .github/workflows/release.yml:
support L4H_ARCH=aarch64 for l4h-fl4-aarch64.efi,
l4h-debug-fl4-aarch64.tar.xz, and static l4h-dom0-aarch64.tar.xz
(with unified static ELF executable verification and x86_64-only
install.py packaging), explicit L4H_LINUX_CC_AARCH64 in multi-arch
release builds, and document the published AArch64 artifacts in DESIGN.md.
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
CommaBot
force-pushed
the
feat/arm64-vspaces-rng-nfsd
branch
2 times, most recently
from
November 30, 2026 16:17
b50476a to
efc5fa1
Compare
Add the built-in Foreign Kernel Interface (FKI v5) driver under
guest/linux/arch/l4h/drivers/fki/ (CONFIG_L4H_FKI, default y on
ARM64 && NET, disabled on x86_64) together with its public header
guest/linux/arch/l4h/include/linux/fki.h:
- Opt-in runtime activation via kernel command line `fki.enable=1`
(default off so standard dom0/sub-VM guests do not register
/dev/xnu-chan{0,1}, /dev/xnu-hostcall, or xnu0; exported fki_*
entry points reject calls cleanly when disabled).
- High-VA kernel memory, paravirtual user VSpace pool scaling with
l4h_bootinfo->nr_vspaces (max(nr - 48, 32) when nr > 80, reserving
208/256 user VSpaces for vspaces=256 guests with elastic borrow/return
to the Linux VSpace pool), uTCB lifecycle with strict per-CPU
fki_cur_utcb invariant, cross-CPU fault_ep rebinding on migration,
pre-run FPU state read/write support, hostcall bridge, virtual
Ethernet link (xnu0), and bidirectional byte channels.
- Automatic export of <linux/fki.h> and all 83 fki_* symbols into
/dev/l4hsdk (sdk.erofs) so out-of-tree foreign-kernel modules can
compile against the guest SDK and load directly without shipping a
separate fki.ko.
- Update DESIGN.md §3/§5.6 to document the built-in AArch64 FKI driver
and `fki.enable=1` boot parameter.
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
CommaBot
force-pushed
the
feat/arm64-vspaces-rng-nfsd
branch
from
November 30, 2026 16:57
efc5fa1 to
7e415b0
Compare
…check The first virtio-gpu attach for guest slot 1 allocates permanent global paging structures (3 pages / 12 KiB on AArch64) in vmmgr's own VSpace for layout::DISPLAY, which are reused by subsequent guests. Because init-gputest sampled floor-truncated MiB free memory (l4hctl info) before any GPU attach, any guest kernel size leaving free memory within 12 KiB above a 1 MiB boundary caused a false-positive 1 MiB leak report after the first GPU guest. Follow tests/guest/init-hvmtest: warm guest slot 1's display page tables before taking the baseline, switch to l4hctl info --free-bytes, and assert exact zero-byte reclamation after both the 800x600 and 65x65 GPU guests. Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
tools/cargo.sh and tools/ci-setup.sh downloaded x86_64-unknown-linux-gnu binaries unconditionally, so a native AArch64 Linux build host (as l4h-sandbox/image/build-node.sh requires) failed with "Exec format error" on the pinned Cargo. tools/source-pins.sh now selects RUSTUP_SHA256 and L4H_CARGO_SHA256 by L4H_HOST_TRIPLE (default: `uname -m`-unknown-linux-gnu), with pins for x86_64 and aarch64. Other hosts get empty pins, so check-reproducible.sh can still source the Linux pins, and cargo.sh and ci-setup.sh refuse to run there. cargo.sh keeps its download and extracted tool per triple. ci-setup.sh installs libc6-dev-arm64-cross only on cross-compiling hosts (an AArch64 host has its native libc6-dev from build-essential) and adds the arm64 dpkg architecture only when it is foreign. Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
CommaBot
marked this pull request as ready for review
December 1, 2026 18:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable AArch64 L4H-on-FL4 hosts to ship reproducible UEFI/dom0 release artifacts and run foreign-kernel modules inside paravirtual Linux guests:
vmmgr,l4hctl): allowCTL_VM_CREATE(l4hctl create --vspaces) to size a PV guest's VSpace pool up to 512 (0keepsmax(64, vcpus)) so guests hosting many isolated user address spaces do not hit the 64-VSpace default, and return-ENOSPCwith transactional rollback instead of panicking when host ASID pools are full.CTL_HOST_INFO): reportL4H_HOST_CAP_ARM64_PAUTH_FULLwhen both the provider supportsseL4_TCB_SetPACKeysand the CPU implements address authentication (APA/API/APA3) plus generic authentication (GPA/GPI/GPA3), so schedulers can match PAC-dependent workloads without hardcoding CPU models.guest/linux): addCONFIG_L4H_FKI(opt-in viafki.enable=1, inert by default) providing paravirtual user VSpaces/uTCBs, high-VA kernel memory, per-context PAC keys, hostcalls,xnu0, and byte channels, and include<linux/fki.h>+Module.symversin/dev/l4hsdkso out-of-tree foreign-kernel modules build directly inside a seed guest. Also enableCONFIG_DM_SNAPSHOTandCONFIG_NFSD_V4inarch/l4h/configs/defconfigfor copy-on-write disks and loopback workspace mounts.boot/l4h-fl4-efi,host/l4h-root,tools): add AArch64 UEFIfl4-bootinfohandoff (TPM 2.0 event log + cache maintenance), maploader_modulesonaarch64inl4h-root, strip build-path noise from arm64vdso.so, and pin host tools per triple so bothx86_64and nativeaarch64Linux build hosts produce bit-for-bit reproduciblel4h-fl4-aarch64.efi,l4h-debug-fl4-aarch64.tar.xz, andl4h-dom0-aarch64.tar.xz.tests/gputest): warm guest slot 1's permanentvmmgrdisplay page tables before sampling--free-bytesso guest kernel size changes near a 1 MiB boundary do not cause false-positive 1 MiB leak failures.