‹ 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. WanjohiRyan · · focus · HN ↗
            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.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.