hv: virq: disable interrupt-window exiting in vmexit handler

In interrupt-window exiting handler, disable it directly even there has
pending interrupts. The later acrn_handle_pending_request will
re-evaluation and re-enable it if needed.

Signed-off-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yu Wang 2018-08-14 14:34:32 +00:00 committed by wenlingz
parent f4513f903d
commit 8d383185ec

View File

@ -337,22 +337,13 @@ int interrupt_window_vmexit_handler(struct vcpu *vcpu)
TRACE_2L(TRACE_VMEXIT_INTERRUPT_WINDOW, 0UL, 0UL);
if (vcpu == NULL)
return -1;
if (vcpu_pending_request(vcpu)) {
/* Do nothing
* acrn_handle_pending_request will continue for this vcpu
*/
} else {
/* No interrupts to inject.
* Disable the interrupt window exiting
/* Disable interrupt-window exiting first.
* acrn_handle_pending_request will continue handle for this vcpu
*/
vcpu->arch_vcpu.irq_window_enabled = 0U;
value32 = exec_vmread32(VMX_PROC_VM_EXEC_CONTROLS);
value32 &= ~(VMX_PROCBASED_CTLS_IRQ_WIN);
exec_vmwrite32(VMX_PROC_VM_EXEC_CONTROLS, value32);
}
vcpu_retain_rip(vcpu);
return 0;