Commit Graph

6 Commits

Author SHA1 Message Date
7f7021e218 Wave 7: complete RM escape dispatch (0x27-0x5f/0xd5/0xd8) and x86_64/ARM64 kernel hardening gates 2026-12-01 19:19:30 +00:00
373e801f8c rmapi/drm/uvm: multi-arch RMAPI, PCI-bound DRM atomic/syncobj/NVIDIA ioctls, and 5 R620 UVM symbols (Wave 5)
- src/nvidia/src/rmapi/gpu.rs: remove GV100-only gate (line 5250) and add chip-derived GPU names across Maxwell, Pascal, Volta (Titan V / Quadro GV100), Turing, Ampere, Ada, Hopper, and Blackwell.
- kernel-open/nvidia-drm/nvidia_rs_drm.c: bind real NVIDIA PCI GPUs when present (platform fallback), enable DRIVER_SYNCOBJ | DRIVER_SYNCOBJ_TIMELINE | DRIVER_MODESET | DRIVER_ATOMIC, and implement core DRM_IOCTL_NVIDIA_* ioctls matching stock nvidia-drm-drv.c.
- interface_dispatch.rs, uvm_interface_ffi.rs, src/nvidia/Makefile, uvm_iface_exports.c, uvm_bridge.c: implement and export all 5 new R620 nvUvmInterface* symbols (AccessBitsBufAlloc/Free/Dump, RegisterUvmEvents/DeRegisterUvmEvents -> 81 total exported symbols).
- Update HANDOFF.md and docs/PARITY_AND_UNLOCKS.md with Wave 1-5 summary.

Validated: fmt, clippy -D warnings, 1067/1067 nv-rs-core tests, IBT=1 & IBT=0 modules + check_kernel_module.py (largest_stack: 1016, 0 GOT/memcpy/SIMD), uvm-bridge, QEMU EDU non-IOMMU + IOMMU.
2026-12-01 17:05:11 +00:00
5a02e03a79 Merge pull request #16 from morebrackets/fix/v100-16gb-iommu-irq-linux7
Fix 16GB V100 VRAM sizing, strict IOMMU DMA, IRQ deadlock, and Linux 7.0 build
2026-11-30 20:00:37 -05:00
33ff608a88 Add MIT LICENSE and unify repository SPDX/Cargo/module licensing
- Add root LICENSE (MIT License, Copyright (c) 2026 QuixiAI / Eric Hartford).
- Set license = "MIT" in workspace Cargo.toml and member crates (zero non-MIT dependencies).
- Update all kernel-open/ and tests/vm/ SPDX headers to MIT and EXPORT_SYMBOL_GPL -> EXPORT_SYMBOL.
- Use MODULE_LICENSE("Dual MIT/GPL") in Linux .ko modules so Linux modpost permits linking against the kernel's own EXPORT_SYMBOL_GPL symbols while keeping the repository source 100% MIT.

Closes #12.
2026-12-01 00:20:02 +00:00
2d90287ede Fix 16GB V100 VRAM sizing, strict IOMMU DMA, IRQ top-half deadlock, and Linux 7.0 build
Tested on 4x Tesla V100-SXM2-16GB (Dell PowerEdge C4130) running Ubuntu
7.0.0-44-generic with Intel VT-d enabled (no iommu=pt).

Fixes #2 and a few other things that showed up once 16GB cards came up:

- Derive the GV100 runtime VRAM window, RMAPI VideoRegion ceiling, NVENC
  ucode staging address, and UVM descriptor/PMA base from the real FB size
  in placement::Placement::usable instead of hardcoding 32 GiB constants.
  Also pass the detected VRAM size through fb_info_v2_with_usable so
  cards with a smaller BAR1 still report the right total memory.

- Switch LiveEngine::irq_top_half, live_irq_mask, and live_irq_unmask to
  the lockless nv_rs_pci_{read,write}32_irq helpers. Using the normal
  nv_rs_pci_{read,write}32 path acquires p->access inside hardirq context
  and self-deadlocks when an IRQ lands on the same CPU running
  irq_thread_service.

- DMA-map sysmem pages per GPU instead of putting raw physical addresses
  in GPU page tables and rings: lazy per-GPU dma_map_page for RMAPI
  allocations and CPU-mapped UVM semaphore/managed pages, dma_alloc_coherent
  for SysmemPageTree and the replayable fault ring, and a live coherent
  flush page in 0x100c10 across ACR load/runtime/unload so SYS_MEMBAR does
  not hit stale unmapped IOVAs left behind by stock nvidia.ko.

- Add version-guarded compatibility wrappers for Linux 6.3-7.0 API changes
  (noop_llseek, vm_flags_set/clear, PCI_IRQ_INTX, timer_container_of,
  hrtimer_setup, MAX_PAGE_ORDER, MODULE_IMPORT_NS("DMA_BUF"), and
  drm_driver.date).

Verified with cargo fmt/clippy/test (918 passed), make modules +
check_kernel_module.py (10/10, largest_stack 1000), native-hello,
uvm-replayable-fault-test, 4-GPU cuda-multigpu-parity (matches stock
580.178.04), and llama-bench on 1 and 4 GPUs with zero DMAR faults and
clean unbind/rmmod.
2026-11-30 10:53:36 -08:00
1da14ed862 Implement Round 5 580.178.04 ports (NVLS Multicast 0x00fd, RC Watchdog, VRR/G-Sync, standalone nvidia_rs_drm.ko & nvidia_rs_peermem.ko) 2026-11-30 15:54:18 +00:00