Skip to content

feat(kmm): resolve GIM artifacts for VF passthrough - #674

Draft
johnahull wants to merge 1 commit into
ROCm:mainfrom
johnahull:feat/gim-artifact-resolution
Draft

johnahull wants to merge 1 commit into
ROCm:mainfrom
johnahull:feat/gim-artifact-resolution

Conversation

@johnahull

@johnahull johnahull commented Oct 27, 2026 •

Copy link
Copy Markdown

Problem

The AMD GIM driver is distributed through release artifacts whose layout differs between older releases and current releases. The operator's GIM Dockerfile templates previously constructed the download URL and package names from the driver version alone. As a result, a KMM build for 9.3.0.K could not resolve the correct GIM package without manual host-side preparation.

This blocks the intended DeviceConfig flow for AMD VF passthrough: configure the GIM version in the operator, build the module image with KMM, and expose the resulting VFs to workloads.

What this changes

  • Resolve GIM artifacts in the KMM module builder and pass the resolved values as build arguments.
  • Support the published release layouts:
    • 8.4.1.K through 9.3.0.K use direct release tags matching the version.
    • Older releases such as 8.1.0.K retain the mainline%2F<version> tag layout.
    • RPM names retain the -0 revision for older releases; 9.3.0.K uses the published package without that revision.
    • Debian package names continue to use gim-dkms_<version>_all.deb.
  • Update the Ubuntu and CoreOS GIM Dockerfile templates to consume explicit release-tag and package-name arguments instead of embedding one legacy layout.
  • Require an explicit driver version for enabled VF passthrough so artifact selection is deterministic and does not silently fall back to an OS-derived version.
  • Add the AMD MI3xx VF PCI IDs to the default VF detection list so supported devices can be discovered without custom configuration.

Compatibility

The legacy artifact mapping remains unchanged for older GIM versions. The new build arguments are added only to VF-passthrough KMM builds; container-driver and PF-passthrough flows are not changed by the artifact resolver. The generic selector and custom-VFIO-ID behavior is intentionally covered by separate PR #675.

Testing

  • GOTOOLCHAIN=auto go test ./api/... ./cmd/... ./internal/... ./tools/build/copyright
  • GOTOOLCHAIN=auto go vet ./api/... ./cmd/... ./internal/... ./tools/build/copyright
  • git diff --check
  • Regression coverage for direct-tag releases 8.4.1.K and 9.2.0.K, plus legacy 8.1.0.K and current 9.3.0.K.
  • Local Podman image build using the checked-in Ubuntu GIM template and the 9.3.0.K KMM build arguments. The build downloaded and installed gim-dkms_9.3.0.K_all.deb, compiled DKMS for kernel 6.8.0-139-generic, and produced gim.ko in the resulting image.

Out of scope

Live KMM reconciliation on OpenShift and VFIO validation on physical AMD hardware remain to be performed.

@johnahull
johnahull force-pushed the feat/gim-artifact-resolution branch from 10e2120 to c562551 Compare October 27, 2026 16:23

This branch has not been deployed

No deployments
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.

1 participant