summaryrefslogtreecommitdiffstats
path: root/scripts/create_mdev.sh
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 22:17:09 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 22:17:09 -0400
commit9a7263fce4e3156349a526631805fce66b87fb1b (patch)
tree6278c1972754e6cb60f953a1af05a472f4efecea /scripts/create_mdev.sh
parentbfd269ee74d166be4f386640f8b5daad31d5d6ed (diff)
downloadopen-iov-9a7263fce4e3156349a526631805fce66b87fb1b.tar.gz
open-iov-9a7263fce4e3156349a526631805fce66b87fb1b.zip
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
Diffstat (limited to 'scripts/create_mdev.sh')
-rwxr-xr-xscripts/create_mdev.sh6
1 files changed, 3 insertions, 3 deletions
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