mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 14:38:47 +00:00
* 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>