summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/guest-diag/phys_claim_cycle.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/guest-diag/phys_claim_cycle.sh b/tools/guest-diag/phys_claim_cycle.sh
index 6f13d75..ec6e29f 100755
--- a/tools/guest-diag/phys_claim_cycle.sh
+++ b/tools/guest-diag/phys_claim_cycle.sh
@@ -63,6 +63,11 @@
# --fw NAME GSP firmware to stage (request_firmware name under
# /lib/firmware; default: the module's own default, currently
# nvidia/570.211.01/gsp_tu10x.bin)
+# --nocat pass gsp_phys_nocat=1: during --boot, log every GSP-RM NOCAT
+# journal record (status-queue function 0x1020) to dmesg with
+# the "gsp-nocat:" prefix. The unique-record summary is
+# printed at the end of stage 3e (success or failure) with or
+# without this flag; per-record logging is verbose.
# --no-restore do not restore power/control=auto or restart persistenced
# at the end of each cycle (leaves the D0 hold in place)
#
@@ -92,6 +97,7 @@ DRYRUN=0
FWSEC=0
BOOT=0
BOOT_DRYRUN=0
+NOCAT=0
KEEP=0
NO_RESTORE=0
KO="$REPO_ROOT/kernel/open-iov-vfio.ko"
@@ -130,6 +136,7 @@ EOF
exit 1 ;;
--ko) KO="${2:-}"; shift ;;
--fw) FW="${2:-}"; shift ;;
+ --nocat) NOCAT=1 ;;
--no-restore) NO_RESTORE=1 ;;
-h|--help) usage; exit 0 ;;
*) echo "unknown argument: $1" >&2; usage >&2; exit 1 ;;
@@ -349,10 +356,12 @@ for n in $(seq 1 "$CYCLES"); do
[ "$BOOT" -eq 1 ] && BOOT_ARG="gsp_phys_boot=1"
FW_ARG=""
[ -n "$FW" ] && FW_ARG="gsp_phys_fw=$FW"
+ NOCAT_ARG=""
+ [ "$NOCAT" -eq 1 ] && NOCAT_ARG="gsp_phys_nocat=1"
# One command: stop persistenced and insmod with the D0 pre-lock in place.
# gsp_phys_fwsec=1 is never passed: --fwsec refuses before this point.
if ! { sudo systemctl stop nvidia-persistenced && sudo insmod "$KO" \
- gsp_phys_gpu=1 gsp_phys_hazard_ack=1 $LAYOUT_ARG $DRYRUN_ARG $BOOTDRY_ARG $BOOT_ARG $FW_ARG; }; then
+ gsp_phys_gpu=1 gsp_phys_hazard_ack=1 $LAYOUT_ARG $DRYRUN_ARG $BOOTDRY_ARG $BOOT_ARG $FW_ARG $NOCAT_ARG; }; then
save_dmesg "$DLOG"
echo "ABORT: cycle $n: stop-persistenced && insmod failed" >&2
exit 2