mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 22:48:43 +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
139 lines
14 KiB
JSON
139 lines
14 KiB
JSON
{
|
|
"scope": "GV100 KernelBus InitLocked BAR2 bring-up: the kernel half _nv039592rm of the class body _nv039595rm, from the default PRAMIN window to the end of the BAR2 pattern test, as core mmu::bar2_setup",
|
|
"original_artifact_sha256": "5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b",
|
|
"function_chain": {
|
|
"KernelBus InitLocked": "wrapper _nv003764rm -> class body _nv039595rm -> _nv039592rm, then KernelBus+110 _nv039594rm, which calls the function at +de0 of the GPU+1ec0 object (not examined)",
|
|
"_nv039592rm": "KernelBus+3e0 _nv039556rm (default window), KernelBus+400 _nv039463rm (BAR2 init), KernelBus+408 _nv039656rm (pattern test)",
|
|
"_nv039463rm": "KernelBus+1d0 _nv039563rm (maps rmApertureLimit+1 bytes of BAR2), +140 _nv039566rm (GPU VA space), +178 _nv039325rm (commit)",
|
|
"_nv039566rm": "+3f0 _nv039562rm and +3f8 _nv039541rm (window before and after), +160 _nv039455rm (VA limit), +158 _nv039445rm and +150 _nv039447rm (level sizes), walker _nv046237rm, _nv046252rm (reserve), _nv046260rm (sparsify) with the callbacks of _nv029065rm: _nv012114rm level allocation, _nv012116rm root update (-> +428 _nv039472rm instance block), _nv012117rm directory entry, _nv012113rm fill; PRAMIN accessor _nv039504rm",
|
|
"_nv039325rm": "+418 _nv039307rm (bind), _nv039475rm (page-level mapping -> +138 _nv039638rm with entry callback _nv013924rm, flush _nv039553rm -> OBJBUS+268 _nv018613rm, invalidate _nv040843rm -> KernelGmmu+160 _nv040639rm, +168 _nv040663rm, +170 _nv040941rm), +1c0 _nv039577rm (flush pointer)",
|
|
"placement": "_nv044065rm puts the BAR1 and BAR2 instance blocks at offsets 0 and 0x1000 of reserved memory; _nv044075rm places directories and tables behind them; _nv043997rm adds MemoryManager+488 (reserved base) to the instance block and _nv039566rm adds it to the directory and table bases",
|
|
"teardown": "_nv039358rm (destroy) -> KernelBus+1d8 _nv039604rm, whose last accesses are read 0x1714, write it with bit 31 clear, read it again"
|
|
},
|
|
"what_determines_each_address": {
|
|
"instance_block_0x7fffa1000": "reserved base + 0x1000 (second instance block slot; pseudocode of _nv044065rm and _nv043997rm, public memmgrPreInitReservedMemory_GM107)",
|
|
"page_directory_0x7fffa2000": "reserved base + 0x2000, rounded to a page: _nv044075rm, executed",
|
|
"page_tables_0x7fffa6000": "directory base + 4 directory pages (root and three lower levels for a space below 512 MiB): _nv039445rm and _nv044075rm, executed",
|
|
"table_count_81": "ceil((visible bytes + hidden bytes) / 2 MiB) = ceil(0xa091000 / 0x200000): _nv039447rm, executed",
|
|
"va_limit_0xa090fff": "cpuInvisibleLimit when above cpuInvisibleBase, else cpuVisibleLimit: _nv039455rm, executed. The hidden range itself is computed by _nv039317rm/_nv039316rm from fault-buffer and FIFO sizes and is an input here (bar2::HiddenDemand models it)",
|
|
"page_level_mapping_0xfaa000": "85 pages mapped top down below the last page of the 16 MiB RM aperture: public kbusMapBar2ApertureCached with FORCE_MEM_GROWS_DOWN and the allocation range ending one page early. Fixture policy, confirmed by the transcript (entries at 0x7fffadd50) and the full trace",
|
|
"flush_page_va_0xfa9000": "next persistent mapping below; confirmed by BAR2 reads at 0xfa9000 in the full trace",
|
|
"test_page_va_0": "first non-persistent mapping from the bottom; confirmed by BAR2 writes at offset 0 in the full trace",
|
|
"reserved_base_0x7fffa0000": "MemoryManager+488, set by _nv043997rm from framebuffer and reserved sizes. Input; not derived here",
|
|
"default_window_0x7fff00000": "MemoryManager+830 megabytes minus 1 MiB on the branch taken by the fixture; other branches use MemoryManager+488 or the static configuration. Input",
|
|
"flush_page_and_test_page": "framebuffer pages allocated by _nv039577rm and _nv039656rm through the framebuffer allocator. Inputs"
|
|
},
|
|
"implemented": [
|
|
"mmu::bar2_setup::Plan::new derives VA limit, directory and table counts, the offsets of _nv044075rm, the absolute bases and the BAR2 offsets of the three mappings.",
|
|
"set_default_window, setup_gpu_va_space, commit, verify, init_locked (all four in original order), unbind and teardown perform the accesses through the Io trait (BAR0 read32/write32, BAR2 read32/write32, write-combine flush, timeout start/check, level-2 cache service) and the existing pramin::Window cache, which gained base() and set_base().",
|
|
"Reused encoders: ramin::encode_pdb (page directory base words), bar2::encode_bind (0x1714), encode_pte (mapped entries), pramin::Window (039394/039556 window cache and the two read-modify-write stores)."
|
|
],
|
|
"evidence": [
|
|
{
|
|
"evidence_category": "instruction emulation",
|
|
"harness": "tools/check_gpu_bar2_setup_binary.py",
|
|
"what_ran": "The whole original object is loaded and relocated; _nv039592rm runs to completion with binder-selected KernelBus, KernelGmmu, MemoryManager, KernelMemorySystem and OBJBUS tables and the original page-table format construction. _nv044075rm supplies the level offsets, _nv039604rm the teardown tail.",
|
|
"original_functions_executed_on_one_small_case": 126,
|
|
"cases": 175,
|
|
"cases_by_kind": {
|
|
"v100": 1,
|
|
"layout": 80,
|
|
"default": 3,
|
|
"aperture": 6,
|
|
"large": 1,
|
|
"bind": 18,
|
|
"flush": 16,
|
|
"mmu": 25,
|
|
"verify": 17,
|
|
"pages": 3,
|
|
"teardown": 5
|
|
},
|
|
"cases_with_nonzero_original_status": 10,
|
|
"oracle": "target/gpu-stage/original-bar2-setup.txt",
|
|
"oracle_sha256": "a1071cf7757dc976e44178343f0598c3f38137eb8063b5420b12eb2da32878dd",
|
|
"oracle_regenerates_identically": true,
|
|
"comparison_test": "mmu::bar2_setup::tests::compare_original_bar2_setup (ignored; NV_RS_BAR2_SETUP_ORACLE)",
|
|
"comparison_result": "175 cases: layout words equal in all 170 setup cases; 159 cases run to the original's end with every access equal, 16 stop early at the original's failing check with every access up to there equal; 1,126,162 accesses compared",
|
|
"fixture_supplied": "register values with a PRAMIN/framebuffer model, BAR2 memory translated through the tables just written, allocation, fill and copy, diagnostics, timeout start/check and thread reset, multi-GPU loop helpers, calling-context query, device ownership helper _nv014074rm, PCI mapping, framebuffer allocation addresses, the level-2 cache service _nv041683rm, and the BAR2 mapping cache (map: original _nv039638rm at the address the public code picks; unmap: write-combine flush and the original flush; descriptor destruction: original _nv039638rm in sparsify mode)",
|
|
"covered_variation": "five reserved bases including ones that are not 64 KiB aligned, contiguous and separated hidden ranges, window register and cache states, apertures of 1 to 16 MiB with equal limits, a 512 MiB space whose tables leave the 1 MiB PRAMIN window and whose page-level mapping spans two tables, bind/flush/invalidate status sequences with timeout statuses, a corrupted value at each PRAMIN and BAR2 read of the test, three placements of the two pages"
|
|
},
|
|
{
|
|
"evidence_category": "original-driver observation compared with replacement model",
|
|
"transcript": "target/trace/b3-bar0.txt",
|
|
"transcript_sha256": "348f232f9604a06b86b9d8574e6a3883e4cecc2e727ee3cf25aa593d76c055be",
|
|
"test": "mmu::bar2_setup::tests::reproduce_physical_v100_transcript (ignored; NV_RS_B3_BAR0_TRACE)",
|
|
"lines_compared": "107728-138655 (30,928 lines: 30,926 accesses and 2 loss markers)",
|
|
"requested_lines_107728_to_138514": "30,785 accesses, all equal in offset, value, direction and order",
|
|
"result": "30,821 accesses equal. The remaining 105 are three runs of the memory-system level-2 cache service (35 accesses each: 0x12006c, two LTC broadcast writes, sixteen reads after each), which the executor requests through Io::l2_invalidate_evict and the test only checks for shape. No mismatch.",
|
|
"lost_event_gaps": "Exactly two, at the markers of lines 113897 and 114752; the executor predicts 52,164 and 828 accesses there, equal to the counts the tracer reports lost. The first gap holds 51,904 table words and the 260 words of the 65 directory entries of the hidden range.",
|
|
"predicted_bar0_accesses": 83813,
|
|
"the_original_instructions_give_the_same_result": "the harness makes the same comparison with the emulated original (30,821 equal, gaps 52,164 and 828)",
|
|
"bar2_accesses": "The 18 BAR2 accesses of the interval in the full trace (reports/original-mmiotrace-b3-first/mmiotrace.txt lines 30853165-30853348) equal the predicted ones in offset, direction and order: entry stores at 0xfb5d48 and 0xfae000, flush reads at 0xfa9000, pattern words at 0 to 0xc, entry store at 0xfae000 again. The tracer recorded no values for the three entry stores (byte copies).",
|
|
"initial_state_assumed": "window register 0x7fff0 with the original's cached base already valid; BAR2 not bound"
|
|
}
|
|
],
|
|
"attributed_and_left_out": {
|
|
"lines_74914_to_107704": "Two 64 KiB zero fills at 0x7fdf90000 and 0x7fdf80000. OBJGMMU InitLocked _nv029562rm allocates an 'MMU read' and then an 'MMU write' buffer and clears each (_nv043684rm); it precedes KernelBus in Init order. Pseudocode and register meaning only.",
|
|
"lines_107705_to_107727": "Fault-buffer registers and fuse reads before the BAR2 mapping exists (the BAR2 MAP event of the full trace follows them). KernelGmmu or OBJBUS InitLocked by order; not established.",
|
|
"level2_cache_service": "Reached through _nv041683rm, a one-call dispatch into the memory system; the function that writes 0x17e2a4/0x17e2a0 was not identified."
|
|
},
|
|
"inputs_for_0000_b3_00_0": {
|
|
"visible_limit": "0x1ffffff: 16 directory entries precede the first table fill (lines 108766-108829); public default of 32 MiB",
|
|
"hidden_base_and_limit": "0x2000000 and 0xa090fff: address limit word 0x0a090fff at line 108756 and 41,105 table entries",
|
|
"rm_aperture_limit": "0xffffff: BAR2 MAP of 0x1000000 bytes in the full trace and the page-level entries ending at index 510 of table 7",
|
|
"reserved_base": "0x7fffa0000: bind value 0xc07fffa1 (line 138314), BAR1 block 0x807fffa0 (line 165464), window 0x7fffa (line 107729)",
|
|
"default_window": "0x7fff00000: register value 0x7fff0 before and after every window move",
|
|
"verify_page": "0x7fdf7e000: window 0x7fdf7 and offset 0x70e000 at lines 138517-138521",
|
|
"flush_page": "0x7fdf7f000 is an inference (the allocator hands out descending addresses: 0x7fdf90000, 0x7fdf80000, then two pages); the trace has no value for its entry. Any owned framebuffer page works for the executor.",
|
|
"bar2_mapping": "the caller maps the first 16 MiB of BAR2 (0x39a800000000 on this machine) before commit"
|
|
},
|
|
"teardown": {
|
|
"original": "_nv039604rm reads 0x1714, writes the value with bit 31 clear (physical mode), reads it again; before that it releases the page-level mapping, the flush pointer and every cached mapping and unmaps BAR2. Public kbusTeardownBar2GpuVaSpace then unmaps and releases the page levels through the BAR0 window, and StateDestroy selects the window at framebuffer size minus 1 MiB. Only the 0x1714 tail was executed (5 cases).",
|
|
"executor": "teardown(): the 0x1714 tail, then the default window with the cached base dropped first. Framebuffer contents are left in place; the original clears the root, rewrites the instance block and every directory and table entry on its next setup."
|
|
},
|
|
"deviations_from_the_original": [
|
|
"Page-table entries written through BAR2 are two 32-bit stores; the original copies eight bytes.",
|
|
"A flush or invalidate timeout stops the executor with an error; the original logs it and continues. A bind timeout stops both.",
|
|
"GPU state checks inside the polling loops (in reset, detached) are not modelled; the caller guarantees an attached GPU.",
|
|
"After a flush timeout the original reads 0x70000 twice more for its log and calls a GPU function at GPU+1a0; the executor returns at once."
|
|
],
|
|
"limits": [
|
|
"Nothing calls the executor yet: there is no kernel Io implementation and no bring-up level for it. No hardware ran this code.",
|
|
"Spaces of 512 MiB or more (a second lowest-level directory) and visible ranges that do not start at 0 are refused.",
|
|
"The mapping-cache policy that fixes the three BAR2 offsets was modelled from public source, not executed; the physical traces agree with it for the V100.",
|
|
"The level-2 cache service has no implementation. A caller without one cannot run verify() as the original does.",
|
|
"The entry written when the test mapping is released is sparse by the semantics of _nv039638rm; the full trace confirms the store but not its value.",
|
|
"reserved_base, default_window and the hidden range are inputs taken from the transcript for this GPU; their original producers (_nv043997rm, _nv039316rm) are not implemented."
|
|
],
|
|
"verification": {
|
|
"bar2_setup_tests_passed": 8,
|
|
"workspace_tests_passed": 576,
|
|
"workspace_tests_failed": 0,
|
|
"strict_clippy_and_format_passed": true,
|
|
"source_sha256": {
|
|
"src/nvidia/src/mmu/bar2_setup.rs": "9444c14df374f178c6b726b41e23d3d5dbe8611f6ad7a8ce765231f3755a7da2",
|
|
"src/nvidia/src/mmu/bar2_setup_tests.rs": "9924898280b2bd1631bec9861620fec16232adeceab562a9cd71b21765199b45",
|
|
"src/nvidia/src/mmu/pramin.rs": "d154283efefb4e51cdf6e369334ed20237fc57796b24e0685f9ce3f1625c29e3",
|
|
"tools/check_gpu_bar2_setup_binary.py": "2749596a1b921e29fa5044bc263a9c48a2e1a0f69d1589c1b7a19f2801ab744e"
|
|
}
|
|
},
|
|
"correction_2026_11_19_hal_bindings": {
|
|
"date": "2026-11-19",
|
|
"cause": "reports/gv100-engine-hal-bindings-correction.json: argument conventions of the binders and property initializers established from their callers",
|
|
"change": "The harness ran the parent-class binder _nv005997rm on OBJBUS+0. Its caller (_nv005726rm, from the creator _nv006625rm) passes the sub-object OBJBUS+e8, so the five slots belong at +f8..+118, not +10..+30. The call now passes OBJBUS+e8. The harness was also rerun against the regenerated bindings report.",
|
|
"harness": "tools/check_gpu_bar2_setup_binary.py",
|
|
"harness_sha256_after": "d8da871f251838c7fdc7b5cb349dee039a2d5c7eeb5a5628d355c7adc390ee9c",
|
|
"oracle": "target/gpu-stage/original-bar2-setup.txt",
|
|
"oracle_sha256_before": "a1071cf7757dc976e44178343f0598c3f38137eb8063b5420b12eb2da32878dd",
|
|
"oracle_sha256_after": "a1071cf7757dc976e44178343f0598c3f38137eb8063b5420b12eb2da32878dd",
|
|
"oracle_changed": false,
|
|
"bindings_report_sha256": "8fbaef939de28a5295ac8cb81cebed21ff9a0310afaff0fabe004978ef1c2386",
|
|
"rust_sources_changed": false,
|
|
"comparison_tests_passed_after": [
|
|
"mmu::bar2_setup::tests::compare_original_bar2_setup",
|
|
"mmu::bar2_setup::tests::reproduce_physical_v100_transcript"
|
|
],
|
|
"harness_sha256_before": "2749596a1b921e29fa5044bc263a9c48a2e1a0f69d1589c1b7a19f2801ab744e"
|
|
}
|
|
}
|