From 68cdd7728a7cc6715bbbff7decfe2b11c3bdf558 Mon Sep 17 00:00:00 2001 From: Open-IOV Date: Wed, 23 Sep 2026 05:44:08 -0400 Subject: Open-IOV: initial public release Open-IOV virtualizes NVIDIA GPUs so that unmodified guest drivers run with real GPU functionality - CUDA first, 3D and video to follow - on unmodified hosts, without a proprietary vGPU license and without patching any driver, firmware or hypervisor. Core principle: emulate the interface, pass through the work. kernel/ open-iov-vfio.ko - host VFIO mdev driver: virtual GPU device (PCI config space, BAR shadows, MSI-X), GSP boot emulation, GSP-RM message-queue/RPC emulation, memory model (GPU-VA to guest-PA discovery) and the semaphore-completion service that advances guest UVM progress. userspace/ libiov.so management API and examples. tools/ guest diagnostics, firmware analysis wrappers, RM probes. scripts/ stack manager, VM harness, build/load/test automation. config/ hardware/version profiles (the portability surface). docs/ documentation tree - start at docs/README.md. wiki/ long-form firmware and protocol deep dives. Status: initialization works end to end for a stock 570.144 Linux guest on Turing (TU104): driver probe, nvidia-smi, the full GSP-RM control battery, object creation and the early CUDA/UVM start-up path. GPU work forwarding - the step that makes CUDA kernels execute on real hardware - is the active work item; see docs/04-implementation/01-known-knowns-and-unknowns.md. License: BSD-3-Clause for the project; GPL-2.0 for kernel modules that link GPL-only kernel interfaces. See LICENSE and docs/09-reference/legal-and-licensing.md. --- scripts/test_vgpu_stack.sh | 149 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100755 scripts/test_vgpu_stack.sh (limited to 'scripts/test_vgpu_stack.sh') diff --git a/scripts/test_vgpu_stack.sh b/scripts/test_vgpu_stack.sh new file mode 100755 index 0000000..4df9cdc --- /dev/null +++ b/scripts/test_vgpu_stack.sh @@ -0,0 +1,149 @@ +#!/bin/bash +# Comprehensive Test Suite for Open-IOV vGPU-IO +# Runs all validation tests in sequence + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OPEN_IOV_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" + +echo "=== Open-IOV vGPU-IO Comprehensive Test Suite ===" +echo "Open-IOV root: $OPEN_IOV_ROOT" +echo "Date: $(date)" +echo "" + +# Check if we're root +if [ "$EUID" -ne 0 ]; then + echo "ERROR: This script must be run as root" + exit 1 +fi + +# Parse arguments +RUN_KERNEL_TESTS=true +RUN_GUEST_TESTS=true +RUN_CUDA_TESTS=true +RUN_GRAPHICS_TESTS=true +RUN_WINDOWS_TESTS=false + +while [[ $# -gt 0 ]]; do + case $1 in + --kernel-only) + RUN_GUEST_TESTS=false + RUN_CUDA_TESTS=false + RUN_GRAPHICS_TESTS=false + shift + ;; + --guest-only) + RUN_KERNEL_TESTS=false + RUN_CUDA_TESTS=false + RUN_GRAPHICS_TESTS=false + shift + ;; + --no-windows) + RUN_WINDOWS_TESTS=false + shift + ;; + --windows) + RUN_WINDOWS_TESTS=true + shift + ;; + *) + echo "Unknown option: $1" + echo "Usage: $0 [--kernel-only] [--guest-only] [--no-windows] [--windows]" + exit 1 + ;; + esac +done + +RESULTS=() + +# Test 1: Kernel GSP Emulation Tests +if [ "$RUN_KERNEL_TESTS" = true ]; then + echo "" + echo "========================================" + echo "TEST 1: Kernel GSP Emulation Unit Tests" + echo "========================================" + if "$SCRIPT_DIR/test_gsp_emu.sh"; then + RESULTS+=("Kernel GSP Emulation: PASS") + else + RESULTS+=("Kernel GSP Emulation: FAIL") + fi +fi + +# Test 2: Guest Driver Integration +if [ "$RUN_GUEST_TESTS" = true ]; then + echo "" + echo "========================================" + echo "TEST 2: Guest Driver Integration" + echo "========================================" + if "$SCRIPT_DIR/test_guest_driver.sh"; then + RESULTS+=("Guest Driver Integration: PASS") + else + RESULTS+=("Guest Driver Integration: FAIL") + fi +fi + +# Test 3: CUDA Workloads +if [ "$RUN_CUDA_TESTS" = true ]; then + echo "" + echo "========================================" + echo "TEST 3: CUDA Workload Validation" + echo "========================================" + if "$SCRIPT_DIR/test_cuda_workloads.sh"; then + RESULTS+=("CUDA Workloads: PASS") + else + RESULTS+=("CUDA Workloads: FAIL") + fi +fi + +# Test 4: Graphics Workloads +if [ "$RUN_GRAPHICS_TESTS" = true ]; then + echo "" + echo "========================================" + echo "TEST 4: Graphics Workload Validation" + echo "========================================" + if "$SCRIPT_DIR/test_graphics_workloads.sh"; then + RESULTS+=("Graphics Workloads: PASS") + else + RESULTS+=("Graphics Workloads: FAIL") + fi +fi + +# Test 5: Windows Guest (optional) +if [ "$RUN_WINDOWS_TESTS" = true ]; then + echo "" + echo "========================================" + echo "TEST 5: Windows Guest Validation" + echo "========================================" + if "$SCRIPT_DIR/test_windows_guest.sh"; then + RESULTS+=("Windows Guest: PASS") + else + RESULTS+=("Windows Guest: FAIL") + fi +fi + +# Summary +echo "" +echo "========================================" +echo "TEST SUMMARY" +echo "========================================" +for result in "${RESULTS[@]}"; do + echo " $result" +done + +# Check for failures +FAIL_COUNT=0 +for result in "${RESULTS[@]}"; do + if [[ "$result" == *"FAIL"* ]]; then + FAIL_COUNT=$((FAIL_COUNT + 1)) + fi +done + +echo "" +if [ $FAIL_COUNT -eq 0 ]; then + echo "ALL TESTS PASSED ✓" + exit 0 +else + echo "$FAIL_COUNT TEST(S) FAILED ✗" + exit 1 +fi \ No newline at end of file -- cgit v1.2.3