You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC: a community-supported best-effort tier for untestable-in-CI hardware, applied to Hygon (HygonGenuine) x86_64 support
#6438
I'd like to propose a small, bounded governance tier for hardware the core team's CI cannot exercise, and use it to accept the HygonGenuine CPUID vendor string through the existing AMD CPUID paths behind an off-by-defaulthygon cargo feature.
This is deliberately starting as a Discussion (not a PR): two prior PRs already added the Hygon mapping and were closed — not on technical grounds, but because the project can't test Hygon in CI and doesn't want a feature branch that goes stale:
x86_64: Add support for Hygon CPUs #5905 — closed: "with our current infrastructure we are unable to test Hygon CPUs"; a proposed experimental tier was declined because "we have previously had feature branches but found they quickly became stale and hard to manage."
So the thing to agree on first is the tier, not a diff. A reference implementation is attached below, but the decision requested here is the governance model.
Problem (purely technical)
Hygon Dhyana / C86 report CPUID vendor HygonGenuine. Firecracker's x86_64 CPUID handling recognises only GenuineIntel and AuthenticAMD, and rejects anything else at two start-path gates:
So a microVM can't start on a Hygon host. Hygon Dhyana is a licensed AMD Zen design; the Linux kernel and KVM already route it through their AMD implementation. The fix is to do the same at those two gates — a few lines.
Addressing each reason the prior PRs were closed
1. "We can't test it in CI." → Provide the missing infrastructure. The component's owners contribute a Hygon host as a Buildkite agent and a dedicated pipeline (.buildkite/pipeline_hygon.py) that runs the vendor-mapping unit test plus boot, snapshot/restore and vsock end-to-end on real Hygon silicon. It runs only on a hygon agent, at non-gating priority, and never blocks the core pipelines or a release.
2. "Feature branches go stale." → Keep it in mainline but bound it: named owners in CODEOWNERS, and auto-unsupported on bitrot — if the dedicated CI is red/absent for 30 days with no owner fix, the component is marked unsupported and may be removed. Staleness becomes a bounded, self-clearing state instead of silent rot.
3. "A vendor must not be represented as another" (safety). → Enable the functional path; make no safety claim. Mapping Hygon onto the AMD paths makes a guest run; it isn't a claim that AMD's security-relevant model descriptions (microcode, errata, mitigations, IA32_ARCH_CAPABILITIES) hold for Hygon silicon. So the design keeps the static CPU-template vendor check strict and untouched: eligibility compares host vendor to the template's supported vendor (T2A → AuthenticAMD), so a Hygon host is rejected from T2A by default. Applying an AMD-derived template on Hygon stays an explicit, per-bit-verified opt-in. Functional enablement does not widen the security surface.
Proposed tier (addition to MAINTAINERS.md)
"Community-supported, best-effort components" — hardware the core CI cannot exercise:
Off by default behind a cargo feature not enabled in any default/released build → default artifacts byte-for-byte unchanged, supported paths gain no runtime branch.
Named owners in CODEOWNERS.
Dedicated, contributor-funded CI on a separate, non-gating pipeline.
Auto-unsupported after 30 days of red/absent CI with no owner fix.
It never blocks a release and never alters the Intel/AMD/ARM build.
Reference implementation (for discussion, not a merge request)
Feature off → HygonGenuine is still rejected like any other unknown vendor (asserted by test_hygon_kvmcpuid_rejected_without_feature).
Feature on → HygonGenuine maps to the AMD CPUID variant (test_hygon_kvmcpuid_maps_to_amd), and the AMD cache-topology passthrough accepts the Hygon host.
Static-template vendor check untouched → T2A rejected on Hygon by default.
Why this helps the project beyond Hygon
It's a reusable mechanism: any future CPU reporting a distinct CPUID vendor that is architecturally equivalent to an already-supported one can be onboarded the same way — contributor CI, named owners, off-by-default feature, auto-unsupported safeguard — rather than case-by-case. New hardware exercising the AMD CPUID path also tends to surface latent issues that benefit the AMD path.
Questions for maintainers
Is the best-effort tier (off-by-default feature + named owners + dedicated contributor CI + 30-day auto-unsupported) acceptable in principle?
Any additional constraints before Hygon is accepted as its first member (required e2e coverage on the owner pipeline, exact auto-unsupported window)?
Preferred home/format for the owner-provided CI agent registration?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
I'd like to propose a small, bounded governance tier for hardware the core team's CI cannot exercise, and use it to accept the
HygonGenuineCPUID vendor string through the existing AMD CPUID paths behind an off-by-defaulthygoncargo feature.This is deliberately starting as a Discussion (not a PR): two prior PRs already added the Hygon mapping and were closed — not on technical grounds, but because the project can't test Hygon in CI and doesn't want a feature branch that goes stale:
So the thing to agree on first is the tier, not a diff. A reference implementation is attached below, but the decision requested here is the governance model.
Problem (purely technical)
Hygon Dhyana / C86 report CPUID vendor
HygonGenuine. Firecracker's x86_64 CPUID handling recognises onlyGenuineIntelandAuthenticAMD, and rejects anything else at two start-path gates:kvm_bindings::CpuId→Cpuidconversion —UnsupportedVendor.BadVendorId.So a microVM can't start on a Hygon host. Hygon Dhyana is a licensed AMD Zen design; the Linux kernel and KVM already route it through their AMD implementation. The fix is to do the same at those two gates — a few lines.
Addressing each reason the prior PRs were closed
1. "We can't test it in CI." → Provide the missing infrastructure. The component's owners contribute a Hygon host as a Buildkite agent and a dedicated pipeline (
.buildkite/pipeline_hygon.py) that runs the vendor-mapping unit test plus boot, snapshot/restore and vsock end-to-end on real Hygon silicon. It runs only on ahygonagent, at non-gating priority, and never blocks the core pipelines or a release.2. "Feature branches go stale." → Keep it in mainline but bound it: named owners in
CODEOWNERS, and auto-unsupported on bitrot — if the dedicated CI is red/absent for 30 days with no owner fix, the component is marked unsupported and may be removed. Staleness becomes a bounded, self-clearing state instead of silent rot.3. "A vendor must not be represented as another" (safety). → Enable the functional path; make no safety claim. Mapping Hygon onto the AMD paths makes a guest run; it isn't a claim that AMD's security-relevant model descriptions (microcode, errata, mitigations,
IA32_ARCH_CAPABILITIES) hold for Hygon silicon. So the design keeps the static CPU-template vendor check strict and untouched: eligibility compares host vendor to the template's supported vendor (T2A→AuthenticAMD), so a Hygon host is rejected fromT2Aby default. Applying an AMD-derived template on Hygon stays an explicit, per-bit-verified opt-in. Functional enablement does not widen the security surface.Proposed tier (addition to
MAINTAINERS.md)"Community-supported, best-effort components" — hardware the core CI cannot exercise:
CODEOWNERS.It never blocks a release and never alters the Intel/AMD/ARM build.
Reference implementation (for discussion, not a merge request)
Feature
hygon, off by default. Branch: https://github.com/AdaAibaby/firecracker/tree/rfc/hygon-vendor-supportgit diff --statvsmain:Properties:
HygonGenuineis still rejected like any other unknown vendor (asserted bytest_hygon_kvmcpuid_rejected_without_feature).HygonGenuinemaps to the AMD CPUID variant (test_hygon_kvmcpuid_maps_to_amd), and the AMD cache-topology passthrough accepts the Hygon host.T2Arejected on Hygon by default.Why this helps the project beyond Hygon
It's a reusable mechanism: any future CPU reporting a distinct CPUID vendor that is architecturally equivalent to an already-supported one can be onboarded the same way — contributor CI, named owners, off-by-default feature, auto-unsupported safeguard — rather than case-by-case. New hardware exercising the AMD CPUID path also tends to surface latent issues that benefit the AMD path.
Questions for maintainers
References
docs/cpu_templates/cpu-templates.md(vendor/template model)cc the participants of the earlier threads for continuity.
All reactions