handoff: VSync/event-wedge fixes + iterate 2.A–2.BC research notes

Source changes (dormant parity infra, retained from iterate 2.AI/2.AO):
- xenia-kernel/exports.rs: nt_create_event manual_reset polarity +
  related event wiring
- xenia-gpu/mmio_region.rs: D1MODE_VBLANK_VLINE_STATUS hardcode parity

Also lands the audit-runs/ analysis notes (.md/.txt/.json digests) for the
iterate 2.x VSync/0x10e8/0x1004 wedge investigation. Raw trace dumps
(.jsonl/.gz/.csv/.stdout) and agent worktrees (.claude/) are gitignored as
regenerable local artifacts — see memory + HANDOFF for the running findings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-06-05 07:19:08 +02:00
parent acd1656753
commit ef93a4fa14
620 changed files with 108303 additions and 1 deletions

View File

@@ -0,0 +1,61 @@
# Phase C+23 broad-impact assessment (2026-05-18)
## Resolved
- **D-NEW-2 (C+17 catalog)** — KeWait timeout `wait.begin.timeout_ns`
on canary tid=12 → ours tid=7 idx=3. Was 429466729600 (broken
positive sign-extension); now -30000000 matching canary exactly.
Sister chain advances 3 → 4.
## Advanced
- **`addis` opcode semantics across the entire CPU interpreter**.
Any place in any guest binary using `lis`/`addis` with a negative
immediate that flows into a 64-bit `std`, `mr`, `orx`, or anything
else that propagates the full GPR value will now produce
canary-equivalent behavior. The KeWait timeout was just the first
observable symptom in Sylpheed's cold-vs-cold trajectory.
## Persisted (no change)
- Main matched-prefix tid=6→1 = **104,607** (the C+22 scheduler-
determinism asymmetry is unaffected by this fix).
- Sister chains tid=4→11 (11), tid=7→2 (32), tid=14→9 (41),
tid=15→10 (16).
- Phase B `image_canonical_sha256 = ea8d160e9369328a5b922258a92113ef
b8d7ce3e1a5c12cc521e375985c91c18`.
- Kernel tests 204 (unchanged — no kernel-side code change).
## NEW
- **D-NEW-2.1 (idx=4 sister chain canary tid=12 → ours tid=7)**:
`KeWaitForSingleObject` return value canary=258 (TIMEOUT) vs
ours=0 (SUCCESS). Same C+20/C+22 family — scheduler-determinism;
ours's monolithic-thread runner allows the wait to return
SUCCESS where canary's contended scheduler lets the 30 ms timeout
elapse with no signaler. Out of scope for this phase; same
parallel scheduler-determinism track recommended in C+22.
- **CPU correctness probe**: opportunity for a low-key audit of
every "32-bit ABI defensive truncation" in
`xenia-cpu/src/interpreter.rs` for other ops that legitimately
need 64-bit sign-extension at the producer rather than truncation.
Quick mental scan suggests `addis` was likely the only such case;
`addi` already extends via `simm16 as i64 as u64`, `ori`/`oris`
are pure 64-bit OR. Not a blocking concern.
## Test count delta
| crate | pre-C+23 | post-C+23 | delta |
|---------------|----------|-----------|-------|
| xenia-cpu | 288 | 291 | +3 |
| xenia-kernel | 204 | 204 | 0 |
## Cold-stable digest delta
| baseline | pre-C+23 | post-C+23 |
|------------------------|-----------------------------------|-----------------------------------|
| ours-cold det-fields | e1dfcb1559f987b35012a7f2dc6d93f5 | 23cf4c4cbf61a577caa4118ab2308ba6 |
| Phase B image_canonical| ea8d160e9369… | ea8d160e9369… (UNCHANGED) |
3× ours-cold runs all yield the new digest. Determinism preserved.