Files
nvdriver/reports/gp106-core-validation.md
Scottcjn 37a6e160ae tools: run the GP106 oracle areas from validate_all.sh
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.
2026-12-03 11:24:34 -06:00

4.2 KiB

GP106 core validation

This branch covers GP106 physical-function metadata, framebuffer placement, BAR2, WPR image construction, and SEC2 core operations. The reference for the instruction comparisons is NVIDIA Linux 580.178.04. The checks execute the original instructions in Unicorn with modeled register and service inputs. The Rust tests compare the corresponding results, operation ordering and failure paths against the generated fixtures.

Reproduction

Use the project's Rust toolchain and a Python interpreter with Unicorn and pyelftools. Extract the original driver package separately and use target/reference-580.178.04/kernel/nvidia/nv-kernel.o_binary or set NV_RS_ORIGINAL to the original object. Set REA_PYTHON if the Python dependencies are installed in a separate environment.

Run a single area with bash tools/gp106/check.sh <area>. Run the full GP106 offline set from the repository root with:

bash tools/gp106/check.sh all

all runs the areas memory legacy layout regions heap-inputs acr wpr sec2 hs-wpr upload launch run unmap control inputs tlb pf-cpu pte-policy bar2 in that order and stops at the first failure. It exits 2 without running anything when the interpreter cannot import Unicorn and pyelftools or the original object is not found. tools/validate_all.sh runs it as the gp106_oracles step and reports that exit status as SKIP.

The checks generate fixtures and firmware-derived data under target/. JSON summaries from the original-instruction checks are under target/gp106-reports/. The PF CPU check compares generated metadata with the tracked Rust file before compiling. To regenerate the tracked metadata explicitly, run target/rea-python/bin/python tools/gp106/pf_cpu.py --write.

Validation results

The GP106 core change was validated on Fedora's Linux 7.3.4-300.fc45.x86_64, Rust 1.100.0 and Unicorn 2.1.2.

Validation Result
Rust workspace 1,034 passed, 150 opt-in tests ignored
GP106 offline groups [E] 18/18 groups, 87 Rust tests passed, including all 26 GP106 opt-in comparisons
GP106 placement and BAR2 [E] 1,296 placement cases and 113 BAR2 cases. BAR2 replay matched 97 complete traces and 16 stopping prefixes over 1,122,188 accesses
Shared GV100 placement oracle [E] 11,427 original-instruction cases compared successfully
Kernel Rust object 14/14 static checks passed, IBT enforced, 222 data relocations to code, 1,000-byte maximum stack frame
Production kernel module 18/18 module checks passed, IBT enforced, 0 unsupported GOT relocations, 1,000-byte maximum stack frame
QEMU/KVM EDU Both normal and IOMMU configurations passed, with two validated guest results each
Project validation All 32 offline stages listed in tools/validate_all.sh passed when run individually

The Fedora host fixtures used position-independent C objects for Rust PIE linking. The EDU fixture used Fedora's IBT, call padding, retpoline, return thunk and SLS flags. The live validation stage remains pending.

The chip selection regression passed 12 BAR2 tests, including comparisons against 113 GP106 and 175 GV100 original-instruction cases. It also passed five GPU architecture and physical-function constructor tests, the constructor code-generation audit, and all 18 production module checks.

SEC2 failure behavior

The native halt wait _nv028782rm+0x49 replaces the saved timer status after each poll. With CPUCTL reads 0, 0, 0x10 and timer statuses 7, 0, the original returns OK and _nv028781rm retires the mapping and VM resources. The control oracle replays this sequence. A nonzero final status retains the resources.

The mapped runner preserves the original create and map status exits, which leave the DMA-index interrupt mask cleared. A Rust provider error after the mask has been saved triggers restoration. The runner's teardown retry resumes from the retained resource state and restores the mask after the retry.

Evidence boundary

GP106 core tests exercise modeled services. The generic QEMU EDU tests exercise the Linux PCI and DMA adapters. GP106 first-open, firmware execution on the device, and workload parity against the stock driver require a separate physical-device baseline and replay.