News for hackers. Stuff that matters.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by markasoftware on Wednesday September 23, 2026 @10:40PM (#49825552)
How is this different than gVisor's nvproxy? https://gvisor.dev/docs/user_guide/gpu/#compatibility

Edit: nvproxy is mentioned as the "direct inspiration" in the readme without mention of how this is different or why it doesn't use nvproxy as a backend.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Wednesday September 23, 2026 @10:45PM (#49825583)
We borrowed a lot of the architectural design from nvproxy, then built it to support graphical workloads. Plus it is reusable in such a way you can hot plug it into any microVM, cloud-hypervisor, maybe even Firecracker
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by mcmatterson on Wednesday September 23, 2026 @10:15PM (#49825378)
Amazing project! But man, that README is just a textbook example of LLM word salad. It's wild how these tools are so incredibly capable at many things, but their writing sticks out like a sore thumb
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by vlovich123 on Wednesday September 23, 2026 @11:36PM (#49825935)
Claude is much worse for having a distinctive style you can spot from a mile away. I’ve found GPT-6 to not suffer from this or it’s insanely verbose markdown salad.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by verall on Thursday September 24, 2026 @01:02AM (#49826447)
I see everyone saying this but I've been using 6-astra lately and afaict it's not much better
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by LiamPowell on Wednesday September 23, 2026 @10:58PM (#49825677)
When the lines in the ASCII charts don't even line up my immediate assumption is that the author didn't even bother to glance at it.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by Borealid on Wednesday September 23, 2026 @10:25PM (#49825460)
The percentage-overhead comparison is pretty choice nonsense. It has only percentages to try and "explain" that overheads don't matter if the system is slow anyhow.

A fair comparison would be this project vs virtio.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Wednesday September 23, 2026 @10:50PM (#49825627)
Virtio? what virtio? virtio native drm native context, is that what you mean? We actually use it in nesbox[1] for AMD/Intel cards.

Venus is the only one we could directly compare to, as it is the only one that supports Nvidia GPUs. vDRM works only on AMD/Intel GPUs and has a similar performance (~98% baremetal performance) to virtio-nvgpu.

[1] https://github.com/nestrilabs/nesbox

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by Borealid on Wednesday September 23, 2026 @11:28PM (#49825878)
I meant vfio-pci.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Wednesday September 23, 2026 @10:18PM (#49825408)
My bad, i am not a native English speaker... I did my best to try and brush it up. Terribly sorry if it did not match your flow.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by jchw on Wednesday September 23, 2026 @11:19PM (#49825821)
LLMs are pretty good at translation, they're just pretty awful at generating natural-sounding English prose from scratch. In my opinion, probably the best solution is to simply write the README in your native tongue and use an LLM to translate it.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by junon on Thursday September 24, 2026 @02:09AM (#49826818)
This! Claude word salad is worse than maybe subpar translations, with which I'm sure PRs can help.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by mcmatterson on Wednesday September 23, 2026 @10:21PM (#49825435)
All good friend! I'm as guilty as anyone. It's a super cool project though.

Now that I have you on the hook, is there any benefit to this over virtio for a single KVM passthrough situation? I previously ran a proxmox based gaming PC setup (docs here: https://github.com/mtrudel/rabble/tree/4d9329f3dd0fb09123a8f...), and was lucky enough that the GPU passthrough part of that build 'just worked'. I'd started down a path of trying to share the GPU between VMs based on a naive 'one VM owns it at a time' setup, but never really got it off the ground.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Wednesday September 23, 2026 @10:34PM (#49825513)
The benefit is that you do not have a limit to how many VMs you can run at the same time. However, virtio-nvgpu has no Windows support as of yet, please check back in a while :)

You should check out Nestri [1], another project we are working on, that helps you do exactly that. It helps run multiple gaming sessions for you and your friends on the same GPU, without anyone meddling in the other person's session. Everyone gets to stream their game to whatever desktop or device they want. It is still a work-in-progress though.

[1] https://github.com/nestrilabs/nestri

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by lisp2240 on Thursday September 24, 2026 @08:44AM (#49829833)
Jdkhdkhdoudludlhxljdluelxfgncbt vkcljxlj. Fulxkhxjcouxyo. Choxoufoudljcljcljc gufkhxpjclixluxouc vfuoxoudydoudljc ycoucupck mccddhxhoxohxoj ljxohhlxljcluxkh ckhxoydoudljcljcljn lhxkhdhx.

Sorry. Qwerty isn't my native keyboard.

Fucukdyshd iohhfghfhgh ggbvfg gdh ghcfjh hdhvbbghb hjjgigggfv.q gfghbdbdbd cjcjcjcnn. Dr rhrjfnnf cjcucjcjjcnr rbjjdisnxbbfb hehrbrbrb. Xjcjcjcjbd rhrjrnrbrb xhfjcjcjbde hdhdbcncbfn dhdjjfjchcnbdbdbffnndnd

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by serf on Wednesday September 23, 2026 @10:39PM (#49825543)
it's not just literary authorship, it's pretty easy to spot LLM driven programming paradigms too, especially if you look at the test suites of a given package.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by hacker_homie on Wednesday September 23, 2026 @11:09PM (#49825749)
What are the isolation implications?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by kjs3 on Thursday September 24, 2026 @12:49PM (#49833394)
The authors seem to acknowledge it's not so good, but I haven't done my homework so pinch of salt and all that both ways. Use in protected environments only would probably be a good precaution.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by majorchord on Wednesday September 23, 2026 @10:40PM (#49825550)
Can this be used with a Windows guest?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Wednesday September 23, 2026 @10:45PM (#49825587)
No not yet, but that is in the roadmap.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by orphereus on Thursday September 24, 2026 @01:16AM (#49826534)
Why not use normal GPU passthrough? I don't see how you can use this to share a GPU between multiple VMs, so what is the benefit of using this software over normal GPU passthrough with vfio-pci drivers?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by Tajnymag on Thursday September 24, 2026 @02:07AM (#49826800)
With normal passthrough, your host loses access to the gpu, no? So you need to have two gpus, one for the host and one for the guest. Correct me, if I am wrong, but this should make the host fully operational on a single gpu and still let vm guests have headless access to the host gpu.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by orphereus on Thursday September 24, 2026 @02:20AM (#49826888)
Is it really that simple to split an Nvidia GPU between multiple users like that? I thought that you have to have specific drivers which support that.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by az226 on Thursday September 24, 2026 @03:53AM (#49827593)
GeForce GPUs don’t support MIG. Only workstation and data center cards do that.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by gmerc on Thursday September 24, 2026 @03:22AM (#49827372)
that's paid
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by defer on Thursday September 24, 2026 @01:22AM (#49826571)
README mentions it supports up to 4 guests at a time sharing the GPU.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by orphereus on Thursday September 24, 2026 @02:22AM (#49826904)
I am wondering how they managed to achieve that without using Nvidia vGPU drivers.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by jdub on Thursday September 24, 2026 @09:07AM (#49830071)
Indirection! The cause of, and solution to, all of computing's problems.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by Datagenerator on Thursday September 24, 2026 @01:33AM (#49826629)
Does it work under OpenStack?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by mjg59 on Thursday September 24, 2026 @02:19AM (#49826881)
Hrm, something of a lack of discussion about what level of access the card has to the host in the absence of IOMMU-restricted passthrough.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by orphereus on Thursday September 24, 2026 @02:24AM (#49826915)
I am very sceptical about this. I have some experience in GPU virtualization and passthrough with Nvidia GPUs and they are really not designed to be able to share them with multiple guests/host without Nvidia's blessing (licenced drivers).
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Thursday September 24, 2026 @02:32AM (#49826982)
Yes they are not... we run the Nvidia drivers unmodified. Only thing we have done is make the guest driver think it's running on the host, talking to the host's GPU kernel.

It works really well with a ~2% performance penalty. Nvproxy by google/gvisor has been doing this for years.

You should try running it yourself and see how it goes :D

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by orphereus on Thursday September 24, 2026 @02:59AM (#49827178)
So you can share the GPU between multiple VMs? I can have 4 VMs simultaneously do work on the GPU?

And each one would have its own Nvidia driver? How do they not interfere with each other? I mean I am by no means an expert in GPU architecture or anything similar, but I thought the problems with sharing a GPU come from the differences between GPU vs CPU architecture. On the other hand, multiple processes on a host can run on the same GPU, but that is all using the same kernel. I am just very confused.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by madushan1000 on Thursday September 24, 2026 @03:21AM (#49827367)
This has been a thing for AMD, Intel, and Qualcomm GPUs for a few years now. Search for "DRM native context". The only difference here is that you had to use mesa drivers before and now someone made it work with the Nvidia drivers.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by mjg59 on Thursday September 24, 2026 @02:51AM (#49827114)
Does "how it goes" include the guest being able to DMA over the host kernel?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by rwmj on Thursday September 24, 2026 @03:18AM (#49827345)
How is this different (in effect, not technically) from just using PCI passthrough, apart from being less safe and less tested?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Thursday September 24, 2026 @03:30AM (#49827426)
Fair point, we still have a long way to go in terms of security AND being suitable for everyday use.

However, nvgpu is meant to be used in PCI passthrough in scenarios where you would want to run and share your GPU across multiple KVM guests, or you don't want to detach the GPU from the host, and plug it into the VM you are running... you know, that little dance you do everytime you want to game inside a VM.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by exceptione on Thursday September 24, 2026 @05:14AM (#49828144)

  > just using PCI passthrough
On a laptop, I never got a working setup where I could attach/detach a modern nvidia card from host linux. So something that can do without is better. But intel SRIOV is a thing as well, which should be the secure alternative.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by halfcat on Thursday September 24, 2026 @10:29AM (#49831143)
I got it working on my laptop. It has an Intel integrated iGPU and an NVIDIA discrete dGPU. I was able to pass through the NVIDIA GPU and use it for CUDA/etc.

But the NVIDIA dGPU is muxless, so apparently all of the display outputs (laptop screen, HDMI outputs) are effectively hard wired to the iGPU. dGPU can render in a VM, it just has no where it can send it without trying to use Looking Glass or similar approach.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by az226 on Thursday September 24, 2026 @03:51AM (#49827580)
If memory serves, there is a way to hack the drivers to unlock MIG for GeForce GPUs.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by vsviridov on Thursday September 24, 2026 @03:17AM (#49827341)
Can this be used with proxmox?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by dylanger on Thursday September 24, 2026 @03:40AM (#49827484)
Smells like KVM/VM escape to host.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by jauntywundrkind on Thursday September 24, 2026 @03:47AM (#49827548)
Nesbox also just submitted today with similar intents. Except it also allows sharing the GPU across multiple guests. https://news.ycombinator.com/item?id=49824884

Nesbox is just an underlying part of a broader (but early) kit to allow a system to stream multiple remote desktops at once. https://github.com/nestrilabs/nestri

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by refibrillator on Thursday September 24, 2026 @03:50AM (#49827567)
There are roughly 3 ways to give a KVM guest a GPU.

1) VFIO passthrough: host binds entire GPU to guest as PCI device, which only allows one VM to use the GPU, thus you sacrifice your host display too (unless you fallback to integrated graphics on cpu etc). Strongest isolation because host kernel module driver not involved.

2) virtio-gpu: guest sees paravirtual GPU and loads virgl/venus mesa driver which serializes graphics API calls and replays them on the host driver. This allows multiple VMs to use the GPU, but performance overhead can be significant, and guests can’t practically leverage lower level primitives eg NVENC without paying price of CPU readback.

3) virtio-nvgpu (this repo): guest loads standard NVIDIA user mode driver (closed source), a fake /dev/nvidia* kernel module copies ioctl bytes + handle onto queue for host kernel mode driver to execute. This also allows multiple VMs to use a GPU, but is near native speed due to low overhead. Unfortunately the tradeoff is this project has the weakest isolation, eg every guest ioctl is forwarded to the host by default, the VMM holds read/write FDs, no seccomp/caps/allowlist. With respect to There is basically no GPU related security measures here, the exposure is the same as running multiple processes using the GPU with no VM. Only caveat is these guests can’t drive a physical display, so there is some restriction of surface area but it feels incidental rather than intentional in this case.

Anyways this is a tough problem OP, I don’t want to discourage you.

Without hardware/driver support for isolation (MIG) on consumer grade NVIDIA GPUs, it won’t be possible to solve this properly for a long time.

Also a factor is that NVIDIA has no open Mesa driver to support a native context approach (guest owns GPU command buffers, host maps them) like we have for AMD/Intel.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by tarruda on Thursday September 24, 2026 @04:27AM (#49827837)
What is the state of virtio-gpu these days? I have a system76 "pang14" (Ryzen 7 7840U laptop), is that a valid option for me to have a VM with 3d acceleration? I'm fine with having some overhead if it is better than the current software GPU.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by ranger_danger on Thursday September 24, 2026 @10:16AM (#49830975)
If you don't need Mac or Windows guests then the existing virtio-gpu works in my experience.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by madushan1000 on Thursday September 24, 2026 @05:28AM (#49828243)
This is not a completely novel approach. This has been a thing in virtio-gpu for a while, it's called "DRM native context".
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by rithdmc on Thursday September 24, 2026 @05:30AM (#49828260)
Putting Security aside, do you know how this might complicate bot detections that use GPU or canvas indicators?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by XorNot on Thursday September 24, 2026 @08:09AM (#49829522)
I'm more interested how this would effect providing VM graphics with migrations between hosts.

The dream would be put the user OS in a VM in a lab, and then be able to suspend and resume seamlessly if you need to push it to a new workstation, with locally accelerated graphics available.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by deltoidmaximus on Thursday September 24, 2026 @09:07AM (#49830070)
A week or so ago when I stumbled on this he at least seemed to be clear about the potential security implications, which gave me pause. But it doesn't seem any worse than just running software on your main OS which is what most people do. Sure, it's DoA for a hypervisor in a data center but that isn't the only use case out there.

What kinds of things can a guest running undesirably applications (viruses, malware, LLM escaping a sandbox, etc) get up to with shared GPU access?

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by Sohcahtoa82 on Thursday September 24, 2026 @01:25PM (#49833943)
> Sure, it's DoA for a hypervisor in a data center but that isn't the only use case out there.

Indeed. For me, I find the ecosystem around AI/LLMs works better on Linux than Windows, but Windows is my main OS since I'm a gamer. Being able to run GPU-accelerated AI in a VM is huge for me.

In my case though, I just use WSL which does an amazing job.

> What kinds of things can a guest running undesirably applications (viruses, malware, LLM escaping a sandbox, etc) get up to with shared GPU access?

The most obvious answer is a DoS. If my malicious VM is sharing a GPU and has full access to it, I could simply tell the GPU not to run a victim VM's workload, or manipulate it in some way. I might not be able to pivot to having a shell on their VM, but I could at least read/write their data in VRAM. If it contained secret data (custom model, or secret data being processed by AI), I could easily steal it.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by JackSlateur on Thursday September 24, 2026 @09:43AM (#49830475)
4th solution: nvidia vgpu

If I remember correctly, the idea is that you have a physical GPU and you split its memory (with, eventually, time-budget) to create multiple virtual GPUs, which can then be associated with a KVM guest and use by it

(not available legally on consumer-grade GPU)

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by KetoManx64 on Thursday September 24, 2026 @06:11PM (#49837417)
I don't believe it's illegal to run your own firmware. It's just not supported by the manufacturer.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by miladyincontrol on Thursday September 24, 2026 @09:53AM (#49830600)
vGPU support on consumer cards is more or less just drivers, you can patch it back in and there exist a few git repos to help do so.

I do think at the very least the domain specific workarounds are neat too some, even if not solving every problem. Such as ffmpeg-over-ip, pytorch with remote gpu usage, etc.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by westurner on Thursday September 24, 2026 @01:18PM (#49833812)
virtio-gpu-rutabaga is another way to use a GPU from a KVM / Qemu guest which primarily Android Studio developed IIUC.

Notes re: how IOMMU GPU passthrough with device selection would be a helpful feature to add to QEMU cli, virt-manager,: https://news.ycombinator.com/item?id=46750715 :

> rutabaga_gfx does GPU paravirtualization: https://github.com/magma-gpu/rutabaga_gfx

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by m463 on Thursday September 24, 2026 @01:18PM (#49833820)
isn't there vgpu too? (that thing that needs a license?)
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by jadera on Thursday September 24, 2026 @04:01AM (#49827652)
I recently did a similar thing with cgroups2 and lxc

Its an proxmox host with local lxc drm passtrough for monitor + udev perhiperals, then cgroup the nvidia cuda api to other stream lxcs. this way i can play on my local node and friends can play on my pc remotely without anyone hogging the gpu fully.

Here is the writeup(AI gen): https://git.sahkoinsinoorikilta.fi/joona/hyper-converged-gam...

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by kjs3 on Thursday September 24, 2026 @03:35PM (#49835779)
Poorly implemented roll your own overbroad backlisting thinks I'm 'suspicious'.
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by athrowaway3z on Thursday September 24, 2026 @05:46AM (#49828364)
I'm a guy with vague knowledge on KVM - having only tinkered with it and briefly had a GPU pass-through setup 2 years ago.

I suggest putting the 'multiple guests at near-native speed' use-case in the opening paragraphs of the README.

Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by WanjohiRyan on Thursday September 24, 2026 @05:51AM (#49828396)
Thank you for the feedback... i will do that
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by PcChip on Thursday September 24, 2026 @07:56AM (#49829403)
will this finally allow for a gpu-accelerated windows VM on a linux host, without nvidia vGPU licenses?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by ranger_danger on Thursday September 24, 2026 @10:50AM (#49831438)
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by PcChip on Thursday September 24, 2026 @02:03PM (#49834523)
I've never found one that actually "Just works" though
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by brcmthrowaway on Thursday September 24, 2026 @12:17PM (#49832873)
Would this work for Apple Silicon?
Re:Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM ... by ericd on Thursday September 24, 2026 @12:39PM (#49833210)
Excited to try this, I've wanted for so long to have a properly performant gaming VM without having to do all the VFIO nonsense, thanks very much.