summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag/pin_miss_pages.sh
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-28 13:27:31 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-28 13:27:31 -0400
commitf3a10d9a117bbc1eeec121fe6f726e9199a3c89a (patch)
tree03f27c985bffbd4fe3281a931388bee29c1b3f43 /tools/guest-diag/pin_miss_pages.sh
parent6ac574eb67b478cb48ddfbd6e77f4613698020c7 (diff)
downloadopen-iov-f3a10d9a117bbc1eeec121fe6f726e9199a3c89a.tar.gz
open-iov-f3a10d9a117bbc1eeec121fe6f726e9199a3c89a.zip
guest-diag: ctx999.py (scanner/ctx gdb capture); fix pinner exact-VA match
ctx999.py arms the scanner entry/returns plus cuCtxCreate and dumps the ctx->mgr->reg->record chain at the stop. First live capture: the scanner is called with param_2=1 during normal context creation and correctly returns 0 on a zero record (mgr[+0], the channel handle, and the record walk are now confirmed live). pin_miss_pages.sh must match the exact VA pmapall printed: guest_pmap_all.py returns the first nvidia page at-or-above va-min, so a page that is not present resolves to an unrelated mapping (it pinned a UVM page for 0x20400f000).
Diffstat (limited to 'tools/guest-diag/pin_miss_pages.sh')
-rwxr-xr-xtools/guest-diag/pin_miss_pages.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/guest-diag/pin_miss_pages.sh b/tools/guest-diag/pin_miss_pages.sh
index 80b8c77..77268ef 100755
--- a/tools/guest-diag/pin_miss_pages.sh
+++ b/tools/guest-diag/pin_miss_pages.sh
@@ -43,7 +43,7 @@ for ((i = 1; i <= MAXMIN * 4; i++)); do
*" $page "*) continue ;;
esac
line=$(EXEC "sudo python3 /tmp/pmapall.py $pid $page 1" |
- grep -aE '^0x[0-9a-f]+,0x[0-9a-f]+$' | head -1)
+ grep -aE "^$page,0x[0-9a-f]+$" | head -1)
if [ -n "$line" ]; then
echo "$line,0x1000,1" | sudo tee /sys/module/open_iov_vfio/parameters/sema_map_add >/dev/null
echo "[$((i * 15))s] pinned $line (pid $pid)"