/* $Id$ */
/** @file
* TRPM - The Trap Monitor - HC Ring 0
*/
/*
* Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "TRPMInternal.h"
#include <iprt/asm-amd64-x86.h>
/**
* Dispatches an interrupt that arrived while we were in the guest context.
*
* @param pVM Pointer to the VM.
* @remark Must be called with interrupts disabled.
*/
{
/*
* Get the active interrupt vector number.
*/
AssertMsgReturnVoid(uActiveVector < 256, ("uActiveVector=%#x is invalid! (More assertions to come, please enjoy!)\n", uActiveVector));
/*
* Do it the simple and safe way.
*
* This is a workaround for an optimization bug in the code below
* or a gcc 4.2 on mac (snow leopard seed 314).
*/
#else /* The complicated way: */
# ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
/*
* Check if we're in long mode or not.
*/
{
return;
}
# endif
/*
* Get the handler pointer (16:32 ptr) / (16:48 ptr).
*/
ASMGetIDTR(&Idtr);
# if HC_ARCH_BITS == 32
# else
# endif
("The IDT entry (%d) is not 32-bit int gate! type1=%#x type2=%#x\n",
# if HC_ARCH_BITS == 32
# else /* 64-bit: */
{
return;
}
# endif
/*
* Dispatch it.
*/
#endif
}