summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-13 02:16:10 -0500
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-13 02:16:10 -0500
commit78225d9c81f22dbcd5af92aa088e4eeabe91e200 (patch)
treec3526f40f0b41fade624bf99cf33ac45f844bbeb /tools/guest-diag
parent296906351bc671e60a3dfbbad8eae3e667227195 (diff)
downloadopen-iov-78225d9c81f22dbcd5af92aa088e4eeabe91e200.tar.gz
open-iov-78225d9c81f22dbcd5af92aa088e4eeabe91e200.zip
tools: cycle-r1780.sh arms the GR lane per boot (rm-call ladder + guest-ram activation)
Post-reboot cycles lost the pre-reboot 'arm the GR lane' steps, so gsp_phys_backend_gr_ready() stayed false (rmcall_gr_exec_ok=false) and every captured GL section died SILENTLY at svc_gr_request's first gate (c198: work_gr req=73 fallback=73 ok=0 refused=73 submitted=0 exec_ok=0; an ftrace run counted 2282 silent svc_gr_request calls). After 'guest agent up' the cycle now runs, with warnings only (never fails the cycle): echo 5; echo 3; echo 4 > gsp-phys-rm-call (order matters; 4 alone fails by design) echo '<mdev> /dev/shm/vgpu-guest-ram 0x80000000 0x0 0x300000000' > gsp-phys-guest-ram and logs both to <tag>-ladder.txt. Validated c203: 7x 'GR LAUNCH submitted' + 5x 'GUEST GR LAUNCH OK' from the captured GL sections (zero ever before), exec_ok=1, work_gr ok=4 backend_ok=4. Residual: gl_frames still black - GR-DEC n_data=0 dropped=24 (the section's data window resolves empty) and 'sema-grce: owner-vas h=0xbeef0100 ... dst=0x120700000 unmapped; cross-VAS walk refused (client-private page)' for the client copy-out operand - the old n_data/dstpend frontier, now with the forward live.
Diffstat (limited to 'tools/guest-diag')
-rwxr-xr-xtools/guest-diag/cycle-r1780.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/guest-diag/cycle-r1780.sh b/tools/guest-diag/cycle-r1780.sh
index 4fb796a..24bff12 100755
--- a/tools/guest-diag/cycle-r1780.sh
+++ b/tools/guest-diag/cycle-r1780.sh
@@ -145,6 +145,32 @@ echo "$TAG" > "$RUNDIR/current-tag"
for i in $(seq 1 90); do
if timeout 5 sudo python3 "$REPO/scripts/vgpu_vm.py" exec "echo CYCLE_UP" 2>/dev/null | grep -q CYCLE_UP; then
echo "[cycle $TAG] guest agent up"
+ # 2026-11-13 (eng9, c198-c203 RCA): arm the GR forward lane. Without
+ # this block the pump's GR request gate refuses EVERY captured launch
+ # with "backend not ready" (gsp_phys_backend_gr_ready() is false until
+ # the rm-call ladder latches boot_stage.rmcall_gr_exec_ok) and the
+ # backend submit then refuses with -EAGAIN until the guest RAM
+ # backing is registered: captured GL sections never become
+ # `GR LAUNCH submitted`, gl_frames reads black (px0=0), work_gr shows
+ # refused==fallback==req with submitted==0. Trigger 4 alone on a
+ # fresh session is EXPECTED to fail at stage 1 (NV01_ROOT 0x23):
+ # trigger 5 adopts the static handles first (docs/eng-ops.md Step 4).
+ LADDER_LOG="$BACKUP/$TAG-ladder.txt"
+ : > "$LADDER_LOG"
+ echo "[cycle $TAG] arm GR lane (rm-call ladder 5->3->4 + guest-ram backing)"
+ for t in 5 3 4; do
+ sudo bash -c "echo $t > /sys/kernel/debug/vgsp/gsp-phys-rm-call" 2>>"$LADDER_LOG" || true
+ sleep 4
+ done
+ sudo dmesg -T 2>/dev/null | grep -E "rm-call: (stage|ladder|REAL GR)|ladder at stage" | tail -10 >> "$LADDER_LOG" || true
+ sudo bash -c "echo '$U /dev/shm/vgpu-guest-ram 0x80000000 0x0 0x300000000' > /sys/kernel/debug/vgsp/gsp-phys-guest-ram" 2>>"$LADDER_LOG" || true
+ sleep 1
+ sudo cat /sys/kernel/debug/vgsp/gsp-phys-state 2>/dev/null | grep -E "work_gr|guest_ram:" | cut -c1-220 >> "$LADDER_LOG" || true
+ if grep -q "ladder at stage 4" "$LADDER_LOG"; then
+ echo "[cycle $TAG] GR lane armed (ladder stage 4; guest-ram configured; log: $LADDER_LOG)"
+ else
+ echo "[cycle $TAG] WARN: GR lane arm incomplete (see $LADDER_LOG); cycle still usable"
+ fi
exit 0
fi
sleep 2