Skip to content

Conversation

@cdesiniotis
Copy link
Collaborator

@cdesiniotis cdesiniotis commented Jan 23, 2026

In a follow-up, I plan to move internal/nvpassthrough to go-nvlib. This code can be shared with other projects that also need to bind GPUs to the VFIO module (e.g. the NVIDIA DRA Driver for GPUs).

Testing

root@smc741ge-0013:/localhome/local-cdesiniotis# lspci -nnk -d 10de:
17:00.0 3D controller [0302]: NVIDIA Corporation AD102GL [L40] [10de:26b5] (rev a1)
        Subsystem: NVIDIA Corporation AD102GL [L40] [10de:169d]
        Kernel modules: nvidiafb, nouveau
3d:00.0 3D controller [0302]: NVIDIA Corporation AD104GL [L4] [10de:27b8] (rev a1)
        Subsystem: NVIDIA Corporation AD104GL [L4] [10de:16ca]
        Kernel modules: nvidiafb, nouveau
root@smc741ge-0013:/localhome/local-cdesiniotis# ./vfio-manage bind --all
INFO[2026-01-23T23:21:26Z] Binding device 0000:17:00.0                  
INFO[2026-01-23T23:21:26Z] Binding device 0000:17:00.0 to driver: vfio-pci 
INFO[2026-01-23T23:21:26Z] Binding device 0000:3d:00.0                  
INFO[2026-01-23T23:21:26Z] Binding device 0000:3d:00.0 to driver: vfio-pci 
root@smc741ge-0013:/localhome/local-cdesiniotis# lspci -nnk -d 10de:
17:00.0 3D controller [0302]: NVIDIA Corporation AD102GL [L40] [10de:26b5] (rev a1)
        Subsystem: NVIDIA Corporation AD102GL [L40] [10de:169d]
        Kernel driver in use: vfio-pci
        Kernel modules: nvidiafb, nouveau
3d:00.0 3D controller [0302]: NVIDIA Corporation AD104GL [L4] [10de:27b8] (rev a1)
        Subsystem: NVIDIA Corporation AD104GL [L4] [10de:16ca]
        Kernel driver in use: vfio-pci
        Kernel modules: nvidiafb, nouveau
root@smc741ge-0013:/localhome/local-cdesiniotis# ./vfio-manage unbind --all
INFO[2026-01-23T23:21:36Z] Unbinding device 0000:17:00.0                
INFO[2026-01-23T23:21:36Z] Unbinding device 0000:3d:00.0                
root@smc741ge-0013:/localhome/local-cdesiniotis# lspci -nnk -d 10de:
17:00.0 3D controller [0302]: NVIDIA Corporation AD102GL [L40] [10de:26b5] (rev a1)
        Subsystem: NVIDIA Corporation AD102GL [L40] [10de:169d]
        Kernel modules: nvidiafb, nouveau
3d:00.0 3D controller [0302]: NVIDIA Corporation AD104GL [L4] [10de:27b8] (rev a1)
        Subsystem: NVIDIA Corporation AD104GL [L4] [10de:16ca]
        Kernel modules: nvidiafb, nouveau

Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21303345017

Details

  • 0 of 95 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 6.004%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/vfio-manage/unbind.go 0 9 0.0%
cmd/vfio-manage/bind.go 0 11 0.0%
internal/nvpassthrough/nvpassthrough.go 0 75 0.0%
Totals Coverage Status
Change from base Build 21297491272: 0.05%
Covered Lines: 84
Relevant Lines: 1399

💛 - Coveralls

@cdesiniotis cdesiniotis merged commit fd043d8 into main Jan 24, 2026
11 checks passed
@tariq1890 tariq1890 deleted the refactor-vfio-code branch January 24, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants