mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-05 11:36:50 +00:00
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:
parent
f4513f903d
commit
8d383185ec
@ -337,22 +337,13 @@ int interrupt_window_vmexit_handler(struct vcpu *vcpu)
|
|||||||
|
|
||||||
TRACE_2L(TRACE_VMEXIT_INTERRUPT_WINDOW, 0UL, 0UL);
|
TRACE_2L(TRACE_VMEXIT_INTERRUPT_WINDOW, 0UL, 0UL);
|
||||||
|
|
||||||
if (vcpu == NULL)
|
/* Disable interrupt-window exiting first.
|
||||||
return -1;
|
* acrn_handle_pending_request will continue handle for this vcpu
|
||||||
|
*/
|
||||||
if (vcpu_pending_request(vcpu)) {
|
vcpu->arch_vcpu.irq_window_enabled = 0U;
|
||||||
/* Do nothing
|
value32 = exec_vmread32(VMX_PROC_VM_EXEC_CONTROLS);
|
||||||
* acrn_handle_pending_request will continue for this vcpu
|
value32 &= ~(VMX_PROCBASED_CTLS_IRQ_WIN);
|
||||||
*/
|
exec_vmwrite32(VMX_PROC_VM_EXEC_CONTROLS, value32);
|
||||||
} else {
|
|
||||||
/* No interrupts to inject.
|
|
||||||
* Disable the interrupt window exiting
|
|
||||||
*/
|
|
||||||
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);
|
vcpu_retain_rip(vcpu);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user