Repository navigation
Conversation
johnahull
force-pushed
the
fix/passthrough-vfio-validation
branch
from
October 27, 2026 16:23
aad4024 to
c9e99f5
Compare
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.
Problem
The operator supports PF/VF passthrough through a node-scoped DeviceConfig and VFIO device IDs. Two generic correctness and safety gaps make those configurations unsafe or incomplete:
spec.driver.vfioConfig.deviceIDs, the bind/unbind command uses those IDs but the VF-detection init container still scans only the built-in defaults. A custom VF configuration can therefore wait indefinitely for a device that the detection command does not look for.What this changes
spec.selectorfor enabledvf-passthroughandpf-passthroughconfigurations. The validation treats an omitteddriver.enableas enabled, matching the CRD default.Compatibility
This PR is independent of GIM artifact resolution. It applies only to PF/VF passthrough configurations; container-driver behavior is unchanged. The AMD MI3xx default VF IDs and GIM artifact mapping are kept in PR #674. The unrelated
-efix remains in PR #673.Testing
GOTOOLCHAIN=auto go test ./api/... ./cmd/... ./internal/... ./tools/build/copyrightGOTOOLCHAIN=auto go vet ./api/... ./cmd/... ./internal/... ./tools/build/copyrightgit diff --checkThe tests verify that configured VFIO IDs appear safely in both the binding command and detection command, and that enabled PF/VF passthrough rejects an empty selector.
Out of scope