summaryrefslogtreecommitdiffstats
path: root/docs/03-architecture/13-vexecution-plane.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/03-architecture/13-vexecution-plane.md')
-rw-r--r--docs/03-architecture/13-vexecution-plane.md81
1 files changed, 81 insertions, 0 deletions
diff --git a/docs/03-architecture/13-vexecution-plane.md b/docs/03-architecture/13-vexecution-plane.md
index 733da13..3d97d07 100644
--- a/docs/03-architecture/13-vexecution-plane.md
+++ b/docs/03-architecture/13-vexecution-plane.md
@@ -568,6 +568,39 @@ forwards (local evidence and the prepared harness:
forwarding-service cost, not engine time — the number to drive down is the
7.9 ms and the per-window round trips.
+### 3.5a Copy-out change detection: fingerprint rule
+
+A forwarded launch stages every referenced data page into the data-bounce
+chunk, and after the retire wait the copy-out ships back only the pages the
+engine actually modified. That decision used to be a 32-bit additive
+checksum of the page's words, compared against a baseline captured at
+copy-in. The additive form has a structural blind spot: doubling every word
+of a 4 KB page raises each float exponent by one (+2^23 per word), and 1024
+words contribute `1024 * 2^23 = 2^33`, which is exactly `0 (mod 2^32)` — an
+in-place power-of-two scale of a whole page (`c[i] *= 2.0f`) left the
+checksum bit-identical, the page was classified "engine did not touch",
+the write-back was skipped, and the client read the pre-scale values. The
+same blindness applies to `*= 0.5f`, `* 4`, `* 8`, etc. Since `r452`
+(commit `19399f4f`) every change decision in the copy path — the retire
+wait's settle scan, the tracked and gap copy-outs, the window witness, the
+late-store witness and the idempotent-launch fingerprint — uses a 64-bit
+FNV-1a hash over the page instead; the additive sum survives only as the
+all-zero filter. Policy rule for the plane: **a change-detection
+fingerprint must not be an algebraic invariant of any plausible kernel
+operation** — use a hash, never a sum.
+
+The reader side of the same decision is the landing table: a D2H copy of a
+device VA resolves through the last recorded write of that VA. Since `r453`
+the forwarded QMD's release0 is redirected to the module semaphore by
+default (`gsp_phys_rmcall_gr_rel_mod=1`): the guest-visible release word is
+authored by the host only on the completion edge, after the copy-out has
+shipped the engine's stores, so a client's stream-ordered readback can no
+longer run ahead of the write-back (the historical shape: the engine's own
+release satisfied the guest while the copy-out was still pending). The
+engine-completion observable remains the module semaphore, and the
+per-outcome authoring path guarantees the guest word is applied on every
+outcome (timeout, wedge, no-write).
+
### 3.6 Citation map for this section
| Claim | Authority |
@@ -1038,6 +1071,53 @@ technical barrier between the project's architecture and its promise.
---
+## m91-class I-fetch faults: capture and icache coherence (2026-10-18)
+
+The physical submit's remaining transient failure class ("m91 class" after the
+trap-decode campaign that first named the SM instruction-fetch signature) has
+two observable faces. In one, the first attempt of a mid-sequence launch
+raises SM warp exceptions ("Illegal Instruction Encoding", "Out Of Range
+Register") on garbage instruction bytes while the engine-authored release
+stays at its failure value, and a retry of the *identical* QMD and shadow
+content succeeds. In the other, the launch reports fetch success but writes
+nothing (dispatch loss). The submit retry that recovers the first face is the
+fast re-arm: the same method block is re-published on a fresh GPFIFO ring
+entry and the mode-35 lane-enable tail plus channel/TSG schedules and the
+doorbell are re-issued — no shadow re-copy, no QMD re-read, no content
+change. Identical content flipping outcome across attempts is the signature
+of stale engine-side fetch state, not a content or relocation error.
+
+Two code changes follow from that:
+
+* **FAULT-CAP (diagnostic).** When a forwarded launch's fault epoch advanced
+ across its window, the submit emits one `vgsp-m91: FAULT-CAP` line per
+ launch (capped at 20 per module-load cycle, then one suppression notice):
+ fault-epoch delta, the forwarded QMD address and first 64 B, the live
+ program pair (word 48/49 read) with its resolved engine-visible VA/PA, the
+ first 64 B at that code address, the retry decision (fast re-arm /
+ resched/fresh-entry / none) and outcome (ok vs timeout), and the newest
+ relay-decoded fault note (exceptType, chid, errString). It is inert on a
+ fault-free launch: one epoch read and one compare.
+* **icache coherence (fix, default on).** The window-0 shadow pool alternates
+ two 8-page banks by submit epoch, so the bytes at a program VA change every
+ two launches, while the captured guest QMDs carry the QMD v2.3
+ cache-control word (word 5) with the
+ `INVALIDATE_INSTRUCTION_CACHE` bit (bit 30) clear — the field the client
+ driver arms only under its forced-invalidate mode. The submit now sets
+ that bit in the forwarded QMD when the QMD carries the driver's standard
+ cache-control signature (word 5 bits 26..29 set), forcing an instruction
+ fetch at dispatch and removing the stale-line window; an unknown QMD
+ revision is never touched, and `gsp_phys_gr_icache_inv=0` restores the
+ exact pre-change QMD for a one-flip A/B. Setting the bit cannot alter
+ instruction bytes or data — it only invalidates cached fetch state — so
+ green launches keep their semantics.
+
+The next physical cycle's evidence is the FAULT-CAP lines (or their absence)
+against the four-client class: zero FAULT-CAP lines with the four clients
+green confirms the stale-fetch mechanism; FAULT-CAP content policies the
+remaining candidates (shadow-VA reuse distance, cross-cycle context state
+left by killed clients).
+
## See also
* [`01-system-overview.md`](01-system-overview.md) — principles and layer map
@@ -1057,3 +1137,4 @@ technical barrier between the project's architecture and its promise.
|---|---|
| 2026-10-08 | Created: canonical name (vGSP Execution Plane, vEP), four domains, component/data-flow/mode-matrix diagrams, discovery/truth/release/completion/submit reality, GR chain vocabulary, arbitrary-CUDA program, challenges, iteration plan, portability paths, CUDA/architecture mapping, future gaps, 3D interaction, framing. Tree `66388560`. |
| 2026-10-08 | Review pass: status hash refreshed to `master @ 1f571dda`; drifted line anchors updated for the post-`66388560` code (`svc_thread`, `svc_gr_request`, `svc_pending_add`, H3 guard, readiness gate); GR completion §3.4/§6.1 reconciled with FORENSICS-grv5 (wake-up fires; the counter publication is the leading reading); discovery cadence wording corrected (2-second paced passes, not "milliseconds"); mode-matrix source note corrected. |
+| 2026-10-18 | m91-class I-fetch section: FAULT-CAP first-fault capture (`vgsp-m91: FAULT-CAP`, 20/cycle) and the default-on forwarded-QMD instruction-cache invalidate (`gsp_phys_gr_icache_inv`) with the retry-state analysis (identical content, fresh ring entry + lane-enable replay; stale engine-side fetch state at reused shadow VAs). |