summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-02 12:17:10 -0500
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-02 12:17:10 -0500
commitf07da6a78ae3189740ac72cd99783c4f3d835749 (patch)
treeb245a01e060a95043c08ac180ec2b563ce4b600b
parent32ec1ca305fe60da413cfe7262e2fbb4bc199a1d (diff)
downloadopen-iov-f07da6a78ae3189740ac72cd99783c4f3d835749.tar.gz
open-iov-f07da6a78ae3189740ac72cd99783c4f3d835749.zip
vgsp-diag: re-assert GL setup-push pins end-to-end (strict window re-emit + host GL-family exception)
The r1397 cycle located and content-validated the 60 216 B GL setup push (the MME 0x114 carrier: 15-page window at a client rw-s mapping, 3728 code words / 74 SA pairs) and the strict client-mem parse emitted all 15 pins - yet the host entry stayed unreadable (src=255) on every re-read: pages 0x400a000..0x400e000 never reached the pin table (no injection line, no re-resolution), so the per-page read always failed on a missing tail page, and the loose family-learn could additionally overwrite a validated page with a wrong one (weak 0x200-byte prefix learn). Two one-line-class changes, mirroring the proven CE-window rationale ('a pin batch that raced in must be allowed to land again even when the pair is unchanged'): * guest_pin_stream: a strict-window success stashes its content-validated pairs (_strict_reemit) and re-emits them every ~4 s, so a page dropped in burst delivery heals without a new resolution and without defeating the done latch (r1397: the missing pages were never retried). * pin_gr_stream: re-asserts GL setup-push family pairs (0x4000000-0x4160000, 0x4200000-0x4300000, 0xcc80000-0xcc90000, 0x6f00000-0x6f10000) like the CE window, instead of dropping unchanged repeats via the seen dedup. SESSION 153 r1397b; follows the r1397 offline brief Change 1 (pagemap window fallback, kept).
-rw-r--r--tools/guest-diag/guest_pin_stream.py23
-rw-r--r--tools/guest-diag/pin_gr_stream.py14
2 files changed, 36 insertions, 1 deletions
diff --git a/tools/guest-diag/guest_pin_stream.py b/tools/guest-diag/guest_pin_stream.py
index 3222a90..d8566c2 100644
--- a/tools/guest-diag/guest_pin_stream.py
+++ b/tools/guest-diag/guest_pin_stream.py
@@ -316,6 +316,17 @@ _area_off = {}
# zero pages included); cleared when the area disappears (context rebuild).
_gl_fam = {}
+# SESSION 153-r1397b: strict-validated window pins are re-emitted every few
+# seconds. The one-shot emission loses pages: a burst can be dropped under
+# host load, and the `done` latch then means the lost pages are never
+# retried - the 60216 B GL setup push needs all 15 pages, so one missing
+# page keeps the whole entry unreadable (r1397: pages 0x4007000..0x4009000
+# re-landed via the loose path but 0x400a000..0x400e000 never did; every
+# 60216 B read answered src=255 unreadable=1 and the entry was skipped).
+# The pairs are content-validated, so a repeat is idempotent; the host
+# re-asserts GL-family pairs on receipt. epage -> [pairs, next_ts].
+_strict_reemit = {}
+
def resolve_va_by_content(kc, va, out):
"""Demand pin: find the page carrying GPU VA 'va' by content match.
@@ -2581,6 +2592,12 @@ def main():
got = got2
if ok and got:
lines.extend(got)
+ # SESSION 153-r1397b: keep re-emitting this
+ # content-validated window so a page lost in
+ # burst delivery heals without waiting for a
+ # new resolution (see _strict_reemit).
+ _strict_reemit[epage] = [list(got),
+ time.time() + 4.0]
for g in got:
try:
_want_state["done"].add(
@@ -2592,6 +2609,12 @@ def main():
else:
_want_state["strict_pending"].setdefault(
epage, now_d)
+ _rr_now = time.time()
+ for _epg in list(_strict_reemit):
+ _pairs, _nxt = _strict_reemit[_epg]
+ if _rr_now >= _nxt:
+ lines.extend(_pairs)
+ _strict_reemit[_epg][1] = _rr_now + 4.0
# Loose VAs in a family whose strict anchor is still
# pending are deferred to the strict path only.
pend_bases = set()
diff --git a/tools/guest-diag/pin_gr_stream.py b/tools/guest-diag/pin_gr_stream.py
index 35c2ea3..b2ba9b8 100644
--- a/tools/guest-diag/pin_gr_stream.py
+++ b/tools/guest-diag/pin_gr_stream.py
@@ -675,7 +675,19 @@ def _flush(runs, seen, full=False):
# r145 stall: sema-probe "NO ENTRY" for the live push pages) and the
# pool/tracker page (pending release starved, every client's first
# seconds).
- ce_win = 0x120000000 <= va < 0x122000000
+ #
+ # SESSION 153-r1397b: the GL setup-push families get the same
+ # treatment. The guest re-emits a strict-validated 60 216 B window
+ # every ~4 s because a burst can be partially dropped under host
+ # load and the `done` latch otherwise never retries the lost pages
+ # (r1397: pages 0x400a000..0x400e000 never landed; every 60216 B
+ # entry read answered src=255 and the push was skipped). Without
+ # this exception the unchanged re-emits were dropped here.
+ gl_win = ((0x4000000 <= va < 0x4160000) or
+ (0x4200000 <= va < 0x4300000) or
+ (0xcc80000 <= va < 0xcc90000) or
+ (0x6f00000 <= va < 0x6f10000))
+ ce_win = 0x120000000 <= va < 0x122000000 or gl_win
if not full and not ce_win and seen.get(va) == pa and n == 1:
continue
todo[(va, pa, n)] = True