assert check
This commit is contained in:
parent
d0e118a1d0
commit
b8dfe6d9b1
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: smm.cc,v 1.63 2010-03-14 15:51:26 sshwarts Exp $
|
||||
// $Id: smm.cc,v 1.64 2010-03-15 22:58:41 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2006-2009 Stanislav Shwartsman
|
||||
@ -73,9 +73,15 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::RSM(bxInstruction_c *i)
|
||||
}
|
||||
|
||||
#if BX_SUPPORT_VMX
|
||||
if (BX_CPU_THIS_PTR in_vmx_guest) {
|
||||
BX_ERROR(("VMEXIT: RSM in VMX non-root operation"));
|
||||
VMexit(i, VMX_VMEXIT_RSM, 0);
|
||||
if (BX_CPU_THIS_PTR in_vmx) {
|
||||
if (BX_CPU_THIS_PTR in_vmx_guest) {
|
||||
BX_ERROR(("VMEXIT: RSM in VMX non-root operation"));
|
||||
VMexit(i, VMX_VMEXIT_RSM, 0);
|
||||
}
|
||||
else {
|
||||
BX_ERROR(("RSM in VMX root operation !"));
|
||||
exception(BX_UD_EXCEPTION, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: vmx.cc,v 1.38 2010-03-15 16:34:03 sshwarts Exp $
|
||||
// $Id: vmx.cc,v 1.39 2010-03-15 22:58:41 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2009 Stanislav Shwartsman
|
||||
@ -1758,6 +1758,10 @@ void BX_CPU_C::VMexit(bxInstruction_c *i, Bit32u reason, Bit64u qualification)
|
||||
{
|
||||
VMCS_CACHE *vm = &BX_CPU_THIS_PTR vmcs;
|
||||
|
||||
if (!BX_CPU_THIS_PTR in_vmx || !BX_CPU_THIS_PTR in_vmx_guest) {
|
||||
BX_PANIC(("PANIC: VMEXIT not in VMX guest mode !"));
|
||||
}
|
||||
|
||||
// VMEXITs are FAULT-like: restore RIP/RSP to value before VMEXIT occurred
|
||||
RIP = BX_CPU_THIS_PTR prev_rip;
|
||||
if (BX_CPU_THIS_PTR speculative_rsp)
|
||||
@ -2162,7 +2166,6 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::VMLAUNCH(bxInstruction_c *i)
|
||||
///////////////////////////////////////////////////////
|
||||
|
||||
VMenterInjectEvents();
|
||||
|
||||
#else
|
||||
BX_INFO(("VMLAUNCH/VMRESUME: required VMX support, use --enable-vmx option"));
|
||||
exception(BX_UD_EXCEPTION, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user