You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The host's GPU mode is determined by the host driver configuration:
15
-
- If `/sys/class/mdev_bus/` contains VFs → vGPU mode
16
-
- If NVIDIA GPUs are available for VFIO → passthrough mode
15
+
- If `/sys/class/mdev_bus/` contains VFs → mdev vGPU mode
16
+
- If VFs expose `/sys/bus/pci/devices/<VF>/nvidia/current_vgpu_type` → vendor VFIO vGPU mode
17
+
- If NVIDIA GPUs are available for whole-device VFIO → passthrough mode
17
18
18
19
## vGPU Mode (Recommended)
19
20
20
-
vGPU mode uses NVIDIA's SR-IOV technology to create Virtual Functions (VFs), each capable of hosting an mdev (mediated device) representing a vGPU.
21
+
vGPU mode uses NVIDIA's SR-IOV technology to create Virtual Functions (VFs). Hosts on older kernels represent each vGPU as an mdev. Hosts using NVIDIA's vendor VFIO framework assign the profile directly to the VF through `current_vgpu_type`.
21
22
22
23
### How It Works
23
24
@@ -74,7 +75,7 @@ curl -X POST http://localhost:4973/instances \
74
75
}'
75
76
```
76
77
77
-
The response includes the assigned mdev UUID:
78
+
On an mdev host, the response also includes the assigned mdev UUID:
78
79
79
80
```json
80
81
{
@@ -87,19 +88,16 @@ The response includes the assigned mdev UUID:
87
88
}
88
89
```
89
90
90
-
### Ephemeral mdev Lifecycle
91
+
### Ephemeral vGPU Lifecycle
91
92
92
-
mdev devices are **ephemeral**: created on instance start, destroyed on instance delete.
93
+
vGPU assignments are created on instance start and released on stop or delete. Hypeman creates/removes an mdev on mdev hosts and writes the profile ID/`0` to `current_vgpu_type` on vendor VFIO hosts.
93
94
94
95
```
95
-
Instance Create → Create mdev → Attach to VM → Instance Running
96
-
Instance Delete → Stop VM → Destroy mdev → VF available again
96
+
Instance Create → Assign profile to VF → Attach VF to VM → Instance Running
97
+
Instance Stop/Delete → Release profile → VF available again
97
98
```
98
99
99
-
This ensures:
100
-
-**Security**: No VRAM data leakage between instances
101
-
-**Clean state**: Fresh vGPU for each instance
102
-
-**Automatic cleanup**: Orphaned mdevs cleaned up on server restart
100
+
Hypeman reconciles orphaned assignments on server restart while preserving devices held open by a running VMM.
103
101
104
102
## Passthrough Mode
105
103
@@ -256,7 +254,8 @@ If assignment cleanup fails, Hypeman retains the instance metadata so a compatib
256
254
257
255
1. Check host GPU mode detection:
258
256
```bash
259
-
ls /sys/class/mdev_bus/ # Should show VFs for vGPU mode
0 commit comments