* docs(bringup): Stage 3b's stock-ABI checks cannot pass as written
nvidia_rs publishes no stock 195 nvidiactl/nvidia0 ABI, so nvidia-smi
and cuInit fail by construction on a healthy bring-up. The failure is
not card-specific and its exit status carries no information about
whether the stage worked.
Replaces the check with an nv-rs-abi probe: GPU node opens 0,
/proc/driver/nvidia/gpus/<bdf>/information is populated, all three
session nodes open 0 while the GPU fd is held, then unbind + rmmod
returns 0 with no task in D.
Keeps the stage's runtime_engines=1 with no bringup= argument, and says
why: resolve_bringup_mode() silently forces runtime off when
bringup=N>0.
Signed-off-by: Mara <Mara@K80.dev>
* docs(bringup): cite the 0600 line correctly and stop Stage 3b on a failed check
The mode is set at gpu_owner.c:1023, not :1009; :1009 is `int error;` and
:1008 is the `struct device *device;` declaration. Measured at this branch's
head rather than carried over from an earlier tree.
The Stage 3b block also lost `set -eu` when the pass conditions replaced the
nvidia-smi checks. Without strict mode a failed insmod, a missing node, or a
failed unbind falls through to the trailing rmmod, and the block can exit 0
without any check having passed. Restore strict mode, and say in the block why
it is there so it is not tidied away again.
Reported-by: JoshyDo
Reported-by: Solarboaters
Signed-off-by: Mara <Mara@K80.dev>
* docs(bringup): require this GPU's session node, and bound the first open
Two defects in the Stage 3b block, both found by review on ab42c01a.
The per-GPU session node was matched with a glob under `nullglob`, so a
*missing* session node was skipped rather than failed, and a wildcard also
matched when the node belonged to a different GPU. The block now reads
`Device Minor:` out of the proc page it has just printed (rmapi_node.c:1085
prints it; :4338 builds the node name from the same minor_index) and requires
exactly /dev/nvidia-rs-rmapi-gpu$MINOR. `nullglob` is gone and all three
session paths are literal.
The first open ran as a bare `exec 9<` in the operator's root shell, which the
guide's own rule forbids for /dev/nvidia* commands. The open and checks 1-4 now
run inside one `timeout 15 bash -euo pipefail -c` helper that holds fd 9 for
the duration of the checks, so the fd still lives in the process that measures
and a stall no longer leaves a root shell sitting in it. The guide's own caveat
is kept in the comment: `timeout` does not interrupt an uninterruptible kernel
wait, so it is a stop signal, not a rescue.
Checked against the block as it ships (2,766 B / 57 lines) with a stubbed
logic-only harness: nine fixtures, nine intended branches. No module was
loaded, no real device node was touched, and nothing here says Stage 3b passes
on hardware.
Reported-by: coderabbitai[bot]
Signed-off-by: Mara <Mara@K80.dev>
* docs(bringup): open the RMAPI session node for Stage 3b, not the GPU node
The direct /dev/nvidia-rs-<bdf> open runs the first-open path under
misc_mtx with no runtime worker: nv_rs_runtime_park_wait returns 0 when
the caller is not the runtime kthread, so the engines are torn down
before the open returns. Holding that fd was therefore not evidence of
live engines, and the note that closing it parks the runtime was wrong.
Resolve Device Minor from the per-GPU proc page (created at probe) and
open /dev/nvidia-rs-rmapi-gpu<minor> first; that open starts the runtime
worker and waits for it to park. Keep the control and UVM opens under
the held session fd. State the close semantics correctly: the worker
stays parked until a stop request, and the unbind is that request.
Reported-by: coderabbitai[bot]
Signed-off-by: Mara <Mara@K80.dev>
* docs(bringup): say how to clean up after a failed Stage 3b check
If the session or UVM open fails, the block exits before the unbind and
rmmod, and closing fd 9 does not stop the runtime worker: the module stays
loaded and the GPU stays bound, so a retry fails at insmod. The failure
branch now says so and prints the unbind/rmmod line for a new root shell.
Reported-by: coderabbitai[bot]
Signed-off-by: Mara <Mara@K80.dev>
* docs(bringup): print Stage 3b cleanup on every failure path
The earlier checks - unreadable proc page, no Device Minor, missing session
node - exited before the cleanup line added for the helper branch, leaving
the module loaded and the GPU bound. One stage3b_fail helper now prints the
unbind/rmmod line on every failure after insmod.
Reported-by: coderabbitai[bot]
Signed-off-by: Mara <Mara@K80.dev>
---------
Signed-off-by: Mara <Mara@K80.dev>
Co-authored-by: Mara <Mara@K80.dev>
The :90 callout tells multi-function card owners that
ensure_vfio_bound() requires a single-device IOMMU group and refuses
groups with sibling devices. tools/vm/run_vfio_guest.py does neither:
validate_iommu_group() accepts a same-slot multifunction group, and
ensure_vfio_bound() binds every member itself.
Framed as a disagreement between the doc and the tool, not as a verdict
on which is right.
Signed-off-by: Mara <Mara@K80.dev>
Co-authored-by: Mara <Mara@K80.dev>
The NOT_SUPPORTED bullet reads as though 0x56 always means the command
is unimplemented for the class on this chip. It also means the command
was addressed to an object whose class does not own it, which says
nothing about the hardware.
Adds how to tell the two apart from tables in this tree: check the
owning class in the method's control_table row against the target
object's class in resources.rs, and confirm the parameter buffer was
left untouched. One bullet, one paragraph; no part-specific numbers.
Signed-off-by: Mara <Mara@K80.dev>
Co-authored-by: Mara <Mara@K80.dev>
The 19 areas of tools/gp106/check.sh, which hold all 26 GP106 opt-in
(#[ignore]) comparisons against the 580.178.04 instructions, were run by
nothing: not by validate_all.sh, not by the Makefile. They only ran when
someone typed the loop from reports/gp106-core-validation.md, and that
loop left out pte-policy.
check.sh gains an `all` area that runs every area in order and stops at
the first failure. validate_all.sh runs it as the optional step
gp106_oracles, next to gsp_620_headers. Missing prerequisites follow the
existing optional-step rule (exit 2 is SKIP, as in test_native_compute.sh
and oracle_gsp_620.py): `all` exits 2 before running anything when the
interpreter cannot import Unicorn and pyelftools, or when
resolve_580_binary() finds no original object. A present object with the
wrong digest, a generator error or a Rust mismatch is still FAIL. The
interpreter default is the top-level Makefile's REA_PYTHON default.
The report now documents `check.sh all` in place of the hand-written
loop. The step count in AGENTS.md, CLAUDE.md and docs/GPU_BRINGUP_GUIDE.md
is set to 36, the number of PASS/FAIL/SKIP lines validate_all.sh prints
with this step; those files said 31, 30 and 31 while the script already
printed 35.
Tests: tests/gp106/test_check_all.py covers both exit-2 paths and the
usage line with stand-in interpreters; tests/vm/test_validate_guest_steps.py
covers PASS, SKIP and FAIL of the new step. All six fail on master.
No driver logic changes. On this host `check.sh all` passes all 19 areas
(90 Rust tests, 0 failed) in about 4 minutes cold, 3 minutes warm; BAR2
and the two framebuffer generators are most of it.
- Step 1 (4778460035): require full 31/31 sh tools/validate_all.sh gate on
a quiet tree before any hardware run (Step 2 or Step 3).
- Step 2 (4778460043): scope native_hello.sm70.cubin example to Volta/Turing
and document matching-architecture cubin requirement for Ampere+.
- Step 3 (4778460053, 4778460061): document releasing vfio-pci + clearing
driver_override before bare-metal bring-up, split Stage 3a (bringup=0..9)
from Stage 3b (runtime_engines=1), and stop immediately with exit 1 if the
timeout-bounded first open fails.
- Staged bring-up (4777756486): add timeout-bounded open of
/dev/nvidia-rs-0000:01:00.0 so nv_rs_gpu_first_open() actually executes
each stage under runtime_engines=0 before checking dmesg.
- VFIO IOMMU group limit (4777756494): document ensure_vfio_bound()'s
single-device IOMMU group requirement before the VM examples.
- RM status codes (4777756499): fix 0x57 to NV_ERR_OBJECT_NOT_FOUND and
list 0x1f for NV_ERR_INVALID_ARGUMENT.
- Guest hang bound (4777756505): document the 90-second default wall-clock
timeout and --timeout option instead of claiming a 3-second hang exit.