mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 06:28:39 +00:00
- 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
91 lines
6.0 KiB
Plaintext
91 lines
6.0 KiB
Plaintext
GV100 engine/PBDMA discovery and ordered quiesce observations
|
|
|
|
Implemented src/nvidia/src/mmu/engine_discovery.rs with no new backend trait:
|
|
- Concrete bounded RegisterIo discovery follows original read order: CFG0x2004
|
|
low8 count (reject>16);0x2390+PBDMAid*4 runlist masks;CFG again for fault-ID
|
|
base bits23:16;64 PTOP device-info words0x22700..0x227fc. No writes or GPU
|
|
access were executed by this investigation; tests use register mocks.
|
|
- Stateful device-info chain decoding extracts ENUM engine tag/runlist/reset/
|
|
interrupt/host flags, TYPE device type and DATA instance/MMU fault ID. It
|
|
resolves23 original device-type class mappings,15 selected GV100 metadata
|
|
rows and57 generic RM-engine-type mappings from the original ELF. These are
|
|
lookup capacities, not a claim that57 engines exist on a GPU.
|
|
- Hardware routes select at most2 PBDMAs by their runlist masks, with fault IDs
|
|
derived from the original CFG base. Invalid/unterminated chains, unsupported
|
|
engine metadata, invalid DATA flags and absent/oversized routes return errors.
|
|
- Exact100-byte cached engine records decode16 data words,2 PBDMA IDs,2 fault
|
|
IDs,count at80 and16-byte name at84. Typed translation preserves first-match
|
|
ordering, distinct missing-row status0x57 versus invalid-index0x1f, host-only
|
|
diagnostic classification and GV100 GR fault-ID alias range. The actual
|
|
max-subcontext count is an input from its owner, never guessed as64.
|
|
- Original CE PBDMA de-dup chooses first not-yet-used ID in table order, changes
|
|
ID0/count and retains the other/fault-ID words exactly as original. IDs beyond
|
|
the original512-bit scratch bitvector are rejected before mutation.
|
|
- observe_runlist_references uses the completed cached table's actual first
|
|
runlist route, reads PBDMA status0x3080+id*4, then engine status0x2640+tag*8
|
|
only after PBDMA references clear. It stops at the first matching reference,
|
|
uses previously proven original predicates, and excludes the trailing
|
|
SOFTWARE record. It returns NoReferencesObserved, not whole-channel idle or
|
|
completion. Actual fault draining, FB flush and scheduling ownership remain
|
|
necessary before root changes or restart.
|
|
|
|
Exact original chains recovered through fresh REA:
|
|
_nv027856rm -> _nv040300rm is GetEnginePbdmaIds;
|
|
_nv027890rm -> _nv040329rm is hardware count (cached count minus SOFTWARE row);
|
|
KernelFifo+1b8=_nv040256rm wraps _nv040255rm translation, including GR fault
|
|
range aliasing. KernelFifo+1a8=_nv040242rm calls OBJFIFO+2f0=_nv027760rm to
|
|
construct the engine table lazily. KernelFifo+288=_nv040335rm reads CFG count
|
|
before table construction;OBJFIFO+5e0=_nv027828rm reads the fault-ID base.
|
|
OBJFIFO+700=_nv027812rm decodes instance bits29:26; +4f8=_nv028098rm validates
|
|
DATA bit30 clear/bit2 set and decodes MMU fault-ID bits9:3.
|
|
OBJFIFO+558=_nv027885rm uses GPU+570=_nv031279rm to map device type to class,
|
|
combines instance and calls _nv027886rm over OBJFIFO+310=_nv027854rm's static
|
|
metadata. _nv031280rm resolves RM engine types. Poststeps _nv027765rm and
|
|
_nv027763rm normalize copy-engine routing and add SOFTWARE routing respectively.
|
|
Fresh complete/instruction evidence and indexes are in channel-discovery-rea,
|
|
channel-device-info-rea, channel-engine-metadata-rea and
|
|
channel-discovery-finalize-rea. Original immutable facts and relocation-derived
|
|
source offsets are recorded in engine-discovery-data.json.
|
|
|
|
Critical exact-version ABI distinction:
|
|
The proprietary table uses input selectors INDEX16 and PBDMA17. The published
|
|
CPU/GSP source enum has INDEX15 and PBDMA16, and15 data words. Blindly importing
|
|
that enum/record layout into the monolithic driver would shift PBDMA fields.
|
|
This implementation preserves the actual16-word/100-byte layout. Column15 is
|
|
retained raw but its semantics remain unknown; typed outputs cover proven0..14
|
|
and do not relabel it. PBDMA/index are typed input selectors. Unsupported
|
|
columns/types are explicit errors, not invented compatibility.
|
|
|
|
Independent validation:
|
|
tools/generate_engine_discovery_tables.py reads original ELF relocations and
|
|
immutable rodata facts; it does not execute the driver.
|
|
tools/check_engine_discovery_binary.py executes original x86 instructions only
|
|
inside isolated Unicorn memory with initialized engine tables and original
|
|
rodata. It verifies408 translation,13 PBDMA-list,84 GR fault-range,192 DATA
|
|
entry and3 full-record CE-normalization cases. It also checks25 device-class
|
|
and16 RM-type lookup cases. Diagnostics, max-subcontext HAL and512-bit scratch
|
|
bitvector helpers are intercepted with deterministic mocks. No native target
|
|
code, physical GPU or original kernel-driver execution is involved. The full
|
|
constructor, allocation and GPU-state prerequisites are not emulated by this
|
|
oracle; checked chain decoding is supported by REA and focused register tests.
|
|
See engine-discovery-binary.json and generated engine_discovery_vectors.rs.
|
|
The expanded original-setter instruction oracle verifies24 selected bindings
|
|
in channel-bindings-binary.json, including the discovery callbacks above.
|
|
Eight focused tests cover oracle vectors, metadata, DATA decoding, complete
|
|
normalized record bytes, actual read order and fault stop, chain/route errors,
|
|
input buffer/count validation and ordered PBDMA/engine reference reads.
|
|
|
|
Concrete remaining transitive work:
|
|
Implement original constructor GPU/access/attachment prerequisites and owned
|
|
engine-cache allocation/publication; SOFTWARE-row source-route selection and
|
|
success/failure lifetime; permissive unknown/nonhost engine policy; remaining
|
|
opaque column15 semantics and other architecture/runtime layouts. The current
|
|
chain decoder rejects malformed/nonhost/unknown metadata instead of continuing
|
|
past original diagnostic assertions or permissive policy. Hardware-only
|
|
snapshots are not passed off as a completed cache with SOFTWARE row.
|
|
For complete channel quiescence/submission still need owned channel/group state,
|
|
real scheduling/locks, power constraints, NON-replayable fault servicing/deferred
|
|
actions and restart/doorbell protocols. Topology facts and a clear reference
|
|
snapshot do not establish GPU/CUDA readiness. No root/lifetime/VM/status files
|
|
were changed in this discovery phase.
|