added vmx consistency checks related to recently implemented support for vm-entering shutdown/wait-for-sipi state

This commit is contained in:
Stanislav Shwartsman 2015-10-09 06:18:14 +00:00
parent cd2129ec3b
commit ea3c1c77eb
2 changed files with 8 additions and 5 deletions

View File

@ -233,11 +233,6 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::linkTrace(bxInstruction_c *i)
bxInstruction_c *next = i->getNextTrace(BX_CPU_THIS_PTR iCache.traceLinkTimeStamp);
if (next) {
// bx_address eipBiased = RIP + BX_CPU_THIS_PTR eipPageBias;
// if (eipBiased >= BX_CPU_THIS_PTR eipPageWindowSize) {
// prefetch();
// }
BX_EXECUTE_INSTRUCTION(next);
return;
}

View File

@ -1756,6 +1756,14 @@ Bit32u BX_CPU_C::VMenterLoadCheckGuestState(Bit64u *qualification)
return VMX_VMEXIT_VMENTRY_FAILURE_GUEST_STATE;
}
}
if (guest.activity_state == BX_ACTIVITY_STATE_WAIT_FOR_SIPI) {
BX_ERROR(("VMENTER FAIL: No guest interruptions are allowed when entering Wait-For-Sipi state"));
return VMX_VMEXIT_VMENTRY_FAILURE_GUEST_STATE;
}
if (guest.activity_state == BX_ACTIVITY_STATE_SHUTDOWN && event_type != BX_NMI) {
BX_ERROR(("VMENTER FAIL: No NMI guest interruption is allowed when entering Shotdown state"));
return VMX_VMEXIT_VMENTRY_FAILURE_GUEST_STATE;
}
}
if (vmentry_ctrls & VMX_VMENTRY_CTRL1_SMM_ENTER) {