Files
nvdriver/reports/rmapi-slice4-validation.json
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

210 lines
13 KiB
JSON

{
"scope": "RM API slice 3c (information controls behind original stage bodies: the engine list) and slice 4 (VA spaces: 0x90f1, 0x801806, 0x503c with 0x503c0102/0x503c0103, dependant invalidation), CPU-side state only",
"date": "2026-11-19",
"original": {
"object": "nv-kernel.o_binary 580.178.04",
"sha256": "5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b"
},
"not_run": "nothing was run against libcuda, a CUDA program, any /dev/nvidia* node of the original driver, or a GPU; no bind, reset or module load outside tools/validate_all.sh",
"oracle": {
"kind": "instruction emulation of the original (Unicorn), tools/check_rmapi_binary.py",
"tool_sha256": "208bf90f3e09d25a3dee2bc9813c99677e4136c226e2233fb4affe9f48668d10",
"slice1_record": {
"path": "target/rmapi/original-rmapi.txt",
"sha256": "354d1f9244060af687c581637c45b9e2a4ac9ea9fad965ffd1d5a3485baa2a52",
"unchanged": true
},
"gpu_record": {
"path": "target/rmapi/original-rmapi-gpu.txt",
"sha256": "da1bc7fc0f56645f64d5b54abf46a3a40cd2bf9957d8cc406c81a5fa89b6d67a",
"cases": 11,
"operations": 1016,
"earlier_cases_unchanged": "the text of the first three cases still has SHA-256 0bca0a5d351dd9b2b7f18c48d4c02384f7be7afa33f013a00f30ce3a72f59982 (slice 3 report)",
"regenerated_identically": "--check run twice after generation"
},
"changes": [
"GpuSequence.stage: original stage bodies run on the constructed GPU as the stage wrappers call them; registers on demand from the case or the transcript's first read; writes recorded, not applied; every status must be 0",
"stage bodies in recorded cases: OBJCE StatePreInitLocked _nv019109rm, KernelCE StateInitLocked _nv039835rm, OBJCE StateInitUnlocked _nv019107rm, OBJCE StatePreLoad _nv019113rm, KernelCE StateLoad _nv039837rm (9 instances each), KernelMemorySystem StatePreInitLocked _nv041691rm",
"six cases gpu-slice3c-* (PCE-LCE register variants), gpu-vaspace, gpu-vaspace-dependants",
"record lines engine-table (the static table of _nv031235rm with the NV2080 type of _nv030671rm), stage, stage-reads, stage-writes, peeks of OBJCE+0x488",
"new fixtures: os_delay_us, os_get_monotonic_tick_resolution_ns, data symbol os_page_size = 0x1000 (reset to 0 for every other case)",
"the oracle asserts that no 0x90f1 allocation and no control of the VA-space case reads or writes a register"
],
"rust_comparison": "rmapi::gpu_tests::original_gpu_object_record: 439 allocations, 260 frees, 307 controls, 10 fd registrations, 217 peeked words, 17 class and engine tables, 32 stage-body groups in front; 39 replies entered the control cache; nothing skipped, no mask",
"fault_injection": [
"GRCE shared bit ignored",
"PCE word not masked to four bits",
"default VA start 0x200000",
"token search ignores registered handles",
"mirrored together with externally owned accepted",
"dependants not invalidated",
"unregister drops the dependency"
],
"fault_injection_result": "each of the seven made the comparison fail; the restored sources are byte-identical to the backups and pass",
"limits": [
"the GPU is constructed and swept, not initialized; only the named stage bodies run in front",
"KernelCE StateLoad of the shim owner logs three assertions of the original (A53d, S1f.a15, A343) from the scheduling pause around the mapping update (no initialized FIFO); statuses are 0",
"KernelNvlink is removed by the sweep of this emulation, so the PCE-LCE update takes its path without an NVLink topology (no register rewrite); the traced board took the NVLink path",
"register values are first reads of the transcript of 0000:b3:00.0; for the PCE-LCE words those are the values the original itself had programmed",
"MemorySystem, KernelMemorySystem and MemoryManager InitLocked, KernelGmmu InitLocked, KernelGraphicsManager InitLocked and KernelGraphics PostLoad do not run to status 0 in this fixture",
"one GPU, one client file, no channel class: free ordering of VA spaces against channels is not executed"
]
},
"capture_replay": {
"requests_compared": 903,
"previously_compared": 823,
"requests_not_replayed": 3519,
"mask": [
{
"field": "client handles",
"treatment": "translated"
},
{
"field": "gpuFlags bit 0 (IN_USE) of 0x202/0x205",
"treatment": "masked, 216 bit differences"
}
],
"new_in_this_slice": {
"alloc 0x90f1": 32,
"alloc 0x503c": 16,
"0x503c0102": 16,
"0x20800170": 16
},
"inputs_taken_from_the_capture": "as slice 3, plus a PCE-LCE register image per GPU rebuilt from the engine mask of that GPU's own captured 0x20802a0a reply (the registers of the capture machine were not recorded); the captured engine lists (15, 14 and 11 engines) are then compared with what the model derives from it",
"notes": "the third capture holds no allocation parameters, so its 16 x 0x90f1, 8 x 0x503c and the controls on them stay unreplayed; 24 x 0x50a0 are not replayed (no constructor)"
},
"rea_readings": [
"REA Ghidra procedure_assembly _nv019120rm (copy-engine class update: stub rule, registers 0x40+4p and 0x34+4i of the shim, bit 30)",
"REA Ghidra procedure_pseudo_code _nv039835rm",
"capstone on the relocated object: _nv031235rm (engine table bounds and loop), _nv034563rm first 0x350 bytes (flag tests, static configuration read), _nv041632rm, _nv044827rm, _nv044826rm (compression page size 1 << 0x10)"
],
"implemented_in_this_slice": {
"controls": {
"0x20800170": {
"handler": "_nv057800rm -> _nv031235rm, _nv030671rm",
"producer": "rmapi::providers::kernel_ce",
"evidence": "[A] stub rule and table walk, [E] 14 requests over six register variants",
"inputs": "BAR0 0x104040..0x104060, 0x104034, 0x104038 read-only at the first open of the device node; class database; static engine table"
},
"0x801806": {
"handler": "_nv022155rm -> _nv034588rm",
"producer": "rmapi::vaspace::va_caps",
"evidence": "[E] 17 requests, [S]; compression page size [A]",
"inputs": "the address space object; GV100 format constants"
},
"0x503c0102": {
"handler": "_nv059454rm",
"producer": "rmapi::vaspace::P2p::register",
"evidence": "[E] 25 requests, [S]",
"inputs": "request-time bookkeeping"
},
"0x503c0103": {
"handler": "_nv059457rm",
"producer": "rmapi::vaspace::P2p::unregister",
"evidence": "[E] 9 requests, [S]",
"inputs": "request-time bookkeeping (not issued by the workload)"
}
},
"classes": {
"0x90f1": {
"constructor": "_nv059869rm -> _nv060601rm -> _nv059856rm -> _nv034563rm",
"producer": "rmapi::vaspace::construct",
"evidence": "[E] 282 allocations in the record, [S] structure, [A] flag tests",
"inputs": "request, VA mode of the device; no register"
},
"0x503c": {
"constructor": "_nv059452rm",
"producer": "rmapi::vaspace::p2p_type",
"evidence": "[E] 14 allocations, [D], [S]",
"inputs": "request"
}
},
"server": "dependant invalidation (status 0x6e, RESOURCE_LOST) in rmapi::server, [E]",
"workload_commands": {
"total": 68,
"implemented": 34,
"unavailable": 34,
"unavailable_needing_engine_state": 25,
"unavailable_needing_later_object_classes": 9
}
},
"not_done": [
"slice 3c: of the 28 commands only 0x20800170 is implemented. 0x20802a0a (capability bits not read, NVLink-dependent), 0x20800102, 0x801307, 0x20801803, 0x20801303, 0x20801823, the six KernelGraphics commands, 0x20803801, names, UUID, compute policy, ECC, NVLink, P2P and perf stay unavailable; section 8.3 of the notes gives what each experiment established",
"the NVLink auto-configuration of the PCE-LCE mapping (_nv039739rm and its table) is not implemented: the engine list follows the registers as found",
"0x50a0 (NV50_MEMORY_VIRTUAL) and the VA range allocator: not implemented; executed once exploratorily (notes 9.1)",
"page-directory commit and revoke (0x801813, 0x801814, rm_gpu_ops set/unset page directory): bodies not read; the Rust side stops at the trait vaspace::PageDirectory, which has no implementation",
"0x90f1 controls (0x90f10101..0x90f10108) and control privilege in the server",
"free ordering of VA spaces against channels",
"vaSize together with allocation flag 0x4 or 0x80, and the default space of a device made with VA flags: answered 0x56",
"NV_ESC_NUMA_INFO on the device node (open since slice 3b)"
],
"kernel": {
"nodes": "unchanged: /dev/nvidia-rs-rmapi-ctl and /dev/nvidia-rs-rmapi-gpu<minor>",
"registers_read_on_hardware": {
"0x1373a0, 0x21c04": "as before",
"0x104040, 0x104044, 0x104048, 0x10404c, 0x104050, 0x104054, 0x104058, 0x10405c, 0x104060": "PCE2LCE_CONFIG(0..8)",
"0x104034, 0x104038": "GRCE_CONFIG(0..1)"
},
"when": "once per bound GV100, at the first open of its device node, under the node mutex, through nv_rs_pci_read32; if any of the 13 reads fails none is delivered (class list and engine list answer 0x56); a PCE-LCE word with the pattern 0xbadxxxxx makes the engine list answer 0x56",
"registers_written": "none",
"registers_read_at_control_time": "none",
"never_executed_on_a_real_gpu": "the reader path ran only against the guest's fixture reader",
"shared_files_edited": [
"kernel-open/nvidia/rmapi_node.c (array bound 4 -> 16 and a comment)",
"src/nvidia/kernel/rmapi_node.rs (register list from node::ATTACH_REGISTERS)",
"tests/vm/edu_adapter_test.c (fixture reader answers the eleven PCE-LCE offsets)",
"tools/vm/guest_results.py and tests/vm/test_result_gate.py (expected assertion count 313 -> 335)"
]
},
"guest": {
"assertions_per_module_load": 335,
"previously": 313,
"new": "engine list (15 engines), the two address spaces of the workload, refused flags, index 3, wrong parent, VA capabilities (three handle cases), ThirdPartyP2P with registration, duplicate, invalidation through a freed VA space (0x6e) and the later free"
},
"validate_all": {
"script": "tools/validate_all.sh",
"runs": [
{
"result": "29 of 30 PASS",
"failed": "clippy: findings only in src/nvidia/src/uvm/va_space.rs and va_space_tests.rs (another agent's files, mid-edit); no finding in rmapi files"
},
{
"result": "30 of 30 PASS, tests passed 700 failed 0",
"note": "rerun after the fault-injection check, with the rmapi sources byte-identical to the first run"
}
],
"module_sha256": {
"kernel-open/nvidia_rs.ko": "42f120634e19ddafac484f40b6daf0edbd14214746870790f2d2f273b0862939",
"target/vm-module/nv_rs_edu_test.ko": "917b6b57051956cf0273e067cea08cedb90221710b9826fb8c49e43a6aba6ae1"
},
"vermagic": "5.15.0-203-generic SMP mod_unload modversions",
"also_run": [
"tools/generate_rmapi_tables.py --check",
"tools/generate_rmapi_class_db.py --check",
"tools/check_rmapi_binary.py --check",
"rmapi::oracle_tests, rmapi::gpu_tests, rmapi::replay_tests with --include-ignored"
],
"caveat": "the module contains whatever the other agents' files held at build time; the live step loads it on the host but opens no RM API node"
},
"source_sha256": {
"src/nvidia/src/rmapi/vaspace.rs": "2733ddab76fdd4c4873d5c5a932c03d13e819823b2731fbcf9ac9d0dba2d48e4",
"src/nvidia/src/rmapi/providers/kernel_ce.rs": "7c3e71f94b6006e424b7c826dff3b23de4d06faf464179b37605c2edc1875738",
"src/nvidia/src/rmapi/providers/class_db.rs": "029a229ac167108814c2ee062df3154997968743aaf5e5c343889ea00edd0a5b",
"src/nvidia/src/rmapi/providers/mod.rs": "841d691294043fe27edf369191730502858da0085d5ac3b4dfcf435ffff38f4d",
"src/nvidia/src/rmapi/gpu.rs": "8dde5e7a0c82e35e595933465ac4f9db4e7e2ab38fc1e2a0ea408e1942954cf0",
"src/nvidia/src/rmapi/server.rs": "3ce1769407610def6be22cb33ecdde5c4b2f97a32fd0b5e78560018f4190ab68",
"src/nvidia/src/rmapi/node.rs": "1e244357c242be9777c5c6542e168379e66ed8598f76d5c04c84fbb90dd1a60d",
"src/nvidia/src/rmapi/status.rs": "ed0c5cf5a2223dd51bf7f7388d01a63cf02b7482d3c6beb8bc7b3a1e832caad8",
"src/nvidia/src/rmapi/mod.rs": "8d83509c8d9c7abd9743f9c9a23a092c075ee184daf195b1af14ec6d85a44662",
"src/nvidia/src/rmapi/gpu_tests.rs": "f9ed1cebf8f938daf324f0e7f12f0890e658c7a5f0306c8af1e5794f9afca0dc",
"src/nvidia/src/rmapi/replay_tests.rs": "313c7b609afd825099f25b0c4cdc8427a059d7e7b234662f867857c1f3ee42f6",
"src/nvidia/kernel/rmapi_node.rs": "bb6f0a026917402c1ed12d17b9db9e216ab8a1e406415a2b0e754a26a9581e4e",
"kernel-open/nvidia/rmapi_node.c": "98f1a8286f6f44017e7ffa07c36b3019cab41561afc52033773a1b69c92fb67f",
"tests/vm/rmapi_user_test.c": "303314b2e361c51a95b1f1bd16eb457eb71211c75a151140cc70ae5f1fd025fd",
"tests/vm/edu_adapter_test.c": "99292c9e8605c992a8c9fcc35349deebd1ddc35dba077943c3ba12afbb655655",
"tools/vm/guest_results.py": "635da29855ea556f8ba6f6d4fdaebce83fa74df67dc3d7bc4ef24bfe88562ce3",
"tests/vm/test_result_gate.py": "653dbf2cd19bfbe8d91c832cfdf9f9153c88a7b95ef7cdc02182537dad266b18",
"analysis/closed-driver-580/rmapi-implementation-notes.md": "a7c7acac23cdc765a890f85b1bfd1caa350f39eef38bc4d7186326c09a773b53"
},
"status_names": "rmapi::status::ILLEGAL_ACTION was 0x17; it is now 0x16 (NV_ERR_ILLEGAL_ACTION) and 0x17 is IN_USE (NV_ERR_IN_USE), per nvstatuscodes.h. The two users of the old name (node::register_fd and its unit test) now use IN_USE: the value NV_ESC_REGISTER_FD returns (0x17, as the oracle records) is unchanged, no oracle record and no test expectation changed. 0x16 is new in this slice: the original returns it for a mirrored VA space."
}