Repository navigation
aarch64: Defer EL2 guest PPIs to IRQ entry - #154
Merged
Merged
Conversation
CommaBot
added a commit
to CommaBot/FL4
that referenced
this pull request
Dec 5, 2026
CommaBot
added a commit
to CommaBot/FL4
that referenced
this pull request
Dec 5, 2026
…exit entries, with a mechanized non-vacuity witness (Stage 3) Stage 3 of the AArch64 P3 refinement proof (Lean 4, `proofs/Fl4ProofsA64`): FL4's slow-path kernel entries refine the spec's `call_kernel` body from `kBodyA` through `syscall.finish`, for the syscall dispatch groups, the fault and VM-exit entries, the preempted exit and decode errors. Every hypothesis is a named premise tagged [P]/[J]/[S]/[S4], and `kernelEntrySend_recGA`'s premises are shown jointly satisfiable (`wit_send_nonvacuous`, under the witness-world hypothesis `OpaqueWA`). Also extends the AArch64 spec port (`proofs/Fl4SpecA64`, documented in its PORTING.md), updates DESIGN.md section 9 and the README status, and relies on losfair#154 (already on main). No Rust or extraction change. Root `lake build Fl4ProofsA64` (last full build at the witness merge; later commits are docs and the losfair#154 merge): 8671 jobs, 0 errors, 0 sorry; axioms: propext, Classical.choice, Quot.sound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
losfair
pushed a commit
that referenced
this pull request
Dec 5, 2026
…exit entries, with a mechanized non-vacuity witness (Stage 3) (#155) Stage 3 of the AArch64 P3 refinement proof (Lean 4, `proofs/Fl4ProofsA64`): FL4's slow-path kernel entries refine the spec's `call_kernel` body from `kBodyA` through `syscall.finish`, for the syscall dispatch groups, the fault and VM-exit entries, the preempted exit and decode errors. Every hypothesis is a named premise tagged [P]/[J]/[S]/[S4], and `kernelEntrySend_recGA`'s premises are shown jointly satisfiable (`wit_send_nonvacuous`, under the witness-world hypothesis `OpaqueWA`). Also extends the AArch64 spec port (`proofs/Fl4SpecA64`, documented in its PORTING.md), updates DESIGN.md section 9 and the README status, and relies on #154 (already on main). No Rust or extraction change. Root `lake build Fl4ProofsA64` (last full build at the witness merge; later commits are docs and the #154 merge): 8671 jobs, 0 errors, 0 sorry; axioms: propext, Classical.choice, Quot.sound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
On AArch64 with EL2 available, preemption-time polling can acknowledge the VGIC maintenance or guest virtual timer PPI and pass it to the generic IRQ handler. Both PPIs are reserved in the EL2 IRQ table. The generic handler ends the interrupt without reading the VGIC EISR or dispatching the guest's virtual timer event.
Reserve both PPIs for kernel IRQ entry, alongside the remote-call SGI. Decode the interrupt ID from both the highest-pending value and the acknowledge value. If either PPI is highest pending, return
NO_IRQbefore acknowledging it. If the acknowledge races and returns either PPI, issue EOI with the raw value and returnNO_IRQ. Keep the PPI unmasked so its asserted level can make it pending again for entry to classify. EL1 continues to use the virtual timer PPI as its kernel timer.fl4-coreis unchanged, so no Lean re-extraction is needed.Verified on Linux with a 170-second timeout per command.
cargo xtask kernel --arch aarch64cargo xtask kernel --arch aarch64 --releasecargo test -p fl4-abi -p fl4-core -p fl4-arch-x86_64 -p xtask -p fl4-store -p fl4-sync🤖 Generated with Claude Code