Repository navigation
Conversation
Add a kernel module that creates fake PCI devices in /sys/bus/pci/devices/ to simulate NVIDIA SR-IOV Virtual Functions with vGPU profiles assigned. This enables testing of PR kubevirt#16710's vGPU VF discovery logic without requiring real GPU hardware. The module: - Creates a virtual PCI bus at domain 0001 - Registers fake PCI devices with NVIDIA Tesla T4 vendor/device IDs - Provides nvidia/current_vgpu_type sysfs attribute for vGPU profile detection - Devices appear as real PCI devices visible to virt-handler Usage: cd kubevirtci/cluster-up/cluster/kind-1.33-vgpu/fake-sriov-vgpu make # or use container build sudo ./setup-fake-sriov.sh setup Devices will appear at /sys/bus/pci/devices/0001:00:XX.X with: - vendor: 0x10de (NVIDIA) - device: 0x1eb8 (Tesla T4) - nvidia/current_vgpu_type: configurable vGPU profile Signed-off-by: oshoval <[email protected]> Co-authored-by: Cursor <[email protected]>
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
@oshoval: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
closing for now, will be glad if desired to open it in the future |
What this PR does
Add a kernel module that creates fake PCI devices in /sys/bus/pci/devices/ to simulate NVIDIA SR-IOV Virtual Functions with vGPU profiles assigned.
This enables testing of PR #16710's vGPU VF discovery logic without requiring real GPU hardware. The module:
Note: didn't test e2d, just device creation.
Usage:
cd kubevirtci/cluster-up/cluster/kind-1.33-vgpu/fake-sriov-vgpu make # or use container build sudo ./setup-fake-sriov.sh setup
Devices will appear at /sys/bus/pci/devices/0001:00:XX.X with:
References
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note