-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NVIDIA gpu support #165
NVIDIA gpu support #165
Conversation
Signed-off-by: Ian May <[email protected]>
Signed-off-by: Andrea Righi <[email protected]>
Signed-off-by: Ian May <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall, thanks for working on this!
I just left a small comment about running vng as regular user, but we can definitely merge it and address this later in-tree.
# Load VFIO module | ||
$ sudo modprobe vfio-pci | ||
# Pass PCI address to virtme-ng | ||
$ sudo vng --nvgpu "01:00.0" -r linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need sudo permission here to run vng? That might be the case because we need to access pci directly I guess... do you get an permission error if you try to run vng as regular user?
While this is a good addition, I wonder if it can be generalised. I used to pass-through the network interface with VFIO and the steps were almost identical. I'm afraid there are driver and device specific quirks, but the basic steps were the same as in this case:
Sure, success is highly device and host dependent (e.g. the same i225 NIC worked in the VM on an Intel host, but not on an AMD, etc.), but a generic PCIe passthrough feature might be worth considering. |
Absolutely, I totally agree on generalizing the concept of PCI passthrough and I think we can improve this in-tree. At this stage even if we break the API (command options) is not so critical as long as we don't break any previous behavior or option (maybe we should have a way to mark new options as "unstable"?). But I think it's good to have "something" merged, a lot of people have been asking me this feature for a while, so at least now people can start using it and improving it. 🙂 That said, I'll think about a proper interface for a generic PCI passthrough and maybe we can discuss it here or better create a separate issue. Thanks! |
This PR enables gpu passthrough with virtme-ng. It adds a new paramemeter "--nvgpu' which is used to provide the PCI address of the gpu. There are included instructions in the README for enabling VFIO passthrough support.