{
  "url": "https://github.com/QuixiAI/nvdriver",
  "title": "GitHub - QuixiAI/nvdriver",
  "siteName": "GitHub",
  "leadImage": "https://private-user-images.githubusercontent.com/1117701/722513707-a8c2c70c-a365-4ad2-a738-7e89e749555e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTYwNzAzODIsIm5iZiI6MTc5NjA3MDA4MiwicGF0aCI6Ii8xMTE3NzAxLzcyMjUxMzcwNy1hOGMyYzcwYy1hMzY1LTRhZDItYTczOC03ZTg5ZTc0OTU1NWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMzBUMjAyMTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGMwOTliZmU4ZWViYzc4ZDA4MjQxMjIxZmI0MTU3ZDVkNWU2ZjlhNmNkMzYxNjQzYTAxOWUxMjhjMDFkM2U2YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.QiBSURCNqCQxp6LTkBsmvvxQM6146eoIjfkwLYdG6yY",
  "wordCount": 2166,
  "readingTimeMinutes": 10,
  "cacheStatus": "HIT",
  "markdown": "# GitHub - QuixiAI/nvdriver\n\n[![image](https://private-user-images.githubusercontent.com/1117701/722513707-a8c2c70c-a365-4ad2-a738-7e89e749555e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTYwNzAzODIsIm5iZiI6MTc5NjA3MDA4MiwicGF0aCI6Ii8xMTE3NzAxLzcyMjUxMzcwNy1hOGMyYzcwYy1hMzY1LTRhZDItYTczOC03ZTg5ZTc0OTU1NWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMzBUMjAyMTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGMwOTliZmU4ZWViYzc4ZDA4MjQxMjIxZmI0MTU3ZDVkNWU2ZjlhNmNkMzYxNjQzYTAxOWUxMjhjMDFkM2U2YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.QiBSURCNqCQxp6LTkBsmvvxQM6146eoIjfkwLYdG6yY)](https://private-user-images.githubusercontent.com/1117701/722513707-a8c2c70c-a365-4ad2-a738-7e89e749555e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTYwNzAzODIsIm5iZiI6MTc5NjA3MDA4MiwicGF0aCI6Ii8xMTE3NzAxLzcyMjUxMzcwNy1hOGMyYzcwYy1hMzY1LTRhZDItYTczOC03ZTg5ZTc0OTU1NWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMzBUMjAyMTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGMwOTliZmU4ZWViYzc4ZDA4MjQxMjIxZmI0MTU3ZDVkNWU2ZjlhNmNkMzYxNjQzYTAxOWUxMjhjMDFkM2U2YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.QiBSURCNqCQxp6LTkBsmvvxQM6146eoIjfkwLYdG6yY)\n\n**`nvdriver` (`nvidia_rs.ko`) is a clean-room, open-source `#![no_std]` Rust Linux kernel driver for NVIDIA GPUs** — built to be a drop-in replacement for NVIDIA's proprietary kernel driver while giving you back full control of the hardware you own. It works out of the box with unmodified NVIDIA userspace (`CUDA`, `PyTorch`, `cuDNN`, `NCCL`, `llama.cpp`, `nvidia-smi`, `NVENC`/`NVDEC`) and unmodified stock companion modules (`nvidia-uvm.ko`, `nvidia-modeset.ko`, `nvidia-drm.ko`), without reproducing the artificial software locks NVIDIA ships in its closed driver. That means PCIe & BAR1 P2P across consumer and datacenter GPUs, Resizable BAR1 enabled by default, GPUDirect RDMA, unlocked NVENC sessions, no vGPU/hypervisor/CSP allowlists, and native support for pre-GSP architectures (Maxwell, Pascal, Volta) alongside modern Turing–Blackwell–Rubin GSP-RM GPUs. On **Tesla V100 (GV100)** cards, `nvdriver` also unlocks HBM2 memory clocks to **1107 MHz (V100S factory spec, +26.2% memory bandwidth, `1,041.7 GB/s` per card / `8.33 TB/s` across 8× V100)** alongside dynamic P0 boost (`1290 MHz` all-bin stable default / `1425 MHz` golden-bin OC, `1380 MHz` XBAR, and a 1 Hz on-die thermal guard) and live hardware `nvidia-smi` telemetry — made possible by the pioneering hardware research of **[arikamidotnet](https://github.com/arikamidotnet)** and **[FBR-ROM/FBR-RAM-Downloader](https://github.com/FBR-ROM/FBR-RAM-Downloader)**.\n\n* * *\n\n## Why `nvdriver`?\n\n-   **Drop-In Compatibility:** Runs unmodified `libcuda.so`, `libnvidia-ml.so`, `nvidia-smi`, `libnvidia-encode.so`, `libnvcuvid.so`, PyTorch, cuDNN, NCCL, and `llama.cpp` — plus unmodified stock `nvidia-uvm.ko` and `nvidia-modeset.ko` / `nvidia-drm.ko` via exact `CONFIG_MODVERSIONS` bridges.\n-   **Unlocks Artificial Software Restrictions:** Removes NVIDIA's closed-driver product-tier and chipset gates — enabling **PCIe & Dynamic BAR1 P2P** (`RMDynBar1P2PEnable=1` + `RMDisableFeatureDisablement=1`, including optional PCIe P2P Atomics), **Resizable BAR1** by default, **Native Linux `dma-buf` + `P2PDMA` / GPUDirect RDMA**, unrestricted **NVENC** sessions/telemetry, **CMP Mining Card Full Compute Unlock** (`CMP 100-210`, `170HX`, `90HX`, `70HX`, `50HX`, `40HX`, `30HX`), **Ada Lovelace SM Speed-Select Tensor Unlock** (`unlock_ada_tensor=1`), **Unprivileged Hardware Profiling** (`unpriv_profiling=1` default for non-root `ncu`/`nsys`/CUPTI), **Zero-Reboot Dynamic ECC Toggle** (`disable_ecc=1`), and **vGPU / SR-IOV** without CPUID or GRID licensing timers.\n-   **+26.2% Tesla V100 Memory Bandwidth Out of the Box (`1,041.7 GB/s` / `8.33 TB/s` on 8× V100):** Safely raises GV100 HBM2 clocks from the stock `877.5 MHz` cap to **`1107.0 MHz`** (`v100_hbm_ndiv=82`, V100S factory spec) with dynamic P0 boost (`1290 MHz` all-bin stable GPC / `1380 MHz` XBAR + 1 Hz thermal guard, `1425 MHz` configurable), live runtime-writable sysfs clocks (no module reload), per-partition lock verification, automatic rollback on error, and clean restore on unload — thanks to **[arikamidotnet](https://github.com/arikamidotnet)** and **[FBR-ROM/FBR-RAM-Downloader](https://github.com/FBR-ROM/FBR-RAM-Downloader)**.\n-   **Live Hardware Telemetry (`nvidia-smi` / NVML + Native Linux `/sys/class/hwmon`):** Exposes per-GPU Linux `hwmon` sensors (`temp1_input`, `power1_average`, `in0_input`, `gpc_clock_mhz`, `mem_clock_mhz`, `gpu_util_pct`, `mem_util_pct` for `lm-sensors`, `btop`, `nvtop`, and Prometheus `node_exporter`) alongside NVML/RMAPI telemetry (PROM BIT VBIOS version `88.00.80.00.01`, hardware `NV_PPWR_PMU_IDLE_COUNT` GPU & memory utilization counters `0x2080a097` / `0x20802087`, and PMGR I2C INA3221 power probe).\n-   **x86\\_64 & ARM64 / SBC PCIe Support (`ARCH=arm64`):** Builds for both `x86_64-unknown-none` and `aarch64-unknown-none` (`-C target-feature=-neon,-fp-armv8`) with explicit non-coherent DMA cache sync (`dma_sync_single_for_cpu`/`device`) for ARM64 PCIe boards (RK3588, Ampere Altra, Apple Silicon Linux).\n-   **Maxwell Through Blackwell & Rubin in One Driver:** Supports pre-GSP GPUs (Maxwell, Pascal, Volta) natively in Rust alongside Turing, Ampere, Hopper, Ada Lovelace, Blackwell (`620.70.06` GSP-RM default, `580` compat), and Rubin (`GR100`).\n-   **Built in `#![no_std]` Rust with Strict Kernel Hygiene:** Pure `#![no_std]` Rust core statically linked into a minimal Linux C shim, passing a `10/10` kernel ABI audit (zero GOT relocations, zero SIMD/x87, zero `memcpy`/`memset`/`memmove`, zero unwind sections, every stack frame `<= 1,024` bytes).\n-   **Verified on Real 8-GPU Hardware:** Battle-tested side-by-side against stock NVIDIA `580.178.04` on **8× physical Tesla V100-SXM2-32GB (256 GiB VRAM)** — passing 77/77 CUDA Parity Suite checks, 8-GPU PyTorch/NCCL `AllReduce` (`59.71 GB/s` BusBW, `max_err = 0.0`), 8-GPU `8.33 TB/s` HBM2 STREAM Triad, multi-GPU FP16/FP32 GEMM & `llama.cpp`, 25.781 Gbps NVLink 2.0, H.264/HEVC NVENC & NVDEC, S3/S4 suspend/resume, and automatic Xid 31 fault recovery with clean module unload.\n\n* * *\n\n## Performance vs. Proprietary NVIDIA `580.178.04` (Tesla V100-SXM2-32GB)\n\n### Single-GPU & 2-GPU NVLink Head-to-Head (Identical VFIO VMs, `0000:b2/b3:00.0`)\n\n| Benchmark | Proprietary `580.178.04` | **`nvdriver` (Default)** | Delta |\n| --- | --- | --- | --- |\n| **PyTorch STREAM Triad** (768 MiB) | `821.85 GB/s` | **`1,041.72 GB/s`** | **+26.8% (>1 TB/s!)** |\n| **HBM2 D2D Copy** (512 MiB) | `819.01 GB/s` | **`1,013.65 GB/s`** | **+23.8%** |\n| **FP16 Tensor Core GEMM** (8192³) | `97.69 TFLOPS` | **`107.17 TFLOPS`** | **+9.7%** |\n| **FP32 GEMM** (8192³) | `14.18 TFLOPS` | **`14.37 TFLOPS`** | **+1.3%** |\n| **Memory-Bound LayerNorm + GELU** | `2.612 ms` | **`2.126 ms`** | **1.23× faster** |\n| **`llama.cpp` Prompt Eval (`pp512`)** | `31,067 tok/s` | **`34,884 tok/s`** | **+12.3%** |\n| **Transformer Layer Fwd + Bwd** | `13.245 ms` | **`12.885 ms`** | **+2.7% faster** |\n| **CUDA Graph 50-op Replay** | `76.17 µs` | **`80.20 µs`** | **95.0% parity** |\n| **PCIe Pinned H2D / D2H** (256 MiB) | `12.39 / 13.16 GB/s` | **`12.40 / 13.16 GB/s`** | **100% parity** |\n| **2-GPU NVLink 2.0 `NV2` Bidir / Unidir** | `94.0 / 48.1 GB/s` | **`96.98 / 48.49 GB/s`** | **+3.2% (25.781 Gbps)** |\n\n### Bare-Metal 8× Tesla V100-SXM2-32GB (`geodd03`, 256 GiB VRAM)\n\n| Workload | Measured on `nvidia_rs.ko` |\n| --- | --- |\n| **8× V100 HBM2 STREAM Triad (`1107 MHz`)** | **`8,334.1 GB/s` (`8.33 TB/s`)** aggregate (`1,041.3–1,041.9 GB/s` per GPU) |\n| **8-GPU PyTorch/NCCL `AllReduce` (FP16 256 MiB)** | **`59.71 GB/s` BusBW** (`34.12 GB/s` AlgBW, `max_err = 0.0`) |\n| **8-GPU PyTorch DDP Transformer (92.4M, FP16 AMP)** | **`497,072 tok/s`** (`970.8 samples/s`, **`275.4 TFLOPS`** eff., `0.0e+00` weight parity) |\n| **8-GPU Simultaneous FP16 / FP32 GEMM (`8192³`)** | **`776.14 TFLOPS` FP16 / `103.44 TFLOPS` FP32** aggregate (`1290 MHz`, `97.00–97.03 TFLOPS`/GPU; `106.8 TFLOPS`/GPU @ `1425 MHz`) |\n| **8-GPU Layer-Split `llama.cpp` (`-sm layer`, 256 GiB)** | **`30,169.8 tok/s` `pp512`**, **`492.28 tok/s` `tg128`** across all 8 GPUs |\n\nSee [docs/PARITY\\_AND\\_UNLOCKS.md](https://github.com/QuixiAI/nvdriver/blob/master/docs/PARITY_AND_UNLOCKS.md) for the complete 3-way benchmark breakdown (including stock-clock `877.5 MHz` vs. unlocked `1107 MHz` HBM2).\n\n* * *\n\n## Supported GPUs (At a Glance)\n\n| Family | Representative GPUs | Status |\n| --- | --- | --- |\n| **Volta (`GV100`)** | Tesla V100 PCIe / SXM2 16GB & 32GB, Quadro GV100, Titan V, **CMP 100-210** | **Live physical silicon verified (0-diff)** on 8× V100-SXM2-32GB (with default `1107 MHz` HBM2 + dynamic P0 boost + 25.781 Gbps NVLink 2.0) |\n| **Maxwell & Pascal** | GTX 750–1080 Ti, Titan X, Tesla M40/M60/P4/P40/P100 | **Native Rust HALs implemented & Unicorn-verified offline** _(awaiting physical silicon test)_ |\n| **Turing, Ampere, Hopper, Ada, Blackwell, Rubin** | RTX 20/30/40/50 series, T4, A100, H100/H200, L40S, B100/B200/GB200, GR100, **CMP 30HX–170HX** | **GSP-RM (`620.70.06` / `580`) + MMU V2/V3 HALs wired & verified offline** _(awaiting physical silicon test)_ |\n\nFor the full **43-chip architecture matrix**, **verified workload parity table**, and **disassembly-backed table of unlocked NVIDIA restrictions**, see **[docs/PARITY\\_AND\\_UNLOCKS.md](https://github.com/QuixiAI/nvdriver/blob/master/docs/PARITY_AND_UNLOCKS.md)**.\n\n* * *\n\n## Quick Start\n\n### Prerequisites\n\n-   Linux `x86_64` or `arm64` (`aarch64`) with kernel headers (`/lib/modules/$(uname -r)/build`)\n-   Rust toolchain with `x86_64-unknown-none` (or `aarch64-unknown-none` for ARM64/SBCs) target\n-   Existing NVIDIA userspace libraries (`libcuda.so`, `nvidia-smi`, etc.)\n\n### Build & Validate\n\n# Build nvidia\\_rs.ko and run the 30-step unit, oracle, QEMU guest & kernel-hygiene gate\nsh tools/validate\\_all.sh\n\n# ARM64 / SBC PCIe build (RK3588, Ampere Altra, Apple Silicon Linux)\nARCH=arm64 make modules\n\n# Optional: x86\\_64 Unicorn binary oracles & companion module bridges\npython3 tools/mock\\_gv100\\_diff.py\nmake uvm-bridge && python3 tools/check\\_uvm\\_symbol\\_conformance.py\nmake modeset-bridge && python3 tools/check\\_modeset\\_symbol\\_conformance.py\n\n### Install & Useful Module Options\n\nUse `./install.sh` (supports Secure Boot MOK signing) or configure `/etc/modprobe.d/nvidia_rs.conf`:\n\n```\noptions nvidia_rs pci_target=* runtime_engines=1\n```\n\nKey tunable parameters:\n\n-   `v100_hbm_ndiv=82` _(default, runtime-writable `0644`)_ — GV100 / CMP 100-210 HBM2 clock divider (`82` = `1107 MHz` V100S spec / +26.2%, `80` = `1080 MHz` / +23%, `78` = `1053 MHz` / +20%, `0` = stock `877.5 MHz`).\n-   `v100_p0_gpc_ndiv=190` _(default, runtime-writable `0644`, auto-capped to `172` / `1290 MHz` unless Level-3 HS voltage scaling succeeds)_ — GV100 dynamic P0 boost GPC NAFLL divider; can be updated live via `/sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv` without reloading the module.\n-   `v100_p0_volt_uv=0` _(default, experimental)_ — Optional GV100 LOGIC rail voltage target in µV (hard-clamped to `[800_000, 1_050_000] µV` in `<= 25 mV` steps; `0` keeps VBIOS boot voltage and caps GPC to `1290 MHz`).\n-   `unlock_ada_tensor=0` _(opt-in)_ — Pre-GSP Ada Lovelace (`AD10x` / RTX 40-series) SM Speed-Select FP32-accumulate Tensor Core unlock (`SS0 = 0x88888888`, `SS1 = 0x8`, PLM-guarded).\n-   `dyn_bar1_p2p=1` _(default)_ — Enables Dynamic BAR1 P2P (`RMDynBar1P2PEnable=1` + `RMDisableFeatureDisablement=1` + `RMForceP2PType=2`) in the GSP-RM registry alongside `EnableResizableBar=1`.\n-   `unpriv_profiling=1` _(default)_ — Allows non-root userspace CUPTI / `ncu` / `nsys` hardware performance counters (`RMRestrictProfilingToAdminUsers=0`).\n-   `disable_ecc=0` _(opt-in)_ — Zero-reboot dynamic ECC disable toggle across RMAPI, UVM, and GSP-RM without flashing InfoROM.\n-   `live_pci_irq=1` _(default)_ — Enables storm-guarded hardware MSI-X/PCI IRQ servicing across PFIFO, PGRAPH, PMU, THERM, and HUB/MMU (`live_pci_irq=0` to disable).\n-   `enable_resizable_bar=1` _(default)_ — Automatically expands BAR1 to the largest supported ReBAR aperture.\n-   `force_p2p=0x11` _(default)_ — Enables PCIe P2P Read+Write (`0x211` opts into PCIe P2P Atomics).\n-   `gsp_abi=620` _(default)_ — Selects GSP-RM `620.70.06` framing for Turing–Blackwell–Rubin (`580` for `580.178.04` compat).\n-   `system_memory_pool_retain_mb=0` _(default)_ — Trims cached system-memory pages on client close so `MemAvailable` stays accurate.\n\n### Live `/sys/class/hwmon` Telemetry & Runtime Clock Tuning\n\nEvery GPU exposes a native Linux `hwmon` sensor node (`name = nvdriver`) readable by `lm-sensors`, `btop`, `nvtop`, and Prometheus `node_exporter`, and GV100 clocks can be adjusted live without reloading `nvidia_rs.ko`:\n\n# Read live per-GPU sensors directly from sysfs (no libnvidia-ml.so required)\nfor h in /sys/class/hwmon/hwmon\\*; do\n  \\[ \"$(cat \"$h/name\" 2>/dev/null)\" \\= \"nvdriver\" \\] && \\\\\n    echo \"$h: $(( $(cat $h/temp1\\_input)/1000 ))C $(( $(cat $h/power1\\_average)/1000000 ))W gpc=$(cat $h/gpc\\_clock\\_mhz)MHz mem=$(cat $h/mem\\_clock\\_mhz)MHz util=$(cat $h/gpu\\_util\\_pct)%\"\ndone\n\n# Dynamically tune GV100 GPC NAFLL clock live (takes effect within 1 s, no reload)\necho 160 | sudo tee /sys/module/nvidia\\_rs/parameters/v100\\_p0\\_gpc\\_ndiv   # 1200 MHz\necho 172 | sudo tee /sys/module/nvidia\\_rs/parameters/v100\\_p0\\_gpc\\_ndiv   # 1290 MHz\n\n### Safe Live Testing in a Disposable VFIO VM\n\n# Single-GPU CUDA Parity Suite v19 on a VFIO-bound Tesla V100\nsudo python3 tools/vm/run\\_vfio\\_guest.py --bdf 0000:b3:00.0 --driver rust\n\n* * *\n\n## `580.178.04` Subsystem Parity & Kernel Module Suite\n\n`nvdriver` ships **4 standalone Linux kernel modules** (`nvidia_rs.ko` with integrated UVM, `nvidia_rs_modeset.ko`, `nvidia_rs_drm.ko`, and `nvidia_rs_peermem.ko`) with **100% Linux UVM ioctl parity (`73/73`)**, **2,096/2,096 RM controls dispatched**, and **899 passing Rust unit/oracle tests**:\n\n| Domain | Ported Subsystems (`src/nvidia/src/` & `kernel-open/`) |\n| --- | --- |\n| **Compute, Scheduling & Sync** | `CILP` / `GFXP` preemption (`cilp_preempt.rs`), Persisting L2 `EVICT_LAST` (`l2_cache.rs`), Explicit Sync `dma_fence` timelines `0x00da` (`sync_timeline.rs`), NVIDIA MPS (`UVM_REGISTER_MPS_*`), Async CE VRAM/ECC Scrubber (`mem_scrub.rs`) |\n| **Memory, UVM & P2P** | 100% Linux UVM ioctls (`73/73`), Linux HMM / SVA-ATS (`uvm/hmm.rs`), Thrashing/Prefetch heuristics (`uvm/perf_heuristics.rs`), Access Counter Notify Buffer `0xc365`, Native `dma-buf` P2PDMA (`NV_ESC_EXPORT_TO_DMABUF_FD`), `nvidia_rs_peermem.ko` |\n| **Telemetry, Debug & Reliability** | HWPM (`0x90cc`/`0xb0cc`/`0xb1cc`/`0xb2cc`) & `cuda-gdb` (`0x83de`/`0x83df`) + 13 `UVM_TOOLS_*` ioctls, SPI/PROM InfoROM (`inforom_spi.rs`), ECC Poison Xid 94/95 containment (`ecc_poison.rs`), RC Watchdog (`rc_watchdog.rs`), FECS Ctxsw Timeout Dump (`ctxsw_dump.rs`), GSP CrashCat decoder (`crashcat.rs`), stock `NVRM: Xid` logs, full `/proc/driver/nvidia/` tree |\n| **Power, Thermals & Interconnect** | Full PMU task stack `VFE→THERM→VOLT→CLK→PMGR→PERF` (`pmu_task_stack.rs`), LPWR `GR-PG`/`MSCG`/`ELPG` (`lpwr_pg.rs`), RTD3 & S3 VRAM preservation (`rtd3_pm.rs`), Fan 2.0/3.0 PWM (`fan_cooler.rs`), PCIe Gen1–5 & ASPM (`pcie_bif.rs`), NVLink 2.0 telemetry (`nvlink_telemetry.rs`), NVLink-C2C (`nvlink_c2c.rs`), NVSwitch/NVLS Multicast `0x00fd` (`nvls_multicast.rs`) |\n| **Display, Media & Datacenter** | `nvidia_rs_drm.ko` (GEM/PRIME/KMS `/dev/dri/renderD*`), `nvidia_rs_modeset.ko` (`/dev/nvidia-rs-modeset`), EDID/vblank (`display_kms.rs`), DP AUX/DPCD (`dp_aux.rs`), VRR/G-Sync (`vrr_gsync.rs`), HDCP 1.x/2.2 (`hdcp.rs`), ACPI NBCI mux (`acpi_nbci.rs`), Video Falcons `NVDEC`/`NVENC`/`SEC2` (`video_falcon.rs`), `OFA`/`NVJPG` (`ofa_nvjpg.rs`), MIG `0xc637`/`0xc638` & IMEX (`mig_fabric.rs`), SR-IOV/vGPU `0xa080`–`0xa084` (`sriov_vgpu.rs`), Live GSP-RM queue/LIBOS/CC (`gsp_live.rs`) |\n\n* * *\n\n## Documentation & Deep Dives\n\n-   **[docs/PARITY\\_AND\\_UNLOCKS.md](https://github.com/QuixiAI/nvdriver/blob/master/docs/PARITY_AND_UNLOCKS.md)** — Full 43-GPU architecture matrix, verified workload & digest parity table, and complete NVIDIA artificial-restrictions unlock reference.\n-   **[docs/blog-nvidia-artificial-restrictions.md](https://github.com/QuixiAI/nvdriver/blob/master/docs/blog-nvidia-artificial-restrictions.md)** — Deep-dive write-up on the software locks discovered in NVIDIA's closed driver.\n-   **[reports/nvidia-580-artificial-restrictions-rea.md](https://github.com/QuixiAI/nvdriver/blob/master/reports/nvidia-580-artificial-restrictions-rea.md)** — Full reverse-engineering notes, disassembly, `.rodata` tables, and struct offsets.\n-   **[HANDOFF.md](https://github.com/QuixiAI/nvdriver/blob/master/HANDOFF.md)** — Detailed engineering log and verified artifact digests.\n\n* * *\n\n## Repository Layout\n\n```\n.\n├── src/nvidia/\n│   ├── abi/                  # Stable C/Rust ABI definitions (nv_rs_abi)\n│   ├── src/                  # Core #![no_std] Rust driver (nv_rs_core): gpu, mmu, fifo, rmapi, uvm\n│   └── kernel/               # Linux kernel FFI & live GV100/GSP bring-up (nv_rs_kernel)\n├── kernel-open/\n│   ├── nvidia/               # Minimal Linux PCI/chardev/DMA/hwmon/dmabuf C shim -> nvidia_rs.ko\n│   ├── nvidia-modeset/       # Standalone /dev/nvidia-rs-modeset module -> nvidia_rs_modeset.ko\n│   ├── nvidia-drm/           # Standalone Linux DRM GEM/PRIME/KMS module -> nvidia_rs_drm.ko\n│   ├── nvidia-peermem/       # Standalone GPUDirect RDMA peermem bridge -> nvidia_rs_peermem.ko\n│   ├── uvm_bridge/           # 76-symbol CONFIG_MODVERSIONS bridge -> nvidia_rs_uvm_bridge.ko\n│   └── modeset_bridge/       # nvidia_get_rm_ops bridge -> nvidia_rs_modeset_bridge.ko\n├── docs/                     # Parity/unlock tables & technical write-ups\n├── tools/                    # Validation gate, Unicorn binary oracles, VFIO VM harness & parity suites\n├── dkms.conf                 # DKMS packaging for automatic rebuilds across kernel upgrades\n└── install.sh                # Installer with Secure Boot MOK signing support\n```\n\n* * *\n\n## Known Limitations & Roadmap\n\n-   **GV100 Dynamic V/F Above 1290 MHz:** Raising `NV_THERM_VID0_PWM_1` (`0x20344`, Priv Level 3) above VBIOS boot voltage (`~0.72 V`) for `1425–1530 MHz` across all silicon bins requires full PMU `VFE` + `THERM` + `CLK` + `VOLT` prerequisite bring-up. Until complete, `nvidia_rs.ko` safely caps GPC to `1290 MHz` by default whenever voltage scaling is inactive.\n-   **Non-Volta & Display-Attached Silicon:** Maxwell, Pascal, and Turing–Blackwell–Rubin GSP-RM/Display HALs are implemented and verified offline (`119/119` `mock_gv100_diff.py` + `19/19` `oracle_gsp_620.py`), but have not yet been validated on physical non-Volta or display-attached GPUs.\n-   **Discrete PCIe GPUs Only (x86\\_64 & ARM64):** Tegra integrated SoCs (Jetson Orin / Thor) are not supported.\n\n* * *\n\n## Credits & Acknowledgments\n\n-   **[arikamidotnet](https://github.com/arikamidotnet)** & **[FBR-ROM/FBR-RAM-Downloader](https://github.com/FBR-ROM/FBR-RAM-Downloader)** (MIT): Live GV100 / Tesla V100 HBM2 memory-clock unlock (`0x98BC98` multicast HBMPLL coefficient programming, `PMC_BOOT_0` canary, PRI-ring write-only safety window, 16-partition lock + readback verification, and 36-bit hardware DRAM cycle-counter metering), along with the upstream research it credits (`cmpunlocker`, `170tune`, `CMP100-210`).\n-   **[Zagitta/gpu-unlock](https://github.com/Zagitta/gpu-unlock)** & **[JustAResearcher/gpu-unlock-ada](https://github.com/JustAResearcher/gpu-unlock-ada)**: Ada Lovelace (`AD10x`) pre-GSP SM Speed-Select (`SS0`/`SS1`) FP32-accumulate Tensor Core unlock research.\n-   **[Cinderella-Man/geforce-dynbar1-p2p](https://github.com/Cinderella-Man/geforce-dynbar1-p2p)** & **[tinygrad/open-gpu-kernel-modules](https://github.com/tinygrad/open-gpu-kernel-modules)**: Consumer GeForce Dynamic BAR1 P2P (`RMDynBar1P2PEnable`) & P2P unlock research.\n-   **[us4us/nvidia-open-gpu-kernel-modules](https://github.com/us4us/nvidia-open-gpu-kernel-modules)** & **[scottjg/nvidia-armsbc](https://github.com/scottjg/nvidia-armsbc)**: Mainline Linux `dma-buf` / P2PDMA export and non-coherent ARM64 SBC PCIe support inspiration.",
  "html": "<h1>GitHub - QuixiAI/nvdriver</h1>\n<p><a href=\"https://private-user-images.githubusercontent.com/1117701/722513707-a8c2c70c-a365-4ad2-a738-7e89e749555e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTYwNzAzODIsIm5iZiI6MTc5NjA3MDA4MiwicGF0aCI6Ii8xMTE3NzAxLzcyMjUxMzcwNy1hOGMyYzcwYy1hMzY1LTRhZDItYTczOC03ZTg5ZTc0OTU1NWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMzBUMjAyMTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGMwOTliZmU4ZWViYzc4ZDA4MjQxMjIxZmI0MTU3ZDVkNWU2ZjlhNmNkMzYxNjQzYTAxOWUxMjhjMDFkM2U2YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.QiBSURCNqCQxp6LTkBsmvvxQM6146eoIjfkwLYdG6yY\"><img src=\"https://private-user-images.githubusercontent.com/1117701/722513707-a8c2c70c-a365-4ad2-a738-7e89e749555e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTYwNzAzODIsIm5iZiI6MTc5NjA3MDA4MiwicGF0aCI6Ii8xMTE3NzAxLzcyMjUxMzcwNy1hOGMyYzcwYy1hMzY1LTRhZDItYTczOC03ZTg5ZTc0OTU1NWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMzBUMjAyMTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGMwOTliZmU4ZWViYzc4ZDA4MjQxMjIxZmI0MTU3ZDVkNWU2ZjlhNmNkMzYxNjQzYTAxOWUxMjhjMDFkM2U2YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.QiBSURCNqCQxp6LTkBsmvvxQM6146eoIjfkwLYdG6yY\" alt=\"image\" /></a></p>\n<p><strong><code>nvdriver</code> (<code>nvidia_rs.ko</code>) is a clean-room, open-source <code>#![no_std]</code> Rust Linux kernel driver for NVIDIA GPUs</strong> — built to be a drop-in replacement for NVIDIA's proprietary kernel driver while giving you back full control of the hardware you own. It works out of the box with unmodified NVIDIA userspace (<code>CUDA</code>, <code>PyTorch</code>, <code>cuDNN</code>, <code>NCCL</code>, <code>llama.cpp</code>, <code>nvidia-smi</code>, <code>NVENC</code>/<code>NVDEC</code>) and unmodified stock companion modules (<code>nvidia-uvm.ko</code>, <code>nvidia-modeset.ko</code>, <code>nvidia-drm.ko</code>), without reproducing the artificial software locks NVIDIA ships in its closed driver. That means PCIe &amp; BAR1 P2P across consumer and datacenter GPUs, Resizable BAR1 enabled by default, GPUDirect RDMA, unlocked NVENC sessions, no vGPU/hypervisor/CSP allowlists, and native support for pre-GSP architectures (Maxwell, Pascal, Volta) alongside modern Turing–Blackwell–Rubin GSP-RM GPUs. On <strong>Tesla V100 (GV100)</strong> cards, <code>nvdriver</code> also unlocks HBM2 memory clocks to <strong>1107 MHz (V100S factory spec, +26.2% memory bandwidth, <code>1,041.7 GB/s</code> per card / <code>8.33 TB/s</code> across 8× V100)</strong> alongside dynamic P0 boost (<code>1290 MHz</code> all-bin stable default / <code>1425 MHz</code> golden-bin OC, <code>1380 MHz</code> XBAR, and a 1 Hz on-die thermal guard) and live hardware <code>nvidia-smi</code> telemetry — made possible by the pioneering hardware research of <strong><a href=\"https://github.com/arikamidotnet\">arikamidotnet</a></strong> and <strong><a href=\"https://github.com/FBR-ROM/FBR-RAM-Downloader\">FBR-ROM/FBR-RAM-Downloader</a></strong>.</p>\n<hr />\n<h2>Why <code>nvdriver</code>?</h2>\n<ul>\n<li><strong>Drop-In Compatibility:</strong> Runs unmodified <code>libcuda.so</code>, <code>libnvidia-ml.so</code>, <code>nvidia-smi</code>, <code>libnvidia-encode.so</code>, <code>libnvcuvid.so</code>, PyTorch, cuDNN, NCCL, and <code>llama.cpp</code> — plus unmodified stock <code>nvidia-uvm.ko</code> and <code>nvidia-modeset.ko</code> / <code>nvidia-drm.ko</code> via exact <code>CONFIG_MODVERSIONS</code> bridges.</li>\n<li><strong>Unlocks Artificial Software Restrictions:</strong> Removes NVIDIA's closed-driver product-tier and chipset gates — enabling <strong>PCIe &amp; Dynamic BAR1 P2P</strong> (<code>RMDynBar1P2PEnable=1</code> + <code>RMDisableFeatureDisablement=1</code>, including optional PCIe P2P Atomics), <strong>Resizable BAR1</strong> by default, <strong>Native Linux <code>dma-buf</code> + <code>P2PDMA</code> / GPUDirect RDMA</strong>, unrestricted <strong>NVENC</strong> sessions/telemetry, <strong>CMP Mining Card Full Compute Unlock</strong> (<code>CMP 100-210</code>, <code>170HX</code>, <code>90HX</code>, <code>70HX</code>, <code>50HX</code>, <code>40HX</code>, <code>30HX</code>), <strong>Ada Lovelace SM Speed-Select Tensor Unlock</strong> (<code>unlock_ada_tensor=1</code>), <strong>Unprivileged Hardware Profiling</strong> (<code>unpriv_profiling=1</code> default for non-root <code>ncu</code>/<code>nsys</code>/CUPTI), <strong>Zero-Reboot Dynamic ECC Toggle</strong> (<code>disable_ecc=1</code>), and <strong>vGPU / SR-IOV</strong> without CPUID or GRID licensing timers.</li>\n<li><strong>+26.2% Tesla V100 Memory Bandwidth Out of the Box (<code>1,041.7 GB/s</code> / <code>8.33 TB/s</code> on 8× V100):</strong> Safely raises GV100 HBM2 clocks from the stock <code>877.5 MHz</code> cap to <strong><code>1107.0 MHz</code></strong> (<code>v100_hbm_ndiv=82</code>, V100S factory spec) with dynamic P0 boost (<code>1290 MHz</code> all-bin stable GPC / <code>1380 MHz</code> XBAR + 1 Hz thermal guard, <code>1425 MHz</code> configurable), live runtime-writable sysfs clocks (no module reload), per-partition lock verification, automatic rollback on error, and clean restore on unload — thanks to <strong><a href=\"https://github.com/arikamidotnet\">arikamidotnet</a></strong> and <strong><a href=\"https://github.com/FBR-ROM/FBR-RAM-Downloader\">FBR-ROM/FBR-RAM-Downloader</a></strong>.</li>\n<li><strong>Live Hardware Telemetry (<code>nvidia-smi</code> / NVML + Native Linux <code>/sys/class/hwmon</code>):</strong> Exposes per-GPU Linux <code>hwmon</code> sensors (<code>temp1_input</code>, <code>power1_average</code>, <code>in0_input</code>, <code>gpc_clock_mhz</code>, <code>mem_clock_mhz</code>, <code>gpu_util_pct</code>, <code>mem_util_pct</code> for <code>lm-sensors</code>, <code>btop</code>, <code>nvtop</code>, and Prometheus <code>node_exporter</code>) alongside NVML/RMAPI telemetry (PROM BIT VBIOS version <code>88.00.80.00.01</code>, hardware <code>NV_PPWR_PMU_IDLE_COUNT</code> GPU &amp; memory utilization counters <code>0x2080a097</code> / <code>0x20802087</code>, and PMGR I2C INA3221 power probe).</li>\n<li><strong>x86_64 &amp; ARM64 / SBC PCIe Support (<code>ARCH=arm64</code>):</strong> Builds for both <code>x86_64-unknown-none</code> and <code>aarch64-unknown-none</code> (<code>-C target-feature=-neon,-fp-armv8</code>) with explicit non-coherent DMA cache sync (<code>dma_sync_single_for_cpu</code>/<code>device</code>) for ARM64 PCIe boards (RK3588, Ampere Altra, Apple Silicon Linux).</li>\n<li><strong>Maxwell Through Blackwell &amp; Rubin in One Driver:</strong> Supports pre-GSP GPUs (Maxwell, Pascal, Volta) natively in Rust alongside Turing, Ampere, Hopper, Ada Lovelace, Blackwell (<code>620.70.06</code> GSP-RM default, <code>580</code> compat), and Rubin (<code>GR100</code>).</li>\n<li><strong>Built in <code>#![no_std]</code> Rust with Strict Kernel Hygiene:</strong> Pure <code>#![no_std]</code> Rust core statically linked into a minimal Linux C shim, passing a <code>10/10</code> kernel ABI audit (zero GOT relocations, zero SIMD/x87, zero <code>memcpy</code>/<code>memset</code>/<code>memmove</code>, zero unwind sections, every stack frame <code>&lt;= 1,024</code> bytes).</li>\n<li><strong>Verified on Real 8-GPU Hardware:</strong> Battle-tested side-by-side against stock NVIDIA <code>580.178.04</code> on <strong>8× physical Tesla V100-SXM2-32GB (256 GiB VRAM)</strong> — passing 77/77 CUDA Parity Suite checks, 8-GPU PyTorch/NCCL <code>AllReduce</code> (<code>59.71 GB/s</code> BusBW, <code>max_err = 0.0</code>), 8-GPU <code>8.33 TB/s</code> HBM2 STREAM Triad, multi-GPU FP16/FP32 GEMM &amp; <code>llama.cpp</code>, 25.781 Gbps NVLink 2.0, H.264/HEVC NVENC &amp; NVDEC, S3/S4 suspend/resume, and automatic Xid 31 fault recovery with clean module unload.</li>\n</ul>\n<hr />\n<h2>Performance vs. Proprietary NVIDIA <code>580.178.04</code> (Tesla V100-SXM2-32GB)</h2>\n<h3>Single-GPU &amp; 2-GPU NVLink Head-to-Head (Identical VFIO VMs, <code>0000:b2/b3:00.0</code>)</h3>\n<table>\n<thead>\n<tr>\n<th>Benchmark</th>\n<th>Proprietary <code>580.178.04</code></th>\n<th><strong><code>nvdriver</code> (Default)</strong></th>\n<th>Delta</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><strong>PyTorch STREAM Triad</strong> (768 MiB)</td>\n<td><code>821.85 GB/s</code></td>\n<td><strong><code>1,041.72 GB/s</code></strong></td>\n<td><strong>+26.8% (&gt;1 TB/s!)</strong></td>\n</tr>\n<tr>\n<td><strong>HBM2 D2D Copy</strong> (512 MiB)</td>\n<td><code>819.01 GB/s</code></td>\n<td><strong><code>1,013.65 GB/s</code></strong></td>\n<td><strong>+23.8%</strong></td>\n</tr>\n<tr>\n<td><strong>FP16 Tensor Core GEMM</strong> (8192³)</td>\n<td><code>97.69 TFLOPS</code></td>\n<td><strong><code>107.17 TFLOPS</code></strong></td>\n<td><strong>+9.7%</strong></td>\n</tr>\n<tr>\n<td><strong>FP32 GEMM</strong> (8192³)</td>\n<td><code>14.18 TFLOPS</code></td>\n<td><strong><code>14.37 TFLOPS</code></strong></td>\n<td><strong>+1.3%</strong></td>\n</tr>\n<tr>\n<td><strong>Memory-Bound LayerNorm + GELU</strong></td>\n<td><code>2.612 ms</code></td>\n<td><strong><code>2.126 ms</code></strong></td>\n<td><strong>1.23× faster</strong></td>\n</tr>\n<tr>\n<td><strong><code>llama.cpp</code> Prompt Eval (<code>pp512</code>)</strong></td>\n<td><code>31,067 tok/s</code></td>\n<td><strong><code>34,884 tok/s</code></strong></td>\n<td><strong>+12.3%</strong></td>\n</tr>\n<tr>\n<td><strong>Transformer Layer Fwd + Bwd</strong></td>\n<td><code>13.245 ms</code></td>\n<td><strong><code>12.885 ms</code></strong></td>\n<td><strong>+2.7% faster</strong></td>\n</tr>\n<tr>\n<td><strong>CUDA Graph 50-op Replay</strong></td>\n<td><code>76.17 µs</code></td>\n<td><strong><code>80.20 µs</code></strong></td>\n<td><strong>95.0% parity</strong></td>\n</tr>\n<tr>\n<td><strong>PCIe Pinned H2D / D2H</strong> (256 MiB)</td>\n<td><code>12.39 / 13.16 GB/s</code></td>\n<td><strong><code>12.40 / 13.16 GB/s</code></strong></td>\n<td><strong>100% parity</strong></td>\n</tr>\n<tr>\n<td><strong>2-GPU NVLink 2.0 <code>NV2</code> Bidir / Unidir</strong></td>\n<td><code>94.0 / 48.1 GB/s</code></td>\n<td><strong><code>96.98 / 48.49 GB/s</code></strong></td>\n<td><strong>+3.2% (25.781 Gbps)</strong></td>\n</tr>\n</tbody></table>\n<h3>Bare-Metal 8× Tesla V100-SXM2-32GB (<code>geodd03</code>, 256 GiB VRAM)</h3>\n<table>\n<thead>\n<tr>\n<th>Workload</th>\n<th>Measured on <code>nvidia_rs.ko</code></th>\n</tr>\n</thead>\n<tbody><tr>\n<td><strong>8× V100 HBM2 STREAM Triad (<code>1107 MHz</code>)</strong></td>\n<td><strong><code>8,334.1 GB/s</code> (<code>8.33 TB/s</code>)</strong> aggregate (<code>1,041.3–1,041.9 GB/s</code> per GPU)</td>\n</tr>\n<tr>\n<td><strong>8-GPU PyTorch/NCCL <code>AllReduce</code> (FP16 256 MiB)</strong></td>\n<td><strong><code>59.71 GB/s</code> BusBW</strong> (<code>34.12 GB/s</code> AlgBW, <code>max_err = 0.0</code>)</td>\n</tr>\n<tr>\n<td><strong>8-GPU PyTorch DDP Transformer (92.4M, FP16 AMP)</strong></td>\n<td><strong><code>497,072 tok/s</code></strong> (<code>970.8 samples/s</code>, <strong><code>275.4 TFLOPS</code></strong> eff., <code>0.0e+00</code> weight parity)</td>\n</tr>\n<tr>\n<td><strong>8-GPU Simultaneous FP16 / FP32 GEMM (<code>8192³</code>)</strong></td>\n<td><strong><code>776.14 TFLOPS</code> FP16 / <code>103.44 TFLOPS</code> FP32</strong> aggregate (<code>1290 MHz</code>, <code>97.00–97.03 TFLOPS</code>/GPU; <code>106.8 TFLOPS</code>/GPU @ <code>1425 MHz</code>)</td>\n</tr>\n<tr>\n<td><strong>8-GPU Layer-Split <code>llama.cpp</code> (<code>-sm layer</code>, 256 GiB)</strong></td>\n<td><strong><code>30,169.8 tok/s</code> <code>pp512</code></strong>, <strong><code>492.28 tok/s</code> <code>tg128</code></strong> across all 8 GPUs</td>\n</tr>\n</tbody></table>\n<p>See <a href=\"https://github.com/QuixiAI/nvdriver/blob/master/docs/PARITY_AND_UNLOCKS.md\">docs/PARITY_AND_UNLOCKS.md</a> for the complete 3-way benchmark breakdown (including stock-clock <code>877.5 MHz</code> vs. unlocked <code>1107 MHz</code> HBM2).</p>\n<hr />\n<h2>Supported GPUs (At a Glance)</h2>\n<table>\n<thead>\n<tr>\n<th>Family</th>\n<th>Representative GPUs</th>\n<th>Status</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><strong>Volta (<code>GV100</code>)</strong></td>\n<td>Tesla V100 PCIe / SXM2 16GB &amp; 32GB, Quadro GV100, Titan V, <strong>CMP 100-210</strong></td>\n<td><strong>Live physical silicon verified (0-diff)</strong> on 8× V100-SXM2-32GB (with default <code>1107 MHz</code> HBM2 + dynamic P0 boost + 25.781 Gbps NVLink 2.0)</td>\n</tr>\n<tr>\n<td><strong>Maxwell &amp; Pascal</strong></td>\n<td>GTX 750–1080 Ti, Titan X, Tesla M40/M60/P4/P40/P100</td>\n<td><strong>Native Rust HALs implemented &amp; Unicorn-verified offline</strong> <em>(awaiting physical silicon test)</em></td>\n</tr>\n<tr>\n<td><strong>Turing, Ampere, Hopper, Ada, Blackwell, Rubin</strong></td>\n<td>RTX 20/30/40/50 series, T4, A100, H100/H200, L40S, B100/B200/GB200, GR100, <strong>CMP 30HX–170HX</strong></td>\n<td><strong>GSP-RM (<code>620.70.06</code> / <code>580</code>) + MMU V2/V3 HALs wired &amp; verified offline</strong> <em>(awaiting physical silicon test)</em></td>\n</tr>\n</tbody></table>\n<p>For the full <strong>43-chip architecture matrix</strong>, <strong>verified workload parity table</strong>, and <strong>disassembly-backed table of unlocked NVIDIA restrictions</strong>, see <strong><a href=\"https://github.com/QuixiAI/nvdriver/blob/master/docs/PARITY_AND_UNLOCKS.md\">docs/PARITY_AND_UNLOCKS.md</a></strong>.</p>\n<hr />\n<h2>Quick Start</h2>\n<h3>Prerequisites</h3>\n<ul>\n<li>Linux <code>x86_64</code> or <code>arm64</code> (<code>aarch64</code>) with kernel headers (<code>/lib/modules/$(uname -r)/build</code>)</li>\n<li>Rust toolchain with <code>x86_64-unknown-none</code> (or <code>aarch64-unknown-none</code> for ARM64/SBCs) target</li>\n<li>Existing NVIDIA userspace libraries (<code>libcuda.so</code>, <code>nvidia-smi</code>, etc.)</li>\n</ul>\n<h3>Build &amp; Validate</h3>\n<h1>Build nvidia_rs.ko and run the 30-step unit, oracle, QEMU guest &amp; kernel-hygiene gate</h1>\n<p>sh tools/validate_all.sh</p>\n<h1>ARM64 / SBC PCIe build (RK3588, Ampere Altra, Apple Silicon Linux)</h1>\n<p>ARCH=arm64 make modules</p>\n<h1>Optional: x86_64 Unicorn binary oracles &amp; companion module bridges</h1>\n<p>python3 tools/mock_gv100_diff.py\nmake uvm-bridge &amp;&amp; python3 tools/check_uvm_symbol_conformance.py\nmake modeset-bridge &amp;&amp; python3 tools/check_modeset_symbol_conformance.py</p>\n<h3>Install &amp; Useful Module Options</h3>\n<p>Use <code>./install.sh</code> (supports Secure Boot MOK signing) or configure <code>/etc/modprobe.d/nvidia_rs.conf</code>:</p>\n<pre><code>options nvidia_rs pci_target=* runtime_engines=1\n</code></pre>\n<p>Key tunable parameters:</p>\n<ul>\n<li><code>v100_hbm_ndiv=82</code> <em>(default, runtime-writable <code>0644</code>)</em> — GV100 / CMP 100-210 HBM2 clock divider (<code>82</code> = <code>1107 MHz</code> V100S spec / +26.2%, <code>80</code> = <code>1080 MHz</code> / +23%, <code>78</code> = <code>1053 MHz</code> / +20%, <code>0</code> = stock <code>877.5 MHz</code>).</li>\n<li><code>v100_p0_gpc_ndiv=190</code> <em>(default, runtime-writable <code>0644</code>, auto-capped to <code>172</code> / <code>1290 MHz</code> unless Level-3 HS voltage scaling succeeds)</em> — GV100 dynamic P0 boost GPC NAFLL divider; can be updated live via <code>/sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv</code> without reloading the module.</li>\n<li><code>v100_p0_volt_uv=0</code> <em>(default, experimental)</em> — Optional GV100 LOGIC rail voltage target in µV (hard-clamped to <code>[800_000, 1_050_000] µV</code> in <code>&lt;= 25 mV</code> steps; <code>0</code> keeps VBIOS boot voltage and caps GPC to <code>1290 MHz</code>).</li>\n<li><code>unlock_ada_tensor=0</code> <em>(opt-in)</em> — Pre-GSP Ada Lovelace (<code>AD10x</code> / RTX 40-series) SM Speed-Select FP32-accumulate Tensor Core unlock (<code>SS0 = 0x88888888</code>, <code>SS1 = 0x8</code>, PLM-guarded).</li>\n<li><code>dyn_bar1_p2p=1</code> <em>(default)</em> — Enables Dynamic BAR1 P2P (<code>RMDynBar1P2PEnable=1</code> + <code>RMDisableFeatureDisablement=1</code> + <code>RMForceP2PType=2</code>) in the GSP-RM registry alongside <code>EnableResizableBar=1</code>.</li>\n<li><code>unpriv_profiling=1</code> <em>(default)</em> — Allows non-root userspace CUPTI / <code>ncu</code> / <code>nsys</code> hardware performance counters (<code>RMRestrictProfilingToAdminUsers=0</code>).</li>\n<li><code>disable_ecc=0</code> <em>(opt-in)</em> — Zero-reboot dynamic ECC disable toggle across RMAPI, UVM, and GSP-RM without flashing InfoROM.</li>\n<li><code>live_pci_irq=1</code> <em>(default)</em> — Enables storm-guarded hardware MSI-X/PCI IRQ servicing across PFIFO, PGRAPH, PMU, THERM, and HUB/MMU (<code>live_pci_irq=0</code> to disable).</li>\n<li><code>enable_resizable_bar=1</code> <em>(default)</em> — Automatically expands BAR1 to the largest supported ReBAR aperture.</li>\n<li><code>force_p2p=0x11</code> <em>(default)</em> — Enables PCIe P2P Read+Write (<code>0x211</code> opts into PCIe P2P Atomics).</li>\n<li><code>gsp_abi=620</code> <em>(default)</em> — Selects GSP-RM <code>620.70.06</code> framing for Turing–Blackwell–Rubin (<code>580</code> for <code>580.178.04</code> compat).</li>\n<li><code>system_memory_pool_retain_mb=0</code> <em>(default)</em> — Trims cached system-memory pages on client close so <code>MemAvailable</code> stays accurate.</li>\n</ul>\n<h3>Live <code>/sys/class/hwmon</code> Telemetry &amp; Runtime Clock Tuning</h3>\n<p>Every GPU exposes a native Linux <code>hwmon</code> sensor node (<code>name = nvdriver</code>) readable by <code>lm-sensors</code>, <code>btop</code>, <code>nvtop</code>, and Prometheus <code>node_exporter</code>, and GV100 clocks can be adjusted live without reloading <code>nvidia_rs.ko</code>:</p>\n<h1>Read live per-GPU sensors directly from sysfs (no libnvidia-ml.so required)</h1>\n<p>for h in /sys/class/hwmon/hwmon*; do\n  [ \"$(cat \"$h/name\" 2&gt;/dev/null)\" = \"nvdriver\" ] &amp;&amp; \\\n    echo \"$h: $(( $(cat $h/temp1_input)/1000 ))C $(( $(cat $h/power1_average)/1000000 ))W gpc=$(cat $h/gpc_clock_mhz)MHz mem=$(cat $h/mem_clock_mhz)MHz util=$(cat $h/gpu_util_pct)%\"\ndone</p>\n<h1>Dynamically tune GV100 GPC NAFLL clock live (takes effect within 1 s, no reload)</h1>\n<p>echo 160 | sudo tee /sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv   # 1200 MHz\necho 172 | sudo tee /sys/module/nvidia_rs/parameters/v100_p0_gpc_ndiv   # 1290 MHz</p>\n<h3>Safe Live Testing in a Disposable VFIO VM</h3>\n<h1>Single-GPU CUDA Parity Suite v19 on a VFIO-bound Tesla V100</h1>\n<p>sudo python3 tools/vm/run_vfio_guest.py --bdf 0000:b3:00.0 --driver rust</p>\n<hr />\n<h2><code>580.178.04</code> Subsystem Parity &amp; Kernel Module Suite</h2>\n<p><code>nvdriver</code> ships <strong>4 standalone Linux kernel modules</strong> (<code>nvidia_rs.ko</code> with integrated UVM, <code>nvidia_rs_modeset.ko</code>, <code>nvidia_rs_drm.ko</code>, and <code>nvidia_rs_peermem.ko</code>) with <strong>100% Linux UVM ioctl parity (<code>73/73</code>)</strong>, <strong>2,096/2,096 RM controls dispatched</strong>, and <strong>899 passing Rust unit/oracle tests</strong>:</p>\n<table>\n<thead>\n<tr>\n<th>Domain</th>\n<th>Ported Subsystems (<code>src/nvidia/src/</code> &amp; <code>kernel-open/</code>)</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><strong>Compute, Scheduling &amp; Sync</strong></td>\n<td><code>CILP</code> / <code>GFXP</code> preemption (<code>cilp_preempt.rs</code>), Persisting L2 <code>EVICT_LAST</code> (<code>l2_cache.rs</code>), Explicit Sync <code>dma_fence</code> timelines <code>0x00da</code> (<code>sync_timeline.rs</code>), NVIDIA MPS (<code>UVM_REGISTER_MPS_*</code>), Async CE VRAM/ECC Scrubber (<code>mem_scrub.rs</code>)</td>\n</tr>\n<tr>\n<td><strong>Memory, UVM &amp; P2P</strong></td>\n<td>100% Linux UVM ioctls (<code>73/73</code>), Linux HMM / SVA-ATS (<code>uvm/hmm.rs</code>), Thrashing/Prefetch heuristics (<code>uvm/perf_heuristics.rs</code>), Access Counter Notify Buffer <code>0xc365</code>, Native <code>dma-buf</code> P2PDMA (<code>NV_ESC_EXPORT_TO_DMABUF_FD</code>), <code>nvidia_rs_peermem.ko</code></td>\n</tr>\n<tr>\n<td><strong>Telemetry, Debug &amp; Reliability</strong></td>\n<td>HWPM (<code>0x90cc</code>/<code>0xb0cc</code>/<code>0xb1cc</code>/<code>0xb2cc</code>) &amp; <code>cuda-gdb</code> (<code>0x83de</code>/<code>0x83df</code>) + 13 <code>UVM_TOOLS_*</code> ioctls, SPI/PROM InfoROM (<code>inforom_spi.rs</code>), ECC Poison Xid 94/95 containment (<code>ecc_poison.rs</code>), RC Watchdog (<code>rc_watchdog.rs</code>), FECS Ctxsw Timeout Dump (<code>ctxsw_dump.rs</code>), GSP CrashCat decoder (<code>crashcat.rs</code>), stock <code>NVRM: Xid</code> logs, full <code>/proc/driver/nvidia/</code> tree</td>\n</tr>\n<tr>\n<td><strong>Power, Thermals &amp; Interconnect</strong></td>\n<td>Full PMU task stack <code>VFE→THERM→VOLT→CLK→PMGR→PERF</code> (<code>pmu_task_stack.rs</code>), LPWR <code>GR-PG</code>/<code>MSCG</code>/<code>ELPG</code> (<code>lpwr_pg.rs</code>), RTD3 &amp; S3 VRAM preservation (<code>rtd3_pm.rs</code>), Fan 2.0/3.0 PWM (<code>fan_cooler.rs</code>), PCIe Gen1–5 &amp; ASPM (<code>pcie_bif.rs</code>), NVLink 2.0 telemetry (<code>nvlink_telemetry.rs</code>), NVLink-C2C (<code>nvlink_c2c.rs</code>), NVSwitch/NVLS Multicast <code>0x00fd</code> (<code>nvls_multicast.rs</code>)</td>\n</tr>\n<tr>\n<td><strong>Display, Media &amp; Datacenter</strong></td>\n<td><code>nvidia_rs_drm.ko</code> (GEM/PRIME/KMS <code>/dev/dri/renderD*</code>), <code>nvidia_rs_modeset.ko</code> (<code>/dev/nvidia-rs-modeset</code>), EDID/vblank (<code>display_kms.rs</code>), DP AUX/DPCD (<code>dp_aux.rs</code>), VRR/G-Sync (<code>vrr_gsync.rs</code>), HDCP 1.x/2.2 (<code>hdcp.rs</code>), ACPI NBCI mux (<code>acpi_nbci.rs</code>), Video Falcons <code>NVDEC</code>/<code>NVENC</code>/<code>SEC2</code> (<code>video_falcon.rs</code>), <code>OFA</code>/<code>NVJPG</code> (<code>ofa_nvjpg.rs</code>), MIG <code>0xc637</code>/<code>0xc638</code> &amp; IMEX (<code>mig_fabric.rs</code>), SR-IOV/vGPU <code>0xa080</code>–<code>0xa084</code> (<code>sriov_vgpu.rs</code>), Live GSP-RM queue/LIBOS/CC (<code>gsp_live.rs</code>)</td>\n</tr>\n</tbody></table>\n<hr />\n<h2>Documentation &amp; Deep Dives</h2>\n<ul>\n<li><strong><a href=\"https://github.com/QuixiAI/nvdriver/blob/master/docs/PARITY_AND_UNLOCKS.md\">docs/PARITY_AND_UNLOCKS.md</a></strong> — Full 43-GPU architecture matrix, verified workload &amp; digest parity table, and complete NVIDIA artificial-restrictions unlock reference.</li>\n<li><strong><a href=\"https://github.com/QuixiAI/nvdriver/blob/master/docs/blog-nvidia-artificial-restrictions.md\">docs/blog-nvidia-artificial-restrictions.md</a></strong> — Deep-dive write-up on the software locks discovered in NVIDIA's closed driver.</li>\n<li><strong><a href=\"https://github.com/QuixiAI/nvdriver/blob/master/reports/nvidia-580-artificial-restrictions-rea.md\">reports/nvidia-580-artificial-restrictions-rea.md</a></strong> — Full reverse-engineering notes, disassembly, <code>.rodata</code> tables, and struct offsets.</li>\n<li><strong><a href=\"https://github.com/QuixiAI/nvdriver/blob/master/HANDOFF.md\">HANDOFF.md</a></strong> — Detailed engineering log and verified artifact digests.</li>\n</ul>\n<hr />\n<h2>Repository Layout</h2>\n<pre><code>.\n├── src/nvidia/\n│   ├── abi/                  # Stable C/Rust ABI definitions (nv_rs_abi)\n│   ├── src/                  # Core #![no_std] Rust driver (nv_rs_core): gpu, mmu, fifo, rmapi, uvm\n│   └── kernel/               # Linux kernel FFI &amp; live GV100/GSP bring-up (nv_rs_kernel)\n├── kernel-open/\n│   ├── nvidia/               # Minimal Linux PCI/chardev/DMA/hwmon/dmabuf C shim -&gt; nvidia_rs.ko\n│   ├── nvidia-modeset/       # Standalone /dev/nvidia-rs-modeset module -&gt; nvidia_rs_modeset.ko\n│   ├── nvidia-drm/           # Standalone Linux DRM GEM/PRIME/KMS module -&gt; nvidia_rs_drm.ko\n│   ├── nvidia-peermem/       # Standalone GPUDirect RDMA peermem bridge -&gt; nvidia_rs_peermem.ko\n│   ├── uvm_bridge/           # 76-symbol CONFIG_MODVERSIONS bridge -&gt; nvidia_rs_uvm_bridge.ko\n│   └── modeset_bridge/       # nvidia_get_rm_ops bridge -&gt; nvidia_rs_modeset_bridge.ko\n├── docs/                     # Parity/unlock tables &amp; technical write-ups\n├── tools/                    # Validation gate, Unicorn binary oracles, VFIO VM harness &amp; parity suites\n├── dkms.conf                 # DKMS packaging for automatic rebuilds across kernel upgrades\n└── install.sh                # Installer with Secure Boot MOK signing support\n</code></pre>\n<hr />\n<h2>Known Limitations &amp; Roadmap</h2>\n<ul>\n<li><strong>GV100 Dynamic V/F Above 1290 MHz:</strong> Raising <code>NV_THERM_VID0_PWM_1</code> (<code>0x20344</code>, Priv Level 3) above VBIOS boot voltage (<code>~0.72 V</code>) for <code>1425–1530 MHz</code> across all silicon bins requires full PMU <code>VFE</code> + <code>THERM</code> + <code>CLK</code> + <code>VOLT</code> prerequisite bring-up. Until complete, <code>nvidia_rs.ko</code> safely caps GPC to <code>1290 MHz</code> by default whenever voltage scaling is inactive.</li>\n<li><strong>Non-Volta &amp; Display-Attached Silicon:</strong> Maxwell, Pascal, and Turing–Blackwell–Rubin GSP-RM/Display HALs are implemented and verified offline (<code>119/119</code> <code>mock_gv100_diff.py</code> + <code>19/19</code> <code>oracle_gsp_620.py</code>), but have not yet been validated on physical non-Volta or display-attached GPUs.</li>\n<li><strong>Discrete PCIe GPUs Only (x86_64 &amp; ARM64):</strong> Tegra integrated SoCs (Jetson Orin / Thor) are not supported.</li>\n</ul>\n<hr />\n<h2>Credits &amp; Acknowledgments</h2>\n<ul>\n<li><strong><a href=\"https://github.com/arikamidotnet\">arikamidotnet</a></strong> &amp; <strong><a href=\"https://github.com/FBR-ROM/FBR-RAM-Downloader\">FBR-ROM/FBR-RAM-Downloader</a></strong> (MIT): Live GV100 / Tesla V100 HBM2 memory-clock unlock (<code>0x98BC98</code> multicast HBMPLL coefficient programming, <code>PMC_BOOT_0</code> canary, PRI-ring write-only safety window, 16-partition lock + readback verification, and 36-bit hardware DRAM cycle-counter metering), along with the upstream research it credits (<code>cmpunlocker</code>, <code>170tune</code>, <code>CMP100-210</code>).</li>\n<li><strong><a href=\"https://github.com/Zagitta/gpu-unlock\">Zagitta/gpu-unlock</a></strong> &amp; <strong><a href=\"https://github.com/JustAResearcher/gpu-unlock-ada\">JustAResearcher/gpu-unlock-ada</a></strong>: Ada Lovelace (<code>AD10x</code>) pre-GSP SM Speed-Select (<code>SS0</code>/<code>SS1</code>) FP32-accumulate Tensor Core unlock research.</li>\n<li><strong><a href=\"https://github.com/Cinderella-Man/geforce-dynbar1-p2p\">Cinderella-Man/geforce-dynbar1-p2p</a></strong> &amp; <strong><a href=\"https://github.com/tinygrad/open-gpu-kernel-modules\">tinygrad/open-gpu-kernel-modules</a></strong>: Consumer GeForce Dynamic BAR1 P2P (<code>RMDynBar1P2PEnable</code>) &amp; P2P unlock research.</li>\n<li><strong><a href=\"https://github.com/us4us/nvidia-open-gpu-kernel-modules\">us4us/nvidia-open-gpu-kernel-modules</a></strong> &amp; <strong><a href=\"https://github.com/scottjg/nvidia-armsbc\">scottjg/nvidia-armsbc</a></strong>: Mainline Linux <code>dma-buf</code> / P2PDMA export and non-coherent ARM64 SBC PCIe support inspiration.</li>\n</ul>\n"
}