summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 11:53:20 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 11:53:20 -0400
commit3485a440c69a042ae043ad8089329601272155e8 (patch)
tree28e8478c820973ae06df9d2378abf51b602ba022 /tools
parente95b4055edbc160e64e2561e32debb220303cf41 (diff)
downloadopen-iov-3485a440c69a042ae043ad8089329601272155e8.tar.gz
open-iov-3485a440c69a042ae043ad8089329601272155e8.zip
spdx: add BSD-3-Clause identifiers to userspace/tools/scripts sources
Sweep of the 155 tracked C/Python/shell files under userspace/ (excluding the MIT-licensed vendored userspace/extern/), tools/ and scripts/ that had no per-file license identifier. Each gains the minimal two-line header in the area's existing form: 'SPDX-License-Identifier: BSD-3-Clause' plus 'Copyright (c) 2026 Open-IOV contributors'; shebang and coding lines stay first. No other content touched. kernel/** is deliberately out of scope (recorded as a follow-up in CODESTD-REPORT-2026-10-08.md): its SPDX coverage and MODULE_LICENSE normalization need their own GPL-2.0 pass.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/benchmark_infrastructure.sh2
-rw-r--r--tools/debug/nv2080_ctrl.c2
-rwxr-xr-xtools/debug/nv2080_ctrl.sh2
-rw-r--r--tools/failure_analyzer.py2
-rwxr-xr-xtools/firmware/verify_gsp_firmware.sh2
-rw-r--r--tools/ghidra/analyze_fwimage.py2
-rwxr-xr-xtools/ghidra/analyze_gsp_firmware.sh2
-rw-r--r--tools/ghidra/create_gsp_project.py2
-rw-r--r--tools/ghidra/diff_gsp_firmware.py2
-rw-r--r--tools/ghidra/gsp-fwimage-570.144/scripts/basic_analysis.py2
-rw-r--r--tools/ghidra/gsp-tu104-570.144/scripts/analyze_gsp_fwimage.py2
-rw-r--r--tools/ghidra/gsp-tu104-570.144/scripts/basic_analysis.py2
-rw-r--r--tools/ghidra/gsp-tu104-570.144/scripts/extract_fwimage.py2
-rw-r--r--tools/ghidra/gsp-tu104-570.144/scripts/extract_gsp_version.py2
-rw-r--r--tools/gr-regs/analyze_regs.py2
-rw-r--r--tools/gr-regs/reg_sampler.py2
-rw-r--r--tools/guest-diag/bp999.py2
-rw-r--r--tools/guest-diag/bp999v2.py2
-rw-r--r--tools/guest-diag/bpwait.py2
-rw-r--r--tools/guest-diag/bpz.py2
-rw-r--r--tools/guest-diag/bpz10.py2
-rw-r--r--tools/guest-diag/bpz11.py2
-rw-r--r--tools/guest-diag/bpz12.py2
-rw-r--r--tools/guest-diag/bpz13.py2
-rw-r--r--tools/guest-diag/bpz14.py2
-rw-r--r--tools/guest-diag/bpz16.py2
-rw-r--r--tools/guest-diag/bpz18.py2
-rw-r--r--tools/guest-diag/bpz19.py2
-rw-r--r--tools/guest-diag/bpz2.py2
-rw-r--r--tools/guest-diag/bpz20.py2
-rw-r--r--tools/guest-diag/bpz21.py2
-rw-r--r--tools/guest-diag/bpz3.py2
-rw-r--r--tools/guest-diag/bpz4.py2
-rw-r--r--tools/guest-diag/bpz5.py2
-rw-r--r--tools/guest-diag/bpz6.py2
-rw-r--r--tools/guest-diag/bpz7.py2
-rw-r--r--tools/guest-diag/bpz8.py2
-rw-r--r--tools/guest-diag/bpz9.py2
-rwxr-xr-xtools/guest-diag/bridge_sems.sh2
-rw-r--r--tools/guest-diag/ctx999.py2
-rwxr-xr-xtools/guest-diag/cuda_cycle.sh2
-rwxr-xr-xtools/guest-diag/cycle_cdt.sh2
-rwxr-xr-xtools/guest-diag/dbg_seq.sh2
-rwxr-xr-xtools/guest-diag/dbg_seq2.sh2
-rw-r--r--tools/guest-diag/dumpctx.py2
-rw-r--r--tools/guest-diag/gdb_now.sh2
-rw-r--r--tools/guest-diag/guest_engines.c2
-rw-r--r--tools/guest-diag/guest_kprobes.sh2
-rw-r--r--tools/guest-diag/guest_pin_stream.py2
-rw-r--r--tools/guest-diag/guest_pmap.py2
-rw-r--r--tools/guest-diag/guest_pmap_all.py2
-rw-r--r--tools/guest-diag/guest_pmap_win.py2
-rwxr-xr-xtools/guest-diag/inject_counters.sh2
-rwxr-xr-xtools/guest-diag/inject_maps.sh2
-rwxr-xr-xtools/guest-diag/inject_tracker.sh2
-rw-r--r--tools/guest-diag/invd.py2
-rw-r--r--tools/guest-diag/ioctl_trace.c2
-rwxr-xr-xtools/guest-diag/kret.sh2
-rw-r--r--tools/guest-diag/kretprobes.sh2
-rwxr-xr-xtools/guest-diag/launch_qemu_rootport.sh2
-rw-r--r--tools/guest-diag/memprobe.py2
-rw-r--r--tools/guest-diag/nmi_catch.sh2
-rw-r--r--tools/guest-diag/oneshot_gdb.sh2
-rwxr-xr-xtools/guest-diag/pdwatch_cycle.sh2
-rw-r--r--tools/guest-diag/peek.c2
-rwxr-xr-xtools/guest-diag/phys_claim_cycle.sh2
-rwxr-xr-xtools/guest-diag/pin_client_sems.sh2
-rw-r--r--tools/guest-diag/pin_gr_stream.py2
-rw-r--r--tools/guest-diag/pin_gr_window.py2
-rwxr-xr-xtools/guest-diag/pin_miss_pages.sh2
-rwxr-xr-xtools/guest-diag/pin_sem_fast.sh2
-rwxr-xr-xtools/guest-diag/pmap_va.sh2
-rw-r--r--tools/guest-diag/ptrace_ioctl.c2
-rwxr-xr-xtools/guest-diag/push_guest_tools.sh2
-rwxr-xr-xtools/guest-diag/read_va.py2
-rw-r--r--tools/guest-diag/rmq_probe.c2
-rwxr-xr-xtools/guest-diag/run_cycle.sh2
-rwxr-xr-xtools/guest-diag/run_traced.sh2
-rw-r--r--tools/guest-diag/scan.c2
-rw-r--r--tools/guest-diag/scan2.c2
-rw-r--r--tools/guest-diag/scan3.c2
-rwxr-xr-xtools/guest-diag/scanerr.py2
-rwxr-xr-xtools/guest-diag/sem_counters.py2
-rwxr-xr-xtools/guest-diag/sem_slots.py2
-rwxr-xr-xtools/guest-diag/semfix_uvmt.py2
-rw-r--r--tools/guest-diag/semfix_watch.py2
-rwxr-xr-xtools/guest-diag/sempages.py2
-rwxr-xr-xtools/guest-diag/stack_sampler.sh2
-rw-r--r--tools/guest-diag/state_log.sh2
-rw-r--r--tools/guest-diag/sysc_shim.c2
-rw-r--r--tools/guest-diag/track_waits.sh2
-rw-r--r--tools/guest-diag/trkinfo.py2
-rwxr-xr-xtools/guest-diag/uvm_rmmem_probe.sh2
-rw-r--r--tools/guest-diag/uvmprobe.sh2
-rw-r--r--tools/guest-diag/uvmt_poll.py2
-rw-r--r--tools/guest-diag/uvmwait.sh2
-rwxr-xr-xtools/guest-diag/vmcycle.sh2
-rwxr-xr-xtools/guest-diag/vmrestart.sh2
-rw-r--r--tools/guest-diag/watch_ctx.sh2
-rw-r--r--tools/guest_agent/guest_test_agent.py2
-rw-r--r--tools/guest_init_monitor.py2
-rwxr-xr-xtools/module_ops/dry_run.sh2
-rwxr-xr-xtools/module_ops/load_converged.sh2
-rwxr-xr-xtools/module_ops/unload_all.sh2
-rw-r--r--tools/rmq/grctx_oracle.c2
-rw-r--r--tools/rmq/kmod/wpr2_reset_kmod.c2
-rw-r--r--tools/rmq/rmq.c2
-rw-r--r--tools/rmq/wpr2_reset.c2
-rw-r--r--tools/rmtool/include/rm_api.h2
-rw-r--r--tools/rmtool/include/rmtool.h2
-rw-r--r--tools/rmtool/src/engine.c2
-rw-r--r--tools/rmtool/src/gpu.c2
-rw-r--r--tools/rmtool/src/main.c2
-rw-r--r--tools/rmtool/src/mem.c2
-rw-r--r--tools/rmtool/src/nv2080.c2
-rw-r--r--tools/rmtool/src/output.c2
-rw-r--r--tools/rmtool/src/query.c2
-rw-r--r--tools/rmtool/src/rm_api.c2
-rw-r--r--tools/rmtop/include/rmtop.h2
-rw-r--r--tools/rmtop/src/main.c2
-rw-r--r--tools/rmtop/src/panel.c2
-rw-r--r--tools/test/cuda_drv_test.c2
-rw-r--r--tools/test/cuda_drv_test2.c2
-rw-r--r--tools/test/gpage_test.c2
-rwxr-xr-xtools/test/run_integration_tests.sh2
-rwxr-xr-xtools/vm/launch_vgpu_qemu.sh2
-rwxr-xr-xtools/vm/setup_mdev.sh2
127 files changed, 254 insertions, 0 deletions
diff --git a/tools/benchmark_infrastructure.sh b/tools/benchmark_infrastructure.sh
index 606aa10..9efe06a 100755
--- a/tools/benchmark_infrastructure.sh
+++ b/tools/benchmark_infrastructure.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# benchmark_infrastructure.sh - Benchmark runner for VM vs bare metal comparison
set -euo pipefail
diff --git a/tools/debug/nv2080_ctrl.c b/tools/debug/nv2080_ctrl.c
index 46ade02..fb1b924 100644
--- a/tools/debug/nv2080_ctrl.c
+++ b/tools/debug/nv2080_ctrl.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/*
* NV2080 Control Command Sender
* C program to send NV2080 RM control commands via ioctl
diff --git a/tools/debug/nv2080_ctrl.sh b/tools/debug/nv2080_ctrl.sh
index 22c7117..e432120 100755
--- a/tools/debug/nv2080_ctrl.sh
+++ b/tools/debug/nv2080_ctrl.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# NV2080 Control Command Tool
# Sends NV2080 RM control commands to the NVIDIA kernel module via ioctl
# Usage: ./nv2080_ctrl.sh <device_fd> <command> [params...]
diff --git a/tools/failure_analyzer.py b/tools/failure_analyzer.py
index 11351da..5fd6f67 100644
--- a/tools/failure_analyzer.py
+++ b/tools/failure_analyzer.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
"""
failure_analyzer.py - Analyze and classify guest initialization failures
Correlates host tracepoints, guest logs, and QEMU state
diff --git a/tools/firmware/verify_gsp_firmware.sh b/tools/firmware/verify_gsp_firmware.sh
index 79f474c..b5c6427 100755
--- a/tools/firmware/verify_gsp_firmware.sh
+++ b/tools/firmware/verify_gsp_firmware.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Verify GSP firmware for TU104
# Usage: ./verify_gsp_firmware.sh
diff --git a/tools/ghidra/analyze_fwimage.py b/tools/ghidra/analyze_fwimage.py
index 5d98504..6cf8d24 100644
--- a/tools/ghidra/analyze_fwimage.py
+++ b/tools/ghidra/analyze_fwimage.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
"""
Analyze GSP firmware .fwimage binary in Ghidra.
Usage: python3 analyze_fwimage.py <fwimage_bin> <project_dir> <project_name>
diff --git a/tools/ghidra/analyze_gsp_firmware.sh b/tools/ghidra/analyze_gsp_firmware.sh
index b2e40d5..bf5d4f6 100755
--- a/tools/ghidra/analyze_gsp_firmware.sh
+++ b/tools/ghidra/analyze_gsp_firmware.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Full GSP firmware analysis pipeline
# Usage: ./analyze_gsp_firmware.sh <firmware_bin> [output_dir]
diff --git a/tools/ghidra/create_gsp_project.py b/tools/ghidra/create_gsp_project.py
index 3f505f1..2d9a588 100644
--- a/tools/ghidra/create_gsp_project.py
+++ b/tools/ghidra/create_gsp_project.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
"""
Create Ghidra project for GSP firmware analysis.
Usage: python3 create_gsp_project.py <firmware_bin> <project_dir> <project_name>
diff --git a/tools/ghidra/diff_gsp_firmware.py b/tools/ghidra/diff_gsp_firmware.py
index 8145982..f9ddaec 100644
--- a/tools/ghidra/diff_gsp_firmware.py
+++ b/tools/ghidra/diff_gsp_firmware.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
"""
Diff two GSP firmware versions.
Usage: python3 diff_gsp_firmware.py <old_firmware> <new_firmware> <output_report>
diff --git a/tools/ghidra/gsp-fwimage-570.144/scripts/basic_analysis.py b/tools/ghidra/gsp-fwimage-570.144/scripts/basic_analysis.py
index 4992106..ad15d1e 100644
--- a/tools/ghidra/gsp-fwimage-570.144/scripts/basic_analysis.py
+++ b/tools/ghidra/gsp-fwimage-570.144/scripts/basic_analysis.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Ghidra script to do basic disassembly analysis of GSP .fwimage binary
# Usage: analyzeHeadless ... -postScript basic_analysis.py
diff --git a/tools/ghidra/gsp-tu104-570.144/scripts/analyze_gsp_fwimage.py b/tools/ghidra/gsp-tu104-570.144/scripts/analyze_gsp_fwimage.py
index 4a6fb56..083e01f 100644
--- a/tools/ghidra/gsp-tu104-570.144/scripts/analyze_gsp_fwimage.py
+++ b/tools/ghidra/gsp-tu104-570.144/scripts/analyze_gsp_fwimage.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Ghidra script to analyze GSP .fwimage binary
# Usage: analyzeHeadless ... -postScript analyze_gsp_fwimage.py
diff --git a/tools/ghidra/gsp-tu104-570.144/scripts/basic_analysis.py b/tools/ghidra/gsp-tu104-570.144/scripts/basic_analysis.py
index 4992106..ad15d1e 100644
--- a/tools/ghidra/gsp-tu104-570.144/scripts/basic_analysis.py
+++ b/tools/ghidra/gsp-tu104-570.144/scripts/basic_analysis.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Ghidra script to do basic disassembly analysis of GSP .fwimage binary
# Usage: analyzeHeadless ... -postScript basic_analysis.py
diff --git a/tools/ghidra/gsp-tu104-570.144/scripts/extract_fwimage.py b/tools/ghidra/gsp-tu104-570.144/scripts/extract_fwimage.py
index d8b0bfd..c9288ed 100644
--- a/tools/ghidra/gsp-tu104-570.144/scripts/extract_fwimage.py
+++ b/tools/ghidra/gsp-tu104-570.144/scripts/extract_fwimage.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Ghidra script to extract .fwimage section from GSP firmware ELF
# Usage: analyzeHeadless ... -postScript extract_fwimage.py
diff --git a/tools/ghidra/gsp-tu104-570.144/scripts/extract_gsp_version.py b/tools/ghidra/gsp-tu104-570.144/scripts/extract_gsp_version.py
index ef44d7d..8e577f1 100644
--- a/tools/ghidra/gsp-tu104-570.144/scripts/extract_gsp_version.py
+++ b/tools/ghidra/gsp-tu104-570.144/scripts/extract_gsp_version.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Ghidra script to extract version from .fwversion section of GSP binary
# Usage: analyzeHeadless ... -postScript extract_gsp_version.py
diff --git a/tools/gr-regs/analyze_regs.py b/tools/gr-regs/analyze_regs.py
index b03aca4..a8227da 100644
--- a/tools/gr-regs/analyze_regs.py
+++ b/tools/gr-regs/analyze_regs.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
import collections, sys
path = sys.argv[1] if len(sys.argv) > 1 else '/tmp/opencode/regs-m63.txt'
cmp_mode = len(sys.argv) > 2 and sys.argv[2] == 'cmp'
diff --git a/tools/gr-regs/reg_sampler.py b/tools/gr-regs/reg_sampler.py
index 24c8296..8ed765e 100644
--- a/tools/gr-regs/reg_sampler.py
+++ b/tools/gr-regs/reg_sampler.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# reg_sampler.py - read-only BAR0 register sampler for GR/FECS/SKED ground truth.
#
# Purpose
diff --git a/tools/guest-diag/bp999.py b/tools/guest-diag/bp999.py
index ff7a23f..2729aac 100644
--- a/tools/guest-diag/bp999.py
+++ b/tools/guest-diag/bp999.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: break on the libcuda instructions that produce CUDA errors
# 719 (0x2cf) and 999 (0x3e7), then print the stack that led there and the
# error record the scanner reads (FUN_0054fa00 walks ctx[0x1291] -> +0x10 ->
diff --git a/tools/guest-diag/bp999v2.py b/tools/guest-diag/bp999v2.py
index 766bc3b..3bd9cd9 100644
--- a/tools/guest-diag/bp999v2.py
+++ b/tools/guest-diag/bp999v2.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: break at the 999/719 RETURN sites of the libcuda scanner
# FUN_0054fa00 and dump the record values the scanner actually read (they are
# still in its stack locals, so the host clearing the notification afterwards
diff --git a/tools/guest-diag/bpwait.py b/tools/guest-diag/bpwait.py
index 9b708c8..d44fd32 100644
--- a/tools/guest-diag/bpwait.py
+++ b/tools/guest-diag/bpwait.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: catch the tracker-gate exit with a NONZERO dispatcher status and
# dump the wait-entry array the gate polls. This names the wait that ends the
# client's context-init spin (the value that becomes the CUDA error).
diff --git a/tools/guest-diag/bpz.py b/tools/guest-diag/bpz.py
index 53d46a6..b61579a 100644
--- a/tools/guest-diag/bpz.py
+++ b/tools/guest-diag/bpz.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: name the silent-rollback 999 site in the cuCtxCreate path.
#
# Sites (file vaddr of libcuda.so.570.144; runtime = base + off):
diff --git a/tools/guest-diag/bpz10.py b/tools/guest-diag/bpz10.py
index 30aa1da..7766103 100644
--- a/tools/guest-diag/bpz10.py
+++ b/tools/guest-diag/bpz10.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: name the first failing call inside FUN_003e90c0 (ucode-image
# create, second half) after FUN_003d1e70 (blob parse) succeeded.
#
diff --git a/tools/guest-diag/bpz11.py b/tools/guest-diag/bpz11.py
index 601a73d..2fb5c02 100644
--- a/tools/guest-diag/bpz11.py
+++ b/tools/guest-diag/bpz11.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: split FUN_00391ee0 (ucode-image registration, file 0x291ee0).
#
# PART 76 + bpz10 run: FUN_003e90c0's failing call is FUN_00391ee0, which
diff --git a/tools/guest-diag/bpz12.py b/tools/guest-diag/bpz12.py
index 3a5767c..d4b4d8e 100644
--- a/tools/guest-diag/bpz12.py
+++ b/tools/guest-diag/bpz12.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: split FUN_00386b90 (ucode image section callback, file
# 0x286b90) - bpz11 showed FUN_00386020 returned 1 from this callback.
#
diff --git a/tools/guest-diag/bpz13.py b/tools/guest-diag/bpz13.py
index 6f2aa8f..3096f30 100644
--- a/tools/guest-diag/bpz13.py
+++ b/tools/guest-diag/bpz13.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: dump FUN_003e35f0 args at the call from FUN_00e0e970 (file
# 0xd0e970 -> call site 0xd0eb65, caller return 0xd0eb6a).
#
diff --git a/tools/guest-diag/bpz14.py b/tools/guest-diag/bpz14.py
index 24302c9..b960676 100644
--- a/tools/guest-diag/bpz14.py
+++ b/tools/guest-diag/bpz14.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: dump the device-object TPC/SM count fields in the guest at the
# FUN_003e3e80 call from FUN_00e0e970 (caller return 0xd0eae1).
#
diff --git a/tools/guest-diag/bpz16.py b/tools/guest-diag/bpz16.py
index c67175d..48b4a53 100644
--- a/tools/guest-diag/bpz16.py
+++ b/tools/guest-diag/bpz16.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: probe the guest's chip-info vtable call (ds->[0x4d38]) and the
# 0xc48/0xc4c fields at the FUN_003e3e80 call from FUN_00e0e970.
#
diff --git a/tools/guest-diag/bpz18.py b/tools/guest-diag/bpz18.py
index ed82084..7e955cd 100644
--- a/tools/guest-diag/bpz18.py
+++ b/tools/guest-diag/bpz18.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: trace the path through FUN_0042aec0 (GPU arch/config init) in
# the guest, launched as `gdb --args /tmp/cdt` so early device-init code is
# caught.
diff --git a/tools/guest-diag/bpz19.py b/tools/guest-diag/bpz19.py
index 9dfed68..82a9bd3 100644
--- a/tools/guest-diag/bpz19.py
+++ b/tools/guest-diag/bpz19.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: trace the path through FUN_0042aec0 (GPU arch/config init) by
# attaching to a running cdt at the CDT_PAUSE (bpz18 variant).
#
diff --git a/tools/guest-diag/bpz2.py b/tools/guest-diag/bpz2.py
index 2d399ff..1058de5 100644
--- a/tools/guest-diag/bpz2.py
+++ b/tools/guest-diag/bpz2.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: capture the post-pump failure call in FUN_00374240 (ctx init).
#
# From the previous run: the engine event pump FUN_0031a3b0 returned 0
diff --git a/tools/guest-diag/bpz20.py b/tools/guest-diag/bpz20.py
index cf8ee8c..d90bc20 100644
--- a/tools/guest-diag/bpz20.py
+++ b/tools/guest-diag/bpz20.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: catch the write that ZEROES ds+0xe94 after the CASE1 body set
# it to 0x18. Run via run_cycle.sh gdb-launch (device init happens during
# cuInit, before the CDT_PAUSE).
diff --git a/tools/guest-diag/bpz21.py b/tools/guest-diag/bpz21.py
index f9809a7..f56b066 100644
--- a/tools/guest-diag/bpz21.py
+++ b/tools/guest-diag/bpz21.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: dump param_2[] at FUN_00337e60 entry when called from
# FUN_00550ff0 (file 0x450ff0). bpz20 showed FUN_00550ff0 -> FUN_00337e60
# overwrites ds+0xe94 with param_2[0x23]; on the host that is 0x18 (24 TPC).
diff --git a/tools/guest-diag/bpz3.py b/tools/guest-diag/bpz3.py
index ae90f86..4528622 100644
--- a/tools/guest-diag/bpz3.py
+++ b/tools/guest-diag/bpz3.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: find the exact site that sets r14d=999 in FUN_00374240.
#
# Run #2 showed every post-pump call site up to 0x2755bf returning 0, then
diff --git a/tools/guest-diag/bpz4.py b/tools/guest-diag/bpz4.py
index eca9618..69cb2b0 100644
--- a/tools/guest-diag/bpz4.py
+++ b/tools/guest-diag/bpz4.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: identify the vtable slot that returns 999 in ctx bring-up.
#
# Run #3 found the failing store at file 0x275cec: the indirect call at
diff --git a/tools/guest-diag/bpz5.py b/tools/guest-diag/bpz5.py
index 568b2f2..d47968e 100644
--- a/tools/guest-diag/bpz5.py
+++ b/tools/guest-diag/bpz5.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: identify WHICH engine-setup hook returns 999.
#
# Run #4 named the target: file 0x4d1fa0 (the +0x4580 table slot) — an engine
diff --git a/tools/guest-diag/bpz6.py b/tools/guest-diag/bpz6.py
index 7742da2..c515878 100644
--- a/tools/guest-diag/bpz6.py
+++ b/tools/guest-diag/bpz6.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: at the membar-WAR hook failure, read the device arch/impl and
# test the FUN_0035a4d0(0x13, arch, rev) descriptor lookup in-process.
#
diff --git a/tools/guest-diag/bpz7.py b/tools/guest-diag/bpz7.py
index 2294298..02f29ed 100644
--- a/tools/guest-diag/bpz7.py
+++ b/tools/guest-diag/bpz7.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: split the membar-WAR hook failure into lookup vs ucode-load.
#
# The remap table at file 0x3dc5b80 maps (chip=7,rev=5)->(7,0) (real Turing
diff --git a/tools/guest-diag/bpz8.py b/tools/guest-diag/bpz8.py
index e0567e5..c44b028 100644
--- a/tools/guest-diag/bpz8.py
+++ b/tools/guest-diag/bpz8.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: localize the ucode-image load failure inside FUN_00e21850.
#
# Run #7: in the membar-WAR hook the descriptor lookup FUN_0035a4d0(0x13,7,5)
diff --git a/tools/guest-diag/bpz9.py b/tools/guest-diag/bpz9.py
index 06c5d96..bbed25f 100644
--- a/tools/guest-diag/bpz9.py
+++ b/tools/guest-diag/bpz9.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: split the failing ucode image create (FUN_003e99d0).
#
# Run #9: FUN_00e21850 -> FUN_003e99d0 returned 1 for the membar-WAR blob.
diff --git a/tools/guest-diag/bridge_sems.sh b/tools/guest-diag/bridge_sems.sh
index a024524..fee71ca 100755
--- a/tools/guest-diag/bridge_sems.sh
+++ b/tools/guest-diag/bridge_sems.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# bridge_sems.sh - bridge the guest's own page table view into the host service.
#
# The emulation cannot (yet) translate the CUDA client's sysmem semaphores
diff --git a/tools/guest-diag/ctx999.py b/tools/guest-diag/ctx999.py
index e5472c8..b99e455 100644
--- a/tools/guest-diag/ctx999.py
+++ b/tools/guest-diag/ctx999.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: catch where a hanging/failing cuCtxCreate goes.
#
# Arms the libcuda 999-scanner sites (FUN_0054fa00 entry/999/0x2cf returns)
diff --git a/tools/guest-diag/cuda_cycle.sh b/tools/guest-diag/cuda_cycle.sh
index cc333fb..fed6e98 100755
--- a/tools/guest-diag/cuda_cycle.sh
+++ b/tools/guest-diag/cuda_cycle.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# cuda_cycle.sh - one full CUDA bring-up attempt: restart the VM, push the
# guest tools, start cdt holding on failure, wait for the 20 GR channels,
# register/pin the completion counters, and arm the RM-error scanner so the
diff --git a/tools/guest-diag/cycle_cdt.sh b/tools/guest-diag/cycle_cdt.sh
index 3aaa723..9fc5b69 100755
--- a/tools/guest-diag/cycle_cdt.sh
+++ b/tools/guest-diag/cycle_cdt.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# cycle_cdt.sh - full test cycle: push tools, start cdt, inject the libcuda
# tracker page mapping when the tracker wait is reached, poke UVM's tracker
# when it stalls, and report where cdt ends up.
diff --git a/tools/guest-diag/dbg_seq.sh b/tools/guest-diag/dbg_seq.sh
index 247bc91..e222d3c 100755
--- a/tools/guest-diag/dbg_seq.sh
+++ b/tools/guest-diag/dbg_seq.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
/tmp/ptio /tmp/cdt > /dev/null 2>/tmp/tr.log
n=$(grep -n 'req=0x25' /tmp/tr.log | head -1 | cut -d: -f1)
echo "marker line: $n"
diff --git a/tools/guest-diag/dbg_seq2.sh b/tools/guest-diag/dbg_seq2.sh
index 8710fd9..28290eb 100755
--- a/tools/guest-diag/dbg_seq2.sh
+++ b/tools/guest-diag/dbg_seq2.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
/tmp/ptio /tmp/cdt > /dev/null 2>/tmp/tr.log
n=$(grep -n 'req=0x25' /tmp/tr.log | head -1 | cut -d: -f1)
echo "=== controls AFTER register (line $n), first 40: ==="
diff --git a/tools/guest-diag/dumpctx.py b/tools/guest-diag/dumpctx.py
index 983997e..4f433a3 100644
--- a/tools/guest-diag/dumpctx.py
+++ b/tools/guest-diag/dumpctx.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script (run with: sudo gdb -p <pid> -batch -x /tmp/dumpctx.py)
# Dumps the libcuda client wait-loop context: the ctx object's queue/entry
# array (ctx+0x10 = count, ctx+0x18 = array of 0x28-byte entries) plus each
diff --git a/tools/guest-diag/gdb_now.sh b/tools/guest-diag/gdb_now.sh
index b58fe3d..4aa394e 100644
--- a/tools/guest-diag/gdb_now.sh
+++ b/tools/guest-diag/gdb_now.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb_now.sh <pid> - attach gdb once immediately (root), dump all threads,
# detach, CONT. Used when the host has seen the final RM control, so the
# attach is timed to the post-control window instead of state sampling.
diff --git a/tools/guest-diag/guest_engines.c b/tools/guest-diag/guest_engines.c
index 10209e2..e04de76 100644
--- a/tools/guest-diag/guest_engines.c
+++ b/tools/guest-diag/guest_engines.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* guest_engines.c - query the guest client RM for the data UVM's register
* path depends on: virtualization mode, subdevice count, ENGINE LIST,
* CLASS LIST, CE caps and CE->PCE masks. Uses the NVOS64 serialized alloc
diff --git a/tools/guest-diag/guest_kprobes.sh b/tools/guest-diag/guest_kprobes.sh
index d3db7b3..58c539a 100644
--- a/tools/guest-diag/guest_kprobes.sh
+++ b/tools/guest-diag/guest_kprobes.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# guest_kprobes.sh - (re)install the UVM trace probes used by semfix_watch.py.
# Runs in the guest as root; kprobes do not survive a guest boot, so this must
# run after every VM restart.
diff --git a/tools/guest-diag/guest_pin_stream.py b/tools/guest-diag/guest_pin_stream.py
index 581dc9d..6c22e62 100644
--- a/tools/guest-diag/guest_pin_stream.py
+++ b/tools/guest-diag/guest_pin_stream.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# guest_pin_stream.py - stream the CUDA client's push-buffer VA->PA pairs to
# the host over vsock, continuously and without the guest agent on the hot
# path. Runs in the guest as root (pagemap reads).
diff --git a/tools/guest-diag/guest_pmap.py b/tools/guest-diag/guest_pmap.py
index 96b7ddc..e2622c4 100644
--- a/tools/guest-diag/guest_pmap.py
+++ b/tools/guest-diag/guest_pmap.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# guest-side helper: translate GPU/user VAs of a process through its pagemap.
# Usage: sudo python3 guest_pmap.py <pid> <hex-va> [hex-va ...]
import os
diff --git a/tools/guest-diag/guest_pmap_all.py b/tools/guest-diag/guest_pmap_all.py
index 1a4df34..a1766c1 100644
--- a/tools/guest-diag/guest_pmap_all.py
+++ b/tools/guest-diag/guest_pmap_all.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# guest-side helper: dump present pages of the target's /dev/nvidia* mappings
# as "va,pa" lines (root in the guest), starting at or above va-min and
# stopping after max-pairs lines so the guest agent's output stays small.
diff --git a/tools/guest-diag/guest_pmap_win.py b/tools/guest-diag/guest_pmap_win.py
index 501e7bc..8732859 100644
--- a/tools/guest-diag/guest_pmap_win.py
+++ b/tools/guest-diag/guest_pmap_win.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# guest_pmap_win.py - dump present pages of a process's VA range through the
# guest's own pagemap (root in the guest). Batched reads (512 entries per
# pread) so a 256 MB window takes about a second, not minutes.
diff --git a/tools/guest-diag/inject_counters.sh b/tools/guest-diag/inject_counters.sh
index 5ee60fd..5bec72a 100755
--- a/tools/guest-diag/inject_counters.sh
+++ b/tools/guest-diag/inject_counters.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# inject_counters.sh - register the running CUDA client's per-channel GPU
# completion counters with the host sema service (the PART 45/46 manual
# procedure, made durable). The host then tracks each GR channel's consumed
diff --git a/tools/guest-diag/inject_maps.sh b/tools/guest-diag/inject_maps.sh
index 6dcabb5..3f018db 100755
--- a/tools/guest-diag/inject_maps.sh
+++ b/tools/guest-diag/inject_maps.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# inject_maps.sh - while cdt runs, collect pushbuffer/ring VAs from the host
# dmesg (sema-chan entry logs) plus channel GPFIFO ring VAs, translate them
# through the guest's own pagemap, and inject the VA->PA pairs into the
diff --git a/tools/guest-diag/inject_tracker.sh b/tools/guest-diag/inject_tracker.sh
index 0a292e4..5438a6d 100755
--- a/tools/guest-diag/inject_tracker.sh
+++ b/tools/guest-diag/inject_tracker.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# inject_tracker.sh - find the libcuda tracker slot the stuck cdt is polling,
# translate its page through the guest pagemap, pin the mapping in the service.
set -u
diff --git a/tools/guest-diag/invd.py b/tools/guest-diag/invd.py
index 313daa3..5838947 100644
--- a/tools/guest-diag/invd.py
+++ b/tools/guest-diag/invd.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: read the device arch/impl and test the membar-WAR descriptor
# lookup (FUN_0035a4d0) live on the parked cdt.
#
diff --git a/tools/guest-diag/ioctl_trace.c b/tools/guest-diag/ioctl_trace.c
index 661636f..4835b10 100644
--- a/tools/guest-diag/ioctl_trace.c
+++ b/tools/guest-diag/ioctl_trace.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* ioctl_trace.c - log the NVIDIA driver ioctls of a child process.
*
* libcuda issues raw syscall instructions, so LD_PRELOAD/ltrace never see
diff --git a/tools/guest-diag/kret.sh b/tools/guest-diag/kret.sh
index 9ed1220..ba374f8 100755
--- a/tools/guest-diag/kret.sh
+++ b/tools/guest-diag/kret.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# kret.sh - kretprobe the nvGpuOps* call chain in the guest's nvidia.ko and
# capture return values while /tmp/cdt runs. Run with sudo.
set -u
diff --git a/tools/guest-diag/kretprobes.sh b/tools/guest-diag/kretprobes.sh
index a5357db..4945c51 100644
--- a/tools/guest-diag/kretprobes.sh
+++ b/tools/guest-diag/kretprobes.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# kretprobes.sh - return-value probes for the UVM API entry points, so the
# failing UVM operation names itself in the trace tail.
TR=/sys/kernel/tracing
diff --git a/tools/guest-diag/launch_qemu_rootport.sh b/tools/guest-diag/launch_qemu_rootport.sh
index 1ddcb92..d7ef097 100755
--- a/tools/guest-diag/launch_qemu_rootport.sh
+++ b/tools/guest-diag/launch_qemu_rootport.sh
@@ -1,2 +1,4 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
exec /bin/qemu-system-x86_64 -D /home/rmcore/.local/libvf.io/logs/qemu/e726ba0b-204f-4ec9-91da-983ed7f41d06-session.txt -no-hpet -mem-prealloc -qmp unix:/tmp/qemu-qmp.sock,server,nowait -chardev socket,path=/tmp/qemu-guest-agent.sock,server=on,wait=off,id=qga0 -device virtio-serial-pci -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -serial file:/tmp/vgpu-guest-serial.log -gdb tcp::1234 -display none -device ivshmem-plain,id=shmem0,memdev=ivshmem_kvmfr -object memory-backend-file,id=ivshmem_kvmfr,mem-path=/dev/shm/kvmfr-e726ba0b-204f-4ec9-91da-983ed7f41d06,size=128M,share=yes -device ivshmem-plain,id=shmem1,memdev=ivshmem_kvmsr -object memory-backend-file,id=ivshmem_kvmsr,mem-path=/dev/shm/kvmsr-e726ba0b-204f-4ec9-91da-983ed7f41d06,size=2M,share=yes -object memory-backend-file,id=pc.ram,size=4096M,mem-path=/dev/shm/vgpu-guest-ram,share=yes,prealloc=on -uuid e726ba0b-204f-4ec9-91da-983ed7f41d06 -machine pc-q35-4.2,accel=kvm,usb=off,vmport=off,dump-guest-core=off,memory-backend=pc.ram -cpu host,ss=on,vmx=on,pcid=on,hypervisor=on,arat=on,tsc-adjust=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaveopt=on,pdpe1gb=on,ibpb=on,amd-stibp=on,amd-ssbd=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,hv-vapic,hv_time,hv-spinlocks=0x1fff,hv-vendor-id=null,kvm=on,topoext=on -rtc clock=host,base=localtime -m 4096 -smp cores=4,threads=1,sockets=1 -hda /home/rmcore/.local/libvf.io/kernel/linux.qcow2 --enable-kvm -device pcie-root-port,id=rp0,chassis=1,slot=30,bus=pcie.0 -device vfio-pci,id=hostdev0,bus=rp0,sysfsdev=/sys/bus/mdev/devices/<MDEV-UUID>,display=off -device rtl8139,netdev=net0 -netdev user,id=net0 -net user,hostfwd=tcp::2222-:22 -net nic -device vhost-vsock-pci,guest-cid=50718 -qmp unix:/tmp/sockets/e726ba0b-204f-4ec9-91da-983ed7f41d06/main.sock,server,nowait -qmp unix:/tmp/sockets/e726ba0b-204f-4ec9-91da-983ed7f41d06/master.sock,server,nowait
diff --git a/tools/guest-diag/memprobe.py b/tools/guest-diag/memprobe.py
index c2bab9f..f246476 100644
--- a/tools/guest-diag/memprobe.py
+++ b/tools/guest-diag/memprobe.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# memprobe.py - read/write another process's memory through /proc/<pid>/mem
# (root only, no gdb/ptrace attach needed).
#
diff --git a/tools/guest-diag/nmi_catch.sh b/tools/guest-diag/nmi_catch.sh
index 3afa895..af46a23 100644
--- a/tools/guest-diag/nmi_catch.sh
+++ b/tools/guest-diag/nmi_catch.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# nmi_catch.sh [rounds] [sleep] - trigger sysrq-l NMI backtraces and append a
# compact summary of the nvidia frames seen in each round (guest side, root).
#
diff --git a/tools/guest-diag/oneshot_gdb.sh b/tools/guest-diag/oneshot_gdb.sh
index 9161ee4..c272acc 100644
--- a/tools/guest-diag/oneshot_gdb.sh
+++ b/tools/guest-diag/oneshot_gdb.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# oneshot_gdb.sh <pid> - catch the client's USERSPACE spin (state R and
# /proc/<pid>/syscall == "running"; a kernel busy-wait shows its syscall
# number). Fires gdb ONCE, dumps all threads, detaches, CONTs.
diff --git a/tools/guest-diag/pdwatch_cycle.sh b/tools/guest-diag/pdwatch_cycle.sh
index fe758fd..d1cbe41 100755
--- a/tools/guest-diag/pdwatch_cycle.sh
+++ b/tools/guest-diag/pdwatch_cycle.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# pdwatch_cycle.sh - TASK 2: watch every write landing in the root PD pages
# 0x200000..0x204000 (and the 0x208000 table) through a full cdt2 run, with
# the walk state sampled during the CP park and after completion.
diff --git a/tools/guest-diag/peek.c b/tools/guest-diag/peek.c
index 857afd0..7c959ec 100644
--- a/tools/guest-diag/peek.c
+++ b/tools/guest-diag/peek.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* peek.c - print RIP/RBX/RSP/RDI of every thread of a process (root).
usage: peek PID [lo_off hi_off] (offsets from the libcuda r-xp base)
Flags threads whose RIP is inside [base+lo, base+hi) with SPIN. */
diff --git a/tools/guest-diag/phys_claim_cycle.sh b/tools/guest-diag/phys_claim_cycle.sh
index e89fbfc..6ce7cff 100755
--- a/tools/guest-diag/phys_claim_cycle.sh
+++ b/tools/guest-diag/phys_claim_cycle.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# phys_claim_cycle.sh - supervised physical-GPU claim/release cycle harness.
#
# Drives one or more full "D0 pre-lock" cycles of the physical-ownership
diff --git a/tools/guest-diag/pin_client_sems.sh b/tools/guest-diag/pin_client_sems.sh
index af39fd1..9d5cdac 100755
--- a/tools/guest-diag/pin_client_sems.sh
+++ b/tools/guest-diag/pin_client_sems.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# pin_client_sems.sh - bridge the CUDA client's device mappings into the
# emulation for the live cdt process.
#
diff --git a/tools/guest-diag/pin_gr_stream.py b/tools/guest-diag/pin_gr_stream.py
index 7f8e4b8..aba3912 100644
--- a/tools/guest-diag/pin_gr_stream.py
+++ b/tools/guest-diag/pin_gr_stream.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# pin_gr_stream.py - pin the CUDA client's GR push-buffer pages from a vsock
# stream produced by guest_pin_stream.py (guest truth via /proc/<pid>/pagemap).
#
diff --git a/tools/guest-diag/pin_gr_window.py b/tools/guest-diag/pin_gr_window.py
index 71f73d0..194ac9d 100644
--- a/tools/guest-diag/pin_gr_window.py
+++ b/tools/guest-diag/pin_gr_window.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# pin_gr_window.py - pin the CUDA client's GR push-buffer pages from guest
# truth, per boot (host-side dev tool, no guest changes beyond the helper).
#
diff --git a/tools/guest-diag/pin_miss_pages.sh b/tools/guest-diag/pin_miss_pages.sh
index fd7722a..34786ac 100755
--- a/tools/guest-diag/pin_miss_pages.sh
+++ b/tools/guest-diag/pin_miss_pages.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# pin_miss_pages.sh - adaptive tracker-sem pinner.
#
# Watches the host journal for "release miss va=0x..." lines, resolves those
diff --git a/tools/guest-diag/pin_sem_fast.sh b/tools/guest-diag/pin_sem_fast.sh
index 16cecc4..c4493f3 100755
--- a/tools/guest-diag/pin_sem_fast.sh
+++ b/tools/guest-diag/pin_sem_fast.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# pin_sem_fast.sh - low-latency tracker-sem pinner (2 s poll vs 15 s).
#
# Pins the client tracker-sem page (0x20400f000, covers 0x20400fec0..ff70)
diff --git a/tools/guest-diag/pmap_va.sh b/tools/guest-diag/pmap_va.sh
index e5bcef4..dbe91df 100755
--- a/tools/guest-diag/pmap_va.sh
+++ b/tools/guest-diag/pmap_va.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# pmap_va.sh <pid|name> <hex-va> [hex-va ...]
# Push guest_pmap.py to the running VM and translate the VAs of the named
# process through the guest's own pagemap (root in the guest).
diff --git a/tools/guest-diag/ptrace_ioctl.c b/tools/guest-diag/ptrace_ioctl.c
index 5f96b31..1762d4c 100644
--- a/tools/guest-diag/ptrace_ioctl.c
+++ b/tools/guest-diag/ptrace_ioctl.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* ptrace_ioctl.c - follow a child with PTRACE_SYSCALL and dump the buffer
* results of selected UVM ioctls. Needed because libcuda issues raw syscall
* instructions (LD_PRELOAD/ltrace never see these).
diff --git a/tools/guest-diag/push_guest_tools.sh b/tools/guest-diag/push_guest_tools.sh
index 9a45fd3..f19f30d 100755
--- a/tools/guest-diag/push_guest_tools.sh
+++ b/tools/guest-diag/push_guest_tools.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# push_guest_tools.sh - (re)build the guest-side diagnostic binaries from the
# sources kept in this directory. The guest's /tmp is wiped on boot, so run
# this after every VM start; the sources here are the persistent copies.
diff --git a/tools/guest-diag/read_va.py b/tools/guest-diag/read_va.py
index fca3994..ef65672 100755
--- a/tools/guest-diag/read_va.py
+++ b/tools/guest-diag/read_va.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# read_va.py - dump a guest process's memory at a VA (GPU VAs of UVM sysmem
# objects are usually also valid CPU VAs in the owning process).
#
diff --git a/tools/guest-diag/rmq_probe.c b/tools/guest-diag/rmq_probe.c
index 7554309..8acf1c3 100644
--- a/tools/guest-diag/rmq_probe.c
+++ b/tools/guest-diag/rmq_probe.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* rmq_probe.c - minimal legacy-ioctl RM client to read device controls:
* 0x800289 NV0080_CTRL_CMD_GPU_GET_VIRTUALIZATION_MODE
* 0x800280 NV0080_CTRL_CMD_GPU_GET_NUM_SUBDEVICES
diff --git a/tools/guest-diag/run_cycle.sh b/tools/guest-diag/run_cycle.sh
index 28ea18d..53ebf52 100755
--- a/tools/guest-diag/run_cycle.sh
+++ b/tools/guest-diag/run_cycle.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# run_cycle.sh - one instrumented CUDA bring-up cycle with full capture.
#
# Recipe (PART 70 + PART 71): restart VM/module, push tools, install kprobes
diff --git a/tools/guest-diag/run_traced.sh b/tools/guest-diag/run_traced.sh
index 009e20b..cb7228c 100755
--- a/tools/guest-diag/run_traced.sh
+++ b/tools/guest-diag/run_traced.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# run_traced.sh - run cdt under the ioctl tracer, keep the libcuda tracker page
# mapped (pagemap + sema_map_add) and poke UVM's tracking semaphore forward as
# the sweep completes pushes, so the run reaches the rc=999 rollback where the
diff --git a/tools/guest-diag/scan.c b/tools/guest-diag/scan.c
index d229dc8..1608ba0 100644
--- a/tools/guest-diag/scan.c
+++ b/tools/guest-diag/scan.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* scan.c - find the libcuda tracker objects in a process without ptrace.
Tracker layout (object p): p+0x9418 submitted, p+0x9420 completed,
p+0x9428 mirror, p+0x9430 sem object; sem object +0x10 -> sem VA (a
diff --git a/tools/guest-diag/scan2.c b/tools/guest-diag/scan2.c
index 6220038..dfc1ae7 100644
--- a/tools/guest-diag/scan2.c
+++ b/tools/guest-diag/scan2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* scan2.c - find qwords whose value points into a /dev/nvidia* mapping of
the target process, and report the u32 stored there (semaphore hunt).
usage: scan2 PID [max_print] */
diff --git a/tools/guest-diag/scan3.c b/tools/guest-diag/scan3.c
index 94f6a42..2683e89 100644
--- a/tools/guest-diag/scan3.c
+++ b/tools/guest-diag/scan3.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* scan3.c - scan all writable memory of a process for qwords equal to any
of the given 64-bit needles; print every hit address.
usage: scan3 PID 0xNEEDLE [0xNEEDLE ...] */
diff --git a/tools/guest-diag/scanerr.py b/tools/guest-diag/scanerr.py
index 96c4170..cca649b 100755
--- a/tools/guest-diag/scanerr.py
+++ b/tools/guest-diag/scanerr.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script: at the libcuda error-scanner entry (FUN_0054fa00), walk the
# context list and dump every non-zero RM error record (magic words,
# errorClass at +0x8, shorts at +0xc/+0xe). The scanner is called often with
diff --git a/tools/guest-diag/sem_counters.py b/tools/guest-diag/sem_counters.py
index 66af258..94a01f4 100755
--- a/tools/guest-diag/sem_counters.py
+++ b/tools/guest-diag/sem_counters.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# sem_counters.py - enumerate a guest process's per-channel GPU completion
# counters (the u32 slots the client polls to observe push completion).
#
diff --git a/tools/guest-diag/sem_slots.py b/tools/guest-diag/sem_slots.py
index 70d184c..f405771 100755
--- a/tools/guest-diag/sem_slots.py
+++ b/tools/guest-diag/sem_slots.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# sem_slots.py - read or write the per-channel u32 completion counters of a
# guest process (verification and fallback for the host's counter publish).
#
diff --git a/tools/guest-diag/semfix_uvmt.py b/tools/guest-diag/semfix_uvmt.py
index ba4f4f7..cf54445 100755
--- a/tools/guest-diag/semfix_uvmt.py
+++ b/tools/guest-diag/semfix_uvmt.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# semfix_uvmt.py - single-QMP tracking-semaphore/resolution watcher.
#
# One QMP client does everything semfix_watch.py and uvmt_poll.py did, because
diff --git a/tools/guest-diag/semfix_watch.py b/tools/guest-diag/semfix_watch.py
index 0a2a6fb..049a612 100644
--- a/tools/guest-diag/semfix_watch.py
+++ b/tools/guest-diag/semfix_watch.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# semfix_watch.py - keep UVM VA->PA translations fresh from guest truth
# (host-side dev tool, no guest changes).
#
diff --git a/tools/guest-diag/sempages.py b/tools/guest-diag/sempages.py
index f8d15b2..f74edb1 100755
--- a/tools/guest-diag/sempages.py
+++ b/tools/guest-diag/sempages.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Print the distinct pages of the semaphore VAs a process references
# (reuses memprobe.py's scanner; run in the guest as root). The VA window is
# derived from the process's /dev/nvidia* mappings unless lo/hi are given.
diff --git a/tools/guest-diag/stack_sampler.sh b/tools/guest-diag/stack_sampler.sh
index f210422..af6f57d 100755
--- a/tools/guest-diag/stack_sampler.sh
+++ b/tools/guest-diag/stack_sampler.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# stack_sampler.sh - per-thread kernel stack sampler for the CUDA client.
#
# The client's failing wait is not always visible in strace: libcuda runs
diff --git a/tools/guest-diag/state_log.sh b/tools/guest-diag/state_log.sh
index de3d6ed..aa5f0f6 100644
--- a/tools/guest-diag/state_log.sh
+++ b/tools/guest-diag/state_log.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# state_log.sh <pid> - 200ms sampler of state/syscall/wchan for the whole run.
PID="$1"
: > /tmp/state.log
diff --git a/tools/guest-diag/sysc_shim.c b/tools/guest-diag/sysc_shim.c
index 9b07e4c..e2ab6f0 100644
--- a/tools/guest-diag/sysc_shim.c
+++ b/tools/guest-diag/sysc_shim.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* sysc_shim.c - intercept syscall() so we can dump ioctl buffer *results*
* for UVM ioctls (libcuda calls syscall(SYS_ioctl, ...) directly, so an
* ioctl() wrapper is bypassed but syscall() is not).
diff --git a/tools/guest-diag/track_waits.sh b/tools/guest-diag/track_waits.sh
index 54c4905..50d67c1 100644
--- a/tools/guest-diag/track_waits.sh
+++ b/tools/guest-diag/track_waits.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# track_waits.sh - guest-side wait sampler: while a CUDA client (cdt) runs,
# repeatedly dump the per-channel completion counters (values), the tracker
# wait entries (trkinfo.py, every 2nd pass) and the push pages the host could
diff --git a/tools/guest-diag/trkinfo.py b/tools/guest-diag/trkinfo.py
index 0d6d629..0b4498f 100644
--- a/tools/guest-diag/trkinfo.py
+++ b/tools/guest-diag/trkinfo.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# gdb script (run with: sudo gdb -p <pid> -batch -x /tmp/trkinfo.py)
# Drills into the libcuda tracker wait: dumps every wait entry, the tracker
# objects they reference (channel/context layout at p+0x9410 with the sem
diff --git a/tools/guest-diag/uvm_rmmem_probe.sh b/tools/guest-diag/uvm_rmmem_probe.sh
index 15ad73f..9778689 100755
--- a/tools/guest-diag/uvm_rmmem_probe.sh
+++ b/tools/guest-diag/uvm_rmmem_probe.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# uvm_rmmem_probe.sh - guest-side kprobe that dumps every UVM rm_mem mapping
# as it is used: {type, CPU VA, GPU0 VA, GPU1 VA, size} for each call to
# uvm_rm_mem_get_cpu_va. This is the ground truth for VA -> physical
diff --git a/tools/guest-diag/uvmprobe.sh b/tools/guest-diag/uvmprobe.sh
index de7293c..fd26c63 100644
--- a/tools/guest-diag/uvmprobe.sh
+++ b/tools/guest-diag/uvmprobe.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# uvmprobe.sh - guest-side: probe UVM's external-range/map API return statuses
# while cdt runs, and capture UVM's own debug-print output.
nvidia-modprobe -c 0
diff --git a/tools/guest-diag/uvmt_poll.py b/tools/guest-diag/uvmt_poll.py
index d145e6c..668435a 100644
--- a/tools/guest-diag/uvmt_poll.py
+++ b/tools/guest-diag/uvmt_poll.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# uvmt_poll.py - poll the live state of the tracking semaphores the CUDA
# client spins on, from the guest trace kptrs, via QMP (no guest agent
# besides the trace read). Prints the payload word the client actually
diff --git a/tools/guest-diag/uvmwait.sh b/tools/guest-diag/uvmwait.sh
index 06b2dc7..cb1fe69 100644
--- a/tools/guest-diag/uvmwait.sh
+++ b/tools/guest-diag/uvmwait.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# uvmwait.sh - guest-side: run cdt with UVM debug prints on, and snapshot the
# UVM tracker-wait messages early (before any teardown floods dmesg).
nvidia-modprobe -c 0
diff --git a/tools/guest-diag/vmcycle.sh b/tools/guest-diag/vmcycle.sh
index d3dcbec..8177300 100755
--- a/tools/guest-diag/vmcycle.sh
+++ b/tools/guest-diag/vmcycle.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# vmcycle.sh - reload cycle for the emulated vGPU stack:
# stop QEMU -> remove mdevs -> rmmod/insmod vgsp.ko -> create a
# fresh mdev -> patch its UUID into the runtime launch script -> relaunch.
diff --git a/tools/guest-diag/vmrestart.sh b/tools/guest-diag/vmrestart.sh
index f94521c..62402ba 100755
--- a/tools/guest-diag/vmrestart.sh
+++ b/tools/guest-diag/vmrestart.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# vmrestart.sh - stop QEMU, reload vgsp.ko from the tree, fresh mdev,
# relaunch the vGPU VM. Everything bounded so a stuck step cannot hang the
# caller.
diff --git a/tools/guest-diag/watch_ctx.sh b/tools/guest-diag/watch_ctx.sh
index 0968571..0af95ca 100644
--- a/tools/guest-diag/watch_ctx.sh
+++ b/tools/guest-diag/watch_ctx.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# watch_ctx.sh - guest-side watcher: (re)start cdt, snapshot the ioctl stream
# (fd paths), attach gdb to the libcuda wait as soon as cuCtxCreate is reached
# and POKE the per-entry trackers (p+0x9410+0x10/0x18 = 1) to test whether that
diff --git a/tools/guest_agent/guest_test_agent.py b/tools/guest_agent/guest_test_agent.py
index 15a578d..b659af1 100644
--- a/tools/guest_agent/guest_test_agent.py
+++ b/tools/guest_agent/guest_test_agent.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
"""
guest_test_agent.py - Runs inside guest VM, executes tests, reports results
Communication via vsock, serial, or HTTP
diff --git a/tools/guest_init_monitor.py b/tools/guest_init_monitor.py
index bc34a08..eb40e41 100644
--- a/tools/guest_init_monitor.py
+++ b/tools/guest_init_monitor.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
"""
guest_init_monitor.py - Monitor guest kernel initialization for NVIDIA driver
Correlates host tracepoints with guest dmesg/serial output
diff --git a/tools/module_ops/dry_run.sh b/tools/module_ops/dry_run.sh
index e6bb6f2..5ac6934 100755
--- a/tools/module_ops/dry_run.sh
+++ b/tools/module_ops/dry_run.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Run vGPU dry-run validation
# Usage: sudo ./dry_run.sh
diff --git a/tools/module_ops/load_converged.sh b/tools/module_ops/load_converged.sh
index dbd090e..e83fcde 100755
--- a/tools/module_ops/load_converged.sh
+++ b/tools/module_ops/load_converged.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Load vGPU stack in converged mode
# Usage: sudo ./load_converged.sh [dry_run]
diff --git a/tools/module_ops/unload_all.sh b/tools/module_ops/unload_all.sh
index 4c73a0b..6ceadea 100755
--- a/tools/module_ops/unload_all.sh
+++ b/tools/module_ops/unload_all.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Unload all vGPU modules cleanly
# Usage: sudo ./unload_all.sh
diff --git a/tools/rmq/grctx_oracle.c b/tools/rmq/grctx_oracle.c
index a2fc5fa..aa4bd2d 100644
--- a/tools/rmq/grctx_oracle.c
+++ b/tools/rmq/grctx_oracle.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* grctx_oracle - query the host NVIDIA RM for the engine context buffer sizes.
*
* Goal: recover the table that GSP-RM serves for
diff --git a/tools/rmq/kmod/wpr2_reset_kmod.c b/tools/rmq/kmod/wpr2_reset_kmod.c
index 523fac7..1e46960 100644
--- a/tools/rmq/kmod/wpr2_reset_kmod.c
+++ b/tools/rmq/kmod/wpr2_reset_kmod.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* wpr2_reset_kmod - kernel module that clears GPU WPR2 registers via BAR0 ioremap.
*
* When nvidia.ko is unloaded without a clean GSP teardown, GSP firmware stays
diff --git a/tools/rmq/rmq.c b/tools/rmq/rmq.c
index 189d647..f179dbb 100644
--- a/tools/rmq/rmq.c
+++ b/tools/rmq/rmq.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* rmq - query host NVIDIA RM via /dev/nvidia0 ioctls (oracle for TU104 static data) */
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/rmq/wpr2_reset.c b/tools/rmq/wpr2_reset.c
index 4435843..41e102f 100644
--- a/tools/rmq/wpr2_reset.c
+++ b/tools/rmq/wpr2_reset.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* wpr2_reset - clear GPU WPR2 registers via BAR0 MMIO to unstick GSP boot.
*
* When nvidia.ko is unloaded, GSP firmware can remain resident in WPR2
diff --git a/tools/rmtool/include/rm_api.h b/tools/rmtool/include/rm_api.h
index 5d7f8cf..8358597 100644
--- a/tools/rmtool/include/rm_api.h
+++ b/tools/rmtool/include/rm_api.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* rm_api.h - minimal self-contained NVIDIA RM userspace client.
*
* ABI and control IDs mirror the NV570 SDK (nvos.h, ctrl2080*.h) but the
diff --git a/tools/rmtool/include/rmtool.h b/tools/rmtool/include/rmtool.h
index 55166f8..76dd583 100644
--- a/tools/rmtool/include/rmtool.h
+++ b/tools/rmtool/include/rmtool.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* rmtool.h - internal shared declarations for rmtool commands and output. */
#ifndef RMTOOL_H
#define RMTOOL_H
diff --git a/tools/rmtool/src/engine.c b/tools/rmtool/src/engine.c
index c247e47..283856c 100644
--- a/tools/rmtool/src/engine.c
+++ b/tools/rmtool/src/engine.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* engine.c - rmtool engine list/info via read-only GPU/engine controls. */
#include <getopt.h>
#include <stdio.h>
diff --git a/tools/rmtool/src/gpu.c b/tools/rmtool/src/gpu.c
index ff9b26c..7db1353 100644
--- a/tools/rmtool/src/gpu.c
+++ b/tools/rmtool/src/gpu.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* gpu.c - rmtool gpu list/topology/info: enumeration and identity queries. */
#include <getopt.h>
#include <stdio.h>
diff --git a/tools/rmtool/src/main.c b/tools/rmtool/src/main.c
index 4e4b440..79a34bb 100644
--- a/tools/rmtool/src/main.c
+++ b/tools/rmtool/src/main.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* main.c - rmtool entry point: command dispatch and global help/version.
*
* rmtool is a read-only host RM oracle for the Open-IOV accuracy loop. It
diff --git a/tools/rmtool/src/mem.c b/tools/rmtool/src/mem.c
index a85bd70..52a3e5a 100644
--- a/tools/rmtool/src/mem.c
+++ b/tools/rmtool/src/mem.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* mem.c - rmtool mem stats: read-only FB/heap/BAR1 information.
*
* Allocation, mapping, pinning and arbitrary-handle inspection are
diff --git a/tools/rmtool/src/nv2080.c b/tools/rmtool/src/nv2080.c
index 5dd808e..0cf1cf1 100644
--- a/tools/rmtool/src/nv2080.c
+++ b/tools/rmtool/src/nv2080.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* nv2080.c - rmtool nv2080 class list / method call and sample.
*
* The generic control entry point is restricted to a read-only allowlist so
diff --git a/tools/rmtool/src/output.c b/tools/rmtool/src/output.c
index 6de5d02..289256c 100644
--- a/tools/rmtool/src/output.c
+++ b/tools/rmtool/src/output.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* output.c - table/JSON/CSV formatting helpers shared by rmtool commands. */
#include <ctype.h>
#include <stdio.h>
diff --git a/tools/rmtool/src/query.c b/tools/rmtool/src/query.c
index c9a7460..37cf3f8 100644
--- a/tools/rmtool/src/query.c
+++ b/tools/rmtool/src/query.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* query.c - shared read-only RM queries used by rmtool and rmtop. */
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/rmtool/src/rm_api.c b/tools/rmtool/src/rm_api.c
index 17fb48b..fd459cd 100644
--- a/tools/rmtool/src/rm_api.c
+++ b/tools/rmtool/src/rm_api.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* rm_api.c - RM ioctl client, GPU discovery and control plumbing.
*
* The ioctl ladder (root -> device -> subdevice) and NV_ESC_RM_CONTROL
diff --git a/tools/rmtop/include/rmtop.h b/tools/rmtop/include/rmtop.h
index 9335e89..0b55187 100644
--- a/tools/rmtop/include/rmtop.h
+++ b/tools/rmtop/include/rmtop.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* rmtop.h - state and rendering declarations for the rmtop dashboard. */
#ifndef RMTOP_H
#define RMTOP_H
diff --git a/tools/rmtop/src/main.c b/tools/rmtop/src/main.c
index b7985df..67ea4eb 100644
--- a/tools/rmtop/src/main.c
+++ b/tools/rmtop/src/main.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* main.c - rmtop: ncurses real-time read-only GPU dashboard.
*
* Interactive mode needs a terminal; --once renders the same panels as plain
diff --git a/tools/rmtop/src/panel.c b/tools/rmtop/src/panel.c
index 9ad5ac8..63f21f1 100644
--- a/tools/rmtop/src/panel.c
+++ b/tools/rmtop/src/panel.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* panel.c - rmtop sampling (read-only RM + /proc) and plain rendering. */
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/test/cuda_drv_test.c b/tools/test/cuda_drv_test.c
index 9501cb3..9c2bd21 100644
--- a/tools/test/cuda_drv_test.c
+++ b/tools/test/cuda_drv_test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* cuda_drv_test.c - minimal CUDA driver-API smoke test (dlopen, no toolkit).
*
* Run inside the guest. Exercises the paths CUDA needs beyond NVML:
diff --git a/tools/test/cuda_drv_test2.c b/tools/test/cuda_drv_test2.c
index a3d3190..6d37f72 100644
--- a/tools/test/cuda_drv_test2.c
+++ b/tools/test/cuda_drv_test2.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* cuda_drv_test2.c - minimal CUDA driver-API smoke test (dlopen, no toolkit)
* with copy-path pause points for live inspection.
*
diff --git a/tools/test/gpage_test.c b/tools/test/gpage_test.c
index 33d0c8d..1ad2212 100644
--- a/tools/test/gpage_test.c
+++ b/tools/test/gpage_test.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2026 Open-IOV contributors */
/* gpage_test.c - guest-page GPA probe for the physical-backend guest-memory path.
*
* Run as root inside the guest (plain gcc on Ubuntu 24.04, no CUDA).
diff --git a/tools/test/run_integration_tests.sh b/tools/test/run_integration_tests.sh
index 06e309c..5f97898 100755
--- a/tools/test/run_integration_tests.sh
+++ b/tools/test/run_integration_tests.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# GSP vGPU-IO Integration Test Runner
set -e
diff --git a/tools/vm/launch_vgpu_qemu.sh b/tools/vm/launch_vgpu_qemu.sh
index 0355ef1..818f0bb 100755
--- a/tools/vm/launch_vgpu_qemu.sh
+++ b/tools/vm/launch_vgpu_qemu.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# QEMU launch script for NVIDIA vGPU testing
# This script assumes:
# 1. nvidia-vgpu-vfio.ko is loaded on host (with dry_run=1 for testing)
diff --git a/tools/vm/setup_mdev.sh b/tools/vm/setup_mdev.sh
index ef31f46..22bd943 100755
--- a/tools/vm/setup_mdev.sh
+++ b/tools/vm/setup_mdev.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2026 Open-IOV contributors
# Setup script for NVIDIA vGPU mdev device
# This script creates an mdev device for QEMU testing