From 725898e44666b4def396f7f3c5e50712fd37aa33 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Thu, 12 Nov 2026 20:01:04 -0500 Subject: vgsp: stop fabricating 0xFFFF into the nvPush error notifier; add r1780 GL ops tooling The uncommitted keep-alive change wrote 0xFFFF into slot 0's status field (u16 at notifier+0x0e) on the X DDX / GLX kick-idle channel families. Ground truth (570.144 reference sources + stock nvidia_drv.so disassembly): slot 0 of an nvPush notifier block is the ERROR notifier; nvPushCheckChannelError reads that status and 0xFFFF aborts every nvPushWaitForNotifier/idle wait as a channel error. There is no pb_kickIfIdle in 570.144 - the DDX DMA-idle test reads the progress-tracker semaphore word, not this slot. Leave slot 0 untouched; keep the 0x8000->0 completion ack for the remaining slots and the r864 0xFFFF/0x8000 completion on the RC-watchdog/beef families. Correct the CONT.408/409 comments accordingly. New host/guest tooling: gpa.py (QMP gva2gpa), tick_gen.py (guest-RM timer BO tick), guest_mode.sh (shared nvClip modeNum reader), gl_verify.sh (X/GLX bring-up with ScreenInit-lottery retries), push_gl_tools.sh, the gzdoom_pbuf_run.sh guest recipe and the test_tri SDL2 harness validation program; ignore tools/guest-diag/build/. --- tools/guest-diag/push_gl_tools.sh | 74 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 tools/guest-diag/push_gl_tools.sh (limited to 'tools/guest-diag/push_gl_tools.sh') diff --git a/tools/guest-diag/push_gl_tools.sh b/tools/guest-diag/push_gl_tools.sh new file mode 100755 index 0000000..4064d58 --- /dev/null +++ b/tools/guest-diag/push_gl_tools.sh @@ -0,0 +1,74 @@ +#!/bin/bash +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2026 Open-IOV contributors +# push_gl_tools.sh - push the guest-side GL/GZDoom harness binaries and scripts +# into the running guest's /tmp and chmod +x them. Uses the established QGA +# guest-exec + base64 mechanism from push_guest_tools.sh (scripts/vgpu_vm.py). +# +# Usage: +# bash tools/guest-diag/push_gl_tools.sh # fixed list below +# bash tools/guest-diag/push_gl_tools.sh FILE... # arbitrary host files +# bash tools/guest-diag/push_gl_tools.sh --dry-run # list only, no push +# +# Destination is /tmp/. The guest's /tmp is wiped on boot; run this +# after every VM start. It does NOT run the pushed programs. +set -u + +HERE="$(cd "$(dirname "$0")" && pwd)" +VMEXEC="$HERE/../../scripts/vgpu_vm.py" +BUILD="$HERE/build" +DEST_DIR="${DEST_DIR:-/tmp}" + +DRY_RUN=0 +if [ "${1:-}" = "--dry-run" ]; then + DRY_RUN=1 + shift +fi + +FIXED=( + "$BUILD/gl_frames" + "$BUILD/gz_pbuf.so" + "$BUILD/sdl_cap.so" + "$BUILD/test_tri" + "$HERE/guest_mode.sh" + "$HERE/gzf2_video.py" + "$HERE/gzdoom_pbuf_run.sh" +) + +if [ "$#" -gt 0 ]; then + FILES=("$@") +else + FILES=("${FIXED[@]}") +fi + +if [ ! -x "$VMEXEC" ] && [ ! -f "$VMEXEC" ]; then + echo "push_gl_tools: vgpu_vm.py not found: $VMEXEC" >&2 + exit 2 +fi + +push_b64() { # push_b64 + local src="$1" dst="$2" b64 + b64=$(base64 -w0 "$src") + if [ "$DRY_RUN" = "1" ]; then + echo "PUSH-DRY $src -> $dst ($(stat -c%s "$src") bytes)" + return 0 + fi + if ! sudo "$VMEXEC" exec --timeout 120 \ + "echo '$b64' | base64 -d > '$dst' && chmod +x '$dst'" \ + >/dev/null 2>&1; then + echo "PUSH-FAIL $src -> $dst" >&2 + return 1 + fi + echo "PUSHED $src -> $dst" +} + +rc=0 +for f in "${FILES[@]}"; do + if [ ! -f "$f" ]; then + echo "PUSH-SKIP missing $f" >&2 + rc=1 + continue + fi + push_b64 "$f" "$DEST_DIR/$(basename "$f")" || rc=1 +done +exit "$rc" -- cgit v1.2.3