Repository navigation
Conversation
This was referenced Oct 27, 2026
This branch has not been deployed
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
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.
Summary
Fix the shell test used by the VFIO worker before unbinding an AMD GPU virtual function from its current PCI driver.
This is a small correctness fix in the GIM/VF passthrough path. When the worker prepares a VF for
vfio-pci, it checks whether the device has an existing driver and unbinds it before applyingdriver_overrideand binding the device tovfio-pci.Root cause
The script currently uses:
The
[token is the shell test command and must be separated from the-eoperator by whitespace. Without that space, the shell parses[-eas the command name instead of invoking the test command. As a result, the unbind check does not execute correctly, and the existing driver may remain attached when the worker attempts the VFIO transition.Change
Change the condition to:
Only
internal/controllers/workermgr/scripts/vfio_bind.shis changed.Impact
This restores the intended unbind behavior for VF passthrough devices managed by the worker. It is relevant to AMD GIM enablement because the GIM driver creates the VFs, after which the operator must move those VFs to
vfio-pcifor KubeVirt passthrough.The fix does not change device selection, GIM package URLs, KMM configuration, node selectors, or KubeVirt configuration. Those concerns are outside the scope of this focused shell correctness fix.
Validation
bash -n internal/controllers/workermgr/scripts/vfio_bind.shgit diff --checkA full hardware-backed VFIO/KubeVirt E2E test was not run in this environment.