‹ BackHN Continuity

Thread

Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM guest

155 points · 65 comments · WanjohiRyan

  1. mjg59 · · focus · HN ↗
    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.
    1. orphereus · · focus · HN ↗
      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).
      1. WanjohiRyan · · focus · HN ↗
        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

        1. rwmj · · focus · HN ↗
          How is this different (in effect, not technically) from just using PCI passthrough, apart from being less safe and less tested?
          1. exceptione · · focus · HN ↗

              > 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.
            1. halfcat · · focus · HN ↗
              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.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.