intercept SMI support in SVM

This commit is contained in:
Stanislav Shwartsman 2021-04-27 08:22:04 +00:00
parent 6781067b55
commit 79d6a16e3b
1 changed files with 5 additions and 0 deletions

View File

@ -221,6 +221,11 @@ bool BX_CPU_C::handleAsyncEvent(void)
// INIT
if (is_unmasked_event_pending(BX_EVENT_SMI) && SVM_GIF)
{
#if BX_SUPPORT_SVM
if (BX_CPU_THIS_PTR in_svm_guest) {
if (SVM_INTERCEPT(SVM_INTERCEPT0_SMI)) Svm_Vmexit(SVM_VMEXIT_SMI);
}
#endif
clear_event(BX_EVENT_SMI); // clear SMI pending flag
enter_system_management_mode(); // would disable NMI when SMM was accepted
}