Skip to content

Track and remove optional features from the minimal microVM kernel configuration #344

Closed

Description

Context

#309 intentionally enables CONFIG_NET_NS=y and CONFIG_VETH=y to support guest-internal networking. These settings have a concrete consumer, but the change highlights that we do not currently maintain a complete record of why each kernel configuration symbol is enabled.

The checked-in kernel/config-microvm is a full generated configuration. Kconfig defaults and dependencies can therefore introduce additional enabled symbols, making it difficult to determine which features are intentional, which are transitively required, and which are unnecessary.

Without this accounting, the configuration can gradually accumulate optional features and cease to be a truly minimal microVM kernel.

Goal

Establish an auditable, preferably machine-checkable inventory of enabled kernel configuration symbols. Each enabled symbol should be classified as one of:

  • Required: Needed for boot, OpenVMM integration, a supported device or filesystem, or an NVX guest/sandbox contract.
  • Transitive/default: Selected by Kconfig because of another required symbol.
  • Optional: Not required by any currently supported NVX path and therefore expected to be disabled in the minimal configuration.

"Optional" should mean that no supported NVX use case requires the feature, rather than merely that the upstream Kconfig prompt describes it as optional.

Scope

  • Audit the enabled symbols in the current microVM kernel configuration.
  • Record the rationale and consumer for every intentionally enabled feature.
  • Associate required symbols with the validation or scenario that depends on them.
  • Record CONFIG_NET_NS and CONFIG_VETH as required by the networking use case introduced in Build VETH into the microVM guest kernel #309.
  • Identify enabled symbols that have no current consumer.
  • Disable those optional symbols and regenerate the configuration through the existing build process.
  • Add validation that prevents new intentional feature symbols from being enabled without a recorded classification and rationale.
  • Document how future changes should add or remove tracked kernel features.

Acceptance criteria

  • Every enabled symbol is either directly classified or attributable to a documented Kconfig dependency/default.
  • Every intentionally enabled feature has a rationale and an identified NVX consumer.
  • Symbols with no current consumer are disabled in the minimal configuration.
  • scripts/nvx_tools/build_constants.py and related validation remain consistent with the resulting configuration.
  • CI detects newly enabled, untracked feature symbols.
  • The kernel builds successfully after running olddefconfig.
  • Existing kernel-configuration tests and affected microVM scenarios pass.
  • The before-and-after kernel size is recorded so the effect of the cleanup is visible.

Non-goal

Do not attempt to disable architecture, compiler-capability, or dependency-selected symbols independently when they are required transitively by a documented feature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions