From 9a7263fce4e3156349a526631805fce66b87fb1b Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 13 Sep 2026 22:17:09 -0400 Subject: Phase 5: Fix MDEV creation blocker - mdev parent registration & ioctl-based vGPU type registration - Implemented nv_vgpu_mdev_register_parent() using mdev_register_parent() API with nv_vgpu_mdev_types array for proper mdev parent registration - Added ioctl NV_VGPU_IOCTL_REGISTER_VGPU_TYPE for userspace vGPU type registration - Created separate header nv-vgpu-vfio-interface-nvidia.h for nvidia.ko with only extern declarations to avoid duplicate symbol exports - Used KBUILD_EXTRA_SYMBOLS to provide only needed symbols (nvidia_vgpu_vfio_*) - Updated create_mdev.sh to use correct mdev type names (pci-nvidia-vgpu-*) - Updated load_vgpu_stack.sh to load open-iov-vfio.ko before nvidia.ko Result: 4 mdev types now show available_instances=8, mdev creation successful --- scripts/create_mdev.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/create_mdev.sh') diff --git a/scripts/create_mdev.sh b/scripts/create_mdev.sh index f6c76ed..a6ea91e 100755 --- a/scripts/create_mdev.sh +++ b/scripts/create_mdev.sh @@ -5,10 +5,10 @@ set -euo pipefail PCI_ADDR="${1:-}" -VGPU_TYPE="${2:-nvidia-vgpu-turing}" +VGPU_TYPE="${2:-pci-nvidia-vgpu-turing}" -# Supported vGPU types -VALID_TYPES=("nvidia-vgpu-ampere" "nvidia-vgpu-hopper" "nvidia-vgpu-turing" "nvidia-vgpu-pascal") +# Supported vGPU types (matching the mdev type names) +VALID_TYPES=("pci-nvidia-vgpu-ampere" "pci-nvidia-vgpu-hopper" "pci-nvidia-vgpu-turing" "pci-nvidia-vgpu-pascal") # Find NVIDIA GPU if not specified if [[ -z "$PCI_ADDR" ]]; then -- cgit v1.2.3