set async_event when injecting virq to SVM guest

This commit is contained in:
Stanislav Shwartsman 2012-01-01 21:22:56 +00:00
parent 269d5e3443
commit 5847e772a6
2 changed files with 6 additions and 2 deletions

View File

@ -296,7 +296,7 @@ bx_bool BX_CPU_C::handleAsyncEvent(void)
}
#if BX_SUPPORT_SVM
else if (BX_CPU_THIS_PTR in_svm_guest && SVM_V_IRQ && BX_CPU_THIS_PTR get_IF() &&
(SVM_V_INTR_PRIO > SVM_V_TPR || SVM_V_IGNORE_TPR))
((SVM_V_INTR_PRIO > SVM_V_TPR) || SVM_V_IGNORE_TPR))
{
// virtual interrupt acknowledge
VirtualInterruptAcknowledge();
@ -354,7 +354,7 @@ bx_bool BX_CPU_C::handleAsyncEvent(void)
#endif
#if BX_SUPPORT_SVM
|| (BX_CPU_THIS_PTR in_svm_guest && SVM_V_IRQ && BX_CPU_THIS_PTR get_IF() &&
(SVM_V_INTR_PRIO > SVM_V_TPR || SVM_V_IGNORE_TPR))
((SVM_V_INTR_PRIO > SVM_V_TPR) || SVM_V_IGNORE_TPR))
#endif
#if BX_X86_DEBUGGER
// a debug code breakpoint is set in current page

View File

@ -531,6 +531,10 @@ bx_bool BX_CPU_C::SvmEnterLoadCheckGuestState(void)
if (guest.eflags & EFlagsTFMask)
BX_CPU_THIS_PTR async_event = 1;
// injecting virtual interrupt
if (SVM_V_IRQ)
BX_CPU_THIS_PTR async_event = 1;
#if BX_SUPPORT_MONITOR_MWAIT
BX_CPU_THIS_PTR monitor.reset_monitor();
#endif