x86/multikernel: inherit host timer calibration - #5
Merged
congwang-mk merged 1 commit intoAug 13, 2026
Merged
Conversation
Spawn kernels cannot calibrate against host-owned PIT, PIC, or IO-APIC resources. Carry the host loops-per-jiffy, CPU and TSC frequencies, and local APIC timer calibration in the spawn boot context. Install fixed calibration callbacks before x86 timer initialization. Keep explicit command-line calibration authoritative. Signed-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>
nickolaev
force-pushed
the
multikernel-timer-calibration
branch
from
August 11, 2026 23:06
55c05d6 to
b24e05c
Compare
nickolaev
marked this pull request as ready for review
August 12, 2026 04:50
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.
Summary
Spawned x86 kernels cannot safely repeat timer calibration while the primary kernel owns the legacy PIT, PIC, and I/O APIC resources used by those probes.
This commit appends optional calibration fields to the spawn context and records the primary kernel's delay-loop, CPU, TSC, and local APIC timer measurements when preparing a spawned kernel. The spawned kernel reuses those measurements when explicit command-line overrides are absent.
Existing context offsets remain unchanged. The appended fields are zero-initialized, so unavailable measurements retain the existing fallback behavior, while explicit overrides remain authoritative.
Validation
platform-quirks.oand Multikernel spawn object buildsCONFIG_MULTIKERNEL=ykernel buildCONFIG_MULTIKERNEL=nvmlinuxbuild