Skip to content

Add generic IO-APIC support to chipset resources#3333

Open
moor-coding wants to merge 2 commits intomicrosoft:mainfrom
moor-coding:generic-ioapic-resourcify
Open

Add generic IO-APIC support to chipset resources#3333
moor-coding wants to merge 2 commits intomicrosoft:mainfrom
moor-coding:generic-ioapic-resourcify

Conversation

@moor-coding
Copy link
Copy Markdown
Contributor

@moor-coding moor-coding commented Apr 20, 2026

  • Move IoApicRouting trait to chipset_resources crate with re-export
  • Add IoApicRoutingHandleKind resource kind and GenericIoApicDeviceHandle
  • Add async resolver that registers line interrupt targets
  • Add IoApicRoutingResolver platform resolver in vmm_core
  • Make num_entries constant (IOAPIC_NUM_ENTRIES = 24)
  • Remove GenericIoApicDeps from base_chipset macro and workers

Copilot AI review requested due to automatic review settings April 20, 2026 18:15
@moor-coding moor-coding marked this pull request as ready for review April 20, 2026 18:20
@moor-coding moor-coding requested a review from a team as a code owner April 20, 2026 18:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors generic IO-APIC support to be resource/resolver-driven by moving IO-APIC routing into chipset_resources and wiring platform-specific routing via platform resolvers, eliminating the old GenericIoApicDeps plumbing in the base chipset builder.

Changes:

  • Introduces chipset_resources::ioapic (routing trait + handle kinds + GenericIoApicDeviceHandle) and a chipset::ioapic::resolver::GenericIoApicResolver.
  • Updates manifest building to attach a generic IO-APIC device handle (and sets capabilities.with_ioapic) instead of using legacy with_generic_ioapic/deps wiring.
  • Registers the new chipset resolver and adds a platform resolver (IoApicRoutingResolver) in both OpenVMM and Underhill workers.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vmm_core/vmotherboard/src/base_chipset.rs Removes legacy GenericIoApicDeps device construction path from base chipset options/builder.
vmm_core/vm_manifest_builder/src/lib.rs Attaches GenericIoApicDeviceHandle via resources and updates IO-APIC capability tracking.
vmm_core/src/platform_resolvers.rs Adds platform resolver to provide IoApicRouting for resource resolution.
vmm_core/src/emuplat/ioapic.rs Updates wrapper to implement the moved chipset_resources::ioapic::IoApicRouting trait.
vmm_core/Cargo.toml Adds chipset_resources dependency needed for the moved IO-APIC routing types.
vm/devices/chipset_resources/src/lib.rs Adds ioapic resource module (routing trait, handle kind, device handle, constant).
vm/devices/chipset/src/ioapic/resolver.rs New async resolver that wires IRQ line targets and instantiates IoApicDevice.
vm/devices/chipset/src/ioapic/mod.rs Exposes resolver module and re-exports IoApicRouting from chipset_resources.
openvmm/openvmm_resources/src/lib.rs Registers the new GenericIoApicResolver for x86_64 guests.
openvmm/openvmm_core/src/worker/dispatch.rs Adds platform IO-APIC routing resolver registration and switches ACPI with_ioapic source to capabilities.
openhcl/underhill_core/src/worker.rs Adds platform IO-APIC routing resolver registration and switches ACPI with_ioapic source to capabilities.
openhcl/openvmm_hcl_resources/src/lib.rs Registers the new GenericIoApicResolver for x86_64 guests (OpenHCL side).
Cargo.lock Records the new chipset_resources dependency edge in the lockfile.

Comment thread openhcl/underhill_core/src/worker.rs
Comment thread openvmm/openvmm_core/src/worker/dispatch.rs
Comment thread vm/devices/chipset/src/ioapic/mod.rs Outdated
@github-actions
Copy link
Copy Markdown

@moor-coding moor-coding force-pushed the generic-ioapic-resourcify branch from bc92eee to 8861f2c Compare April 22, 2026 16:44
- Move IoApicRouting trait to chipset_resources crate with re-export
- Add IoApicRoutingHandleKind resource kind and GenericIoApicDeviceHandle
- Add async resolver that registers line interrupt targets
- Add IoApicRoutingResolver platform resolver in vmm_core
- Make num_entries constant (IOAPIC_NUM_ENTRIES = 24)
- Remove GenericIoApicDeps from base_chipset macro and workers
- Wire up resolver registration in both dispatch.rs and worker.rs
Copilot AI review requested due to automatic review settings April 22, 2026 16:59
@moor-coding moor-coding force-pushed the generic-ioapic-resourcify branch from 8861f2c to 7f3e97f Compare April 22, 2026 16:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Comment thread openvmm/openvmm_core/src/worker/dispatch.rs
ioapic_routing() is only available on x86_64 (gated on HvlitePartition
trait and X86Partition trait). The resolver registration was missing the
cfg gate, breaking all aarch64 CI targets.
Copilot AI review requested due to automatic review settings April 22, 2026 18:26
@moor-coding moor-coding force-pushed the generic-ioapic-resourcify branch from 284c357 to 1d78df3 Compare April 22, 2026 18:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

vm/devices/chipset/src/ioapic/mod.rs:29

  • use std::fmt::Debug; appears to be unused now that the local IoApicRouting trait (and its Debug impl) was removed in favor of chipset_resources::ioapic::IoApicRouting. With warnings denied in CI, this unused import will fail the build; please remove it (or reference it explicitly if still needed).

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.

3 participants