[kernel] E: Add XapicOnly interrupt mode (skip PIC init on microvm)#14
Draft
esaurez wants to merge 1 commit into
Draft
[kernel] E: Add XapicOnly interrupt mode (skip PIC init on microvm)#14esaurez wants to merge 1 commit into
esaurez wants to merge 1 commit into
Conversation
Add XapicOnly interrupt controller variant for WHP+microvm that skips legacy 8259 PIC initialization entirely. When the xAPIC timer has been successfully initialized via try_init_xapic_timer(), the WHP LAPIC emulator handles timer delivery and EOI via MMIO without VM exits. PIC I/O ports (0x20/0x21/0xA0/0xA1) are never accessed, eliminating ~47 VM exits per cold-start. Changes: - New XapicOnly(Xapic) variant in InterruptControllerType enum - Early-return in InterruptController::new() when eoi_xapic is Some under cfg(feature = "microvm", target_arch = "x86") - ack(): delegates to xapic.ack() - unmask(): no-op (LAPIC timer already unmasked during calibration) - start_core(): returns OperationNotSupported (microvm is single-core) - set_handler/get_handler: identity mapping (no IOAPIC routing) Benchmark (20 iterations, high-perf power mode, p50): Config total guest_exec exit_handling baseline (dev) 60,483us 46,238us 7,208us + XapicOnly TBD TBD TBD Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Replica of nanvix#1982.
Add XapicOnly interrupt controller variant for WHP+microvm that skips legacy 8259 PIC initialization entirely, eliminating ~47 VM exits per cold-start.
New XapicOnly(Xapic) variant in InterruptControllerType enum with dispatch logic for ack(), unmask(), start_core(), set_handler/get_handler.
Activation condition: cfg(feature = microvm, target_arch = x86) AND eoi_xapic is Some.
Benchmark (50 iterations, high-perf tuned, p50)