bugfixes for luvalley boot

This commit is contained in:
Stanislav Shwartsman 2010-03-27 11:14:19 +00:00
parent 2f01469007
commit 6280a9560f
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: vmexit.cc,v 1.19 2010-03-25 21:33:07 sshwarts Exp $ // $Id: vmexit.cc,v 1.20 2010-03-27 11:14:19 sshwarts Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2009-2010 Stanislav Shwartsman // Copyright (c) 2009-2010 Stanislav Shwartsman
@ -215,7 +215,8 @@ void BX_CPU_C::VMexit_ExtInterrupt(void)
if (! BX_CPU_THIS_PTR in_vmx_guest) return; if (! BX_CPU_THIS_PTR in_vmx_guest) return;
if (PIN_VMEXIT(VMX_VM_EXEC_CTRL1_EXTERNAL_INTERRUPT_VMEXIT)) { if (PIN_VMEXIT(VMX_VM_EXEC_CTRL1_EXTERNAL_INTERRUPT_VMEXIT)) {
if (! PIN_VMEXIT(VMX_VMEXIT_CTRL1_INTA_ON_VMEXIT)) { VMCS_CACHE *vm = &BX_CPU_THIS_PTR vmcs;
if (! (vm->vmexit_ctrls & VMX_VMEXIT_CTRL1_INTA_ON_VMEXIT)) {
// interrupt wasn't acknowledged and still pending, interruption info is invalid // interrupt wasn't acknowledged and still pending, interruption info is invalid
VMwrite32(VMCS_32BIT_VMEXIT_INTERRUPTION_INFO, 0); VMwrite32(VMCS_32BIT_VMEXIT_INTERRUPTION_INFO, 0);
VMexit(0, VMX_VMEXIT_EXTERNAL_INTERRUPT, 0); VMexit(0, VMX_VMEXIT_EXTERNAL_INTERRUPT, 0);
@ -289,7 +290,7 @@ void BX_CPU_C::VMexit_Event(bxInstruction_c *i, unsigned type, unsigned vector,
return; return;
} }
BX_ERROR(("VMEXIT: exception 0x%02x error code = 0x%04x", vector, errcode)); BX_ERROR(("VMEXIT: event vector 0x%02x error code 0x%04x", vector, errcode));
// VMEXIT is not considered to occur during event delivery if it results // VMEXIT is not considered to occur during event delivery if it results
// in a double fault exception that causes VMEXIT directly // in a double fault exception that causes VMEXIT directly

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: vmx.cc,v 1.48 2010-03-27 09:27:40 sshwarts Exp $ // $Id: vmx.cc,v 1.49 2010-03-27 11:14:19 sshwarts Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2009-2010 Stanislav Shwartsman // Copyright (c) 2009-2010 Stanislav Shwartsman
@ -1856,7 +1856,7 @@ void BX_CPU_C::VMexit(bxInstruction_c *i, Bit32u reason, Bit64u qualification)
reason &= 0xffff; /* keep only basic VMEXIT reason */ reason &= 0xffff; /* keep only basic VMEXIT reason */
if (reason != VMX_VMEXIT_EXCEPTION_NMI) { if (reason != VMX_VMEXIT_EXCEPTION_NMI && reason != VMX_VMEXIT_EXTERNAL_INTERRUPT) {
VMwrite32(VMCS_32BIT_VMEXIT_INTERRUPTION_INFO, 0); VMwrite32(VMCS_32BIT_VMEXIT_INTERRUPTION_INFO, 0);
} }