-
Notifications
You must be signed in to change notification settings - Fork 94
Support VFIO passthrough #668
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
Open
varunrsekar
wants to merge
2
commits into
NVIDIA:main
Choose a base branch
from
varunrsekar:vfio-support-1.33
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Oct 11, 2025
8df3681 to
298704d
Compare
shivamerla
reviewed
Oct 15, 2025
|
Updates:
|
shivamerla
reviewed
Oct 23, 2025
shivamerla
reviewed
Oct 23, 2025
shivamerla
reviewed
Oct 23, 2025
shivamerla
reviewed
Oct 23, 2025
shivamerla
reviewed
Oct 23, 2025
dea8e17 to
cd9c8e1
Compare
shivamerla
reviewed
Oct 28, 2025
0e03ca5 to
9d480e7
Compare
cef0d52 to
80bedf4
Compare
|
LGTM! thanks @varunrsekar for being patient with this change. We have to follow up on some of the blockers as below when we move this feature out of alpha.
cc @klueska to further review this feature to support behind an alpha feature-gate. |
Signed-off-by: Varun Ramachandra Sekar <[email protected]> use chroot to run modprobe Signed-off-by: Varun Ramachandra Sekar <[email protected]> deadvertise sibling devices on preparation Signed-off-by: Varun Ramachandra Sekar <[email protected]> soft check for VFs before attempting unbind Signed-off-by: Varun Ramachandra Sekar <[email protected]> address review comments Signed-off-by: Varun Ramachandra Sekar <[email protected]> address comments (2) Signed-off-by: Varun Ramachandra Sekar <[email protected]> use fuser to check if gpu is free Signed-off-by: Varun Ramachandra Sekar <[email protected]> remove unnecessary securityContext Signed-off-by: Varun Ramachandra Sekar <[email protected]>
Signed-off-by: Varun Ramachandra Sekar <[email protected]>
80bedf4 to
1a6c76f
Compare
|
Updates:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Design
PassthroughSupportgithub.com/NVIDIA/go-nvlib/nvpcipkgvfiowith canonicalNamegpu-vfio-<idx>vfio.gpu.nvidia.comk8s.gpu.nvidia.com-device_vfio.yaml:gpufor the same PCIBusID to be removed from the resourceslice.gpufor the same PCIBusID to be rediscovered and added back to the resourcesliceGPU Discovery
nvpci.GetGPUs(github.com/NVIDIA/go-nvlib/nvpci)vfioin the resourceslicegpudiscovered from NVML (is nil if device is not bound to the nvidia driver)k8s.gpu.nvidia.com-device_vfio.yaml) with the discovered vfio devicesNodePrepare
<driver-root>/dev/nvidia<minor>(timeout after 60s)scripts/unbind_from_driver.sh,scripts/bind_to_driver.shshell scripts.gpuin the resourcesliceNodeUnprepare
scripts/unbind_from_driver.sh,scripts/bind_to_driver.shshell scripts.Deployment
/(read-only),/sys/(read-write) and/proc/(read-write)Testing
demo/specs/quickstart/gpu-test-vfiopci.yamlTODO