How to send external interrupts to guest when following enabled:
Use TPR shadow
Virtualize APIC access
APIC register virtualization
Virtual-interrupt delivery
Acknowledge external interrupts
External interrupts exit
Process posted-interrupt
I've tried vmcs guest interrupt status 0x810, but couldn't make it work correctly. My goal is to redirect external interrupts to guest.
To inject an interrupt into the guest when virtual interrupt delivery is enabled, follow steps similar to those that the CPU performs when it processes a posted interrupt, as described in SDM volume 3, section 30.6, "Posted Interrupt Processing", steps 4, 5, and 6.
The steps are:
Evaluation of pending virtual interrupts will be performed by the CPU upon VM entry.
See also SDM volume 3, section 30.2, "Evaluation and Delivery of Virtual Interrupts".