# ============================================================================
# Open-IOV .gitignore
#
# Goals:
#   - No large binary objects in git (firmware blobs, VM images, Ghidra DBs)
#   - No build artifacts
#   - No local source checkouts (NVIDIA OpenRM is fetched by install.sh)
#   - No local QEMU-wrapper stacks - the repo is hypervisor-management
#     neutral (works with libvirt, raw QEMU, ...)
# ============================================================================

# ----------------------------------------------------------------------------
# Kernel / kbuild artifacts
# ----------------------------------------------------------------------------
*.o
*.o.d
.*.o.d
*.ko
*.mod
*.mod.c
*.mod.o
Module.symvers
modules.order
.*.cmd
.tmp_versions/
*.order
*.symvers

# ----------------------------------------------------------------------------
# Userspace build artifacts
# ----------------------------------------------------------------------------
*.so
*.so.*
*.a
*.pyc
__pycache__/
userspace/lib/libiov.so*
userspace/lib/libvgpu.so*
userspace/examples/example_vgpu
userspace/tests/*_test

# ----------------------------------------------------------------------------
# NVIDIA open-gpu-kernel-modules (public upstream)
# Cloned at a pinned tag and patched by install.sh - see legacy-patches/nvidia/
# ----------------------------------------------------------------------------
/nvidia-open-gpu-kernel-modules/

# Legacy NVIDIA patches (kept locally, no longer tracked)
/legacy-patches/

# Legacy guest driver (gsp-vgpu.ko, superseded by stock guest driver; kept
# locally, no longer tracked)
/legacy-driver-guest/

# Purely legacy docs (describe the superseded guest-driver architecture)
/docs/old/

# Local checkout of the open kernel modules @ 570.144 (not tracked)
/nvidia-570.144-reference/

# rmq build artifact (source stays)
tools/rmq/rmq

# ----------------------------------------------------------------------------
# GSP firmware blobs and decompiled GSP output
# (large, license-restricted NVIDIA binaries; analysis scripts/docs stay)
# ----------------------------------------------------------------------------
firmware/**/*.bin
firmware/**/decompiled/
firmware/**/decompiled_*.c

# ----------------------------------------------------------------------------
# Ghidra project databases (large binary DBs; analysis scripts stay tracked)
# ----------------------------------------------------------------------------
tools/ghidra/**/*.rep/
tools/ghidra/**/*.gpr
tools/ghidra/**/*.lock
tools/ghidra/**/*.lock~

# ----------------------------------------------------------------------------
# VM images and disk artifacts (large binaries)
# ----------------------------------------------------------------------------
*.iso
*.img
*.qcow2
*.qcow
*.vmdk
*.vdi
*.raw

# Local VM deployment resources (autoinstall seeds; not part of the
# reproducible core)
/qemu-resources/

# Compiled helper binaries (build from adjacent .c source instead)
tools/debug/nv2080_ctrl
tools/rmtool/rmtool
tools/rmtop/rmtop

# Prebuilt management tool binaries (not rebuilt from this tree)
/userspace/bin/

# ----------------------------------------------------------------------------
# Local QEMU-wrapper / VM-management layer (NOT part of the reproducible core)
# Bring your own wrapper: libvirt, plain qemu, etc.
# ----------------------------------------------------------------------------
/GVM-guest/
/libvf.io/
/libvfio/
/scripts/vgpu_vm.py
/scripts/qemu_control.py
/scripts/qemu_harness.sh
# Local git-push helper (manages per-machine ssh-agent env; not portable)
/scripts/git-push-vgpu.sh

# ----------------------------------------------------------------------------
# Misc
# ----------------------------------------------------------------------------
*.log
*.tmp
.DS_Store
/core
vgcore.*
userspace/tests/test_vgpu_userspace

# Local-only material (never commit).
ARCHAEOLOGY.md
**/PRIVATE-*.md

# CUDA analysis area: `userspace/cuda/*/run/` is the per-version scratch
# tree: extracted vendor binaries, Ghidra projects, decompiled corpora and
# annotated corpora - all vendor-derived or huge, so the whole tree is
# excluded regardless of extension.
userspace/cuda/run/
userspace/cuda/*/run/
# per-area coordination scratch (local only)
userspace/cuda/WORKING-HERE.md

# generated at runtime by tools/guest-diag/vmcycle.sh
tools/guest-diag/launch_qemu_rootport.run.sh

# Vendor SDK headers kept locally as study material (not published)
userspace/sdks/

# ----------------------------------------------------------------------------
# Local evidence workspace (never track as-is)
# Cycle captures are overwhelmingly run logs/dumps (dmesg captures, boot
# polls, serial tails, per-run summaries). Human-written reports and review
# documents are promoted into docs/ when they need to be tracked; anything
# that names host-specific paths or working notes stays local.
# ----------------------------------------------------------------------------
/backups/

# Recorded debugger sessions (bridge checks, probe dumps) - never track
/dumps/
