Skip to content

perf(config): optimize the x86 guest kernel - #25

Merged
appcypher merged 4 commits into
krunfwfrom
appcypher/perf-guest-kernel
Aug 2, 2026
Merged

perf(config): optimize the x86 guest kernel#25
appcypher merged 4 commits into
krunfwfrom
appcypher/perf-guest-kernel

Conversation

@appcypher

Copy link
Copy Markdown
Member

TL;DR

Enable hardware CRC32C, compile the x86 guest with static PREEMPT_NONE, and enable x2APIC for the Microsandbox firmware performance stack.

Description

  • Enable the feature-detected x86 CRC32C implementation so supported AMD and Intel CPUs can accelerate ext4 metadata checksums.
  • Disable dynamic preemption while retaining PREEMPT_NONE as the selected scheduling model.
  • Enable x2APIC support for lower-overhead interrupt delivery when the VMM and host expose the complementary virtualization capability.
  • Limit the performance changes to the generic x86_64 firmware configuration; Windows, SEV, TDX, aarch64, and riscv64 configs are unchanged.
  • Stack temporarily on the Linux 6.12.99 update in fix(kernel): update Linux to 6.12.99 #24; after that PR merges, this PR contains only the three x86 configuration changes.

Test Plan

  • scripts/check-kernel-version.sh confirms the stacked Linux 6.12.99 baseline is current
  • git diff --check origin/krunfw..HEAD exits 0
  • Config assertions confirm CONFIG_CRYPTO_CRC32C_INTEL=y, CONFIG_PREEMPT_NONE=y, CONFIG_PREEMPT_DYNAMIC disabled, and CONFIG_X86_X2APIC=y exactly once
  • The Linux 6.12.99 source accepts all 33 common patches and 4 TEE patches without rejects
  • Required kernel CI builds Linux x86_64, Windows x86_64, SEV x86_64, TDX x86_64, Linux aarch64, and Linux riscv64 (runs in GitHub CI)
  • Boot and exercise the Linux 6.12.99 x86_64 firmware through Microsandbox (needs a Linux KVM host after CI produces the updated bundle)

Advance the bundled stable kernel by one patch release so the firmware
build remains on the current Linux 6.12.y baseline.

Keep the existing libkrunfw version, ABI, reproducible timestamp, and
patch stack unchanged.
Build the kernel's feature-detected CRC32C implementation so capable AMD and Intel guests can use hardware acceleration for ext4 metadata checksums instead of crc32c-generic.
Disable dynamic preemption in the x86 firmware configuration so the
PREEMPT_NONE selection is compiled as the sole scheduling model.

Keep this change isolated for hardlink throughput and responsiveness
A/B testing before it is considered for the cumulative stack.
Enable the x86 guest kernel's x2APIC support on top of the cumulative
CRC32C and static PREEMPT_NONE firmware. Keep the change isolated so its
interrupt-routing and workload effects can be accepted or rejected
without changing the cumulative performance branch.
@appcypher
appcypher merged commit b7cc1fb into krunfw Aug 2, 2026
8 checks passed
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