Files
nvdriver/reports/root-migration.txt
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

98 lines
6.1 KiB
Plaintext

Exact580 page-root migration and channel PDB update
New core production code:
- mmu/root_migration.rs: RM-internal copy/fill range planning with actual CPU
copies that preserve external entries; original callback flag routing;
matching-channel enumeration, busy checking, VASpace refresh, PDB backing
commit and FIFO commit sequencing with explicit partial-commit count on error.
- mmu/ramin.rs: GP100 base/GV100 subcontext instance PDB word encoding, bounded
unpublished byte initialization, invalid subcontext teardown and ATS/PASID
field encoding. High PDB word is written before low, as in kgmmuInstBlkInit.
Base format/page-size properties are supplied; GV100 subcontexts force v2/64K.
None of this installs a hardware root or supplies the hardware callbacks.
Original ELF callback table, independently verified by
tools/extract_mmu_callback_table.py:
.rodata 0x4c5da80 LevelAlloc _nv013506rm
0x4c5da88 LevelFree _nv013507rm
0x4c5da90 UpdatePdb _nv013511rm
0x4c5da98 UpdatePde _nv013512rm
0x4c5daa0 Fill _nv013503rm
0x4c5daa8 Copy _nv013500rm
See mmu-callback-relocations.json for original .text relocation addends and
artifact SHA256. Callback labels are corroborated by exact-version source table
order and fresh complete REA behavior; they are not Ghidra's native symbols.
Fresh REA chains and exact observations:
page-root-level-rea: _nv046248rm wraps _nv046249rm, matching
mmuWalkMigrateLevelInstance -> mmuWalkModifyLevelInstance. The latter swaps level
memory metadata, copies min(old,new) entries, invalid-fills grown entries,
updates PDB at root/PDE at non-root, and frees the previous descriptor under its
reference rules. Original callbacks assert full progress; Rust validates sizes
before CPU mutation and exposes fallible hardware dependencies explicitly.
page-root-callback-rea: _nv013511rm is the actual proprietary UpdatePdb callback.
Unlike the published CPU-RM/GSP source's no-op tail, this contains a physical
standalone-RM branch. Flags BAR1(bit7) or HDA(bit23) skip instance updates;
PMU(bit11) dispatches _nv052399rm; PERFMON(bit10) dispatches _nv018581rm;
remaining physical/GPU-mode predicates may dispatch _nv027751rm. Flag priority
is implemented. PMU/PERFMON routines remain real required providers, not no-ops.
page-root-channel-rea: _nv027751rm validates GPU/lock state, enumerates FIFO
channels, matches VASpace object identity and optional channel ID, skips missing
channel instances after recording an assertion, checks busy via FIFO virtual
method +0x390(mode2, true), fails with status99 unless ignore-busy set, calls
VASpace virtual+0xf0, _nv019335rm, then FIFO virtual+0x370. Original enumeration
returns success on nonzero iterator result; our backend uses explicit end=None
and propagates actual iterator errors rather than hiding an unknown failure.
This deliberate checked behavior is not claimed exact original error parity.
The Rust orchestration requires begin_update to establish hardware/lock
prerequisites and real callbacks for the two channel commits. Successful channel
commit is not proof of TLB invalidation completion. Partial updates remain
explicit and must be recovered before channels resume.
page-root-instance-rea: _nv019335rm contains original diagnostic name
channelCommitPdb_GM107. It obtains the owning FIFO channel/VASpace and instance
memory; selects GPU/SLI/broadcast scope; invokes _nv040832rm; performs additional
subcontext handling where required; finalizes descriptor transfer and issues
instance-memory flush/invalidation via engine virtual methods. Failures balance
broadcast-state restoration. Those ownership/HAL operations are still mandatory
providers, not invented MMIO offsets.
page-root-write-rea: _nv040832rm matches kgmmuInstBlkInit_IMPL. It obtains
VA-limit data via virtual+0x138, PDB fields via+0x148, optional ATS via+0x130 only
when ATS and PASID ready, optional magic field via+0x140. It maps the descriptor
unless the caller supplied an existing CPU instance pointer, writes VA limit,
PDB high then low, optional ATS and magic, ends descriptor transfer, and flushes
unless caller flag requests deferral. Pure PDB offsets/values are recovered
from exact-version kgmmuInstBlkPageDirBaseGet_GP100/_GV100 and RAMIN headers.
Additional fresh page-root-hal-rea analysis identifies _nv040838rm as the GV100
PDB helper: target-1 delegates to _nv040837rm (GP100 base); subcontexts force
0xc00 format flags, replay0x30, aperture/volatility/address fields and low offset
(id+0x2a)<<4 with high+4. NULL subcontext writes1/1. _nv040830rm is the GV100 ATS
helper: base offset0x21c, subcontext offset(id*0x80+0x1540)>>3, PASID20bits,
ATS-enable bit31, NULL subcontext clears ATS. These bodies corroborate the
published HAL functions directly. Full GV100 runtime factory/vtable selection,
magic and flush prerequisites remain explicit gaps.
Validation:
python3 tools/check_root_migration_oracle.py executes both actual original C
SkipExternal callbacks with memory-only normal fill/copy callback mocks,
producing336 checked growth/shrink/internal-range vectors.
python3 tools/check_ramin_oracle.py executes actual GP100/GV100 PDB HAL source
functions against published exact-version RAMIN headers with descriptor/property
lookups mocked, producing576 vectors across addresses, apertures, volatility,
replayability, base-format/page-size flags and base/subcontext targets. This
proves pure encoding correspondence, not original binary execution or GPU use.
Rust tests also cover immutable invalid output, invalid subcontext/root/PASID,
channel filtering/order/busy/ignore-busy and failure after one channel commit.
Source hashes and source/mocking scope are recorded in corresponding JSON files.
Remaining execution work:
Concrete owned FIFO channel enumeration/locking/idle-unscheduled lifecycle;
instance-block backing owner, real GPU-mode/broadcast guards and PMU/PERFMON
providers; full GV100 runtime factory/vtable selection for these matched field helpers; instance-memory
flush/fault/timeout backends and bounded progress; all non-GV100 hardware matrix
formats and feature paths. No scheduled channel, physical GPU or working host
NVIDIA driver has been accessed or modified by these tests.