Skip to content
Closed
Show file tree
Hide file tree
Changes from 156 commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
376f60b
refactor(ax-task): rebuild task scheduling runtime
ZR233 Jul 27, 2026
e29af40
fix(starry): adapt accelerator ABI copies
ZR233 Jul 28, 2026
61a0a31
fix(ax-runtime): serialize clockevent commits with irqs
ZR233 Jul 28, 2026
8f25049
fix(ax-runtime): guard timer firing transactions
ZR233 Jul 28, 2026
d05459f
docs(ax-task): record Linux v7.1 RT audit baseline
ZR233 Jul 28, 2026
ca43d31
refactor(ax-task): split scheduler ownership modules
ZR233 Jul 28, 2026
9a0d9b4
refactor(ax-runtime): split guard and scheduler events
ZR233 Jul 28, 2026
b451f40
refactor(ax-task): split scheduler state domains
ZR233 Jul 28, 2026
8f05535
fix(ax-task): centralize scheduler placement state
ZR233 Jul 28, 2026
f898ef3
fix(ax-task): own task deadline identity by value
ZR233 Jul 28, 2026
e137229
fix(ax-runtime): keep executor tests with implementation
ZR233 Jul 28, 2026
32de240
fix(ax-runtime): harden clockevent lifecycle
ZR233 Jul 28, 2026
f5e04b9
fix(ax-task): make thread creation rollback transactional
ZR233 Jul 28, 2026
396196d
fix(ax-task): generation-tag PI lock identities
ZR233 Jul 28, 2026
acc30a1
fix(ax-sync): make PI handoff transactional
ZR233 Jul 28, 2026
efe270b
fix(ax-task): bound PI donor traversal
ZR233 Jul 28, 2026
be02460
fix(scope-local): bound active scope lease transitions
ZR233 Jul 28, 2026
4a14838
fix(ax-task): quiesce IRQ wait registrations
ZR233 Jul 28, 2026
9441718
fix(starry-perf): model task and CPU PMU ownership
ZR233 Jul 28, 2026
e548ab8
fix(starry-process): close fork publication during exit
ZR233 Jul 28, 2026
8cce3ae
fix(starry-task): type user wait completion
ZR233 Jul 28, 2026
901e0d2
fix(starry-process): make relationship updates transactional
ZR233 Jul 28, 2026
bfd165d
refactor(starry-task): split thread state ownership
ZR233 Jul 28, 2026
f7f49c8
refactor(starry-task): isolate process image and memory state
ZR233 Jul 28, 2026
109f650
refactor(starry-task): split process wait state
ZR233 Jul 28, 2026
fc69c98
refactor(starry-task): split process accounting state
ZR233 Jul 28, 2026
232ca62
refactor(starry-task): isolate process ptrace state
ZR233 Jul 28, 2026
61e08e1
refactor(serial): bind emergency access to UART ownership
ZR233 Jul 28, 2026
a37de59
refactor(vsock): isolate poll and connection ownership
ZR233 Jul 28, 2026
e0f2cba
refactor(ax-net): split vsock runtime domains
ZR233 Jul 28, 2026
876c771
fix(starry-usb): quiesce deferred IRQ work on teardown
ZR233 Jul 28, 2026
b6e21a6
refactor(usb): defer event draining out of hard IRQ
ZR233 Jul 28, 2026
da4d82b
fix(ax-runtime): recover missed task clockevents
ZR233 Jul 28, 2026
52762e4
fix(ax-task): enforce owner CPU scheduling scopes
ZR233 Jul 28, 2026
53c776e
fix(ax-task): serialize affinity with runqueue ownership
ZR233 Jul 28, 2026
47d73bf
refactor(ax-task): isolate deferred task work
ZR233 Jul 28, 2026
c02e26f
refactor(ax-task): split CPU and thread bootstrap domains
ZR233 Jul 28, 2026
e39f395
refactor(ax-task): split lifecycle and thread APIs
ZR233 Jul 28, 2026
63869de
refactor(ax-task): split deadline and balance ownership
ZR233 Jul 28, 2026
eed6c21
refactor(ax-task): isolate owner switch transactions
ZR233 Jul 28, 2026
85611a5
refactor(ax-task): isolate placement delivery APIs
ZR233 Jul 28, 2026
3e2912d
refactor(ax-task): isolate park and switch-tail lifecycle
ZR233 Jul 28, 2026
3da62c7
refactor(ax-task): isolate owner scheduling entry points
ZR233 Jul 28, 2026
e03a08d
refactor(ax-task): isolate dispatch state transitions
ZR233 Jul 28, 2026
f927306
refactor(ax-task): isolate owner delivery inboxes
ZR233 Jul 28, 2026
0648bc0
refactor(ax-runtime): isolate stack and TLS resources
ZR233 Jul 28, 2026
e141393
fix(ax-runtime): compile clockevent state tests without IRQ
ZR233 Jul 28, 2026
ce33d1e
refactor(ax-runtime): isolate thread resource transactions
ZR233 Jul 28, 2026
90a7a06
refactor(ax-runtime): isolate context switch ownership
ZR233 Jul 28, 2026
d09358d
refactor(ax-runtime): isolate runtime thread lifecycle
ZR233 Jul 28, 2026
c664cc7
refactor(ax-runtime): isolate thread spawn transactions
ZR233 Jul 28, 2026
c6031a8
refactor(ax-runtime): isolate CPU bootstrap ownership
ZR233 Jul 28, 2026
6636125
refactor(ax-runtime): isolate task runtime capabilities
ZR233 Jul 28, 2026
168708c
docs(ax-task): record structural audit progress
ZR233 Jul 28, 2026
d2decc7
fix(ax-task): wait for remote affinity completion
ZR233 Jul 28, 2026
3f40e6c
test(ax-task): cover coalesced remote delivery epochs
ZR233 Jul 28, 2026
1ac7a92
fix(ax-task): reject non-finite task deadlines
ZR233 Jul 28, 2026
f5816b6
test(ax-runtime): cover early and spurious clockevents
ZR233 Jul 28, 2026
5392075
fix(scope-local): enforce single scheduler activation
ZR233 Jul 28, 2026
45a6fbc
docs(ax-task): close PI and waiter audit
ZR233 Jul 28, 2026
7126173
fix(starry-process): keep orphan reaping within pid namespaces
ZR233 Jul 28, 2026
50bcc34
fix(starry-process): serialize pid namespace shutdown
ZR233 Jul 28, 2026
0c84641
fix(starry-perf): model inherited event ownership
ZR233 Jul 29, 2026
dc41295
refactor(starry-perf): split PMU ownership modules
ZR233 Jul 29, 2026
f32592a
fix(ax-task): model CPU offline publication state
ZR233 Jul 29, 2026
c43028a
fix(serial): mask IRQs during emergency output
ZR233 Jul 29, 2026
192c7cf
fix(ax-api): map CPU offline transition errors
ZR233 Jul 29, 2026
3887c06
fix(starry-sched): map CPU offline transition errors
ZR233 Jul 29, 2026
996ef4e
fix(usb): close xHCI rearm acknowledgement race
ZR233 Jul 29, 2026
766d17d
fix(vsock): publish transport credit readiness
ZR233 Jul 29, 2026
c60e681
fix(ax-task): preserve IRQs during in-flight wake
ZR233 Jul 29, 2026
9279fa7
fix(ax-runtime): couple clockevent to CPU lifecycle
ZR233 Jul 29, 2026
e903bfa
fix(starry-perf): enforce task target access
ZR233 Jul 29, 2026
df8d58d
refactor(ax-runtime): isolate clockevent and IPI delivery
ZR233 Jul 29, 2026
433df4e
refactor(ax-runtime): split bootstrap ownership
ZR233 Jul 29, 2026
5d6ed70
test(axcpu): exercise IRQ-masked idle wake
ZR233 Jul 29, 2026
3ed37a3
docs(ax-task): update RT audit milestone
ZR233 Jul 29, 2026
6b3ed0b
fix(starry-task): make process CPU sampling nonblocking
ZR233 Jul 29, 2026
65b1a1a
fix(starry-perf): install task cycle events in owner context
ZR233 Jul 29, 2026
2b79495
fix(starry-perf): publish dynamic rdpmc metadata
ZR233 Jul 29, 2026
9f0abf7
fix(starry-perf): serialize task exit admission
ZR233 Jul 29, 2026
f9c11df
fix(starry-task): preserve concurrent signal wakeups
ZR233 Jul 29, 2026
1fdd869
fix(scope-local): preserve compatible reader admission
ZR233 Jul 29, 2026
bcc19d8
fix(serial): bound runtime register handoff
ZR233 Jul 29, 2026
27a8d90
fix(vsock): retire local transmit credit
ZR233 Jul 29, 2026
8833e85
fix(ax-task): recover migration from offline target
ZR233 Jul 29, 2026
da4cb8f
fix(axvm): adapt timer worker to latest device runtime
ZR233 Jul 29, 2026
23b0b9a
refactor(ax-task): split scheduler ownership modules
ZR233 Jul 29, 2026
fa9f17c
fix(ax-net): use the core scheduler yield API
ZR233 Jul 29, 2026
7c08b86
fix(starry): use scheduler-backed user task references
ZR233 Jul 29, 2026
d2628fe
refactor(starry-task): split timer ownership modules
ZR233 Jul 29, 2026
c8ba147
refactor(starry-perf): split task PMU ownership modules
ZR233 Jul 29, 2026
412123d
refactor(serial): return bounded IRQ reports
ZR233 Jul 29, 2026
1d5bc5a
refactor(some-serial): split PL011 endpoint modules
ZR233 Jul 29, 2026
45c469d
fix(starry-perf): fence the physical scheduler owner
ZR233 Jul 29, 2026
9dd0450
fix(starry-signal): own sigwait wake publication
ZR233 Jul 29, 2026
60da0bd
test(starry-process): exercise zombie leader priority
ZR233 Jul 29, 2026
23a18f9
refactor(starry-task): type scope and access ownership
ZR233 Jul 29, 2026
aa069c5
docs(ax-task): record Linux v7.1 RT audit baseline
ZR233 Jul 29, 2026
eede04d
fix(starry-task): allow legacy clone parent in new PID namespace
ZR233 Jul 29, 2026
b6cbc68
fix(starry-task): own cgroup membership transactions
ZR233 Jul 29, 2026
de1384e
fix(starry-task): publish fatal signals before stop wake
ZR233 Jul 29, 2026
633ce14
docs(ax-task): record RISC-V RT milestone
ZR233 Jul 29, 2026
2a917e5
fix(starry-perf): restore aarch64 module visibility
ZR233 Jul 29, 2026
2b2cbd6
docs(ax-task): close architecture RT audit
ZR233 Jul 29, 2026
d4a03ac
fix(arceos-test): publish IPI handshake resets
ZR233 Jul 29, 2026
bc7445a
fix(ax-runtime): synchronize kernel mapping attributes globally
ZR233 Jul 30, 2026
c73390e
perf(ax-task): cache owner runqueue load summary
ZR233 Jul 30, 2026
e66a609
perf(ax-task): index fair scheduling entities
ZR233 Jul 30, 2026
ba76dc0
perf(ax-task): reuse owner runqueue storage
ZR233 Jul 30, 2026
a6cb816
perf(ax-sync): keep uncontended PI locking local
ZR233 Jul 30, 2026
60c4fc0
fix(task): harden PI futex and timer paths
ZR233 Jul 30, 2026
827032e
fix(starry-task): use PI locks for task-owned state
ZR233 Jul 30, 2026
c28255d
fix(starry-task): move task names out of raw locks
ZR233 Jul 30, 2026
937b70b
fix(starry-task): publish namespaces outside raw locks
ZR233 Jul 30, 2026
2d6ec14
fix(ax-cpu): declare RISC-V AMO assembly feature
ZR233 Jul 30, 2026
112b825
fix(starry-timer): preserve deadline generations
ZR233 Jul 30, 2026
ec2ed38
fix(starry-timer): reject stale expiry signals
ZR233 Jul 30, 2026
fccfcfb
fix(starry-timer): drive CPU timers from accounting ticks
ZR233 Jul 30, 2026
3a3d17a
fix(starry-timer): defer CPU timer ticks to task work
ZR233 Jul 30, 2026
e8a4793
fix(ax-task): own local reschedule transitions
ZR233 Jul 30, 2026
f70f642
fix(ax-task): enforce owner-only wake consumption
ZR233 Jul 30, 2026
f896df1
fix(ax-runtime): preserve failed switch tails
ZR233 Jul 30, 2026
3c9d56f
fix(ax-task): synchronize tick test handoff
ZR233 Jul 30, 2026
a511669
fix(ax-task): balance fair idle pulls by load
ZR233 Jul 30, 2026
4c0fc9e
fix(ax-task): linearize idle pull reservations
ZR233 Jul 30, 2026
a04a780
fix(starry-task): make CPU timer tick accounting linear
ZR233 Jul 30, 2026
8fd204c
fix(ax-runtime): adapt block runtime after dev rebase
ZR233 Jul 30, 2026
e97e739
fix(ax-task): serialize deferred scheduler tick accounting
ZR233 Jul 30, 2026
290c897
fix(ax-task): yield between scheduler tick retries
ZR233 Jul 30, 2026
a163716
fix(ax-task): publish coalesced scheduler tick timestamps
ZR233 Jul 30, 2026
cf8cb62
perf(ax-runtime): streamline preemption guard access
ZR233 Jul 30, 2026
638020f
perf(ax-task): skip empty owner inbox drains
ZR233 Jul 30, 2026
0affdf5
fix(ax-task): bound deadline member scan rounds
ZR233 Jul 30, 2026
7fe9aaa
test(ax-sync): keep lock audit stable across module splits
ZR233 Jul 30, 2026
ce45863
perf(ax-task): cache the current CPU remote endpoint
ZR233 Jul 30, 2026
19e35cc
fix(ax-task): replace deadline scans with typed timer events
ZR233 Jul 30, 2026
da4db34
fix(ax-task): return typed PI cycle errors
ZR233 Jul 30, 2026
87845cd
fix(starry-task): use PI locks for task registries
ZR233 Jul 30, 2026
cc24d13
fix(starry-task): close clone activation window
ZR233 Jul 30, 2026
e8a679a
fix(starry-perf): separate control and IRQ output locks
ZR233 Jul 30, 2026
db0e790
fix(starry-trace): publish callbacks outside raw locks
ZR233 Jul 30, 2026
27e7071
fix(ax-task): service local wakes at scheduler safe points
ZR233 Jul 31, 2026
1821941
perf(ax-runtime): fold reschedule state into preemption guards
ZR233 Jul 31, 2026
01b06df
fix(starry-net): resolve device ioctl rebase conflict
ZR233 Jul 31, 2026
688c813
test(starry): bound ptrace event-stop waits
ZR233 Jul 31, 2026
70cf84c
fix(axbuild): test new ax-task without legacy features
ZR233 Jul 31, 2026
041beec
fix(ax-runtime): model pre-bootstrap host guards safely
ZR233 Jul 31, 2026
cf7fab9
fix(ax-task): make owner migration transactional
ZR233 Jul 31, 2026
b3909c8
test(ax-runtime): declare host guard lock dependency
ZR233 Jul 31, 2026
4bb0325
fix(ax-task): preserve EEVDF ordering across wrap
ZR233 Jul 31, 2026
8e51b6d
fix(ax-task): replenish CBS at the next release
ZR233 Jul 31, 2026
bf34eae
fix(ax-task): enforce constrained deadline wake rules
ZR233 Jul 31, 2026
4dc2b44
fix(axvm): route timer cancellation to owner worker
ZR233 Jul 31, 2026
8998618
fix(starry-process): release address space before zombie wake
ZR233 Jul 31, 2026
6624c8e
fix(starry-ptrace): deliver kill before releasing event stop
ZR233 Jul 31, 2026
e2c4b89
fix(starry-ptrace): preserve kill wake after stop publication
ZR233 Jul 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .claude/skills/arch-platform-porting/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Current Axvisor LoongArch QEMU bring-up uses the dynamic UEFI platform path. The
- **Runtime IRQ initialization order**: dynamic platforms initialize boot IRQ state through `ax_hal::irq::init_boot_irqs(cpu_id)` before registering runtime IRQ handlers or probing normal devices. `rdrive::ProbeLevel` remains the coarse lifecycle boundary, and `ProbePriority` is the ordering source inside `PreKernel`: clocks first, then interrupt controllers, timer sources, MSI parent controllers, and only later normal early devices. For FDT, same level/priority matches must keep device-tree order; interrupt-controller nodes additionally follow parent-before-child ordering similar to Linux `of_irq_init()`, with sibling controllers preserving DT order. Do not add arch-specific ad hoc probe calls in `axruntime` when a priority barrier can express the same dependency.
- **Block runtime SMP order**: the IRQ-driven block runtime creates its control task and one CPU0 bootstrap hctx before secondary CPUs are required, so an early root filesystem remains usable. Only after every intended CPU has an online scheduler, working IPI delivery, and enabled local IRQ state may `axruntime` call `ax_fs_ng::block::runtime::online_smp()` once to add hctxs/vectors and rebuild per-CPU software submission channels. Drivers must not grow queues from secondary-CPU entry code, and an IRQ registration or queue-growth failure must unwind rather than switch to polling. Keep this contract synchronized with `book/design/block-mq-runtime.md`.
- **Runtime IPI identity**: dynamic platforms expose the runtime IPI IRQ as a typed `IrqId` through `somehal::irq::ipi_irq()`, `axplat-dyn`, and `ax_hal::irq::ipi_irq()`. Do not route dynamic runtime IPI registration through `ax-config`; on RISC-V the IRQ is the flagged supervisor software interrupt cause in the CPU-local domain, not bare PLIC source `1`.
- **Runtime clockevent startup**: early per-CPU platform initialization only prepares the one-shot timer in a masked, non-firing state. The runtime clockevent owner must publish a finite deadline, program the device while local IRQs remain excluded, and only then unmask the timer source. Taking a CPU clockevent offline masks/stops the source; re-online repeats program-before-unmask. Timer interval conversion must clamp expired deadlines to a non-zero architectural minimum and must not overflow while aligning or forming an absolute compare value.
- **Runtime CPU limits**: treat generated `CPU_CAPACITY`/`SMP` as a build-time capacity for const generics and fixed-capacity scheduler structures, never as an instruction to replicate the ELF CPU-local template. Actual online/usable CPU count and dynamic CPU-area allocation must flow from the platform-discovered count, capped by `ax_hal::cpu_num()` where the OS capacity applies.
- **IRQ namespace rules**: keep CPU trap vectors, platform `IrqId { domain, hwirq }`, firmware sources (`IrqSource::AcpiGsi`, `IrqSource::AcpiGsiRoute`, explicit `IrqSource::ControllerLine`, and driver binding metadata such as `BindingIrqSource::FdtInterrupt`), controller-local hardware lines (`HwIrq`), and guest GSI/vector values in separate namespaces. New runtime IRQ registrations must use `IrqId`, not `usize`; legacy `IrqNumber(raw)` is only for static or still-unmigrated platform boundaries and must live in OS/HAL-facing layers such as `ax-plat`, `ax-hal`, or `axklib`, not `irq-framework` or `somehal`. `irq-framework` owns generic registry, affinity, execution, and boxed callback dispatch semantics; platform rebase work must preserve `BoxedIrqHandler`, `IrqExecution`, and `IrqRequest::new_boxed` while adapting the surrounding platform code to `IrqId`. `LEGACY_IRQ_DOMAIN` and `CPU_LOCAL_IRQ_DOMAIN` remain fixed compatibility domains, while dynamic `somehal` external controller domains such as GIC, PLIC, IOAPIC, EIOINTC, and PCH-PIC are allocated at controller probe time and must be reached through `alloc_irq_domain`, `domain_by_kind`, `domain_by_owner`, or `domain_is_kind`, not by constructing fixed numeric controller domains in dynamic-platform code. Do not derive a host IRQ with arithmetic such as `0x20 + gsi`, `PCI_INTX_VECTOR_BASE + gsi`, or by subtracting a trap-vector base in Axvisor/device code. Resolve firmware/device descriptions with `ax_hal::irq::resolve_irq_source(...)` / platform resolver and register the returned `IrqId`. When ACPI supplies trigger/polarity/controller metadata, carry it as `IrqSource::AcpiGsiRoute` instead of flattening it to a bare `AcpiGsi`, because PCI INTx routes may use a low GSI with non-ISA level/low semantics. Likewise, FDT device bindings should carry the raw interrupt specifier plus its controller owner in `BindingIrqSource::FdtInterrupt` until the OS/platform layer can resolve that owner to a controller domain and configure it; do not expose parentless FDT cells from `irq-framework` or configure a controller in generic driver probe merely to obtain a legacy number. `rdif_intc` controllers must expose fallible `translate_fdt` / `translate_acpi` methods that return controller-local hardware line and trigger metadata; the registering platform allocates or looks up a domain owner entry for the concrete `rdrive::DeviceId`, passes that domain to `rdif_intc::Intc::new(domain, driver)`, and the wrapper combines that domain with the local `HwIrq` before `configure` / `configure_acpi` programs trigger, polarity, vector, or mask state. Platform `irq_set_enable` and `irq_set_affinity` paths must route by the incoming domain's registered owner/kind and return an error on missing controllers, lock failures, unsupported affinity, or backend/type mismatches instead of silently no-oping. Empty, malformed, out-of-range, or unsupported firmware specifiers must return `IrqError` instead of IRQ 0, a base vector, or a guessed legacy number. If an FDT PCI host bridge preconfigures a controller-level legacy INTx route, store that route as a native `BindingIrq` source (plus any temporary raw compatibility value) and let child endpoints reuse it before falling back to PCI `interrupt-map` parsing.
- **Domain expectations**: x86 LAPIC timer and IOAPIC are distinct domains, so trap vector `0x20` is not `AcpiGsi(0)`. On aarch64, GIC INTID is the `HwIrq` within the GIC domain. On riscv64, PLIC source is the `HwIrq` within the PLIC domain. On loongarch64, EIOINTC and PCH-PIC must remain separate domains. A platform that cannot resolve an `IrqSource` must return `IrqError::Unsupported` instead of guessing a numeric IRQ.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ device-specific drivers.
- Initialize trap vectors on every CPU, not only the boot CPU.
- Flush or barrier boot arguments before `cpu_on`; otherwise secondaries can observe stale stack, page table, or per-CPU data.
- Keep logical CPU ID mapping separate from firmware CPU IDs. LoongArch CPU IDs in firmware data are not guaranteed to be dense array indices.
- Keep the final scheduler idle handoff atomic. Set `CRMD.IE` immediately before `IDLE`, give that window stable assembly labels, and fast-forward interrupt return to the exit label. An empty `ESTAT` at the return instruction can be a consumed spurious interrupt from this window, not a new exception.
- Compare ordering with local Linux architecture code when uncertain. For LoongArch, useful topics include DMW setup, CSR write ordering, TLB refill vector, exception entry, SMP boot argument handoff, and cache/TLB barriers.

## Finding Local Linux Source
Expand Down
110 changes: 75 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading