PGMGst.h revision c58f1213e628a545081c70e26c6b67a841cff880
/* $Id$ */
/** @file
* VBox - Page Manager / Monitor, Guest Paging Template.
*/
/*
* 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.
*/
/*******************************************************************************
* Internal Functions *
*******************************************************************************/
/* r3 */
/* all */
PGM_GST_DECL(int, ModifyPage)(PVMCPU pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
/**
* Initializes the guest bit of the paging mode data.
*
* @returns VBox status code.
* @param pVM Pointer to the VM.
* @param fResolveGCAndR0 Indicate whether or not GC and Ring-0 symbols can be resolved now.
* This is used early in the init process to avoid trouble with PDM
* not being initialized yet.
*/
{
/* Ring-3 */
if (fResolveGCAndR0)
{
int rc;
#if PGM_SHW_TYPE != PGM_TYPE_AMD64 /* No AMD64 for traditional virtualization, only VT-x and AMD-V. */
/* GC */
rc = PDMR3LdrGetSymbolRC(pVM, NULL, PGM_GST_NAME_RC_STR(ModifyPage), &pModeData->pfnRCGstModifyPage);
#endif /* Not AMD64 shadow paging. */
/* Ring-0 */
rc = PDMR3LdrGetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(ModifyPage), &pModeData->pfnR0GstModifyPage);
}
return VINF_SUCCESS;
}
/**
* Enters the guest mode.
*
* @returns VBox status code.
* @param pVCpu Pointer to the VMCPU.
* @param GCPhysCR3 The physical address from the CR3 register.
*/
{
/*
* Map and monitor CR3
*/
return rc;
}
/**
* Relocate any GC pointers related to guest mode paging.
*
* @returns VBox status code.
* @param pVCpu Pointer to the VMCPU.
* @param offDelta The relocation offset.
*/
{
{
}
return VINF_SUCCESS;
}
/**
* Exits the guest mode.
*
* @returns VBox status code.
* @param pVCpu Pointer to the VMCPU.
*/
{
int rc;
return rc;
}