From d6dde0ecac4f031ea27a27df7767cba54ac44f55 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 29 Sep 2026 13:52:49 -0400 Subject: 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/; the guest wait sampler can run counters-only with GDB=0. --- tools/guest-diag/guest_kprobes.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tools/guest-diag/guest_kprobes.sh') 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 -- cgit v1.2.3