Default Interrupt Handling

The VPICD emulates the functions of the programmable interrupt controller (PIC). This entails reflecting interrupts into virtual machines and simulating I/O, such as recognizing when a virtual machine issues an end of interrupt (EOI). When VPICD initializes, it sets up a default interrupt handler for every interrupt request (IRQ). These handlers determine which virtual machine an interrupt should be reflected into, and they arbitrate conflicts between virtual machines that attempt to unmask the same interrupt.

An interrupt that is unmasked when Windows is started is considered a global interrupt. A global interrupt will always be reflected into the currently executing virtual machine, and any virtual machine can mask or unmask the IRQ. If a virtual machine unmasks an IRQ that was masked when Windows was started, it owns that IRQ. All interrupts for owned IRQs are reflected to the owner. If another virtual machine attempts to unmask the interrupt, the second virtual machine is terminated, and Windows may direct the user to restart the computer.

If another virtual device virtualizes an IRQ, it is up to that device to determine which virtual machines receive interrupts and arbitrate conflicts. Once an IRQ is virtualized, the VPICD no longer provides default handling for that IRQ.