Skip to content

devices: add IOAPIC support for Windows Hypervisor Platform#692

Open
lstocchi wants to merge 2 commits into
containers:mainfrom
lstocchi:ioapic_win
Open

devices: add IOAPIC support for Windows Hypervisor Platform#692
lstocchi wants to merge 2 commits into
containers:mainfrom
lstocchi:ioapic_win

Conversation

@lstocchi
Copy link
Copy Markdown
Contributor

This PR adds IOAPIC support for Windows by refactoring the existing KVM-only IOAPIC implementation into a backend-agnostic design. The existing KVM logic moves to ioapic_kvm.rs with no behavioral changes.
ioapic_whp.rs is dedicated to Windows and it translates IOAPIC redirection-table entries into WHP InterruptRequest structs, handling physical/logical destination modes, edge/level triggers, and delivery modes (Fixed, LowestPriority, NMI, INIT, SIPI).

lstocchi added 2 commits May 27, 2026 18:35
This commit refactors the IOAPIC emulation logic to decouple common register state management from hypervisor-specific interrupt injection. This is a prerequisite for supporting the Windows Hypervisor Platform (WHP).

It introduces the IoApicBackend trait to handle backend-specific logic such as interrupt routing updates and injection.
It moves the register state into a dedicated IoApicRegs struct, making the core IoApic struct generic over the backend (IoApic<B: IoApicBackend>) and place KVM-sspecific implementation into a new ioapic_kvm.rs file.

Assisted-by: Cursor:claude-opus-4.6
Signed-off-by: lstocchi <lstocchi@redhat.com>
WHP emulates the LAPIC but not the IOAPIC. Add a WhpIoapicBackend that
plugs into the common IOAPIC register emulation and delivers interrupts
through WHvRequestInterrupt.

The backend translates IOAPIC redirection-table entries into WHP
InterruptRequest structs, handling physical/logical destination modes,
edge/level trigger modes, and delivery modes (Fixed, LowestPriority, NMI,
INIT, SIPI). Level-triggered interrupts track Remote-IRR as the KVM
backend does.

Assisted-by: Cursor:claude-opus-4.6
Signed-off-by: lstocchi <lstocchi@redhat.com>
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