#!/usr/bin/env python3 # pool_page.py - 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("