Skip to content

aarch64: Defer EL2 guest PPIs to IRQ entry - #154

Merged
losfair merged 1 commit into
losfair:mainfrom
CommaBot:fix/a64-poll-irq-el2-ppis
Dec 5, 2026
Merged

losfair merged 1 commit into
losfair:mainfrom
CommaBot:fix/a64-poll-irq-el2-ppis

Conversation

@CommaBot

@CommaBot CommaBot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

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_IRQ before acknowledging it. If the acknowledge races and returns either PPI, issue EOI with the raw value and return NO_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-core is unchanged, so no Lean re-extraction is needed.

Verified on Linux with a 170-second timeout per command.

  • cargo xtask kernel --arch aarch64
  • cargo xtask kernel --arch aarch64 --release
  • cargo test -p fl4-abi -p fl4-core -p fl4-arch-x86_64 -p xtask -p fl4-store -p fl4-sync

🤖 Generated with Claude Code

@losfair
losfair merged commit 82371d5 into losfair:main Dec 5, 2026
1 check failed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants