HWACCMAll.cpp revision 614cbe11a7e5588dc8d369e223174b1441a09359
/* $Id$ */
/** @file
* HWACCM - All contexts.
*/
/*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_HWACCM
#include "HWACCMInternal.h"
#include <VBox/hwacc_vmx.h>
#include <VBox/hwacc_svm.h>
/**
* Queues a page for invalidation
*
* @returns VBox status code.
* @param pVCpu The VMCPU to operate on.
* @param GCVirt Page to invalidate
*/
{
/* Nothing to do if a TLB flush is already pending */
return;
#if 1
#else
else
#endif
}
/**
* Invalidates a guest page
*
* @returns VBox status code.
* @param pVCpu The VMCPU to operate on.
* @param GCVirt Page to invalidate
*/
{
#ifdef IN_RING0
#endif
return VINF_SUCCESS;
}
/**
* Flushes the guest TLB
*
* @returns VBox status code.
* @param pVCpu The VMCPU to operate on.
*/
{
LogFlow(("HWACCMFlushTLB\n"));
return VINF_SUCCESS;
}
#ifndef IN_RC
/**
* Invalidates a guest page on all VCPUs.
*
* @returns VBox status code.
* @param pVM The VM to operate on.
* @param GCVirt Page to invalidate
*/
{
{
{
}
else
{
{
#ifdef IN_RING0
if (idHostCpu != NIL_RTCPUID)
#else
#endif
}
else
}
}
return VINF_SUCCESS;
}
/**
* Dummy RTMpOnSpecific handler since RTMpPokeCpu couldn't be used.
*
*/
{
return;
}
/**
* Flush the TLBs of all VCPUs
*
* @returns VBox status code.
* @param pVM The VM to operate on.
*/
{
{
/* Nothing to do if a TLB flush is already pending; the VCPU should have already been poked if it were active */
continue;
continue;
{
#ifdef IN_RING0
if (idHostCpu != NIL_RTCPUID)
{
# ifdef RT_OS_WINDOWS
# else
/* Not implemented on some platforms (Darwin, Linux kernel < 2.6.19); fall back to a less efficient implementation (broadcast). */
if (rc == VERR_NOT_SUPPORTED)
# endif
}
#else
#endif
}
else
}
return VINF_SUCCESS;
}
#endif
/**
* Checks if nested paging is enabled
*
* @returns boolean
* @param pVM The VM to operate on.
*/
{
}
/**
*
* @returns shadow paging mode
* @param pVM The VM to operate on.
*/
{
return PGMMODE_NESTED;
return PGMMODE_EPT;
}
/**
* Invalidates a guest page by physical address
*
* NOTE: Assumes the current instruction references this physical page though a virtual address!!
*
* @returns VBox status code.
* @param pVM The VM to operate on.
* @param GCPhys Page to invalidate
*/
{
if (!HWACCMIsNestedPagingActive(pVM))
return VINF_SUCCESS;
#ifdef IN_RING0
{
{
{
continue;
}
{
#ifdef IN_RING0
if (idHostCpu != NIL_RTCPUID)
#else
#endif
}
else
}
return VINF_SUCCESS;
}
/* AMD-V doesn't support invalidation with guest physical addresses; see comment in SVMR0InvalidatePhysPage. */
#else
#endif
return VINF_SUCCESS;
}
/**
* Checks if an interrupt event is currently pending.
*
* @returns Interrupt event pending state.
* @param pVM The VM to operate on.
*/
{
}