diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-24 13:24:02 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-24 13:24:02 -0400 |
| commit | 74b6fa4bb0912e310c24dbeefd58eadfc938f9b2 (patch) | |
| tree | b7c64e190889b5228b7fcf7ccd1f5c0d25da258f /tools/guest-diag/pool_page.py | |
| parent | 016c290447c72a72eaac8337cbf09b32f87e9093 (diff) | |
| download | open-iov-74b6fa4bb0912e310c24dbeefd58eadfc938f9b2.tar.gz open-iov-74b6fa4bb0912e310c24dbeefd58eadfc938f9b2.zip | |
tools r624: tracker_walk.py + pool_page.py - guest-side (kcore) walks for the first-wait class: read a UVM tracker's semaphore object and expected payload, and dump the semaphore-pool page's applied values; together with the host pool-wr/sema-sw logs they compare what the driver waits for against what the host wrote
Diffstat (limited to 'tools/guest-diag/pool_page.py')
| -rwxr-xr-x | tools/guest-diag/pool_page.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/guest-diag/pool_page.py b/tools/guest-diag/pool_page.py new file mode 100755 index 0000000..a9f7b15 --- /dev/null +++ b/tools/guest-diag/pool_page.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +# pool_page.py <pa-hex> - dump the UVM semaphore-pool page's u32 slots via +# /proc/kcore (guest root). The pool VA 0x121000000 maps to the PA the +# scanner+host pinned; nonzero slots are the applied release values. Compare +# against the tracker's expected payload (tracker_walk.py) and the driver's +# uvsv wait value to find write-target divergence / starvation. +import sys +import struct + +pa = int(sys.argv[1], 16) if len(sys.argv) > 1 else 0x107fd8000 +sys.argv = ["pool_page"] +sys.path.insert(0, "/tmp") +import guest_pin_stream as g # noqa: E402 + +kc = g.Kcore() +if not kc.load(): + print("KCORE LOAD FAILED") + sys.exit(1) + +nz = [] +for off in range(0, 0x1000, 4): + d = kc.read(kc.page_offset_base + pa + off, 4) + v = struct.unpack("<I", d)[0] if d else 0 + if v: + nz.append((off, v)) +print("pa=0x%x nonzero slots=%d" % (pa, len(nz))) +for off, v in nz[:64]: + print("off=0x%x val=%u" % (off, v)) |
