Share one NVIDIA GPU between a Linux host and Linux VMs, without VFIO passthrough Developer Reindert Pelsma released nvkvm-pv v0.2.5, an experimental open-source project that lets KVM virtual machines run unmodified CUDA, PyTorch and Vulkan workloads on an NVIDIA GPU while the Linux host keeps using the same card, without VFIO passthrough or a vGPU licence. The project forwards NVIDIA driver API calls from a guest kernel module through virtio and QEMU to a per-guest host process, and reports Geekbench 7 GPU (OpenCL) results of 99.6% on an RTX 4070, 99.9% on an RTX 3050 Laptop, 98.8% on an H100 PCIe and 98.0% on an A100 80GB, with kernel launch latency of 8.18µs versus 3.84µs on bare metal. It currently supports only Linux amd64 guests with glibc. Share one NVIDIA GPU between a Linux host and Linux VMs, without VFIO passthrough The project GitHub - reindertpelsma/nvkvm-pv: Paravirtual NVIDIA GPU for KVM guests — run unmodified CUDA, PyTorch and Vulkan inside a VM at host parity, on a GPU the host keeps using. No passthrough, no vGPU licence. Experimental. · GitHub https://github.com/reindertpelsma/nvkvm-pv allows you to run KVM VMs with full NVIDIA driver support, without VFIO. The project forwards NVIDIA’s driver API to the VM with native performance. The idea is to get the CUDA container experience in VMs, on GeForce cards where this isn’t available at all. Experimental, several months, solo. Any bug reports, contributions, architectures/GPUs it worked on are welcome. Currently only Linux amd64 guests with glibc; any distro should work. How it works: Guest kernel module → virtio → QEMU → a per-guest process stub to execute the NVIDIA API on the host → host NVIDIA driver. RM/UVM ioctls are forwarded, not emulated. GPU memory DMA/BAR is actual passthrough, not emulated or copied, using regular unprivileged NVIDIA userspace calls. Display is forwarded as natively as possible. The VM gets a KMS plane rendering target from the host display compositor, for example Wayland, and it renders without any cross CPU-GPU copy unless your display output is on integrated graphics . Supports CUDA, graphics and display, also intended for compute workloads beyond gaming and graphics. Geekbench 7 GPU OpenCL : RTX 4070 99.6%, RTX 3050 Laptop 99.9%, H100 PCIe 98.8%, A100 80GB 98.0%. clpeak: 7 of 8 subtests at 99.4–100.2%. Not everything is parity; some performance issues are still open, for example kernel launch latency is 8.18µs compared to 3.84µs on bare metal. Running Red Dead Redemption 2 in a KVM guest: Docker example, running a headless KVM guest docker run --rm -it --device /dev/kvm --gpus all \ -e NVIDIA DRIVER CAPABILITIES=compute,utility,graphics,display,video \ -p 127.0.0.1:2222:2222 -v nvkvm-guest:/opt/nvkvm-guest \ ghcr.io/reindertpelsma/nvkvm-pv:v0.2.5 ssh -p 2222 ubuntu@127.0.0.1 password is ubuntu It can also be built using docker build -t nvkvm-pv . from the git repository.