mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-30 23:54:40 +00:00
hv: apicv: enable interrupt-window if any pending external interrupts
The external interrupt events only can be inject if RFLAGS.IF = 1 and no blocking by both STI and MOV SS. If met this scenario, we need to enable "interrupt-window exiting" for injection in next VMEXIT. Tracked-On: #1189 Signed-off-by: Yu Wang <yu1.wang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
46c3276ec8
commit
8e296155d5
@ -495,9 +495,18 @@ INTR_WIN:
|
||||
* and automatic inject the virtual interrupts in appropriate time.
|
||||
* And from SDM Vol3 29.2.1, the apicv only trigger evaluation of
|
||||
* pending virtual interrupts when "interrupt-window exiting" is 0.
|
||||
*
|
||||
* External interrupt(from vpic) can't be delivered by "virtual-
|
||||
* interrupt delivery", it only deliver interrupt from vlapic.
|
||||
*
|
||||
* So need to enable "interrupt-window exiting", when there is
|
||||
* an ExtInt or there is lapic interrupt and virtual interrupt
|
||||
* deliver is disabled.
|
||||
*/
|
||||
if (is_apicv_intr_delivery_supported() ||
|
||||
!vcpu_pending_request(vcpu)) {
|
||||
if (!bitmap_test(ACRN_REQUEST_EXTINT,
|
||||
pending_req_bits) &&
|
||||
(is_apicv_intr_delivery_supported() ||
|
||||
!vcpu_pending_request(vcpu))) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user