diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 13:52:49 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 13:52:49 -0400 |
| commit | d6dde0ecac4f031ea27a27df7767cba54ac44f55 (patch) | |
| tree | 2bee86930a53b8a4f0e987e7581877e241733759 /tools/guest-diag | |
| parent | 058076bc81249864bd70615f30e73c95ccfd9bc1 (diff) | |
| download | open-iov-d6dde0ecac4f031ea27a27df7767cba54ac44f55.tar.gz open-iov-d6dde0ecac4f031ea27a27df7767cba54ac44f55.zip | |
kernel: authoritative host-injected VA->PA pins (ipin table) + wider pin table
The CE push-buffer page 0x120000000 resolved to a zero-filled page even after
sema_map_add injected the correct translation: the shared pin table silently
dropped inserts once a hash cluster exceeded the 32-probe window (the page
hashes to slot 0, a hot cluster), and lookups fell through to the
content-scanned map and answered with a stale page - so every CE push read as
implausible and memset stayed 0. Injected translations now live in a separate
authoritative table checked before every other source and are never written by
self-discovery; the general pin table is 4x larger with a 4x probe window and
counts drops (pin_drop/ipin_drop) in the stats line. guest_kprobes.sh disables
the kprobe group before removal (EBUSY) and matches p:kprobes/<name>; the
guest wait sampler can run counters-only with GDB=0.
Diffstat (limited to 'tools/guest-diag')
| -rw-r--r-- | tools/guest-diag/guest_kprobes.sh | 12 | ||||
| -rw-r--r-- | tools/guest-diag/track_waits.sh | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/tools/guest-diag/guest_kprobes.sh b/tools/guest-diag/guest_kprobes.sh index f676e20..0afe6c6 100644 --- a/tools/guest-diag/guest_kprobes.sh +++ b/tools/guest-diag/guest_kprobes.sh @@ -15,29 +15,35 @@ TR=/sys/kernel/tracing [ -d "$TR" ] || TR=/sys/kernel/debug/tracing +# An enabled kprobe event cannot be deleted (EBUSY); disable the group first. +echo 0 > "$TR/events/kprobes/enable" 2>/dev/null || true + add_probe() { name=$1; sym=$2; fmt=$3 + echo "-:kprobes/$name" >> "$TR/kprobe_events" 2>/dev/null echo "-:$name" >> "$TR/kprobe_events" 2>/dev/null if ! grep -qw "$sym" /proc/kallsyms 2>/dev/null; then echo "FAIL $name: symbol $sym not in kallsyms" return 1 fi if echo "p:$name $sym $fmt" >> "$TR/kprobe_events" 2>/dev/null; then - if grep -q "p:$name" "$TR/kprobe_events" 2>/dev/null; then + if grep -qE "p:[^ ]*[ /]$name( |$)" "$TR/kprobe_events" 2>/dev/null; then echo "ok $name $sym" return 0 fi fi + echo "-:kprobes/$name" >> "$TR/kprobe_events" 2>/dev/null echo "-:$name" >> "$TR/kprobe_events" 2>/dev/null if echo "p:$name nvidia_uvm:$sym $fmt" >> "$TR/kprobe_events" 2>/dev/null; then - if grep -q "p:$name" "$TR/kprobe_events" 2>/dev/null; then + if grep -qE "p:[^ ]*[ /]$name( |$)" "$TR/kprobe_events" 2>/dev/null; then echo "ok-module $name $sym" return 0 fi fi + echo "-:kprobes/$name" >> "$TR/kprobe_events" 2>/dev/null echo "-:$name" >> "$TR/kprobe_events" 2>/dev/null if echo "p:$name $sym" >> "$TR/kprobe_events" 2>/dev/null; then - if grep -q "p:$name" "$TR/kprobe_events" 2>/dev/null; then + if grep -qE "p:[^ ]*[ /]$name( |$)" "$TR/kprobe_events" 2>/dev/null; then echo "ok-bare $name $sym" return 0 fi diff --git a/tools/guest-diag/track_waits.sh b/tools/guest-diag/track_waits.sh index 4c9cd1a..45a9a66 100644 --- a/tools/guest-diag/track_waits.sh +++ b/tools/guest-diag/track_waits.sh @@ -52,7 +52,7 @@ for i in $(seq 1 "$N"); do TS=$(date +%T.%3N) kill -0 "$PID" 2>/dev/null || { echo "PROCESS GONE at $TS (sample $i)" >> /tmp/trk.log; break; } - if [ $((i % 2)) -eq 1 ]; then + if [ $((i % 2)) -eq 1 ] && [ "${GDB:-1}" = "1" ]; then echo "=== $TS sample $i ===" >> /tmp/trk.log timeout 8 gdb -p "$PID" -batch -x /tmp/trkinfo.py 2>&1 \ | grep -vE "^\[|Reading symbols|^0x[0-9a-f]+ in |warning:" >> /tmp/trk.log |
