mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-28 20:16:09 +00:00
If the "virtual-interrupt delivery" is enabled for vmx apicv, then need avoid to enable interrupt-window exiting. From SDM Vol3, 29.2.1, the evaluation of pending virtual interrupts only be trigger if "interrupt-window exiting" is 0. The original code will enable interrupt-window vmexit if any pending vlapic interrupts even the "virtual-interrupt delivery" is enabled. It will cause the pending interrupts can't be evaluate immediately until guest triggered interrupt-window vmexit. For "virtual-interrupt delivery" enabled case, just need sync the pending interrupts to irr and update rvi if needed. And CPU will evaluate and automatic injecct virtual interrupt at appropriate time. It doesn't rely on interrupt-window vmexit. For "virtual-interrupt delivery" disabled case, need to check if satisfy the virtual interrupt injection conditions before doing the interrupt injection. If not, then need to enable interrupt-window vmexit and re-check the conditions in the next time vmexit. Tracked-On: #1187 Signed-off-by: Yu Wang <yu1.wang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>