Use when analyzing low-level interrupt behavior - debugging interrupt handler issues, investigating crashes or triple faults, verifying privilege level transitions, analyzing register corruption between interrupts, or understanding interrupt sequencing and timing issues.
Use this skill when you need to analyze low-level interrupt behavior in Breenix:
This skill captures QEMU's interrupt trace logs and provides systematic analysis of:
Set up environment variables:
export BREENIX_QEMU_LOG_PATH=/tmp/breenix-int-trace.log
export BREENIX_QEMU_DEBUG_FLAGS="int,cpu_reset,guest_errors"
Run QEMU with trace enabled:
cargo run --release --bin qemu-uefi -- -serial stdio -display none
Wait for completion or crash (typically 5-10 seconds for boot stages test)
Verify trace was captured:
ls -lh /tmp/breenix-int-trace.log
Extract the interrupt vector sequence:
grep "v=" /tmp/breenix-int-trace.log | head -100
What to look for:
v=20 (0x20 = 32): Timer interrupt - should fire regularlyv=80 (0x80 = 128): Syscall interrupt - indicates userspace is making syscallsv=0d (13): General Protection Fault - privilege violation or invalid operationv=0e (14): Page Fault - memory access issuev=08 (8): Double Fault - critical error handling another exceptionv=06 (6): Invalid Opcode - executing bad instructionCheck for Ring 0 <-> Ring 3 transitions:
grep "CPL=" /tmp/breenix-int-trace.log | head -50
Expected patterns:
CPL=0: Kernel mode (Ring 0)CPL=3: User mode (Ring 3)CPL=3 -> interrupt -> CPL=0CPL=0 -> iret -> CPL=3For critical interrupts, examine full register dumps:
# Look at the last 200 lines before a crash
tail -200 /tmp/breenix-int-trace.log
# Or search for specific interrupt vectors
grep -A 10 "v=0d" /tmp/breenix-int-trace.log | head -50
Key registers:
RIP: Instruction pointer - where the interrupt occurredRSP: Stack pointer - check for stack corruptionCR3: Page table base - verify process contextRFL: Flags register - check interrupt enable flag (IF)Common patterns indicating problems:
Unexpected exception cascade:
v=0e (Page Fault)
v=0d (GPF)
v=08 (Double Fault)
v=02 (Triple Fault) -> CPU reset
Stack pointer corruption:
Missing timer interrupts:
v=20 eventsPrivilege level confusion:
Provide a report with:
Interrupt Statistics:
Privilege Transitions:
Anomalies Found:
Crash Analysis (if applicable):
echo "=== Interrupt Vector Summary ==="
grep "v=" /tmp/breenix-int-trace.log | awk -F'v=' '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -rn
echo "=== Privilege Level Transitions ==="
grep "CPL=" /tmp/breenix-int-trace.log | awk -F'CPL=' '{print $2}' | awk '{print $1}' | uniq -c
echo "=== Exception Events ==="
grep -E "v=0[0-9a-f]" /tmp/breenix-int-trace.log | grep -v "v=20" | head -20
# Find all syscall interrupts and show register state
grep -B 2 -A 5 "v=80" /tmp/breenix-int-trace.log | less
# Show last 50 interrupts before end of log
grep "v=" /tmp/breenix-int-trace.log | tail -50
A normal Breenix boot should show:
v=20 (timer) - repeated regularly
v=80 (syscall) - when userspace runs
CPL=0 -> CPL=3 transitions when entering userspace
CPL=3 -> CPL=0 transitions on syscalls/interrupts
No syscalls (v=80):
No CPL=3:
Exception storm:
CPU reset events:
Other useful QEMU debug flag combinations:
# Just interrupts
export BREENIX_QEMU_DEBUG_FLAGS="int"
# Interrupts + MMU/page tables
export BREENIX_QEMU_DEBUG_FLAGS="int,mmu"
# Interrupts + all exceptions
export BREENIX_QEMU_DEBUG_FLAGS="int,cpu_reset,guest_errors,exception"
# Everything (very verbose)
export BREENIX_QEMU_DEBUG_FLAGS="int,cpu_reset,guest_errors,mmu,exception"
head/tail to avoid overwhelming outputSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer