mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-02 01:16:50 +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:
@@ -495,9 +495,18 @@ INTR_WIN:
|
|||||||
* and automatic inject the virtual interrupts in appropriate time.
|
* and automatic inject the virtual interrupts in appropriate time.
|
||||||
* And from SDM Vol3 29.2.1, the apicv only trigger evaluation of
|
* And from SDM Vol3 29.2.1, the apicv only trigger evaluation of
|
||||||
* pending virtual interrupts when "interrupt-window exiting" is 0.
|
* 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() ||
|
if (!bitmap_test(ACRN_REQUEST_EXTINT,
|
||||||
!vcpu_pending_request(vcpu)) {
|
pending_req_bits) &&
|
||||||
|
(is_apicv_intr_delivery_supported() ||
|
||||||
|
!vcpu_pending_request(vcpu))) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user