HWSVMR0.h revision 5c0c16a890a7447da4713a5e3eac208cbff325fe
/* $Id$ */
/** @file
* HWACCM AMD-V - Internal header file.
*/
/*
* 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.
*/
#ifndef ___VMMR0_HWSVMR0_h
#define ___VMMR0_HWSVMR0_h
#include <VBox/hwacc_svm.h>
/** @defgroup grp_svm_int Internal
* @ingroup grp_svm
* @internal
* @{
*/
#ifdef IN_RING0
/**
* Enters the AMD-V session
*
* @returns VBox status code.
* @param pVM The VM to operate on.
* @param idVCpu VPCPU id.
* @param pCpu CPU info struct
*/
/**
* Leaves the AMD-V session
*
* @returns VBox status code.
* @param pVM The VM to operate on.
* @param idVCpu VPCPU id.
* @param pCtx CPU context
*/
/**
* Sets up and activates AMD-V on the current CPU
*
* @returns VBox status code.
* @param pCpu CPU info struct
* @param pVM The VM to operate on. (can be NULL after a resume)
* @param pvPageCpu Pointer to the global cpu page
* @param pPageCpuPhys Physical address of the global cpu page
*/
VMMR0DECL(int) SVMR0EnableCpu(PHWACCM_CPUINFO pCpu, PVM pVM, void *pvPageCpu, RTHCPHYS pPageCpuPhys);
/**
* Deactivates AMD-V on the current CPU
*
* @returns VBox status code.
* @param pCpu CPU info struct
* @param pvPageCpu Pointer to the global cpu page
* @param pPageCpuPhys Physical address of the global cpu page
*/
/**
* Does Ring-0 per VM AMD-V init.
*
* @returns VBox status code.
* @param pVM The VM to operate on.
*/
/**
* Does Ring-0 per VM AMD-V termination.
*
* @returns VBox status code.
* @param pVM The VM to operate on.
*/
/**
* Sets up AMD-V for the specified VM
*
* @returns VBox status code.
* @param pVM The VM to operate on.
*/
/**
* Runs guest code in an AMD-V VM.
*
* @returns VBox status code.
* @param pVM The VM to operate on.
* @param idVCpu VPCPU id.
* @param pCtx Guest context
*/
/**
* Save the host state
*
* @returns VBox status code.
* @param pVM The VM to operate on.
* @param idVCpu VPCPU id.
*/
/**
* Loads the guest state
*
* @returns VBox status code.
* @param pVM The VM to operate on.
* @param idVCpu VPCPU id.
* @param pCtx Guest context
*/
/** Convert hidden selector attribute word between VMX and SVM formats. */
{ \
}
{ \
}
#endif /* IN_RING0 */
/** @} */
#endif