diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-28 07:34:34 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-28 07:34:34 -0400 |
| commit | 2133dd1fd82b4fd37df45e134b9a073f081d49d1 (patch) | |
| tree | 2e8f1e779833a27f9e0325ec037a06a244a54637 /tools/guest-diag/memprobe.py | |
| parent | 4b214ba45276a8d60161d74ffcb303a28d5f4dab (diff) | |
| download | open-iov-2133dd1fd82b4fd37df45e134b9a073f081d49d1.tar.gz open-iov-2133dd1fd82b4fd37df45e134b9a073f081d49d1.zip | |
sema-svc: apply releases promptly and decode compute-push releases
The content sweep now:
- decodes a release whose method stream continues with any INC_METHOD,
not only the CE LAUNCH_DMA group, so the releases at the head of a
compute/GR channel's first push are applied too;
- remembers releases whose target VA had no translation (deferred list)
and retries them every service pass, so a VA->PA injection lands them
immediately instead of after the next full sweep;
- re-arms the fast sliced sweep for a few seconds after an injection;
- treats a channel whose USERD/ring cannot be resolved as stalled, so the
sweep keeps looking for the releases its unreadable pushes carry.
tools: add per-cdt client-pin helper (sem pages + /dev/nvidia0 windows),
sem-page scanner and memprobe fixes (short-read guard, --brief).
Live-verified: injecting a client sem page applied 12 deferred releases
within a second; the service kept applying (89 -> 202) while cdt ran.
Diffstat (limited to 'tools/guest-diag/memprobe.py')
| -rw-r--r-- | tools/guest-diag/memprobe.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/guest-diag/memprobe.py b/tools/guest-diag/memprobe.py index 26ed0af..96dd40b 100644 --- a/tools/guest-diag/memprobe.py +++ b/tools/guest-diag/memprobe.py @@ -126,8 +126,10 @@ def dump_tracker(pid, fd, p): if sob: print(" sem_obj[0:0x40]=%s" % sob.hex()) mem = r64(sob, 0x10) - mvb = rd(fd, mem & ~0xfff, 0x40) - print(" sem_mem=0x%x val@+0x%x=0x%x" % (mem, mem & 0xfff, r32(mvb, mem & 0xfff) if mvb else -1)) + mvb = rd(fd, mem & ~0xfff, 0x1000) + off = mem & 0xfff + val = r32(mvb, off) if mvb and off + 4 <= len(mvb) else -1 + print(" sem_mem=0x%x val@+0x%x=0x%x" % (mem, off, val)) q = r64(rd(fd, p + 0x48, 8) or b"\0" * 8) print(" prog_obj=0x%x next=0x%x cblist=0x%x idx95bc=0x%x p34=0x%x" % (q, r64(rd(fd, p + 0x9470, 8) or b"\0" * 8), @@ -154,15 +156,18 @@ def main(): if mode == "scan": lo, hi = 0x204800000, 0x204c0000 limit = 8 + brief = False for i, a in enumerate(sys.argv[3:]): if a == "--min": lo = int(sys.argv[4 + i], 16) if a == "--max": hi = int(sys.argv[4 + i], 16) if a == "--limit": limit = int(sys.argv[4 + i]) + if a == "--brief": brief = True res = find_trackers(pid, fd, lo, hi, limit) for p, sub, last, cur, sem, mem in res: print("P=0x%x sub=0x%x last=0x%x cur=0x%x sem_obj=0x%x sem_mem=0x%x" % (p, sub, last, cur, sem, mem or 0)) - dump_tracker(pid, fd, p) + if not brief: + dump_tracker(pid, fd, p) elif mode == "dump": dump_tracker(pid, fd, int(sys.argv[3], 16)) elif mode == "hex": |
